From 6051462ad3f161ab129b5a2fb3a9cacd35201a3b Mon Sep 17 00:00:00 2001 From: Chris Dyer Date: Mon, 7 Apr 2014 01:30:17 -0400 Subject: new version of cythonized code --- python/cdec/_cdec.cpp | 17209 ++++++++++++++++++++++++++-------------------- python/cdec/grammar.pxd | 1 + python/cdec/grammar.pxi | 18 +- python/cdec/sa/_sa.cpp | 7324 ++++++++++---------- 4 files changed, 13284 insertions(+), 11268 deletions(-) (limited to 'python/cdec') diff --git a/python/cdec/_cdec.cpp b/python/cdec/_cdec.cpp index ef203fd9..3ffa2dd5 100644 --- a/python/cdec/_cdec.cpp +++ b/python/cdec/_cdec.cpp @@ -1,4 +1,4 @@ -/* Generated by Cython 0.19.1 on Fri Nov 15 21:03:05 2013 */ +/* Generated by Cython 0.20.1 on Mon Apr 7 01:23:34 2014 */ #define PY_SSIZE_T_CLEAN #ifndef CYTHON_USE_PYLONG_INTERNALS @@ -19,6 +19,7 @@ #elif PY_VERSION_HEX < 0x02040000 #error Cython requires Python 2.4+. #else +#define CYTHON_ABI "0_20_1" #include /* For offsetof */ #ifndef offsetof #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) @@ -53,6 +54,9 @@ #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 1 #endif +#if CYTHON_COMPILING_IN_PYPY +#define Py_OptimizeFlag 0 +#endif #if PY_VERSION_HEX < 0x02050000 typedef int Py_ssize_t; #define PY_SSIZE_T_MAX INT_MAX @@ -60,7 +64,7 @@ #define PY_FORMAT_SIZE_T "" #define CYTHON_FORMAT_SSIZE_T "" #define PyInt_FromSsize_t(z) PyInt_FromLong(z) - #define PyInt_AsSsize_t(o) __Pyx_PyInt_AsInt(o) + #define PyInt_AsSsize_t(o) __Pyx_PyInt_As_int(o) #define PyNumber_Index(o) ((PyNumber_Check(o) && !PyFloat_Check(o)) ? PyNumber_Int(o) : \ (PyErr_Format(PyExc_TypeError, \ "expected index value, got %.200s", Py_TYPE(o)->tp_name), \ @@ -112,13 +116,15 @@ #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, 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 -#if PY_MAJOR_VERSION < 3 && PY_MINOR_VERSION < 6 +#if PY_VERSION_HEX < 0x02060000 #define PyUnicode_FromString(s) PyUnicode_Decode(s, strlen(s), "UTF-8", "strict") #endif #if PY_MAJOR_VERSION >= 3 @@ -131,19 +137,44 @@ #if PY_VERSION_HEX < 0x02060000 #define Py_TPFLAGS_HAVE_VERSION_TAG 0 #endif +#if PY_VERSION_HEX < 0x02060000 && !defined(Py_TPFLAGS_IS_ABSTRACT) + #define Py_TPFLAGS_IS_ABSTRACT 0 +#endif +#if PY_VERSION_HEX < 0x030400a1 && !defined(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_READ(k, d, i) ((k=k), (Py_UCS4)(((Py_UNICODE*)d)[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 +#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 @@ -176,7 +207,7 @@ #else #define __Pyx_PyBaseString_Check(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj) || \ PyString_Check(obj) || PyUnicode_Check(obj)) - #define __Pyx_PyBaseString_CheckExact(obj) (Py_TYPE(obj) == &PyBaseString_Type) + #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj)) #endif #if PY_VERSION_HEX < 0x02060000 #define PySet_Check(obj) PyObject_TypeCheck(obj, &PySet_Type) @@ -201,11 +232,12 @@ #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_VERSION_HEX < 0x03020000 +#if PY_VERSION_HEX < 0x030200A4 typedef long Py_hash_t; #define __Pyx_PyInt_FromHash_t PyInt_FromLong #define __Pyx_PyInt_AsHash_t PyInt_AsLong @@ -264,7 +296,7 @@ #ifndef CYTHON_RESTRICT #if defined(__GNUC__) #define CYTHON_RESTRICT __restrict__ - #elif defined(_MSC_VER) + #elif defined(_MSC_VER) && _MSC_VER >= 1400 #define CYTHON_RESTRICT __restrict #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_RESTRICT restrict @@ -376,8 +408,20 @@ typedef struct {PyObject **p; char *s; const Py_ssize_t n; const char* encoding; #define __PYX_DEFAULT_STRING_ENCODING "" #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize +#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))) ) 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(char*); @@ -388,9 +432,11 @@ static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char*); #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_FromUString(s) __Pyx_PyObject_FromString((char*)s) #define __Pyx_PyBytes_FromUString(s) __Pyx_PyBytes_FromString((char*)s) +#define __Pyx_PyByteArray_FromUString(s) __Pyx_PyByteArray_FromString((char*)s) #define __Pyx_PyStr_FromUString(s) __Pyx_PyStr_FromString((char*)s) #define __Pyx_PyUnicode_FromUString(s) __Pyx_PyUnicode_FromString((char*)s) #if PY_MAJOR_VERSION < 3 @@ -412,7 +458,6 @@ 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); -static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*); #if CYTHON_COMPILING_IN_CPYTHON #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) #else @@ -421,7 +466,7 @@ static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*); #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() { +static int __Pyx_init_sys_getdefaultencoding_params(void) { PyObject* sys = NULL; PyObject* default_encoding = NULL; PyObject* ascii_chars_u = NULL; @@ -446,7 +491,7 @@ static int __Pyx_init_sys_getdefaultencoding_params() { if (ascii_chars_b == NULL || strncmp(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 '%s' is not a superset of ascii.", + "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.", default_encoding_c); goto bad; } @@ -470,7 +515,7 @@ bad: #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() { +static int __Pyx_init_sys_getdefaultencoding_params(void) { PyObject* sys = NULL; PyObject* default_encoding = NULL; char* default_encoding_c; @@ -525,60 +570,61 @@ static const char *__pyx_f[] = { "hypergraph.pxi", "lattice.pxi", "mteval.pxi", + "stringsource", "_sa.pxd", }; /*--- Type declarations ---*/ +struct __pyx_obj_4cdec_2sa_3_sa_FloatList; +struct __pyx_obj_4cdec_2sa_3_sa_IntList; struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector; -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__; +struct __pyx_obj_4cdec_2sa_3_sa_Phrase; +struct __pyx_obj_4cdec_2sa_3_sa_Rule; struct __pyx_obj_4cdec_5_cdec_DenseVector; -struct __pyx_obj_4cdec_5_cdec_SufficientStats; -struct __pyx_obj_4cdec_5_cdec_TRule; -struct __pyx_obj_4cdec_5_cdec_MRule; -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__; -struct __pyx_obj_4cdec_5_cdec_Metric; -struct __pyx_obj_4cdec_2sa_3_sa_IntList; struct __pyx_obj_4cdec_5_cdec_SparseVector; -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__; struct __pyx_obj_4cdec_5_cdec_NT; -struct __pyx_obj_4cdec_5_cdec_Lattice; -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config; -struct __pyx_obj_4cdec_5_cdec_HypergraphEdge; -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase; -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__; -struct __pyx_obj_4cdec_2sa_3_sa_Rule; -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines; -struct __pyx_obj_4cdec_5_cdec_Scorer; -struct __pyx_obj_4cdec_5_cdec_HypergraphNode; -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features; struct __pyx_obj_4cdec_5_cdec_NTRef; +struct __pyx_obj_4cdec_5_cdec_TRule; +struct __pyx_obj_4cdec_5_cdec_MRule; struct __pyx_obj_4cdec_5_cdec_Grammar; +struct __pyx_obj_4cdec_5_cdec_TextGrammar; struct __pyx_obj_4cdec_5_cdec_Hypergraph; -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__; +struct __pyx_obj_4cdec_5_cdec_HypergraphEdge; +struct __pyx_obj_4cdec_5_cdec_HypergraphNode; +struct __pyx_obj_4cdec_5_cdec_Lattice; +struct __pyx_obj_4cdec_5_cdec_Candidate; +struct __pyx_obj_4cdec_5_cdec_SufficientStats; struct __pyx_obj_4cdec_5_cdec_CandidateSet; -struct __pyx_obj_4cdec_2sa_3_sa_FloatList; -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees; -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot; -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__; struct __pyx_obj_4cdec_5_cdec_SegmentEvaluator; -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__; -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr; +struct __pyx_obj_4cdec_5_cdec_Scorer; +struct __pyx_obj_4cdec_5_cdec_Metric; +struct __pyx_obj_4cdec_5_cdec_Decoder; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase; struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr; -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__; struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__; struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__; -struct __pyx_obj_4cdec_2sa_3_sa_Phrase; -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__; -struct __pyx_obj_4cdec_5_cdec_TextGrammar; -struct __pyx_obj_4cdec_5_cdec_Decoder; -struct __pyx_obj_4cdec_5_cdec_Candidate; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__; struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__; struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__; -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__; -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr; -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees; -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__; -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr; struct __pyx_opt_args_4cdec_5_cdec_as_str; /* "cdec/_cdec.pyx":6 @@ -593,6 +639,40 @@ struct __pyx_opt_args_4cdec_5_cdec_as_str { char *error_msg; }; +/* "cdec/sa/_sa.pxd":3 + * from libc.stdio cimport FILE + * + * cdef class FloatList: # <<<<<<<<<<<<<< + * cdef int size + * cdef int increment + */ +struct __pyx_obj_4cdec_2sa_3_sa_FloatList { + PyObject_HEAD + struct __pyx_vtabstruct_4cdec_2sa_3_sa_FloatList *__pyx_vtab; + int size; + int increment; + int len; + float *arr; +}; + + +/* "cdec/sa/_sa.pxd":12 + * cdef void read_handle(self, FILE* f) + * + * cdef class IntList: # <<<<<<<<<<<<<< + * cdef int size + * cdef int increment + */ +struct __pyx_obj_4cdec_2sa_3_sa_IntList { + PyObject_HEAD + struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *__pyx_vtab; + int size; + int increment; + int len; + int *arr; +}; + + /* "cdec/sa/_sa.pxd":25 * cdef void read_handle(self, FILE* f) * @@ -607,23 +687,42 @@ struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector { }; -/* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":90 - * return candidate +/* "cdec/sa/_sa.pxd":29 + * cdef FloatList values * - * def __iter__(self): # <<<<<<<<<<<<<< - * cdef unsigned i - * for i in range(len(self)): + * cdef class Phrase: # <<<<<<<<<<<<<< + * cdef int *syms + * cdef int n, *varpos, n_vars */ -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__ { +struct __pyx_obj_4cdec_2sa_3_sa_Phrase { PyObject_HEAD - unsigned int __pyx_v_i; - struct __pyx_obj_4cdec_5_cdec_CandidateSet *__pyx_v_self; - Py_ssize_t __pyx_t_0; - unsigned int __pyx_t_1; + struct __pyx_vtabstruct_4cdec_2sa_3_sa_Phrase *__pyx_vtab; + int *syms; + int n; + int *varpos; + int n_vars; +}; + + +/* "cdec/sa/_sa.pxd":35 + * cdef public int chunklen(self, int k) + * + * cdef class Rule: # <<<<<<<<<<<<<< + * cdef int lhs + * cdef readonly Phrase f, e + */ +struct __pyx_obj_4cdec_2sa_3_sa_Rule { + PyObject_HEAD + int lhs; + struct __pyx_obj_4cdec_2sa_3_sa_Phrase *f; + struct __pyx_obj_4cdec_2sa_3_sa_Phrase *e; + struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector *scores; + int n_scores; + PyObject *word_alignments; }; -/* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":3 +/* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":3 * from cython.operator cimport preincrement as pinc * * cdef class DenseVector: # <<<<<<<<<<<<<< @@ -637,21 +736,47 @@ struct __pyx_obj_4cdec_5_cdec_DenseVector { }; -/* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":26 - * return fmap +/* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":48 + * return sparse + * + * cdef class SparseVector: # <<<<<<<<<<<<<< + * cdef FastSparseVector[weight_t]* vector * - * cdef class SufficientStats: # <<<<<<<<<<<<<< - * cdef mteval.SufficientStats* stats - * cdef mteval.EvaluationMetric* metric */ -struct __pyx_obj_4cdec_5_cdec_SufficientStats { +struct __pyx_obj_4cdec_5_cdec_SparseVector { PyObject_HEAD - SufficientStats *stats; - EvaluationMetric *metric; + FastSparseVector *vector; +}; + + +/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":8 + * return ' '.join(w.encode('utf8') if isinstance(w, unicode) else str(w) for w in phrase) + * + * cdef class NT: # <<<<<<<<<<<<<< + * cdef public bytes cat + * cdef public unsigned ref + */ +struct __pyx_obj_4cdec_5_cdec_NT { + PyObject_HEAD + PyObject *cat; + unsigned int ref; +}; + + +/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":21 + * return '[%s]' % self.cat + * + * cdef class NTRef: # <<<<<<<<<<<<<< + * cdef public unsigned ref + * def __init__(self, unsigned ref): + */ +struct __pyx_obj_4cdec_5_cdec_NTRef { + PyObject_HEAD + unsigned int ref; }; -/* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":49 +/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":49 * return TRule(lhs, f, e, scores, a) * * cdef class TRule: # <<<<<<<<<<<<<< @@ -664,7 +789,7 @@ struct __pyx_obj_4cdec_5_cdec_TRule { }; -/* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":177 +/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":183 * _phrase(self.f), _phrase(self.e), scores) * * cdef class MRule(TRule): # <<<<<<<<<<<<<< @@ -676,97 +801,78 @@ struct __pyx_obj_4cdec_5_cdec_MRule { }; -/* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":44 - * return self.stats.size() +/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":199 + * super(MRule, self).__init__(lhs, rhs, e, scores, None) + * + * cdef class Grammar: # <<<<<<<<<<<<<< + * cdef shared_ptr[grammar.Grammar]* grammar * - * def __iter__(self): # <<<<<<<<<<<<<< - * for i in range(len(self)): - * yield self[i] */ -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__ { +struct __pyx_obj_4cdec_5_cdec_Grammar { PyObject_HEAD - PyObject *__pyx_v_i; - struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_v_self; - Py_ssize_t __pyx_t_0; - PyObject *__pyx_t_1; - PyObject *(*__pyx_t_2)(PyObject *); + boost::shared_ptr *grammar; }; -/* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":176 - * out.fields[i] = ss[i] +/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":223 + * self.grammar.get().SetGrammarName(name) * - * cdef class Metric: # <<<<<<<<<<<<<< - * cdef Scorer scorer - * def __cinit__(self): + * cdef class TextGrammar(Grammar): # <<<<<<<<<<<<<< + * def __init__(self, rules): + * """TextGrammar(rules) -> SCFG Grammar containing the rules.""" */ -struct __pyx_obj_4cdec_5_cdec_Metric { - PyObject_HEAD - struct __pyx_obj_4cdec_5_cdec_Scorer *scorer; +struct __pyx_obj_4cdec_5_cdec_TextGrammar { + struct __pyx_obj_4cdec_5_cdec_Grammar __pyx_base; }; -/* "cdec/sa/_sa.pxd":12 - * cdef void read_handle(self, FILE* f) +/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":4 + * cimport kbest * - * cdef class IntList: # <<<<<<<<<<<<<< - * cdef int size - * cdef int increment + * cdef class Hypergraph: # <<<<<<<<<<<<<< + * cdef hypergraph.Hypergraph* hg + * cdef MT19937* rng */ -struct __pyx_obj_4cdec_2sa_3_sa_IntList { +struct __pyx_obj_4cdec_5_cdec_Hypergraph { PyObject_HEAD - struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *__pyx_vtab; - int size; - int increment; - int len; - int *arr; + struct __pyx_vtabstruct_4cdec_5_cdec_Hypergraph *__pyx_vtab; + Hypergraph *hg; + MT19937 *rng; }; -/* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":48 - * return sparse - * - * cdef class SparseVector: # <<<<<<<<<<<<<< - * cdef FastSparseVector[weight_t]* vector +/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":196 + * return vector * + * cdef class HypergraphEdge: # <<<<<<<<<<<<<< + * cdef hypergraph.Hypergraph* hg + * cdef hypergraph.HypergraphEdge* edge */ -struct __pyx_obj_4cdec_5_cdec_SparseVector { +struct __pyx_obj_4cdec_5_cdec_HypergraphEdge { PyObject_HEAD - FastSparseVector *vector; -}; - - -/* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":216 - * - * property tail_nodes: - * def __get__(self): # <<<<<<<<<<<<<< - * cdef unsigned i - * for i in range(self.edge.tail_nodes_.size()): - */ -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__ { - PyObject_HEAD - unsigned int __pyx_v_i; - struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *__pyx_v_self; - unsigned int __pyx_t_0; - unsigned int __pyx_t_1; + struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphEdge *__pyx_vtab; + Hypergraph *hg; + Hypergraph::Edge *edge; + struct __pyx_obj_4cdec_5_cdec_TRule *trule; }; -/* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":8 - * return ' '.join(w.encode('utf8') if isinstance(w, unicode) else str(w) for w in phrase) +/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":246 + * raise NotImplemented('comparison not implemented for HypergraphEdge') * - * cdef class NT: # <<<<<<<<<<<<<< - * cdef public bytes cat - * cdef public unsigned ref + * cdef class HypergraphNode: # <<<<<<<<<<<<<< + * cdef hypergraph.Hypergraph* hg + * cdef hypergraph.HypergraphNode* node */ -struct __pyx_obj_4cdec_5_cdec_NT { +struct __pyx_obj_4cdec_5_cdec_HypergraphNode { PyObject_HEAD - PyObject *cat; - unsigned int ref; + struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphNode *__pyx_vtab; + Hypergraph *hg; + Hypergraph::Node *node; }; -/* "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi":3 +/* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":3 * cimport lattice * * cdef class Lattice: # <<<<<<<<<<<<<< @@ -779,116 +885,64 @@ struct __pyx_obj_4cdec_5_cdec_Lattice { }; -/* "cdec/_cdec.pyx":32 - * SetSilent(yn) - * - * def _make_config(config): # <<<<<<<<<<<<<< - * for key, value in config.items(): - * if isinstance(value, dict): - */ -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config { - PyObject_HEAD - PyObject *__pyx_v_config; - PyObject *__pyx_v_info; - PyObject *__pyx_v_key; - PyObject *__pyx_v_name; - PyObject *__pyx_v_value; - PyObject *__pyx_t_0; - PyObject *__pyx_t_1; - Py_ssize_t __pyx_t_2; - PyObject *(*__pyx_t_3)(PyObject *); - Py_ssize_t __pyx_t_4; - PyObject *(*__pyx_t_5)(PyObject *); -}; - - -/* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":196 - * return vector +/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":12 + * return stats * - * cdef class HypergraphEdge: # <<<<<<<<<<<<<< - * cdef hypergraph.Hypergraph* hg - * cdef hypergraph.HypergraphEdge* edge + * cdef class Candidate: # <<<<<<<<<<<<<< + * cdef mteval.const_Candidate* candidate + * cdef public float score */ -struct __pyx_obj_4cdec_5_cdec_HypergraphEdge { +struct __pyx_obj_4cdec_5_cdec_Candidate { PyObject_HEAD - struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphEdge *__pyx_vtab; - Hypergraph *hg; - Hypergraph::Edge *edge; - struct __pyx_obj_4cdec_5_cdec_TRule *trule; + const training::Candidate *candidate; + float score; }; -/* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":5 - * import cdec.sa._sa as _sa - * - * def _phrase(phrase): # <<<<<<<<<<<<<< - * return ' '.join(w.encode('utf8') if isinstance(w, unicode) else str(w) for w in phrase) +/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":26 + * return fmap * + * cdef class SufficientStats: # <<<<<<<<<<<<<< + * cdef mteval.SufficientStats* stats + * cdef mteval.EvaluationMetric* metric */ -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase { +struct __pyx_obj_4cdec_5_cdec_SufficientStats { PyObject_HEAD - PyObject *__pyx_v_phrase; + SufficientStats *stats; + EvaluationMetric *metric; }; -/* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":161 +/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":65 + * return result * - * property edges: - * def __get__(self): # <<<<<<<<<<<<<< - * cdef unsigned i - * for i in range(self.hg.edges_.size()): + * cdef class CandidateSet: # <<<<<<<<<<<<<< + * cdef shared_ptr[mteval.SegmentEvaluator]* scorer + * cdef mteval.EvaluationMetric* metric */ -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__ { +struct __pyx_obj_4cdec_5_cdec_CandidateSet { PyObject_HEAD - unsigned int __pyx_v_i; - struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self; - size_t __pyx_t_0; - unsigned int __pyx_t_1; + boost::shared_ptr *scorer; + EvaluationMetric *metric; + training::CandidateSet *cs; }; -/* "cdec/sa/_sa.pxd":35 - * cdef public int chunklen(self, int k) +/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":100 + * self.cs.AddKBestCandidates(hypergraph.hg[0], k, self.scorer.get()) * - * cdef class Rule: # <<<<<<<<<<<<<< - * cdef int lhs - * cdef readonly Phrase f, e - */ -struct __pyx_obj_4cdec_2sa_3_sa_Rule { - PyObject_HEAD - int lhs; - struct __pyx_obj_4cdec_2sa_3_sa_Phrase *f; - struct __pyx_obj_4cdec_2sa_3_sa_Phrase *e; - struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector *scores; - int n_scores; - PyObject *word_alignments; -}; - - -/* "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi":63 - * def todot(self): - * """lattice.todot() -> Representation of the lattice in GraphViz dot format.""" - * def lines(): # <<<<<<<<<<<<<< - * yield 'digraph lattice {' - * yield 'rankdir = LR;' + * cdef class SegmentEvaluator: # <<<<<<<<<<<<<< + * cdef shared_ptr[mteval.SegmentEvaluator]* scorer + * cdef mteval.EvaluationMetric* metric */ -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines { +struct __pyx_obj_4cdec_5_cdec_SegmentEvaluator { PyObject_HEAD - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot *__pyx_outer_scope; - PyObject *__pyx_v_delta; - PyObject *__pyx_v_i; - PyObject *__pyx_v_label; - PyObject *__pyx_v_weight; - Py_ssize_t __pyx_t_0; - PyObject *__pyx_t_1; - PyObject *(*__pyx_t_2)(PyObject *); - PyObject *__pyx_t_3; - Py_ssize_t __pyx_t_4; - PyObject *(*__pyx_t_5)(PyObject *); + boost::shared_ptr *scorer; + EvaluationMetric *metric; }; -/* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":121 +/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":121 * return CandidateSet(self) * * cdef class Scorer: # <<<<<<<<<<<<<< @@ -902,164 +956,114 @@ struct __pyx_obj_4cdec_5_cdec_Scorer { }; -/* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":246 - * raise NotImplemented('comparison not implemented for HypergraphEdge') +/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":176 + * out.fields[i] = ss[i] * - * cdef class HypergraphNode: # <<<<<<<<<<<<<< - * cdef hypergraph.Hypergraph* hg - * cdef hypergraph.HypergraphNode* node + * cdef class Metric: # <<<<<<<<<<<<<< + * cdef Scorer scorer + * def __cinit__(self): */ -struct __pyx_obj_4cdec_5_cdec_HypergraphNode { +struct __pyx_obj_4cdec_5_cdec_Metric { PyObject_HEAD - struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphNode *__pyx_vtab; - Hypergraph *hg; - Hypergraph::Node *node; + struct __pyx_obj_4cdec_5_cdec_Scorer *scorer; }; -/* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":81 - * del e_derivations +/* "cdec/_cdec.pyx":43 + * yield key, str(value) * - * def kbest_features(self, size): # <<<<<<<<<<<<<< - * """hg.kbest_trees(size) -> List of k-best feature vectors in the hypergraph.""" - * cdef kbest.KBestDerivations[FastSparseVector[weight_t], kbest.FeatureVectorTraversal]* derivations = new kbest.KBestDerivations[FastSparseVector[weight_t], kbest.FeatureVectorTraversal](self.hg[0], size) + * cdef class Decoder: # <<<<<<<<<<<<<< + * cdef decoder.Decoder* dec + * cdef DenseVector weights */ -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features { +struct __pyx_obj_4cdec_5_cdec_Decoder { PyObject_HEAD - KBest::KBestDerivations,FeatureVectorTraversal>::Derivation *__pyx_v_derivation; - KBest::KBestDerivations,FeatureVectorTraversal> *__pyx_v_derivations; - struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_fmap; - unsigned int __pyx_v_k; - struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self; - PyObject *__pyx_v_size; - unsigned int __pyx_t_0; - long __pyx_t_1; + Decoder *dec; + struct __pyx_obj_4cdec_5_cdec_DenseVector *weights; }; -/* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":21 - * return '[%s]' % self.cat +/* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":32 + * self.vector[0][fid] = value * - * cdef class NTRef: # <<<<<<<<<<<<<< - * cdef public unsigned ref - * def __init__(self, unsigned ref): + * def __iter__(self): # <<<<<<<<<<<<<< + * cdef unsigned fid + * for fid in range(1, self.vector.size()): */ -struct __pyx_obj_4cdec_5_cdec_NTRef { +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__ { PyObject_HEAD - unsigned int ref; + unsigned int __pyx_v_fid; + struct __pyx_obj_4cdec_5_cdec_DenseVector *__pyx_v_self; + size_t __pyx_t_0; + unsigned int __pyx_t_1; }; -/* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":193 - * super(MRule, self).__init__(lhs, rhs, e, scores, None) - * - * cdef class Grammar: # <<<<<<<<<<<<<< - * cdef shared_ptr[grammar.Grammar]* grammar +/* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":72 + * self.vector.set_value(fid, value) * + * def __iter__(self): # <<<<<<<<<<<<<< + * cdef FastSparseVector[weight_t].const_iterator* it = new FastSparseVector[weight_t].const_iterator(self.vector[0], False) + * cdef unsigned i */ -struct __pyx_obj_4cdec_5_cdec_Grammar { +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__ { PyObject_HEAD - boost::shared_ptr *grammar; + unsigned int __pyx_v_i; + FastSparseVector::const_iterator *__pyx_v_it; + struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self; + size_t __pyx_t_0; + unsigned int __pyx_t_1; }; -/* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":4 - * cimport kbest +/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":5 + * import cdec.sa._sa as _sa + * + * def _phrase(phrase): # <<<<<<<<<<<<<< + * return ' '.join(w.encode('utf8') if isinstance(w, unicode) else str(w) for w in phrase) * - * cdef class Hypergraph: # <<<<<<<<<<<<<< - * cdef hypergraph.Hypergraph* hg - * cdef MT19937* rng */ -struct __pyx_obj_4cdec_5_cdec_Hypergraph { +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase { PyObject_HEAD - struct __pyx_vtabstruct_4cdec_5_cdec_Hypergraph *__pyx_vtab; - Hypergraph *hg; - MT19937 *rng; + PyObject *__pyx_v_phrase; }; -/* "cdec/_cdec.pyx":47 - * cdef DenseVector weights +/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":6 * - * def __init__(self, config_str=None, **config): # <<<<<<<<<<<<<< - * """Decoder('formalism = scfg') -> initialize from configuration string - * Decoder(formalism='scfg') -> initialize from named parameters + * def _phrase(phrase): + * return ' '.join(w.encode('utf8') if isinstance(w, unicode) else str(w) for w in phrase) # <<<<<<<<<<<<<< + * + * cdef class NT: */ -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__ { +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr { PyObject_HEAD - PyObject *__pyx_v_config; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase *__pyx_outer_scope; + PyObject *__pyx_v_w; + PyObject *__pyx_t_0; + Py_ssize_t __pyx_t_1; + PyObject *(*__pyx_t_2)(PyObject *); }; -/* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":65 - * return result +/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":137 * - * cdef class CandidateSet: # <<<<<<<<<<<<<< - * cdef shared_ptr[mteval.SegmentEvaluator]* scorer - * cdef mteval.EvaluationMetric* metric + * property a: + * def __get__(self): # <<<<<<<<<<<<<< + * cdef unsigned i + * cdef vector[grammar.AlignmentPoint]* a = &self.rule.get().a_ */ -struct __pyx_obj_4cdec_5_cdec_CandidateSet { +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__ { PyObject_HEAD - boost::shared_ptr *scorer; - EvaluationMetric *metric; - training::CandidateSet *cs; + std::vector *__pyx_v_a; + unsigned int __pyx_v_i; + struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self; + size_t __pyx_t_0; + unsigned int __pyx_t_1; }; -/* "cdec/sa/_sa.pxd":3 - * from libc.stdio cimport FILE - * - * cdef class FloatList: # <<<<<<<<<<<<<< - * cdef int size - * cdef int increment - */ -struct __pyx_obj_4cdec_2sa_3_sa_FloatList { - PyObject_HEAD - struct __pyx_vtabstruct_4cdec_2sa_3_sa_FloatList *__pyx_vtab; - int size; - int increment; - int len; - float *arr; -}; - - -/* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":62 - * del derivations - * - * def kbest_trees(self, size): # <<<<<<<<<<<<<< - * """hg.kbest_trees(size) -> List of k-best trees in the hypergraph.""" - * cdef kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal]* f_derivations = new kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal](self.hg[0], size) - */ -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees { - PyObject_HEAD - KBest::KBestDerivations,ETreeTraversal>::Derivation *__pyx_v_e_derivation; - KBest::KBestDerivations,ETreeTraversal> *__pyx_v_e_derivations; - PyObject *__pyx_v_e_tree; - KBest::KBestDerivations,FTreeTraversal>::Derivation *__pyx_v_f_derivation; - KBest::KBestDerivations,FTreeTraversal> *__pyx_v_f_derivations; - PyObject *__pyx_v_f_tree; - unsigned int __pyx_v_k; - struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self; - PyObject *__pyx_v_size; - unsigned int __pyx_t_0; - long __pyx_t_1; -}; - - -/* "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi":61 - * yield self[i] - * - * def todot(self): # <<<<<<<<<<<<<< - * """lattice.todot() -> Representation of the lattice in GraphViz dot format.""" - * def lines(): - */ -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot { - PyObject_HEAD - struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self; -}; - - -/* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":172 +/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":178 * self.rule.get().lhs_ = -TDConvert(( lhs).cat) * * def __str__(self): # <<<<<<<<<<<<<< @@ -1072,71 +1076,105 @@ struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__ { }; -/* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":100 - * self.cs.AddKBestCandidates(hypergraph.hg[0], k, self.scorer.get()) +/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":179 * - * cdef class SegmentEvaluator: # <<<<<<<<<<<<<< - * cdef shared_ptr[mteval.SegmentEvaluator]* scorer - * cdef mteval.EvaluationMetric* metric + * def __str__(self): + * scores = ' '.join('%s=%s' % feat for feat in self.scores) # <<<<<<<<<<<<<< + * return '%s ||| %s ||| %s ||| %s' % (self.lhs, + * _phrase(self.f), _phrase(self.e), scores) */ -struct __pyx_obj_4cdec_5_cdec_SegmentEvaluator { +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr { PyObject_HEAD - boost::shared_ptr *scorer; - EvaluationMetric *metric; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__ *__pyx_outer_scope; + PyObject *__pyx_v_feat; + PyObject *__pyx_t_0; + Py_ssize_t __pyx_t_1; + PyObject *(*__pyx_t_2)(PyObject *); }; -/* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":260 +/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":205 + * del self.grammar * - * property in_edges: - * def __get__(self): # <<<<<<<<<<<<<< - * cdef unsigned i - * for i in range(self.node.in_edges_.size()): + * def __iter__(self): # <<<<<<<<<<<<<< + * cdef grammar.const_GrammarIter* root = self.grammar.get().GetRoot() + * cdef grammar.const_RuleBin* rbin = root.GetRules() */ -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__ { +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__ { PyObject_HEAD unsigned int __pyx_v_i; - struct __pyx_obj_4cdec_5_cdec_HypergraphNode *__pyx_v_self; - size_t __pyx_t_0; + const RuleBin *__pyx_v_rbin; + const GrammarIter *__pyx_v_root; + struct __pyx_obj_4cdec_5_cdec_Grammar *__pyx_v_self; + struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_trule; + int __pyx_t_0; unsigned int __pyx_t_1; }; -/* "cdec/_cdec.pyx":56 - * 'csplit', 'tagger', 'lexalign'): - * raise InvalidConfig('formalism "%s" unknown' % formalism) - * config_str = '\n'.join('%s = %s' % kv for kv in _make_config(config)) # <<<<<<<<<<<<<< - * cdef istringstream* config_stream = new istringstream(config_str) - * self.dec = new decoder.Decoder(config_stream) +/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":49 + * return unicode(hypergraph.JoshuaVisualizationString(self.hg[0]).c_str(), 'utf8') + * + * def kbest(self, size): # <<<<<<<<<<<<<< + * """hg.kbest(size) -> List of k-best hypotheses in the hypergraph.""" + * cdef kbest.KBestDerivations[vector[WordID], kbest.ESentenceTraversal]* derivations = new kbest.KBestDerivations[vector[WordID], kbest.ESentenceTraversal](self.hg[0], size) */ -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr { +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest { PyObject_HEAD - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__ *__pyx_outer_scope; - PyObject *__pyx_v_kv; - PyObject *__pyx_t_0; - Py_ssize_t __pyx_t_1; - PyObject *(*__pyx_t_2)(PyObject *); + KBest::KBestDerivations,ESentenceTraversal>::Derivation *__pyx_v_derivation; + KBest::KBestDerivations,ESentenceTraversal> *__pyx_v_derivations; + unsigned int __pyx_v_k; + struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self; + PyObject *__pyx_v_size; + unsigned int __pyx_t_0; + long __pyx_t_1; }; -/* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":6 +/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":62 + * del derivations * - * def _phrase(phrase): - * return ' '.join(w.encode('utf8') if isinstance(w, unicode) else str(w) for w in phrase) # <<<<<<<<<<<<<< + * def kbest_trees(self, size): # <<<<<<<<<<<<<< + * """hg.kbest_trees(size) -> List of k-best trees in the hypergraph.""" + * cdef kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal]* f_derivations = new kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal](self.hg[0], size) + */ +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees { + PyObject_HEAD + KBest::KBestDerivations,ETreeTraversal>::Derivation *__pyx_v_e_derivation; + KBest::KBestDerivations,ETreeTraversal> *__pyx_v_e_derivations; + PyObject *__pyx_v_e_tree; + KBest::KBestDerivations,FTreeTraversal>::Derivation *__pyx_v_f_derivation; + KBest::KBestDerivations,FTreeTraversal> *__pyx_v_f_derivations; + PyObject *__pyx_v_f_tree; + unsigned int __pyx_v_k; + struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self; + PyObject *__pyx_v_size; + unsigned int __pyx_t_0; + long __pyx_t_1; +}; + + +/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":81 + * del e_derivations * - * cdef class NT: + * def kbest_features(self, size): # <<<<<<<<<<<<<< + * """hg.kbest_trees(size) -> List of k-best feature vectors in the hypergraph.""" + * cdef kbest.KBestDerivations[FastSparseVector[weight_t], kbest.FeatureVectorTraversal]* derivations = new kbest.KBestDerivations[FastSparseVector[weight_t], kbest.FeatureVectorTraversal](self.hg[0], size) */ -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr { +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features { PyObject_HEAD - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase *__pyx_outer_scope; - PyObject *__pyx_v_w; - PyObject *__pyx_t_0; - Py_ssize_t __pyx_t_1; - PyObject *(*__pyx_t_2)(PyObject *); + KBest::KBestDerivations,FeatureVectorTraversal>::Derivation *__pyx_v_derivation; + KBest::KBestDerivations,FeatureVectorTraversal> *__pyx_v_derivations; + struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_fmap; + unsigned int __pyx_v_k; + struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self; + PyObject *__pyx_v_size; + unsigned int __pyx_t_0; + long __pyx_t_1; }; -/* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":97 +/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":97 * del derivations * * def sample(self, unsigned n): # <<<<<<<<<<<<<< @@ -1154,33 +1192,32 @@ struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample { }; -/* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":49 - * return unicode(hypergraph.JoshuaVisualizationString(self.hg[0]).c_str(), 'utf8') +/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":108 + * del hypos * - * def kbest(self, size): # <<<<<<<<<<<<<< - * """hg.kbest(size) -> List of k-best hypotheses in the hypergraph.""" - * cdef kbest.KBestDerivations[vector[WordID], kbest.ESentenceTraversal]* derivations = new kbest.KBestDerivations[vector[WordID], kbest.ESentenceTraversal](self.hg[0], size) + * def sample_trees(self, unsigned n): # <<<<<<<<<<<<<< + * """hg.sample_trees(n) -> Sample of n trees from the hypergraph.""" + * cdef vector[string]* trees = new vector[string]() */ -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest { +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees { PyObject_HEAD - KBest::KBestDerivations,ESentenceTraversal>::Derivation *__pyx_v_derivation; - KBest::KBestDerivations,ESentenceTraversal> *__pyx_v_derivations; unsigned int __pyx_v_k; + unsigned int __pyx_v_n; struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self; - PyObject *__pyx_v_size; - unsigned int __pyx_t_0; - long __pyx_t_1; + std::vector *__pyx_v_trees; + size_t __pyx_t_0; + unsigned int __pyx_t_1; }; -/* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":167 +/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":161 * - * property nodes: + * property edges: * def __get__(self): # <<<<<<<<<<<<<< * cdef unsigned i - * for i in range(self.hg.nodes_.size()): + * for i in range(self.hg.edges_.size()): */ -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__ { +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__ { PyObject_HEAD unsigned int __pyx_v_i; struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self; @@ -1189,83 +1226,55 @@ struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__ { }; -/* "cdec/sa/_sa.pxd":29 - * cdef FloatList values - * - * cdef class Phrase: # <<<<<<<<<<<<<< - * cdef int *syms - * cdef int n, *varpos, n_vars - */ -struct __pyx_obj_4cdec_2sa_3_sa_Phrase { - PyObject_HEAD - struct __pyx_vtabstruct_4cdec_2sa_3_sa_Phrase *__pyx_vtab; - int *syms; - int n; - int *varpos; - int n_vars; -}; - - -/* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":199 - * del self.grammar +/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":167 * - * def __iter__(self): # <<<<<<<<<<<<<< - * cdef grammar.const_GrammarIter* root = self.grammar.get().GetRoot() - * cdef grammar.const_RuleBin* rbin = root.GetRules() + * property nodes: + * def __get__(self): # <<<<<<<<<<<<<< + * cdef unsigned i + * for i in range(self.hg.nodes_.size()): */ -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__ { +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__ { PyObject_HEAD unsigned int __pyx_v_i; - const RuleBin *__pyx_v_rbin; - const GrammarIter *__pyx_v_root; - struct __pyx_obj_4cdec_5_cdec_Grammar *__pyx_v_self; - struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_trule; - int __pyx_t_0; + struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self; + size_t __pyx_t_0; unsigned int __pyx_t_1; }; -/* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":217 - * self.grammar.get().SetGrammarName(name) - * - * cdef class TextGrammar(Grammar): # <<<<<<<<<<<<<< - * def __init__(self, rules): - * """TextGrammar(rules) -> SCFG Grammar containing the rules.""" - */ -struct __pyx_obj_4cdec_5_cdec_TextGrammar { - struct __pyx_obj_4cdec_5_cdec_Grammar __pyx_base; -}; - - -/* "cdec/_cdec.pyx":43 - * yield key, str(value) +/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":216 * - * cdef class Decoder: # <<<<<<<<<<<<<< - * cdef decoder.Decoder* dec - * cdef DenseVector weights + * property tail_nodes: + * def __get__(self): # <<<<<<<<<<<<<< + * cdef unsigned i + * for i in range(self.edge.tail_nodes_.size()): */ -struct __pyx_obj_4cdec_5_cdec_Decoder { +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__ { PyObject_HEAD - Decoder *dec; - struct __pyx_obj_4cdec_5_cdec_DenseVector *weights; + unsigned int __pyx_v_i; + struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *__pyx_v_self; + unsigned int __pyx_t_0; + unsigned int __pyx_t_1; }; -/* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":12 - * return stats +/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":260 * - * cdef class Candidate: # <<<<<<<<<<<<<< - * cdef mteval.const_Candidate* candidate - * cdef public float score + * property in_edges: + * def __get__(self): # <<<<<<<<<<<<<< + * cdef unsigned i + * for i in range(self.node.in_edges_.size()): */ -struct __pyx_obj_4cdec_5_cdec_Candidate { +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__ { PyObject_HEAD - const training::Candidate *candidate; - float score; + unsigned int __pyx_v_i; + struct __pyx_obj_4cdec_5_cdec_HypergraphNode *__pyx_v_self; + size_t __pyx_t_0; + unsigned int __pyx_t_1; }; -/* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":266 +/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":266 * * property out_edges: * def __get__(self): # <<<<<<<<<<<<<< @@ -1281,7 +1290,7 @@ struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__ { }; -/* "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi":56 +/* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":56 * return unicode(str(self), 'utf8') * * def __iter__(self): # <<<<<<<<<<<<<< @@ -1297,118 +1306,142 @@ struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__ { }; -/* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":32 - * self.vector[0][fid] = value +/* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":61 + * yield self[i] * - * def __iter__(self): # <<<<<<<<<<<<<< - * cdef unsigned fid - * for fid in range(1, self.vector.size()): + * def todot(self): # <<<<<<<<<<<<<< + * """lattice.todot() -> Representation of the lattice in GraphViz dot format.""" + * def lines(): */ -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__ { +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot { PyObject_HEAD - unsigned int __pyx_v_fid; - struct __pyx_obj_4cdec_5_cdec_DenseVector *__pyx_v_self; - size_t __pyx_t_0; - unsigned int __pyx_t_1; + struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self; }; -/* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":173 - * - * def __str__(self): - * scores = ' '.join('%s=%s' % feat for feat in self.scores) # <<<<<<<<<<<<<< - * return '%s ||| %s ||| %s ||| %s' % (self.lhs, - * _phrase(self.f), _phrase(self.e), scores) +/* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":63 + * def todot(self): + * """lattice.todot() -> Representation of the lattice in GraphViz dot format.""" + * def lines(): # <<<<<<<<<<<<<< + * yield 'digraph lattice {' + * yield 'rankdir = LR;' */ -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr { +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines { PyObject_HEAD - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__ *__pyx_outer_scope; - PyObject *__pyx_v_feat; - PyObject *__pyx_t_0; - Py_ssize_t __pyx_t_1; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot *__pyx_outer_scope; + PyObject *__pyx_v_delta; + PyObject *__pyx_v_i; + PyObject *__pyx_v_label; + PyObject *__pyx_v_weight; + Py_ssize_t __pyx_t_0; + PyObject *__pyx_t_1; PyObject *(*__pyx_t_2)(PyObject *); + PyObject *__pyx_t_3; + Py_ssize_t __pyx_t_4; + PyObject *(*__pyx_t_5)(PyObject *); }; -/* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":108 - * del hypos +/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":44 + * return self.stats.size() * - * def sample_trees(self, unsigned n): # <<<<<<<<<<<<<< - * """hg.sample_trees(n) -> Sample of n trees from the hypergraph.""" - * cdef vector[string]* trees = new vector[string]() + * def __iter__(self): # <<<<<<<<<<<<<< + * for i in range(len(self)): + * yield self[i] */ -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees { +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__ { PyObject_HEAD - unsigned int __pyx_v_k; - unsigned int __pyx_v_n; - struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self; - std::vector *__pyx_v_trees; - size_t __pyx_t_0; - unsigned int __pyx_t_1; + Py_ssize_t __pyx_v_i; + struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_v_self; + Py_ssize_t __pyx_t_0; + Py_ssize_t __pyx_t_1; }; -/* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":131 +/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":90 + * return candidate * - * property a: - * def __get__(self): # <<<<<<<<<<<<<< - * cdef unsigned i - * cdef vector[grammar.AlignmentPoint]* a = &self.rule.get().a_ + * def __iter__(self): # <<<<<<<<<<<<<< + * cdef unsigned i + * for i in range(len(self)): */ -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__ { +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__ { PyObject_HEAD - std::vector *__pyx_v_a; unsigned int __pyx_v_i; - struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self; - size_t __pyx_t_0; + struct __pyx_obj_4cdec_5_cdec_CandidateSet *__pyx_v_self; + Py_ssize_t __pyx_t_0; unsigned int __pyx_t_1; }; -/* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":72 - * self.vector.set_value(fid, value) +/* "cdec/_cdec.pyx":32 + * SetSilent(yn) * - * def __iter__(self): # <<<<<<<<<<<<<< - * cdef FastSparseVector[weight_t].const_iterator* it = new FastSparseVector[weight_t].const_iterator(self.vector[0], False) - * cdef unsigned i + * def _make_config(config): # <<<<<<<<<<<<<< + * for key, value in config.items(): + * if isinstance(value, dict): */ -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__ { +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config { PyObject_HEAD - unsigned int __pyx_v_i; - FastSparseVector::const_iterator *__pyx_v_it; - struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self; - size_t __pyx_t_0; - unsigned int __pyx_t_1; + PyObject *__pyx_v_config; + PyObject *__pyx_v_info; + PyObject *__pyx_v_key; + PyObject *__pyx_v_name; + PyObject *__pyx_v_value; + PyObject *__pyx_t_0; + PyObject *__pyx_t_1; + Py_ssize_t __pyx_t_2; + PyObject *(*__pyx_t_3)(PyObject *); + Py_ssize_t __pyx_t_4; + PyObject *(*__pyx_t_5)(PyObject *); }; - -/* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":246 - * raise NotImplemented('comparison not implemented for HypergraphEdge') +/* "cdec/_cdec.pyx":47 + * cdef DenseVector weights * - * cdef class HypergraphNode: # <<<<<<<<<<<<<< - * cdef hypergraph.Hypergraph* hg - * cdef hypergraph.HypergraphNode* node + * def __init__(self, config_str=None, **config): # <<<<<<<<<<<<<< + * """Decoder('formalism = scfg') -> initialize from configuration string + * Decoder(formalism='scfg') -> initialize from named parameters */ +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__ { + PyObject_HEAD + PyObject *__pyx_v_config; +}; -struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphNode { - PyObject *(*init)(struct __pyx_obj_4cdec_5_cdec_HypergraphNode *, Hypergraph *, unsigned int); + +/* "cdec/_cdec.pyx":56 + * 'csplit', 'tagger', 'lexalign'): + * raise InvalidConfig('formalism "%s" unknown' % formalism) + * config_str = '\n'.join('%s = %s' % kv for kv in _make_config(config)) # <<<<<<<<<<<<<< + * cdef istringstream* config_stream = new istringstream(config_str) + * self.dec = new decoder.Decoder(config_stream) + */ +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr { + PyObject_HEAD + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__ *__pyx_outer_scope; + PyObject *__pyx_v_kv; + PyObject *__pyx_t_0; + Py_ssize_t __pyx_t_1; + PyObject *(*__pyx_t_2)(PyObject *); }; -static struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphNode *__pyx_vtabptr_4cdec_5_cdec_HypergraphNode; -/* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":196 - * return vector + +/* "cdec/sa/_sa.pxd":3 + * from libc.stdio cimport FILE * - * cdef class HypergraphEdge: # <<<<<<<<<<<<<< - * cdef hypergraph.Hypergraph* hg - * cdef hypergraph.HypergraphEdge* edge + * cdef class FloatList: # <<<<<<<<<<<<<< + * cdef int size + * cdef int increment */ -struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphEdge { - PyObject *(*init)(struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *, Hypergraph *, unsigned int); +struct __pyx_vtabstruct_4cdec_2sa_3_sa_FloatList { + void (*set)(struct __pyx_obj_4cdec_2sa_3_sa_FloatList *, int, float); + void (*write_handle)(struct __pyx_obj_4cdec_2sa_3_sa_FloatList *, FILE *); + void (*read_handle)(struct __pyx_obj_4cdec_2sa_3_sa_FloatList *, FILE *); }; -static struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphEdge *__pyx_vtabptr_4cdec_5_cdec_HypergraphEdge; +static struct __pyx_vtabstruct_4cdec_2sa_3_sa_FloatList *__pyx_vtabptr_4cdec_2sa_3_sa_FloatList; /* "cdec/sa/_sa.pxd":12 @@ -1431,22 +1464,6 @@ struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList { static struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *__pyx_vtabptr_4cdec_2sa_3_sa_IntList; -/* "cdec/sa/_sa.pxd":3 - * from libc.stdio cimport FILE - * - * cdef class FloatList: # <<<<<<<<<<<<<< - * cdef int size - * cdef int increment - */ - -struct __pyx_vtabstruct_4cdec_2sa_3_sa_FloatList { - void (*set)(struct __pyx_obj_4cdec_2sa_3_sa_FloatList *, int, float); - void (*write_handle)(struct __pyx_obj_4cdec_2sa_3_sa_FloatList *, FILE *); - void (*read_handle)(struct __pyx_obj_4cdec_2sa_3_sa_FloatList *, FILE *); -}; -static struct __pyx_vtabstruct_4cdec_2sa_3_sa_FloatList *__pyx_vtabptr_4cdec_2sa_3_sa_FloatList; - - /* "cdec/sa/_sa.pxd":29 * cdef FloatList values * @@ -1462,7 +1479,7 @@ struct __pyx_vtabstruct_4cdec_2sa_3_sa_Phrase { static struct __pyx_vtabstruct_4cdec_2sa_3_sa_Phrase *__pyx_vtabptr_4cdec_2sa_3_sa_Phrase; -/* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":4 +/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":4 * cimport kbest * * cdef class Hypergraph: # <<<<<<<<<<<<<< @@ -1474,6 +1491,34 @@ struct __pyx_vtabstruct_4cdec_5_cdec_Hypergraph { MT19937 *(*_rng)(struct __pyx_obj_4cdec_5_cdec_Hypergraph *); }; static struct __pyx_vtabstruct_4cdec_5_cdec_Hypergraph *__pyx_vtabptr_4cdec_5_cdec_Hypergraph; + + +/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":196 + * return vector + * + * cdef class HypergraphEdge: # <<<<<<<<<<<<<< + * cdef hypergraph.Hypergraph* hg + * cdef hypergraph.HypergraphEdge* edge + */ + +struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphEdge { + PyObject *(*init)(struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *, Hypergraph *, unsigned int); +}; +static struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphEdge *__pyx_vtabptr_4cdec_5_cdec_HypergraphEdge; + + +/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":246 + * raise NotImplemented('comparison not implemented for HypergraphEdge') + * + * cdef class HypergraphNode: # <<<<<<<<<<<<<< + * cdef hypergraph.Hypergraph* hg + * cdef hypergraph.HypergraphNode* node + */ + +struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphNode { + PyObject *(*init)(struct __pyx_obj_4cdec_5_cdec_HypergraphNode *, Hypergraph *, unsigned int); +}; +static struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphNode *__pyx_vtabptr_4cdec_5_cdec_HypergraphNode; #ifndef CYTHON_REFNANNY #define CYTHON_REFNANNY 0 #endif @@ -1525,6 +1570,14 @@ static struct __pyx_vtabstruct_4cdec_5_cdec_Hypergraph *__pyx_vtabptr_4cdec_5_cd #define __Pyx_XGOTREF(r) #define __Pyx_XGIVEREF(r) #endif /* CYTHON_REFNANNY */ +#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) @@ -1545,6 +1598,12 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject static PyObject *__Pyx_GetBuiltinName(PyObject *name); /*proto*/ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); /*proto*/ +#else +#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) +#endif + static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ @@ -1555,13 +1614,37 @@ static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, static CYTHON_INLINE int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed); /*proto*/ -static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, +static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact); /*proto*/ static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/ +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ + +static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ + +static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ +static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ + static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname); +#if PY_MAJOR_VERSION < 3 +#define __Pyx_PyString_Join __Pyx_PyBytes_Join +#define __Pyx_PyBaseString_Join(s, v) (PyUnicode_CheckExact(s) ? PyUnicode_Join(s, v) : __Pyx_PyBytes_Join(s, v)) +#else +#define __Pyx_PyString_Join PyUnicode_Join +#define __Pyx_PyBaseString_Join PyUnicode_Join +#endif +#if CYTHON_COMPILING_IN_CPYTHON + #if PY_MAJOR_VERSION < 3 + #define __Pyx_PyBytes_Join _PyString_Join + #else + #define __Pyx_PyBytes_Join _PyBytes_Join + #endif +#else +static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values); /*proto*/ +#endif + static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); /*proto*/ static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], \ @@ -1606,7 +1689,7 @@ static PyObject* __Pyx_PyObject_CallMethodTuple(PyObject* obj, PyObject* method_ if (unlikely(!args)) return NULL; method = __Pyx_PyObject_GetAttrStr(obj, method_name); if (unlikely(!method)) goto bad; - result = PyObject_Call(method, args, NULL); + result = __Pyx_PyObject_Call(method, args, NULL); Py_DECREF(method); bad: Py_DECREF(args); @@ -1621,22 +1704,23 @@ bad: #define __Pyx_PyObject_CallMethod0(obj, name) \ __Pyx_PyObject_CallMethodTuple(obj, name, (Py_INCREF(__pyx_empty_tuple), __pyx_empty_tuple)) -static CYTHON_INLINE PyObject* __Pyx_PyObject_Append(PyObject* L, PyObject* x); /*proto*/ - -#define __Pyx_GetItemInt(o, i, size, to_py_func, is_list, wraparound, boundscheck) \ - (((size) <= sizeof(Py_ssize_t)) ? \ - __Pyx_GetItemInt_Fast(o, i, is_list, wraparound, boundscheck) : \ - __Pyx_GetItemInt_Generic(o, to_py_func(i))) -#define __Pyx_GetItemInt_List(o, i, size, to_py_func, is_list, wraparound, boundscheck) \ - (((size) <= sizeof(Py_ssize_t)) ? \ - __Pyx_GetItemInt_List_Fast(o, i, wraparound, boundscheck) : \ - __Pyx_GetItemInt_Generic(o, to_py_func(i))) +static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x); /*proto*/ + +#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, size, to_py_func, is_list, wraparound, boundscheck) \ - (((size) <= sizeof(Py_ssize_t)) ? \ - __Pyx_GetItemInt_Tuple_Fast(o, i, wraparound, boundscheck) : \ - __Pyx_GetItemInt_Generic(o, to_py_func(i))) +#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); @@ -1654,7 +1738,8 @@ static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name); /*proto*/ static void __Pyx_WriteUnraisable(const char *name, int clineno, - int lineno, const char *filename); /*proto*/ + int lineno, const char *filename, + int full_traceback); /*proto*/ static CYTHON_INLINE int __Pyx_PyDict_Contains(PyObject* item, PyObject* dict, int eq) { int result = PyDict_Contains(dict, item); @@ -1664,6 +1749,8 @@ static CYTHON_INLINE int __Pyx_PyDict_Contains(PyObject* item, PyObject* dict, i #define __Pyx_PyIter_Next(obj) __Pyx_PyIter_Next2(obj, NULL) static CYTHON_INLINE PyObject *__Pyx_PyIter_Next2(PyObject *, PyObject *); /*proto*/ +static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type); + #define __Pyx_CyFunction_USED 1 #include #define __Pyx_CYFUNCTION_STATICMETHOD 0x01 @@ -1679,28 +1766,30 @@ static CYTHON_INLINE PyObject *__Pyx_PyIter_Next2(PyObject *, PyObject *); /*pro ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) typedef struct { PyCFunctionObject func; - int flags; PyObject *func_dict; PyObject *func_weakreflist; PyObject *func_name; PyObject *func_qualname; PyObject *func_doc; + PyObject *func_globals; PyObject *func_code; PyObject *func_closure; PyObject *func_classobj; /* No-args super() class cell */ void *defaults; int defaults_pyobjects; + int flags; PyObject *defaults_tuple; /* Const defaults tuple */ PyObject *defaults_kwdict; /* Const kwonly defaults dict */ PyObject *(*defaults_getter)(PyObject *); PyObject *func_annotations; /* function annotations dict */ } __pyx_CyFunctionObject; static PyTypeObject *__pyx_CyFunctionType = 0; -#define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, code) \ - __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, code) +#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 *self, + PyObject *module, PyObject *globals, PyObject* code); static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m, size_t size, @@ -1715,6 +1804,43 @@ static int __Pyx_CyFunction_init(void); static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value); /*proto*/ +#include + +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); /*proto*/ + +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); /*proto*/ + +#if PY_MAJOR_VERSION >= 3 +#define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals +#else +#define __Pyx_PyString_Equals __Pyx_PyBytes_Equals +#endif + +#if CYTHON_COMPILING_IN_CPYTHON && (PY_VERSION_HEX >= 0x03020000 || PY_MAJOR_VERSION < 3 && 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 double __Pyx__PyObject_AsDouble(PyObject* obj); /* proto */ #if CYTHON_COMPILING_IN_PYPY #define __Pyx_PyObject_AsDouble(obj) \ @@ -1727,23 +1853,24 @@ static double __Pyx__PyObject_AsDouble(PyObject* obj); /* proto */ PyFloat_AS_DOUBLE(obj) : __Pyx__PyObject_AsDouble(obj)) #endif -static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ - -#include - static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/ static void* __Pyx_GetVtable(PyObject *dict); /*proto*/ -static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ -static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ +static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases); -static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); /*proto*/ +static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname, + PyObject *mkw, PyObject *modname, PyObject *doc); /*proto*/ +static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict, + PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass); /*proto*/ + +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_int(unsigned int value); -static PyObject *__Pyx_FindPy2Metaclass(PyObject *bases); /*proto*/ +static CYTHON_INLINE unsigned int __Pyx_PyInt_As_unsigned_int(PyObject *); -static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name, - PyObject *qualname, PyObject *modname); /*proto*/ +static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); + +static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); /*proto*/ #ifndef __Pyx_CppExn2PyErr #include @@ -1784,43 +1911,19 @@ static void __Pyx_CppExn2PyErr() { } #endif -static CYTHON_INLINE WordID __Pyx_PyInt_from_py_WordID(PyObject *); +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); -static PyObject* __Pyx_Globals(void); /*proto*/ - -static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *); - -static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *); - -static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *); +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); -static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject *); +static CYTHON_INLINE WordID __Pyx_PyInt_As_WordID(PyObject *); -static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject *); +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_short(short value); -static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject *); +static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *); /*proto*/ -static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *); - -static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *); - -static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *); - -static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject *); +static PyObject* __Pyx_Globals(void); /*proto*/ -static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *); - -static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *); - -static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject *); - -static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *); - -static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *); - -static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *); - -static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ +static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); #define __Pyx_Generator_USED #include @@ -1837,7 +1940,7 @@ typedef struct { PyObject *classobj; PyObject *yieldfrom; int resume_label; - char is_running; // using T_BOOL for property below requires char value + char is_running; } __pyx_GeneratorObject; static __pyx_GeneratorObject *__Pyx_Generator_New(__pyx_generator_body_t body, PyObject *closure); @@ -1923,51 +2026,51 @@ static int (*__pyx_f_4cdec_2sa_3_sa_sym_getindex)(int); /*proto*/ /* Module declarations from 'cdec.mteval' */ /* Module declarations from 'cdec._cdec' */ -static PyTypeObject *__pyx_ptype_4cdec_5_cdec_TRule = 0; -static PyTypeObject *__pyx_ptype_4cdec_5_cdec_MRule = 0; -static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_22___iter__ = 0; static PyTypeObject *__pyx_ptype_4cdec_5_cdec_DenseVector = 0; -static PyTypeObject *__pyx_ptype_4cdec_5_cdec_SufficientStats = 0; -static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_21___iter__ = 0; -static PyTypeObject *__pyx_ptype_4cdec_5_cdec_Metric = 0; -static PyTypeObject *__pyx_ptype_4cdec_5_cdec_Candidate = 0; static PyTypeObject *__pyx_ptype_4cdec_5_cdec_SparseVector = 0; -static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_15___get__ = 0; static PyTypeObject *__pyx_ptype_4cdec_5_cdec_NT = 0; -static PyTypeObject *__pyx_ptype_4cdec_5_cdec_Lattice = 0; -static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_23__make_config = 0; -static PyTypeObject *__pyx_ptype_4cdec_5_cdec_HypergraphEdge = 0; -static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_2__phrase = 0; -static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_13___get__ = 0; -static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_20_lines = 0; -static PyTypeObject *__pyx_ptype_4cdec_5_cdec_Scorer = 0; -static PyTypeObject *__pyx_ptype_4cdec_5_cdec_HypergraphNode = 0; -static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_10_kbest_features = 0; static PyTypeObject *__pyx_ptype_4cdec_5_cdec_NTRef = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec_TRule = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec_MRule = 0; static PyTypeObject *__pyx_ptype_4cdec_5_cdec_Grammar = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec_TextGrammar = 0; static PyTypeObject *__pyx_ptype_4cdec_5_cdec_Hypergraph = 0; -static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_24___init__ = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec_HypergraphEdge = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec_HypergraphNode = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec_Lattice = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec_Candidate = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec_SufficientStats = 0; static PyTypeObject *__pyx_ptype_4cdec_5_cdec_CandidateSet = 0; -static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees = 0; -static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_19_todot = 0; -static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_5___str__ = 0; static PyTypeObject *__pyx_ptype_4cdec_5_cdec_SegmentEvaluator = 0; -static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_16___get__ = 0; -static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_25_genexpr = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec_Scorer = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec_Metric = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec_Decoder = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct____iter__ = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_1___iter__ = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_2__phrase = 0; static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_3_genexpr = 0; -static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_11_sample = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_4___get__ = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_5___str__ = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_6_genexpr = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_7___iter__ = 0; static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_8_kbest = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_10_kbest_features = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_11_sample = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_12_sample_trees = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_13___get__ = 0; static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_14___get__ = 0; -static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_7___iter__ = 0; -static PyTypeObject *__pyx_ptype_4cdec_5_cdec_TextGrammar = 0; -static PyTypeObject *__pyx_ptype_4cdec_5_cdec_Decoder = 0; -static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct____iter__ = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_15___get__ = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_16___get__ = 0; static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_17___get__ = 0; static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_18___iter__ = 0; -static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_6_genexpr = 0; -static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_12_sample_trees = 0; -static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_4___get__ = 0; -static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_1___iter__ = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_19_todot = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_20_lines = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_21___iter__ = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_22___iter__ = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_23__make_config = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_24___init__ = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_25_genexpr = 0; static PyObject *__pyx_f_4cdec_5_cdec_as_str(PyObject *, struct __pyx_opt_args_4cdec_5_cdec_as_str *__pyx_optional_args); /*proto*/ static struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_f_4cdec_5_cdec_convert_rule(struct __pyx_obj_4cdec_2sa_3_sa_Rule *); /*proto*/ static struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_f_4cdec_5_cdec_as_stats(PyObject *, PyObject *); /*proto*/ @@ -1998,7 +2101,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_11DenseVector_10__iter__(struct __pyx_obj static PyObject *__pyx_pf_4cdec_5_cdec_11DenseVector_13dot(struct __pyx_obj_4cdec_5_cdec_DenseVector *__pyx_v_self, struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_other); /* proto */ static PyObject *__pyx_pf_4cdec_5_cdec_11DenseVector_15tosparse(struct __pyx_obj_4cdec_5_cdec_DenseVector *__pyx_v_self); /* proto */ static int __pyx_pf_4cdec_5_cdec_12SparseVector___init__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self); /* proto */ -static void __pyx_pf_4cdec_5_cdec_12SparseVector_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self); /* proto */ +static void __pyx_pf_4cdec_5_cdec_12SparseVector_2__dealloc__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_4copy(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_6__getitem__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self, char *__pyx_v_fname); /* proto */ static int __pyx_pf_4cdec_5_cdec_12SparseVector_8__setitem__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self, char *__pyx_v_fname, float __pyx_v_value); /* proto */ @@ -2033,8 +2136,8 @@ static int __pyx_pf_4cdec_5_cdec_5NTRef___init__(struct __pyx_obj_4cdec_5_cdec_N static PyObject *__pyx_pf_4cdec_5_cdec_5NTRef_2__str__(struct __pyx_obj_4cdec_5_cdec_NTRef *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_4cdec_5_cdec_5NTRef_3ref___get__(struct __pyx_obj_4cdec_5_cdec_NTRef *__pyx_v_self); /* proto */ static int __pyx_pf_4cdec_5_cdec_5NTRef_3ref_2__set__(struct __pyx_obj_4cdec_5_cdec_NTRef *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ -static int __pyx_pf_4cdec_5_cdec_5TRule___init__(struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_f, PyObject *__pyx_v_e, PyObject *__pyx_v_scores, PyObject *__pyx_v_a); /* proto */ -static void __pyx_pf_4cdec_5_cdec_5TRule_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self); /* proto */ +static int __pyx_pf_4cdec_5_cdec_5TRule___init__(struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_f, PyObject *__pyx_v_e, PyObject *__pyx_v_scores, PyObject *__pyx_v_a, PyObject *__pyx_v_text); /* proto */ +static void __pyx_pf_4cdec_5_cdec_5TRule_2__dealloc__(struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_5arity___get__(struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_1f___get__(struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self); /* proto */ static int __pyx_pf_4cdec_5_cdec_5TRule_1f_2__set__(struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self, PyObject *__pyx_v_f); /* proto */ @@ -2049,7 +2152,7 @@ static int __pyx_pf_4cdec_5_cdec_5TRule_3lhs_2__set__(struct __pyx_obj_4cdec_5_c static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_7__str___genexpr(PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_4__str__(struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self); /* proto */ static int __pyx_pf_4cdec_5_cdec_5MRule___init__(struct __pyx_obj_4cdec_5_cdec_MRule *__pyx_v_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, PyObject *__pyx_v_scores); /* proto */ -static void __pyx_pf_4cdec_5_cdec_7Grammar___dealloc__(CYTHON_UNUSED struct __pyx_obj_4cdec_5_cdec_Grammar *__pyx_v_self); /* proto */ +static void __pyx_pf_4cdec_5_cdec_7Grammar___dealloc__(struct __pyx_obj_4cdec_5_cdec_Grammar *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_4cdec_5_cdec_7Grammar_2__iter__(struct __pyx_obj_4cdec_5_cdec_Grammar *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_4cdec_5_cdec_7Grammar_4name___get__(struct __pyx_obj_4cdec_5_cdec_Grammar *__pyx_v_self); /* proto */ static int __pyx_pf_4cdec_5_cdec_7Grammar_4name_2__set__(struct __pyx_obj_4cdec_5_cdec_Grammar *__pyx_v_self, PyObject *__pyx_v_name); /* proto */ @@ -2094,7 +2197,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphNode_3cat___get__(struct __py static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphNode___richcmp__(struct __pyx_obj_4cdec_5_cdec_HypergraphNode *__pyx_v_x, struct __pyx_obj_4cdec_5_cdec_HypergraphNode *__pyx_v_y, int __pyx_v_op); /* proto */ static int __pyx_pf_4cdec_5_cdec_7Lattice___cinit__(struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self); /* proto */ static int __pyx_pf_4cdec_5_cdec_7Lattice_2__init__(struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self, PyObject *__pyx_v_inp); /* proto */ -static void __pyx_pf_4cdec_5_cdec_7Lattice_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self); /* proto */ +static void __pyx_pf_4cdec_5_cdec_7Lattice_4__dealloc__(struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_6__getitem__(struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self, int __pyx_v_index); /* proto */ static int __pyx_pf_4cdec_5_cdec_7Lattice_8__setitem__(struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self, int __pyx_v_index, PyObject *__pyx_v_arcs); /* proto */ static Py_ssize_t __pyx_pf_4cdec_5_cdec_7Lattice_10__len__(struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self); /* proto */ @@ -2108,7 +2211,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_9Candidate_5words___get__(struct __pyx_ob static PyObject *__pyx_pf_4cdec_5_cdec_9Candidate_4fmap___get__(struct __pyx_obj_4cdec_5_cdec_Candidate *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_4cdec_5_cdec_9Candidate_5score___get__(struct __pyx_obj_4cdec_5_cdec_Candidate *__pyx_v_self); /* proto */ static int __pyx_pf_4cdec_5_cdec_9Candidate_5score_2__set__(struct __pyx_obj_4cdec_5_cdec_Candidate *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ -static void __pyx_pf_4cdec_5_cdec_15SufficientStats___dealloc__(CYTHON_UNUSED struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_v_self); /* proto */ +static void __pyx_pf_4cdec_5_cdec_15SufficientStats___dealloc__(struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_5score___get__(struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_6detail___get__(struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_v_self); /* proto */ static Py_ssize_t __pyx_pf_4cdec_5_cdec_15SufficientStats_2__len__(struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_v_self); /* proto */ @@ -2117,16 +2220,16 @@ static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_7__getitem__(struct __p static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_9__iadd__(struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_v_self, struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_v_other); /* proto */ static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_11__add__(PyObject *__pyx_v_x, PyObject *__pyx_v_y); /* proto */ static int __pyx_pf_4cdec_5_cdec_12CandidateSet___cinit__(struct __pyx_obj_4cdec_5_cdec_CandidateSet *__pyx_v_self, struct __pyx_obj_4cdec_5_cdec_SegmentEvaluator *__pyx_v_evaluator); /* proto */ -static void __pyx_pf_4cdec_5_cdec_12CandidateSet_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cdec_5_cdec_CandidateSet *__pyx_v_self); /* proto */ +static void __pyx_pf_4cdec_5_cdec_12CandidateSet_2__dealloc__(struct __pyx_obj_4cdec_5_cdec_CandidateSet *__pyx_v_self); /* proto */ static Py_ssize_t __pyx_pf_4cdec_5_cdec_12CandidateSet_4__len__(struct __pyx_obj_4cdec_5_cdec_CandidateSet *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_4cdec_5_cdec_12CandidateSet_6__getitem__(struct __pyx_obj_4cdec_5_cdec_CandidateSet *__pyx_v_self, int __pyx_v_k); /* proto */ static PyObject *__pyx_pf_4cdec_5_cdec_12CandidateSet_8__iter__(struct __pyx_obj_4cdec_5_cdec_CandidateSet *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_4cdec_5_cdec_12CandidateSet_11add_kbest(struct __pyx_obj_4cdec_5_cdec_CandidateSet *__pyx_v_self, struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_hypergraph, unsigned int __pyx_v_k); /* proto */ -static void __pyx_pf_4cdec_5_cdec_16SegmentEvaluator___dealloc__(CYTHON_UNUSED struct __pyx_obj_4cdec_5_cdec_SegmentEvaluator *__pyx_v_self); /* proto */ +static void __pyx_pf_4cdec_5_cdec_16SegmentEvaluator___dealloc__(struct __pyx_obj_4cdec_5_cdec_SegmentEvaluator *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_4cdec_5_cdec_16SegmentEvaluator_2evaluate(struct __pyx_obj_4cdec_5_cdec_SegmentEvaluator *__pyx_v_self, PyObject *__pyx_v_sentence); /* proto */ static PyObject *__pyx_pf_4cdec_5_cdec_16SegmentEvaluator_4candidate_set(struct __pyx_obj_4cdec_5_cdec_SegmentEvaluator *__pyx_v_self); /* proto */ static int __pyx_pf_4cdec_5_cdec_6Scorer___cinit__(struct __pyx_obj_4cdec_5_cdec_Scorer *__pyx_v_self, PyObject *__pyx_v_name); /* proto */ -static void __pyx_pf_4cdec_5_cdec_6Scorer_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cdec_5_cdec_Scorer *__pyx_v_self); /* proto */ +static void __pyx_pf_4cdec_5_cdec_6Scorer_2__dealloc__(struct __pyx_obj_4cdec_5_cdec_Scorer *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_4cdec_5_cdec_6Scorer_4__call__(struct __pyx_obj_4cdec_5_cdec_Scorer *__pyx_v_self, PyObject *__pyx_v_refs); /* proto */ static PyObject *__pyx_pf_4cdec_5_cdec_6Scorer_6__str__(struct __pyx_obj_4cdec_5_cdec_Scorer *__pyx_v_self); /* proto */ static int __pyx_pf_4cdec_5_cdec_6Metric___cinit__(struct __pyx_obj_4cdec_5_cdec_Metric *__pyx_v_self); /* proto */ @@ -2137,371 +2240,377 @@ static PyObject *__pyx_pf_4cdec_5_cdec_2set_silent(CYTHON_UNUSED PyObject *__pyx static PyObject *__pyx_pf_4cdec_5_cdec_4_make_config(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_config); /* proto */ static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_8__init___genexpr(PyObject *__pyx_self); /* proto */ static int __pyx_pf_4cdec_5_cdec_7Decoder___init__(struct __pyx_obj_4cdec_5_cdec_Decoder *__pyx_v_self, PyObject *__pyx_v_config_str, PyObject *__pyx_v_config); /* proto */ -static void __pyx_pf_4cdec_5_cdec_7Decoder_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cdec_5_cdec_Decoder *__pyx_v_self); /* proto */ +static void __pyx_pf_4cdec_5_cdec_7Decoder_2__dealloc__(struct __pyx_obj_4cdec_5_cdec_Decoder *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_7weights___get__(struct __pyx_obj_4cdec_5_cdec_Decoder *__pyx_v_self); /* proto */ static int __pyx_pf_4cdec_5_cdec_7Decoder_7weights_2__set__(struct __pyx_obj_4cdec_5_cdec_Decoder *__pyx_v_self, PyObject *__pyx_v_weights); /* proto */ static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_9formalism___get__(struct __pyx_obj_4cdec_5_cdec_Decoder *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_4read_weights(struct __pyx_obj_4cdec_5_cdec_Decoder *__pyx_v_self, PyObject *__pyx_v_weights); /* proto */ static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_6translate(struct __pyx_obj_4cdec_5_cdec_Decoder *__pyx_v_self, PyObject *__pyx_v_sentence, PyObject *__pyx_v_grammar); /* proto */ -static PyObject *__pyx_tp_new_4cdec_5_cdec_TRule(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_4cdec_5_cdec_MRule(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_22___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_4cdec_5_cdec_DenseVector(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_4cdec_5_cdec_SufficientStats(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_21___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_4cdec_5_cdec_Metric(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_4cdec_5_cdec_Candidate(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_4cdec_5_cdec_SparseVector(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_15___get__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_4cdec_5_cdec_NT(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_4cdec_5_cdec_Lattice(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_23__make_config(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_4cdec_5_cdec_HypergraphEdge(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_2__phrase(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_13___get__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_20_lines(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_4cdec_5_cdec_Scorer(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_4cdec_5_cdec_HypergraphNode(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_10_kbest_features(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_4cdec_5_cdec_NTRef(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec_TRule(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec_MRule(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_4cdec_5_cdec_Grammar(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec_TextGrammar(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_4cdec_5_cdec_Hypergraph(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_24___init__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec_HypergraphEdge(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec_HypergraphNode(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec_Lattice(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec_Candidate(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec_SufficientStats(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_4cdec_5_cdec_CandidateSet(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_19_todot(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_5___str__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_4cdec_5_cdec_SegmentEvaluator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_16___get__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_25_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec_Scorer(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec_Metric(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec_Decoder(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct____iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_1___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_2__phrase(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_3_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_11_sample(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_4___get__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_5___str__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_6_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_7___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_8_kbest(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_10_kbest_features(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_11_sample(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_12_sample_trees(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_13___get__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_14___get__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_7___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_4cdec_5_cdec_TextGrammar(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_4cdec_5_cdec_Decoder(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct____iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_15___get__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_16___get__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_17___get__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_18___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_6_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_12_sample_trees(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_4___get__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_1___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static char __pyx_k_1[] = "Cannot convert type %s to str"; -static char __pyx_k_3[] = "cannot take the dot product of %s and SparseVector"; -static char __pyx_k_4[] = "comparison not implemented for SparseVector"; -static char __pyx_k_7[] = " "; -static char __pyx_k_8[] = "[%s,%d]"; -static char __pyx_k_9[] = "[%s]"; -static char __pyx_k_10[] = "[%d]"; -static char __pyx_k_11[] = "%s=%s"; -static char __pyx_k_12[] = "%s ||| %s ||| %s ||| %s"; -static char __pyx_k_13[] = "the grammar should contain TRule objects"; -static char __pyx_k_15[] = "cannot intersect hypergraph with %s"; -static char __pyx_k_16[] = "csplit_preserve_full_word"; -static char __pyx_k_17[] = "cannot reweight hypergraph with %s"; -static char __pyx_k_18[] = "comparison not implemented for HypergraphEdge"; -static char __pyx_k_20[] = "comparison not implemented for HypergraphNode"; -static char __pyx_k_22[] = "cannot create lattice from %s"; -static char __pyx_k_23[] = "lattice index out of range"; -static char __pyx_k_26[] = "digraph lattice {"; - static char __pyx_k_27[] = "rankdir = LR;"; - static char __pyx_k_28[] = "node [shape=circle];"; - static char __pyx_k_29[] = "%d -> %d [label=\"%s\"];"; - static char __pyx_k_30[] = "\""; - static char __pyx_k_31[] = "\\\""; - static char __pyx_k_33[] = "%d [shape=doublecircle]"; -static char __pyx_k_34[] = "}"; -static char __pyx_k_37[] = "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi"; -static char __pyx_k_38[] = "Lattice.todot..lines"; -static char __pyx_k_39[] = "cdec._cdec"; -static char __pyx_k_40[] = "\n"; -static char __pyx_k_42[] = "sufficient stats vector index out of range"; -static char __pyx_k_44[] = "candidate set index out of range"; -static char __pyx_k_46[] = "%s %s"; -static char __pyx_k_47[] = "%s = %s"; -static char __pyx_k_48[] = "formalism \"%s\" unknown"; -static char __pyx_k_49[] = "cannot initialize weights with %s"; -static char __pyx_k_50[] = "#"; -static char __pyx_k_53[] = "Cannot translate input type %s"; -static char __pyx_k_54[] = "cdec.sa._sa"; -static char __pyx_k_55[] = "*"; -static char __pyx_k_58[] = "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi"; -static char __pyx_k_66[] = "/home/pks/src/cdec-dtrain/python/cdec/_cdec.pyx"; -static char __pyx_k__a[] = "a"; -static char __pyx_k__e[] = "e"; -static char __pyx_k__f[] = "f"; -static char __pyx_k__i[] = "i"; -static char __pyx_k__k[] = "k"; -static char __pyx_k__pb[] = "pb"; -static char __pyx_k__yn[] = "yn"; -static char __pyx_k__CER[] = "CER"; -static char __pyx_k__SSK[] = "SSK"; -static char __pyx_k__TER[] = "TER"; -static char __pyx_k___sa[] = "_sa"; -static char __pyx_k__cat[] = "cat"; -static char __pyx_k__dot[] = "dot"; -static char __pyx_k__fst[] = "fst"; -static char __pyx_k__get[] = "get"; -static char __pyx_k__hyp[] = "hyp"; -static char __pyx_k__inp[] = "inp"; -static char __pyx_k__key[] = "key"; -static char __pyx_k__lhs[] = "lhs"; -static char __pyx_k__plf[] = "plf"; -static char __pyx_k__ref[] = "ref"; -static char __pyx_k__rhs[] = "rhs"; -static char __pyx_k__BLEU[] = "BLEU"; -static char __pyx_k__QCRI[] = "QCRI"; -static char __pyx_k__args[] = "args"; -static char __pyx_k__eval[] = "eval"; -static char __pyx_k__info[] = "info"; -static char __pyx_k__join[] = "join"; -static char __pyx_k__name[] = "name"; -static char __pyx_k__open[] = "open"; -static char __pyx_k__refs[] = "refs"; -static char __pyx_k__scfg[] = "scfg"; -static char __pyx_k__self[] = "self"; -static char __pyx_k__send[] = "send"; -static char __pyx_k__span[] = "span"; -static char __pyx_k__utf8[] = "utf8"; -static char __pyx_k__close[] = "close"; -static char __pyx_k__delta[] = "delta"; -static char __pyx_k__items[] = "items"; -static char __pyx_k__label[] = "label"; -static char __pyx_k__lines[] = "lines"; -static char __pyx_k__range[] = "range"; -static char __pyx_k__rules[] = "rules"; -static char __pyx_k__score[] = "score"; -static char __pyx_k__split[] = "split"; -static char __pyx_k__strip[] = "strip"; -static char __pyx_k__super[] = "super"; -static char __pyx_k__throw[] = "throw"; -static char __pyx_k__value[] = "value"; -static char __pyx_k__append[] = "append"; -static char __pyx_k__config[] = "config"; -static char __pyx_k__csplit[] = "csplit"; -static char __pyx_k__encode[] = "encode"; -static char __pyx_k__format[] = "format"; -static char __pyx_k__phrase[] = "phrase"; -static char __pyx_k__scores[] = "scores"; -static char __pyx_k__tagger[] = "tagger"; -static char __pyx_k__weight[] = "weight"; -static char __pyx_k___phrase[] = "_phrase"; -static char __pyx_k__density[] = "density"; -static char __pyx_k__genexpr[] = "genexpr"; -static char __pyx_k__grammar[] = "grammar"; -static char __pyx_k__replace[] = "replace"; -static char __pyx_k__IBM_BLEU[] = "IBM_BLEU"; -static char __pyx_k__KeyError[] = "KeyError"; -static char __pyx_k____dict__[] = "__dict__"; -static char __pyx_k____exit__[] = "__exit__"; -static char __pyx_k____init__[] = "__init__"; -static char __pyx_k____main__[] = "__main__"; -static char __pyx_k____name__[] = "__name__"; -static char __pyx_k____test__[] = "__test__"; -static char __pyx_k__encoding[] = "encoding"; -static char __pyx_k__evaluate[] = "evaluate"; -static char __pyx_k__in_edges[] = "in_edges"; -static char __pyx_k__lexalign[] = "lexalign"; -static char __pyx_k__lextrans[] = "lextrans"; -static char __pyx_k__sentence[] = "sentence"; -static char __pyx_k__Exception[] = "Exception"; -static char __pyx_k__QCRI_BLEU[] = "QCRI_BLEU"; -static char __pyx_k__TypeError[] = "TypeError"; -static char __pyx_k____class__[] = "__class__"; -static char __pyx_k____enter__[] = "__enter__"; -static char __pyx_k__enumerate[] = "enumerate"; -static char __pyx_k__evaluator[] = "evaluator"; -static char __pyx_k__formalism[] = "formalism"; -static char __pyx_k__IndexError[] = "IndexError"; -static char __pyx_k__ValueError[] = "ValueError"; -static char __pyx_k____import__[] = "__import__"; -static char __pyx_k____module__[] = "__module__"; -static char __pyx_k__alignments[] = "alignments"; -static char __pyx_k__beam_alpha[] = "beam_alpha"; -static char __pyx_k__config_str[] = "config_str"; -static char __pyx_k__hypergraph[] = "hypergraph"; -static char __pyx_k__set_silent[] = "set_silent"; -static char __pyx_k__startswith[] = "startswith"; -static char __pyx_k__ParseFailed[] = "ParseFailed"; -static char __pyx_k____qualname__[] = "__qualname__"; -static char __pyx_k___make_config[] = "_make_config"; -static char __pyx_k__InvalidConfig[] = "InvalidConfig"; -static char __pyx_k____metaclass__[] = "__metaclass__"; -static char __pyx_k__NotImplemented[] = "NotImplemented"; -static char __pyx_k____pyx_vtable__[] = "__pyx_vtable__"; -static PyObject *__pyx_kp_s_10; -static PyObject *__pyx_kp_s_11; -static PyObject *__pyx_kp_s_12; -static PyObject *__pyx_kp_s_13; -static PyObject *__pyx_kp_s_15; -static PyObject *__pyx_n_s_16; -static PyObject *__pyx_kp_s_17; -static PyObject *__pyx_kp_s_18; -static PyObject *__pyx_kp_s_20; -static PyObject *__pyx_kp_s_22; -static PyObject *__pyx_kp_s_23; -static PyObject *__pyx_kp_s_26; -static PyObject *__pyx_kp_s_27; -static PyObject *__pyx_kp_s_28; -static PyObject *__pyx_kp_s_29; -static PyObject *__pyx_kp_s_3; -static PyObject *__pyx_kp_s_30; -static PyObject *__pyx_kp_s_31; -static PyObject *__pyx_kp_s_33; -static PyObject *__pyx_kp_s_34; -static PyObject *__pyx_kp_s_37; -static PyObject *__pyx_n_s_38; -static PyObject *__pyx_n_s_39; -static PyObject *__pyx_kp_s_4; -static PyObject *__pyx_kp_s_40; -static PyObject *__pyx_kp_s_42; -static PyObject *__pyx_kp_s_44; -static PyObject *__pyx_kp_s_46; -static PyObject *__pyx_kp_s_47; -static PyObject *__pyx_kp_s_48; -static PyObject *__pyx_kp_s_49; -static PyObject *__pyx_kp_s_50; -static PyObject *__pyx_kp_s_53; -static PyObject *__pyx_n_s_54; -static PyObject *__pyx_n_s_55; -static PyObject *__pyx_kp_s_58; -static PyObject *__pyx_kp_s_66; -static PyObject *__pyx_kp_s_7; -static PyObject *__pyx_kp_s_8; -static PyObject *__pyx_kp_s_9; -static PyObject *__pyx_n_s__BLEU; -static PyObject *__pyx_n_s__CER; -static PyObject *__pyx_n_s__Exception; -static PyObject *__pyx_n_s__IBM_BLEU; -static PyObject *__pyx_n_s__IndexError; -static PyObject *__pyx_n_s__InvalidConfig; -static PyObject *__pyx_n_s__KeyError; -static PyObject *__pyx_n_s__NotImplemented; -static PyObject *__pyx_n_s__ParseFailed; -static PyObject *__pyx_n_s__QCRI; -static PyObject *__pyx_n_s__QCRI_BLEU; -static PyObject *__pyx_n_s__SSK; -static PyObject *__pyx_n_s__TER; -static PyObject *__pyx_n_s__TypeError; -static PyObject *__pyx_n_s__ValueError; -static PyObject *__pyx_n_s____class__; -static PyObject *__pyx_n_s____dict__; -static PyObject *__pyx_n_s____enter__; -static PyObject *__pyx_n_s____exit__; -static PyObject *__pyx_n_s____import__; -static PyObject *__pyx_n_s____init__; -static PyObject *__pyx_n_s____main__; -static PyObject *__pyx_n_s____metaclass__; -static PyObject *__pyx_n_s____module__; -static PyObject *__pyx_n_s____name__; -static PyObject *__pyx_n_s____pyx_vtable__; -static PyObject *__pyx_n_s____qualname__; -static PyObject *__pyx_n_s____test__; -static PyObject *__pyx_n_s___make_config; -static PyObject *__pyx_n_s___phrase; -static PyObject *__pyx_n_s___sa; -static PyObject *__pyx_n_s__a; -static PyObject *__pyx_n_s__alignments; -static PyObject *__pyx_n_s__append; -static PyObject *__pyx_n_s__args; -static PyObject *__pyx_n_s__beam_alpha; -static PyObject *__pyx_n_s__cat; -static PyObject *__pyx_n_s__close; -static PyObject *__pyx_n_s__config; -static PyObject *__pyx_n_s__config_str; -static PyObject *__pyx_n_s__csplit; -static PyObject *__pyx_n_s__delta; -static PyObject *__pyx_n_s__density; -static PyObject *__pyx_n_s__dot; -static PyObject *__pyx_n_s__e; -static PyObject *__pyx_n_s__encode; -static PyObject *__pyx_n_s__encoding; -static PyObject *__pyx_n_s__enumerate; -static PyObject *__pyx_n_s__eval; -static PyObject *__pyx_n_s__evaluate; -static PyObject *__pyx_n_s__evaluator; -static PyObject *__pyx_n_s__f; -static PyObject *__pyx_n_s__formalism; -static PyObject *__pyx_n_s__format; -static PyObject *__pyx_n_s__fst; -static PyObject *__pyx_n_s__genexpr; -static PyObject *__pyx_n_s__get; -static PyObject *__pyx_n_s__grammar; -static PyObject *__pyx_n_s__hyp; -static PyObject *__pyx_n_s__hypergraph; -static PyObject *__pyx_n_s__i; -static PyObject *__pyx_n_s__in_edges; -static PyObject *__pyx_n_s__info; -static PyObject *__pyx_n_s__inp; -static PyObject *__pyx_n_s__items; -static PyObject *__pyx_n_s__join; -static PyObject *__pyx_n_s__k; -static PyObject *__pyx_n_s__key; -static PyObject *__pyx_n_s__label; -static PyObject *__pyx_n_s__lexalign; -static PyObject *__pyx_n_s__lextrans; -static PyObject *__pyx_n_s__lhs; -static PyObject *__pyx_n_s__lines; -static PyObject *__pyx_n_s__name; -static PyObject *__pyx_n_s__open; -static PyObject *__pyx_n_s__pb; -static PyObject *__pyx_n_s__phrase; -static PyObject *__pyx_n_s__plf; -static PyObject *__pyx_n_s__range; -static PyObject *__pyx_n_s__ref; -static PyObject *__pyx_n_s__refs; -static PyObject *__pyx_n_s__replace; -static PyObject *__pyx_n_s__rhs; -static PyObject *__pyx_n_s__rules; -static PyObject *__pyx_n_s__scfg; -static PyObject *__pyx_n_s__score; -static PyObject *__pyx_n_s__scores; -static PyObject *__pyx_n_s__self; -static PyObject *__pyx_n_s__send; -static PyObject *__pyx_n_s__sentence; -static PyObject *__pyx_n_s__set_silent; -static PyObject *__pyx_n_s__span; -static PyObject *__pyx_n_s__split; -static PyObject *__pyx_n_s__startswith; -static PyObject *__pyx_n_s__strip; -static PyObject *__pyx_n_s__super; -static PyObject *__pyx_n_s__tagger; -static PyObject *__pyx_n_s__throw; -static PyObject *__pyx_n_s__utf8; -static PyObject *__pyx_n_s__value; -static PyObject *__pyx_n_s__weight; -static PyObject *__pyx_n_s__yn; +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_19_todot(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_20_lines(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_21___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_22___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_23__make_config(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_24___init__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_25_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static char __pyx_k_a[] = "a"; +static char __pyx_k_d[] = "[%d]"; +static char __pyx_k_e[] = "e"; +static char __pyx_k_f[] = "f"; +static char __pyx_k_i[] = "i"; +static char __pyx_k_k[] = "k"; +static char __pyx_k_s[] = "[%s]"; +static char __pyx_k__4[] = " "; +static char __pyx_k_pb[] = "pb"; +static char __pyx_k_sa[] = "_sa"; +static char __pyx_k_yn[] = "yn"; +static char __pyx_k_CER[] = "CER"; +static char __pyx_k_SSK[] = "SSK"; +static char __pyx_k_TER[] = "TER"; +static char __pyx_k__10[] = "\""; +static char __pyx_k__11[] = "\\\""; +static char __pyx_k__13[] = "}"; +static char __pyx_k__16[] = "\n"; +static char __pyx_k__20[] = "#"; +static char __pyx_k__23[] = "*"; +static char __pyx_k_cat[] = "cat"; +static char __pyx_k_doc[] = "__doc__"; +static char __pyx_k_dot[] = "dot"; +static char __pyx_k_fst[] = "fst"; +static char __pyx_k_get[] = "get"; +static char __pyx_k_hyp[] = "hyp"; +static char __pyx_k_inp[] = "inp"; +static char __pyx_k_key[] = "key"; +static char __pyx_k_lhs[] = "lhs"; +static char __pyx_k_plf[] = "plf"; +static char __pyx_k_ref[] = "ref"; +static char __pyx_k_rhs[] = "rhs"; +static char __pyx_k_s_d[] = "[%s,%d]"; +static char __pyx_k_s_s[] = "%s=%s"; +static char __pyx_k_BLEU[] = "BLEU"; +static char __pyx_k_QCRI[] = "QCRI"; +static char __pyx_k_args[] = "args"; +static char __pyx_k_dict[] = "__dict__"; +static char __pyx_k_eval[] = "eval"; +static char __pyx_k_exit[] = "__exit__"; +static char __pyx_k_info[] = "info"; +static char __pyx_k_init[] = "__init__"; +static char __pyx_k_join[] = "join"; +static char __pyx_k_main[] = "__main__"; +static char __pyx_k_name[] = "name"; +static char __pyx_k_open[] = "open"; +static char __pyx_k_refs[] = "refs"; +static char __pyx_k_scfg[] = "scfg"; +static char __pyx_k_self[] = "self"; +static char __pyx_k_send[] = "send"; +static char __pyx_k_span[] = "span"; +static char __pyx_k_test[] = "__test__"; +static char __pyx_k_text[] = "text"; +static char __pyx_k_utf8[] = "utf8"; +static char __pyx_k_class[] = "__class__"; +static char __pyx_k_close[] = "close"; +static char __pyx_k_delta[] = "delta"; +static char __pyx_k_enter[] = "__enter__"; +static char __pyx_k_items[] = "items"; +static char __pyx_k_label[] = "label"; +static char __pyx_k_lines[] = "lines"; +static char __pyx_k_range[] = "range"; +static char __pyx_k_rules[] = "rules"; +static char __pyx_k_s_s_2[] = "%s %s"; +static char __pyx_k_s_s_3[] = "%s = %s"; +static char __pyx_k_score[] = "score"; +static char __pyx_k_split[] = "split"; +static char __pyx_k_strip[] = "strip"; +static char __pyx_k_super[] = "super"; +static char __pyx_k_throw[] = "throw"; +static char __pyx_k_value[] = "value"; +static char __pyx_k_append[] = "append"; +static char __pyx_k_config[] = "config"; +static char __pyx_k_csplit[] = "csplit"; +static char __pyx_k_encode[] = "encode"; +static char __pyx_k_format[] = "format"; +static char __pyx_k_import[] = "__import__"; +static char __pyx_k_module[] = "__module__"; +static char __pyx_k_name_2[] = "__name__"; +static char __pyx_k_phrase[] = "_phrase"; +static char __pyx_k_scores[] = "scores"; +static char __pyx_k_tagger[] = "tagger"; +static char __pyx_k_weight[] = "weight"; +static char __pyx_k_density[] = "density"; +static char __pyx_k_genexpr[] = "genexpr"; +static char __pyx_k_grammar[] = "grammar"; +static char __pyx_k_prepare[] = "__prepare__"; +static char __pyx_k_replace[] = "replace"; +static char __pyx_k_s_s_s_s[] = "%s ||| %s ||| %s ||| %s"; +static char __pyx_k_IBM_BLEU[] = "IBM_BLEU"; +static char __pyx_k_KeyError[] = "KeyError"; +static char __pyx_k_encoding[] = "encoding"; +static char __pyx_k_evaluate[] = "evaluate"; +static char __pyx_k_in_edges[] = "in_edges"; +static char __pyx_k_lexalign[] = "lexalign"; +static char __pyx_k_lextrans[] = "lextrans"; +static char __pyx_k_phrase_2[] = "phrase"; +static char __pyx_k_qualname[] = "__qualname__"; +static char __pyx_k_sentence[] = "sentence"; +static char __pyx_k_Exception[] = "Exception"; +static char __pyx_k_QCRI_BLEU[] = "QCRI_BLEU"; +static char __pyx_k_TypeError[] = "TypeError"; +static char __pyx_k_enumerate[] = "enumerate"; +static char __pyx_k_evaluator[] = "evaluator"; +static char __pyx_k_formalism[] = "formalism"; +static char __pyx_k_metaclass[] = "__metaclass__"; +static char __pyx_k_IndexError[] = "IndexError"; +static char __pyx_k_ValueError[] = "ValueError"; +static char __pyx_k_alignments[] = "alignments"; +static char __pyx_k_beam_alpha[] = "beam_alpha"; +static char __pyx_k_cdec__cdec[] = "cdec._cdec"; +static char __pyx_k_config_str[] = "config_str"; +static char __pyx_k_hypergraph[] = "hypergraph"; +static char __pyx_k_pyx_vtable[] = "__pyx_vtable__"; +static char __pyx_k_rankdir_LR[] = "rankdir = LR;"; +static char __pyx_k_set_silent[] = "set_silent"; +static char __pyx_k_startswith[] = "startswith"; +static char __pyx_k_ParseFailed[] = "ParseFailed"; +static char __pyx_k_cdec_sa__sa[] = "cdec.sa._sa"; +static char __pyx_k_d_d_label_s[] = "%d -> %d [label=\"%s\"];"; +static char __pyx_k_make_config[] = "_make_config"; +static char __pyx_k_InvalidConfig[] = "InvalidConfig"; +static char __pyx_k_NotImplemented[] = "NotImplemented"; +static char __pyx_k_digraph_lattice[] = "digraph lattice {"; +static char __pyx_k_node_shape_circle[] = "node [shape=circle];"; +static char __pyx_k_todot_locals_lines[] = "todot..lines"; +static char __pyx_k_formalism_s_unknown[] = "formalism \"%s\" unknown"; +static char __pyx_k_d_shape_doublecircle[] = "%d [shape=doublecircle]"; +static char __pyx_k_csplit_preserve_full_word[] = "csplit_preserve_full_word"; +static char __pyx_k_lattice_index_out_of_range[] = "lattice index out of range"; +static char __pyx_k_Cannot_convert_type_s_to_str[] = "Cannot convert type %s to str"; +static char __pyx_k_cannot_create_lattice_from_s[] = "cannot create lattice from %s"; +static char __pyx_k_Cannot_translate_input_type_s[] = "Cannot translate input type %s"; +static char __pyx_k_cannot_reweight_hypergraph_with[] = "cannot reweight hypergraph with %s"; +static char __pyx_k_usr0_home_cdyer_cdec_python_cde[] = "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi"; +static char __pyx_k_candidate_set_index_out_of_range[] = "candidate set index out of range"; +static char __pyx_k_cannot_initialize_weights_with_s[] = "cannot initialize weights with %s"; +static char __pyx_k_cannot_intersect_hypergraph_with[] = "cannot intersect hypergraph with %s"; +static char __pyx_k_cannot_take_the_dot_product_of_s[] = "cannot take the dot product of %s and SparseVector"; +static char __pyx_k_comparison_not_implemented_for_H[] = "comparison not implemented for HypergraphEdge"; +static char __pyx_k_comparison_not_implemented_for_S[] = "comparison not implemented for SparseVector"; +static char __pyx_k_sufficient_stats_vector_index_ou[] = "sufficient stats vector index out of range"; +static char __pyx_k_the_grammar_should_contain_TRule[] = "the grammar should contain TRule objects"; +static char __pyx_k_usr0_home_cdyer_cdec_python_cde_2[] = "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi"; +static char __pyx_k_usr0_home_cdyer_cdec_python_cde_3[] = "/usr0/home/cdyer/cdec/python/cdec/_cdec.pyx"; +static char __pyx_k_comparison_not_implemented_for_H_2[] = "comparison not implemented for HypergraphNode"; +static PyObject *__pyx_n_s_BLEU; +static PyObject *__pyx_n_s_CER; +static PyObject *__pyx_kp_s_Cannot_translate_input_type_s; +static PyObject *__pyx_n_s_Exception; +static PyObject *__pyx_n_s_IBM_BLEU; +static PyObject *__pyx_n_s_IndexError; +static PyObject *__pyx_n_s_InvalidConfig; +static PyObject *__pyx_n_s_KeyError; +static PyObject *__pyx_n_s_NotImplemented; +static PyObject *__pyx_n_s_ParseFailed; +static PyObject *__pyx_n_s_QCRI; +static PyObject *__pyx_n_s_QCRI_BLEU; +static PyObject *__pyx_n_s_SSK; +static PyObject *__pyx_n_s_TER; +static PyObject *__pyx_n_s_TypeError; +static PyObject *__pyx_n_s_ValueError; +static PyObject *__pyx_kp_s__10; +static PyObject *__pyx_kp_s__11; +static PyObject *__pyx_kp_s__13; +static PyObject *__pyx_kp_s__16; +static PyObject *__pyx_kp_s__20; +static PyObject *__pyx_n_s__23; +static PyObject *__pyx_kp_s__4; +static PyObject *__pyx_n_s_a; +static PyObject *__pyx_n_s_alignments; +static PyObject *__pyx_n_s_append; +static PyObject *__pyx_n_s_args; +static PyObject *__pyx_n_s_beam_alpha; +static PyObject *__pyx_kp_s_candidate_set_index_out_of_range; +static PyObject *__pyx_kp_s_cannot_create_lattice_from_s; +static PyObject *__pyx_kp_s_cannot_initialize_weights_with_s; +static PyObject *__pyx_kp_s_cannot_intersect_hypergraph_with; +static PyObject *__pyx_kp_s_cannot_reweight_hypergraph_with; +static PyObject *__pyx_kp_s_cannot_take_the_dot_product_of_s; +static PyObject *__pyx_n_s_cat; +static PyObject *__pyx_n_s_cdec__cdec; +static PyObject *__pyx_n_s_cdec_sa__sa; +static PyObject *__pyx_n_s_class; +static PyObject *__pyx_n_s_close; +static PyObject *__pyx_kp_s_comparison_not_implemented_for_H; +static PyObject *__pyx_kp_s_comparison_not_implemented_for_H_2; +static PyObject *__pyx_kp_s_comparison_not_implemented_for_S; +static PyObject *__pyx_n_s_config; +static PyObject *__pyx_n_s_config_str; +static PyObject *__pyx_n_s_csplit; +static PyObject *__pyx_n_s_csplit_preserve_full_word; +static PyObject *__pyx_kp_s_d; +static PyObject *__pyx_kp_s_d_d_label_s; +static PyObject *__pyx_kp_s_d_shape_doublecircle; +static PyObject *__pyx_n_s_delta; +static PyObject *__pyx_n_s_density; +static PyObject *__pyx_n_s_dict; +static PyObject *__pyx_kp_s_digraph_lattice; +static PyObject *__pyx_n_s_doc; +static PyObject *__pyx_n_s_dot; +static PyObject *__pyx_n_s_e; +static PyObject *__pyx_n_s_encode; +static PyObject *__pyx_n_s_encoding; +static PyObject *__pyx_n_s_enter; +static PyObject *__pyx_n_s_enumerate; +static PyObject *__pyx_n_s_eval; +static PyObject *__pyx_n_s_evaluate; +static PyObject *__pyx_n_s_evaluator; +static PyObject *__pyx_n_s_exit; +static PyObject *__pyx_n_s_f; +static PyObject *__pyx_n_s_formalism; +static PyObject *__pyx_kp_s_formalism_s_unknown; +static PyObject *__pyx_n_s_format; +static PyObject *__pyx_n_s_fst; +static PyObject *__pyx_n_s_genexpr; +static PyObject *__pyx_n_s_get; +static PyObject *__pyx_n_s_grammar; +static PyObject *__pyx_n_s_hyp; +static PyObject *__pyx_n_s_hypergraph; +static PyObject *__pyx_n_s_i; +static PyObject *__pyx_n_s_import; +static PyObject *__pyx_n_s_in_edges; +static PyObject *__pyx_n_s_info; +static PyObject *__pyx_n_s_init; +static PyObject *__pyx_n_s_inp; +static PyObject *__pyx_n_s_items; +static PyObject *__pyx_n_s_join; +static PyObject *__pyx_n_s_k; +static PyObject *__pyx_n_s_key; +static PyObject *__pyx_n_s_label; +static PyObject *__pyx_kp_s_lattice_index_out_of_range; +static PyObject *__pyx_n_s_lexalign; +static PyObject *__pyx_n_s_lextrans; +static PyObject *__pyx_n_s_lhs; +static PyObject *__pyx_n_s_lines; +static PyObject *__pyx_n_s_main; +static PyObject *__pyx_n_s_make_config; +static PyObject *__pyx_n_s_metaclass; +static PyObject *__pyx_n_s_module; +static PyObject *__pyx_n_s_name; +static PyObject *__pyx_n_s_name_2; +static PyObject *__pyx_kp_s_node_shape_circle; +static PyObject *__pyx_n_s_open; +static PyObject *__pyx_n_s_pb; +static PyObject *__pyx_n_s_phrase; +static PyObject *__pyx_n_s_phrase_2; +static PyObject *__pyx_n_s_plf; +static PyObject *__pyx_n_s_prepare; +static PyObject *__pyx_n_s_pyx_vtable; +static PyObject *__pyx_n_s_qualname; +static PyObject *__pyx_n_s_range; +static PyObject *__pyx_kp_s_rankdir_LR; +static PyObject *__pyx_n_s_ref; +static PyObject *__pyx_n_s_refs; +static PyObject *__pyx_n_s_replace; +static PyObject *__pyx_n_s_rhs; +static PyObject *__pyx_n_s_rules; +static PyObject *__pyx_kp_s_s; +static PyObject *__pyx_kp_s_s_d; +static PyObject *__pyx_kp_s_s_s; +static PyObject *__pyx_kp_s_s_s_2; +static PyObject *__pyx_kp_s_s_s_3; +static PyObject *__pyx_kp_s_s_s_s_s; +static PyObject *__pyx_n_s_sa; +static PyObject *__pyx_n_s_scfg; +static PyObject *__pyx_n_s_score; +static PyObject *__pyx_n_s_scores; +static PyObject *__pyx_n_s_self; +static PyObject *__pyx_n_s_send; +static PyObject *__pyx_n_s_sentence; +static PyObject *__pyx_n_s_set_silent; +static PyObject *__pyx_n_s_span; +static PyObject *__pyx_n_s_split; +static PyObject *__pyx_n_s_startswith; +static PyObject *__pyx_n_s_strip; +static PyObject *__pyx_kp_s_sufficient_stats_vector_index_ou; +static PyObject *__pyx_n_s_super; +static PyObject *__pyx_n_s_tagger; +static PyObject *__pyx_n_s_test; +static PyObject *__pyx_n_s_text; +static PyObject *__pyx_kp_s_the_grammar_should_contain_TRule; +static PyObject *__pyx_n_s_throw; +static PyObject *__pyx_n_s_todot_locals_lines; +static PyObject *__pyx_kp_s_usr0_home_cdyer_cdec_python_cde; +static PyObject *__pyx_kp_s_usr0_home_cdyer_cdec_python_cde_2; +static PyObject *__pyx_kp_s_usr0_home_cdyer_cdec_python_cde_3; +static PyObject *__pyx_n_s_utf8; +static PyObject *__pyx_n_s_value; +static PyObject *__pyx_n_s_weight; +static PyObject *__pyx_n_s_yn; static PyObject *__pyx_int_0; static PyObject *__pyx_int_1; -static PyObject *__pyx_k_tuple_2; -static PyObject *__pyx_k_tuple_5; -static PyObject *__pyx_k_tuple_6; -static PyObject *__pyx_k_tuple_14; -static PyObject *__pyx_k_tuple_19; -static PyObject *__pyx_k_tuple_21; -static PyObject *__pyx_k_tuple_24; -static PyObject *__pyx_k_tuple_25; -static PyObject *__pyx_k_tuple_32; -static PyObject *__pyx_k_tuple_35; -static PyObject *__pyx_k_tuple_41; -static PyObject *__pyx_k_tuple_43; -static PyObject *__pyx_k_tuple_45; -static PyObject *__pyx_k_tuple_51; -static PyObject *__pyx_k_tuple_52; -static PyObject *__pyx_k_tuple_56; -static PyObject *__pyx_k_tuple_59; -static PyObject *__pyx_k_tuple_60; -static PyObject *__pyx_k_tuple_61; -static PyObject *__pyx_k_tuple_62; -static PyObject *__pyx_k_tuple_63; -static PyObject *__pyx_k_tuple_64; -static PyObject *__pyx_k_tuple_67; -static PyObject *__pyx_k_codeobj_36; -static PyObject *__pyx_k_codeobj_57; -static PyObject *__pyx_k_codeobj_65; -static PyObject *__pyx_k_codeobj_68; +static PyObject *__pyx_tuple_; +static PyObject *__pyx_tuple__2; +static PyObject *__pyx_tuple__3; +static PyObject *__pyx_tuple__5; +static PyObject *__pyx_tuple__6; +static PyObject *__pyx_tuple__7; +static PyObject *__pyx_tuple__8; +static PyObject *__pyx_tuple__9; +static PyObject *__pyx_tuple__12; +static PyObject *__pyx_tuple__14; +static PyObject *__pyx_tuple__17; +static PyObject *__pyx_tuple__18; +static PyObject *__pyx_tuple__19; +static PyObject *__pyx_tuple__21; +static PyObject *__pyx_tuple__22; +static PyObject *__pyx_tuple__24; +static PyObject *__pyx_tuple__26; +static PyObject *__pyx_tuple__27; +static PyObject *__pyx_tuple__28; +static PyObject *__pyx_tuple__29; +static PyObject *__pyx_tuple__30; +static PyObject *__pyx_tuple__31; +static PyObject *__pyx_tuple__33; +static PyObject *__pyx_codeobj__15; +static PyObject *__pyx_codeobj__25; +static PyObject *__pyx_codeobj__32; +static PyObject *__pyx_codeobj__34; /* "cdec/_cdec.pyx":6 * cimport decoder @@ -2512,7 +2621,7 @@ static PyObject *__pyx_k_codeobj_68; */ static PyObject *__pyx_f_4cdec_5_cdec_as_str(PyObject *__pyx_v_data, struct __pyx_opt_args_4cdec_5_cdec_as_str *__pyx_optional_args) { - char *__pyx_v_error_msg = ((char *)__pyx_k_1); + char *__pyx_v_error_msg = ((char *)__pyx_k_Cannot_convert_type_s_to_str); PyObject *__pyx_v_ret = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -2549,12 +2658,12 @@ static PyObject *__pyx_f_4cdec_5_cdec_as_str(PyObject *__pyx_v_data, struct __py * elif isinstance(data, str): * ret = data */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s__encode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_4)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_4)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ret = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L3; @@ -2578,9 +2687,11 @@ static PyObject *__pyx_f_4cdec_5_cdec_as_str(PyObject *__pyx_v_data, struct __py * else: * raise TypeError(error_msg.format(type(data))) */ - if (!(likely(PyBytes_CheckExact(__pyx_v_data))||((__pyx_v_data) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_v_data)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_INCREF(__pyx_v_data); - __pyx_v_ret = ((PyObject*)__pyx_v_data); + if (!(likely(PyBytes_CheckExact(__pyx_v_data))||((__pyx_v_data) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_data)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __pyx_v_data; + __Pyx_INCREF(__pyx_t_4); + __pyx_v_ret = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; goto __pyx_L3; } /*else*/ { @@ -2593,27 +2704,27 @@ static PyObject *__pyx_f_4cdec_5_cdec_as_str(PyObject *__pyx_v_data, struct __py * */ __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_error_msg); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_4)); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_t_4), __pyx_n_s__format); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_data))); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)Py_TYPE(__pyx_v_data))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_data))); - __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -2627,13 +2738,20 @@ static PyObject *__pyx_f_4cdec_5_cdec_as_str(PyObject *__pyx_v_data, struct __py * * include "vectors.pxi" */ - __Pyx_XDECREF(((PyObject *)__pyx_r)); - __Pyx_INCREF(((PyObject *)__pyx_v_ret)); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_ret); __pyx_r = __pyx_v_ret; goto __pyx_L0; - __pyx_r = ((PyObject*)Py_None); __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "cdec/_cdec.pyx":6 + * cimport decoder + * + * cdef bytes as_str(data, char* error_msg='Cannot convert type %s to str'): # <<<<<<<<<<<<<< + * cdef bytes ret + * if isinstance(data, unicode): + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); @@ -2647,6 +2765,14 @@ static PyObject *__pyx_f_4cdec_5_cdec_as_str(PyObject *__pyx_v_data, struct __py return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":7 + * cdef bint owned # if True, do not manage memory + * + * def __init__(self): # <<<<<<<<<<<<<< + * """DenseVector() -> Dense weight/feature vector.""" + * self.vector = new vector[weight_t]() + */ + /* Python wrapper */ static int __pyx_pw_4cdec_5_cdec_11DenseVector_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4cdec_5_cdec_11DenseVector___init__[] = "DenseVector() -> Dense weight/feature vector."; @@ -2661,18 +2787,12 @@ static int __pyx_pw_4cdec_5_cdec_11DenseVector_1__init__(PyObject *__pyx_v_self, __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1; __pyx_r = __pyx_pf_4cdec_5_cdec_11DenseVector___init__(((struct __pyx_obj_4cdec_5_cdec_DenseVector *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":7 - * cdef bint owned # if True, do not manage memory - * - * def __init__(self): # <<<<<<<<<<<<<< - * """DenseVector() -> Dense weight/feature vector.""" - * self.vector = new vector[weight_t]() - */ - static int __pyx_pf_4cdec_5_cdec_11DenseVector___init__(struct __pyx_obj_4cdec_5_cdec_DenseVector *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations @@ -2682,7 +2802,7 @@ static int __pyx_pf_4cdec_5_cdec_11DenseVector___init__(struct __pyx_obj_4cdec_5 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":9 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":9 * def __init__(self): * """DenseVector() -> Dense weight/feature vector.""" * self.vector = new vector[weight_t]() # <<<<<<<<<<<<<< @@ -2697,7 +2817,7 @@ static int __pyx_pf_4cdec_5_cdec_11DenseVector___init__(struct __pyx_obj_4cdec_5 } __pyx_v_self->vector = __pyx_t_1; - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":10 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":10 * """DenseVector() -> Dense weight/feature vector.""" * self.vector = new vector[weight_t]() * self.owned = False # <<<<<<<<<<<<<< @@ -2706,6 +2826,15 @@ static int __pyx_pf_4cdec_5_cdec_11DenseVector___init__(struct __pyx_obj_4cdec_5 */ __pyx_v_self->owned = 0; + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":7 + * cdef bint owned # if True, do not manage memory + * + * def __init__(self): # <<<<<<<<<<<<<< + * """DenseVector() -> Dense weight/feature vector.""" + * self.vector = new vector[weight_t]() + */ + + /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; @@ -2716,29 +2845,31 @@ static int __pyx_pf_4cdec_5_cdec_11DenseVector___init__(struct __pyx_obj_4cdec_5 return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":12 + * self.owned = False + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * if not self.owned: + * del self.vector + */ + /* Python wrapper */ static void __pyx_pw_4cdec_5_cdec_11DenseVector_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_4cdec_5_cdec_11DenseVector_3__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_4cdec_5_cdec_11DenseVector_2__dealloc__(((struct __pyx_obj_4cdec_5_cdec_DenseVector *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); } -/* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":12 - * self.owned = False - * - * def __dealloc__(self): # <<<<<<<<<<<<<< - * if not self.owned: - * del self.vector - */ - static void __pyx_pf_4cdec_5_cdec_11DenseVector_2__dealloc__(struct __pyx_obj_4cdec_5_cdec_DenseVector *__pyx_v_self) { __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":13 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":13 * * def __dealloc__(self): * if not self.owned: # <<<<<<<<<<<<<< @@ -2748,7 +2879,7 @@ static void __pyx_pf_4cdec_5_cdec_11DenseVector_2__dealloc__(struct __pyx_obj_4c __pyx_t_1 = ((!(__pyx_v_self->owned != 0)) != 0); if (__pyx_t_1) { - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":14 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":14 * def __dealloc__(self): * if not self.owned: * del self.vector # <<<<<<<<<<<<<< @@ -2760,9 +2891,26 @@ static void __pyx_pf_4cdec_5_cdec_11DenseVector_2__dealloc__(struct __pyx_obj_4c } __pyx_L3:; + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":12 + * self.owned = False + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * if not self.owned: + * del self.vector + */ + + /* function exit code */ __Pyx_RefNannyFinishContext(); } +/* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":16 + * del self.vector + * + * def __len__(self): # <<<<<<<<<<<<<< + * return self.vector.size() + * + */ + /* Python wrapper */ static Py_ssize_t __pyx_pw_4cdec_5_cdec_11DenseVector_5__len__(PyObject *__pyx_v_self); /*proto*/ static Py_ssize_t __pyx_pw_4cdec_5_cdec_11DenseVector_5__len__(PyObject *__pyx_v_self) { @@ -2770,24 +2918,18 @@ static Py_ssize_t __pyx_pw_4cdec_5_cdec_11DenseVector_5__len__(PyObject *__pyx_v __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_11DenseVector_4__len__(((struct __pyx_obj_4cdec_5_cdec_DenseVector *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":16 - * del self.vector - * - * def __len__(self): # <<<<<<<<<<<<<< - * return self.vector.size() - * - */ - static Py_ssize_t __pyx_pf_4cdec_5_cdec_11DenseVector_4__len__(struct __pyx_obj_4cdec_5_cdec_DenseVector *__pyx_v_self) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":17 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":17 * * def __len__(self): * return self.vector.size() # <<<<<<<<<<<<<< @@ -2797,12 +2939,28 @@ static Py_ssize_t __pyx_pf_4cdec_5_cdec_11DenseVector_4__len__(struct __pyx_obj_ __pyx_r = __pyx_v_self->vector->size(); goto __pyx_L0; - __pyx_r = 0; + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":16 + * del self.vector + * + * def __len__(self): # <<<<<<<<<<<<<< + * return self.vector.size() + * + */ + + /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":19 + * return self.vector.size() + * + * def __getitem__(self, char* fname): # <<<<<<<<<<<<<< + * cdef int fid = FDConvert(fname) + * if 0 <= fid < self.vector.size(): + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_11DenseVector_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_fname); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_11DenseVector_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_fname) { @@ -2823,18 +2981,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_11DenseVector_7__getitem__(PyObject *__py return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4cdec_5_cdec_11DenseVector_6__getitem__(((struct __pyx_obj_4cdec_5_cdec_DenseVector *)__pyx_v_self), ((char *)__pyx_v_fname)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":19 - * return self.vector.size() - * - * def __getitem__(self, char* fname): # <<<<<<<<<<<<<< - * cdef int fid = FDConvert(fname) - * if 0 <= fid < self.vector.size(): - */ - static PyObject *__pyx_pf_4cdec_5_cdec_11DenseVector_6__getitem__(struct __pyx_obj_4cdec_5_cdec_DenseVector *__pyx_v_self, char *__pyx_v_fname) { int __pyx_v_fid; PyObject *__pyx_r = NULL; @@ -2848,7 +3000,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_11DenseVector_6__getitem__(struct __pyx_o int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getitem__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":20 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":20 * * def __getitem__(self, char* fname): * cdef int fid = FDConvert(fname) # <<<<<<<<<<<<<< @@ -2857,7 +3009,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_11DenseVector_6__getitem__(struct __pyx_o */ __pyx_v_fid = FD::Convert(__pyx_v_fname); - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":21 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":21 * def __getitem__(self, char* fname): * cdef int fid = FDConvert(fname) * if 0 <= fid < self.vector.size(): # <<<<<<<<<<<<<< @@ -2871,7 +3023,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_11DenseVector_6__getitem__(struct __pyx_o __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":22 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":22 * cdef int fid = FDConvert(fname) * if 0 <= fid < self.vector.size(): * return self.vector[0][fid] # <<<<<<<<<<<<<< @@ -2884,11 +3036,9 @@ static PyObject *__pyx_pf_4cdec_5_cdec_11DenseVector_6__getitem__(struct __pyx_o __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - goto __pyx_L3; } - __pyx_L3:; - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":23 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":23 * if 0 <= fid < self.vector.size(): * return self.vector[0][fid] * raise KeyError(fname) # <<<<<<<<<<<<<< @@ -2896,21 +3046,28 @@ static PyObject *__pyx_pf_4cdec_5_cdec_11DenseVector_6__getitem__(struct __pyx_o * def __setitem__(self, char* fname, float value): */ __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_fname); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_3)); - __Pyx_GIVEREF(((PyObject *)__pyx_t_3)); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyObject_Call(__pyx_builtin_KeyError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; + __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 = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":19 + * return self.vector.size() + * + * def __getitem__(self, char* fname): # <<<<<<<<<<<<<< + * cdef int fid = FDConvert(fname) + * if 0 <= fid < self.vector.size(): + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); @@ -2922,6 +3079,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_11DenseVector_6__getitem__(struct __pyx_o return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":25 + * raise KeyError(fname) + * + * def __setitem__(self, char* fname, float value): # <<<<<<<<<<<<<< + * cdef int fid = FDConvert(fname) + * if fid < 0: raise KeyError(fname) + */ + /* Python wrapper */ static int __pyx_pw_4cdec_5_cdec_11DenseVector_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_fname, PyObject *__pyx_arg_value); /*proto*/ static int __pyx_pw_4cdec_5_cdec_11DenseVector_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_fname, PyObject *__pyx_arg_value) { @@ -2946,18 +3111,12 @@ static int __pyx_pw_4cdec_5_cdec_11DenseVector_9__setitem__(PyObject *__pyx_v_se return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4cdec_5_cdec_11DenseVector_8__setitem__(((struct __pyx_obj_4cdec_5_cdec_DenseVector *)__pyx_v_self), ((char *)__pyx_v_fname), ((float)__pyx_v_value)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":25 - * raise KeyError(fname) - * - * def __setitem__(self, char* fname, float value): # <<<<<<<<<<<<<< - * cdef int fid = FDConvert(fname) - * if fid < 0: raise KeyError(fname) - */ - static int __pyx_pf_4cdec_5_cdec_11DenseVector_8__setitem__(struct __pyx_obj_4cdec_5_cdec_DenseVector *__pyx_v_self, char *__pyx_v_fname, float __pyx_v_value) { int __pyx_v_fid; int __pyx_r; @@ -2970,7 +3129,7 @@ static int __pyx_pf_4cdec_5_cdec_11DenseVector_8__setitem__(struct __pyx_obj_4cd int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setitem__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":26 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":26 * * def __setitem__(self, char* fname, float value): * cdef int fid = FDConvert(fname) # <<<<<<<<<<<<<< @@ -2979,7 +3138,7 @@ static int __pyx_pf_4cdec_5_cdec_11DenseVector_8__setitem__(struct __pyx_obj_4cd */ __pyx_v_fid = FD::Convert(__pyx_v_fname); - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":27 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":27 * def __setitem__(self, char* fname, float value): * cdef int fid = FDConvert(fname) * if fid < 0: raise KeyError(fname) # <<<<<<<<<<<<<< @@ -2989,23 +3148,21 @@ static int __pyx_pf_4cdec_5_cdec_11DenseVector_8__setitem__(struct __pyx_obj_4cd __pyx_t_1 = ((__pyx_v_fid < 0) != 0); if (__pyx_t_1) { __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_fname); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_2)); - __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyObject_Call(__pyx_builtin_KeyError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - goto __pyx_L3; } - __pyx_L3:; - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":28 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":28 * cdef int fid = FDConvert(fname) * if fid < 0: raise KeyError(fname) * if self.vector.size() <= fid: # <<<<<<<<<<<<<< @@ -3015,7 +3172,7 @@ static int __pyx_pf_4cdec_5_cdec_11DenseVector_8__setitem__(struct __pyx_obj_4cd __pyx_t_1 = ((__pyx_v_self->vector->size() <= __pyx_v_fid) != 0); if (__pyx_t_1) { - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":29 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":29 * if fid < 0: raise KeyError(fname) * if self.vector.size() <= fid: * self.vector.resize(fid + 1) # <<<<<<<<<<<<<< @@ -3027,7 +3184,7 @@ static int __pyx_pf_4cdec_5_cdec_11DenseVector_8__setitem__(struct __pyx_obj_4cd } __pyx_L4:; - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":30 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":30 * if self.vector.size() <= fid: * self.vector.resize(fid + 1) * self.vector[0][fid] = value # <<<<<<<<<<<<<< @@ -3036,6 +3193,15 @@ static int __pyx_pf_4cdec_5_cdec_11DenseVector_8__setitem__(struct __pyx_obj_4cd */ ((__pyx_v_self->vector[0])[__pyx_v_fid]) = __pyx_v_value; + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":25 + * raise KeyError(fname) + * + * def __setitem__(self, char* fname, float value): # <<<<<<<<<<<<<< + * cdef int fid = FDConvert(fname) + * if fid < 0: raise KeyError(fname) + */ + + /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; @@ -3049,6 +3215,14 @@ static int __pyx_pf_4cdec_5_cdec_11DenseVector_8__setitem__(struct __pyx_obj_4cd } static PyObject *__pyx_gb_4cdec_5_cdec_11DenseVector_12generator(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ +/* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":32 + * self.vector[0][fid] = value + * + * def __iter__(self): # <<<<<<<<<<<<<< + * cdef unsigned fid + * for fid in range(1, self.vector.size()): + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_11DenseVector_11__iter__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_11DenseVector_11__iter__(PyObject *__pyx_v_self) { @@ -3056,18 +3230,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_11DenseVector_11__iter__(PyObject *__pyx_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_11DenseVector_10__iter__(((struct __pyx_obj_4cdec_5_cdec_DenseVector *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":32 - * self.vector[0][fid] = value - * - * def __iter__(self): # <<<<<<<<<<<<<< - * cdef unsigned fid - * for fid in range(1, self.vector.size()): - */ - static PyObject *__pyx_pf_4cdec_5_cdec_11DenseVector_10__iter__(struct __pyx_obj_4cdec_5_cdec_DenseVector *__pyx_v_self) { struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__ *__pyx_cur_scope; PyObject *__pyx_r = NULL; @@ -3092,6 +3260,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_11DenseVector_10__iter__(struct __pyx_obj return (PyObject *) gen; } + /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; @@ -3128,7 +3297,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_11DenseVector_12generator(__pyx_Generator __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":34 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":34 * def __iter__(self): * cdef unsigned fid * for fid in range(1, self.vector.size()): # <<<<<<<<<<<<<< @@ -3139,7 +3308,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_11DenseVector_12generator(__pyx_Generator for (__pyx_t_2 = 1; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_cur_scope->__pyx_v_fid = __pyx_t_2; - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":35 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":35 * cdef unsigned fid * for fid in range(1, self.vector.size()): * yield str(FDConvert(fid).c_str()), self.vector[0][fid] # <<<<<<<<<<<<<< @@ -3147,15 +3316,15 @@ static PyObject *__pyx_gb_4cdec_5_cdec_11DenseVector_12generator(__pyx_Generator * def dot(self, SparseVector other): */ __pyx_t_3 = __Pyx_PyBytes_FromString(FD::Convert(__pyx_cur_scope->__pyx_v_fid).c_str()); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_3)); - __Pyx_GIVEREF(((PyObject *)__pyx_t_3)); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyFloat_FromDouble(((__pyx_cur_scope->__pyx_v_self->vector[0])[__pyx_cur_scope->__pyx_v_fid])); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -3166,7 +3335,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_11DenseVector_12generator(__pyx_Generator __Pyx_GIVEREF(__pyx_t_4); __pyx_t_3 = 0; __pyx_t_4 = 0; - __pyx_r = ((PyObject *)__pyx_t_5); + __pyx_r = __pyx_t_5; __pyx_t_5 = 0; __pyx_cur_scope->__pyx_t_0 = __pyx_t_1; __pyx_cur_scope->__pyx_t_1 = __pyx_t_2; @@ -3180,6 +3349,16 @@ static PyObject *__pyx_gb_4cdec_5_cdec_11DenseVector_12generator(__pyx_Generator __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":32 + * self.vector[0][fid] = value + * + * def __iter__(self): # <<<<<<<<<<<<<< + * cdef unsigned fid + * for fid in range(1, self.vector.size()): + */ + + /* function exit code */ PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; @@ -3195,6 +3374,14 @@ static PyObject *__pyx_gb_4cdec_5_cdec_11DenseVector_12generator(__pyx_Generator return NULL; } +/* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":37 + * yield str(FDConvert(fid).c_str()), self.vector[0][fid] + * + * def dot(self, SparseVector other): # <<<<<<<<<<<<<< + * """vector.dot(SparseVector other) -> Dot product of the two vectors.""" + * return other.dot(self) + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_11DenseVector_14dot(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ static char __pyx_doc_4cdec_5_cdec_11DenseVector_13dot[] = "vector.dot(SparseVector other) -> Dot product of the two vectors."; @@ -3207,6 +3394,8 @@ static PyObject *__pyx_pw_4cdec_5_cdec_11DenseVector_14dot(PyObject *__pyx_v_sel __Pyx_RefNannySetupContext("dot (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_4cdec_5_cdec_SparseVector, 1, "other", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_4cdec_5_cdec_11DenseVector_13dot(((struct __pyx_obj_4cdec_5_cdec_DenseVector *)__pyx_v_self), ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_other)); + + /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; @@ -3215,14 +3404,6 @@ static PyObject *__pyx_pw_4cdec_5_cdec_11DenseVector_14dot(PyObject *__pyx_v_sel return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":37 - * yield str(FDConvert(fid).c_str()), self.vector[0][fid] - * - * def dot(self, SparseVector other): # <<<<<<<<<<<<<< - * """vector.dot(SparseVector other) -> Dot product of the two vectors.""" - * return other.dot(self) - */ - static PyObject *__pyx_pf_4cdec_5_cdec_11DenseVector_13dot(struct __pyx_obj_4cdec_5_cdec_DenseVector *__pyx_v_self, struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_other) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -3234,7 +3415,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_11DenseVector_13dot(struct __pyx_obj_4cde int __pyx_clineno = 0; __Pyx_RefNannySetupContext("dot", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":39 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":39 * def dot(self, SparseVector other): * """vector.dot(SparseVector other) -> Dot product of the two vectors.""" * return other.dot(self) # <<<<<<<<<<<<<< @@ -3242,23 +3423,30 @@ static PyObject *__pyx_pf_4cdec_5_cdec_11DenseVector_13dot(struct __pyx_obj_4cde * def tosparse(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s__dot); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_dot); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 39; __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[1]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); - __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":37 + * yield str(FDConvert(fid).c_str()), self.vector[0][fid] + * + * def dot(self, SparseVector other): # <<<<<<<<<<<<<< + * """vector.dot(SparseVector other) -> Dot product of the two vectors.""" + * return other.dot(self) + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); @@ -3271,6 +3459,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_11DenseVector_13dot(struct __pyx_obj_4cde return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":41 + * return other.dot(self) + * + * def tosparse(self): # <<<<<<<<<<<<<< + * """vector.tosparse() -> Equivalent SparseVector.""" + * cdef SparseVector sparse = SparseVector.__new__(SparseVector) + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_11DenseVector_16tosparse(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_4cdec_5_cdec_11DenseVector_15tosparse[] = "vector.tosparse() -> Equivalent SparseVector."; @@ -3279,18 +3475,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_11DenseVector_16tosparse(PyObject *__pyx_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("tosparse (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_11DenseVector_15tosparse(((struct __pyx_obj_4cdec_5_cdec_DenseVector *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":41 - * return other.dot(self) - * - * def tosparse(self): # <<<<<<<<<<<<<< - * """vector.tosparse() -> Equivalent SparseVector.""" - * cdef SparseVector sparse = SparseVector.__new__(SparseVector) - */ - static PyObject *__pyx_pf_4cdec_5_cdec_11DenseVector_15tosparse(struct __pyx_obj_4cdec_5_cdec_DenseVector *__pyx_v_self) { struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_sparse = 0; PyObject *__pyx_r = NULL; @@ -3301,20 +3491,20 @@ static PyObject *__pyx_pf_4cdec_5_cdec_11DenseVector_15tosparse(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("tosparse", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":43 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":43 * def tosparse(self): * """vector.tosparse() -> Equivalent SparseVector.""" * cdef SparseVector sparse = SparseVector.__new__(SparseVector) # <<<<<<<<<<<<<< * sparse.vector = new FastSparseVector[weight_t]() * InitSparseVector(self.vector[0], sparse.vector) */ - __pyx_t_1 = __pyx_tp_new_4cdec_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SparseVector)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_tp_new_4cdec_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SparseVector)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4cdec_5_cdec_SparseVector)))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_sparse = ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_t_1); __pyx_t_1 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":44 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":44 * """vector.tosparse() -> Equivalent SparseVector.""" * cdef SparseVector sparse = SparseVector.__new__(SparseVector) * sparse.vector = new FastSparseVector[weight_t]() # <<<<<<<<<<<<<< @@ -3323,7 +3513,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_11DenseVector_15tosparse(struct __pyx_obj */ __pyx_v_sparse->vector = new FastSparseVector(); - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":45 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":45 * cdef SparseVector sparse = SparseVector.__new__(SparseVector) * sparse.vector = new FastSparseVector[weight_t]() * InitSparseVector(self.vector[0], sparse.vector) # <<<<<<<<<<<<<< @@ -3332,7 +3522,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_11DenseVector_15tosparse(struct __pyx_obj */ Weights::InitSparseVector((__pyx_v_self->vector[0]), __pyx_v_sparse->vector); - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":46 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":46 * sparse.vector = new FastSparseVector[weight_t]() * InitSparseVector(self.vector[0], sparse.vector) * return sparse # <<<<<<<<<<<<<< @@ -3344,8 +3534,15 @@ static PyObject *__pyx_pf_4cdec_5_cdec_11DenseVector_15tosparse(struct __pyx_obj __pyx_r = ((PyObject *)__pyx_v_sparse); goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":41 + * return other.dot(self) + * + * def tosparse(self): # <<<<<<<<<<<<<< + * """vector.tosparse() -> Equivalent SparseVector.""" + * cdef SparseVector sparse = SparseVector.__new__(SparseVector) + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cdec._cdec.DenseVector.tosparse", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -3357,6 +3554,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_11DenseVector_15tosparse(struct __pyx_obj return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":51 + * cdef FastSparseVector[weight_t]* vector + * + * def __init__(self): # <<<<<<<<<<<<<< + * """SparseVector() -> Sparse feature/weight vector.""" + * self.vector = new FastSparseVector[weight_t]() + */ + /* Python wrapper */ static int __pyx_pw_4cdec_5_cdec_12SparseVector_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4cdec_5_cdec_12SparseVector___init__[] = "SparseVector() -> Sparse feature/weight vector."; @@ -3371,24 +3576,18 @@ static int __pyx_pw_4cdec_5_cdec_12SparseVector_1__init__(PyObject *__pyx_v_self __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1; __pyx_r = __pyx_pf_4cdec_5_cdec_12SparseVector___init__(((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":51 - * cdef FastSparseVector[weight_t]* vector - * - * def __init__(self): # <<<<<<<<<<<<<< - * """SparseVector() -> Sparse feature/weight vector.""" - * self.vector = new FastSparseVector[weight_t]() - */ - static int __pyx_pf_4cdec_5_cdec_12SparseVector___init__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":53 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":53 * def __init__(self): * """SparseVector() -> Sparse feature/weight vector.""" * self.vector = new FastSparseVector[weight_t]() # <<<<<<<<<<<<<< @@ -3397,33 +3596,44 @@ static int __pyx_pf_4cdec_5_cdec_12SparseVector___init__(struct __pyx_obj_4cdec_ */ __pyx_v_self->vector = new FastSparseVector(); + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":51 + * cdef FastSparseVector[weight_t]* vector + * + * def __init__(self): # <<<<<<<<<<<<<< + * """SparseVector() -> Sparse feature/weight vector.""" + * self.vector = new FastSparseVector[weight_t]() + */ + + /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":55 + * self.vector = new FastSparseVector[weight_t]() + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * del self.vector + * + */ + /* Python wrapper */ static void __pyx_pw_4cdec_5_cdec_12SparseVector_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_4cdec_5_cdec_12SparseVector_3__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_4cdec_5_cdec_12SparseVector_2__dealloc__(((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); } -/* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":55 - * self.vector = new FastSparseVector[weight_t]() - * - * def __dealloc__(self): # <<<<<<<<<<<<<< - * del self.vector - * - */ - -static void __pyx_pf_4cdec_5_cdec_12SparseVector_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self) { +static void __pyx_pf_4cdec_5_cdec_12SparseVector_2__dealloc__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":56 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":56 * * def __dealloc__(self): * del self.vector # <<<<<<<<<<<<<< @@ -3432,9 +3642,26 @@ static void __pyx_pf_4cdec_5_cdec_12SparseVector_2__dealloc__(CYTHON_UNUSED stru */ delete __pyx_v_self->vector; + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":55 + * self.vector = new FastSparseVector[weight_t]() + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * del self.vector + * + */ + + /* function exit code */ __Pyx_RefNannyFinishContext(); } +/* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":58 + * del self.vector + * + * def copy(self): # <<<<<<<<<<<<<< + * """vector.copy() -> SparseVector copy.""" + * return self * 1 + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_5copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_4cdec_5_cdec_12SparseVector_4copy[] = "vector.copy() -> SparseVector copy."; @@ -3443,18 +3670,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_5copy(PyObject *__pyx_v_se __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("copy (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_12SparseVector_4copy(((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":58 - * del self.vector - * - * def copy(self): # <<<<<<<<<<<<<< - * """vector.copy() -> SparseVector copy.""" - * return self * 1 - */ - static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_4copy(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -3464,7 +3685,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_4copy(struct __pyx_obj_4cd int __pyx_clineno = 0; __Pyx_RefNannySetupContext("copy", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":60 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":60 * def copy(self): * """vector.copy() -> SparseVector copy.""" * return self * 1 # <<<<<<<<<<<<<< @@ -3478,8 +3699,15 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_4copy(struct __pyx_obj_4cd __pyx_t_1 = 0; goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":58 + * del self.vector + * + * def copy(self): # <<<<<<<<<<<<<< + * """vector.copy() -> SparseVector copy.""" + * return self * 1 + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cdec._cdec.SparseVector.copy", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -3490,6 +3718,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_4copy(struct __pyx_obj_4cd return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":62 + * return self * 1 + * + * def __getitem__(self, char* fname): # <<<<<<<<<<<<<< + * cdef int fid = FDConvert(fname) + * if fid < 0: raise KeyError(fname) + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_fname); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_fname) { @@ -3510,18 +3746,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_7__getitem__(PyObject *__p return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4cdec_5_cdec_12SparseVector_6__getitem__(((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_self), ((char *)__pyx_v_fname)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":62 - * return self * 1 - * - * def __getitem__(self, char* fname): # <<<<<<<<<<<<<< - * cdef int fid = FDConvert(fname) - * if fid < 0: raise KeyError(fname) - */ - static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_6__getitem__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self, char *__pyx_v_fname) { int __pyx_v_fid; PyObject *__pyx_r = NULL; @@ -3534,7 +3764,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_6__getitem__(struct __pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getitem__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":63 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":63 * * def __getitem__(self, char* fname): * cdef int fid = FDConvert(fname) # <<<<<<<<<<<<<< @@ -3543,7 +3773,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_6__getitem__(struct __pyx_ */ __pyx_v_fid = FD::Convert(__pyx_v_fname); - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":64 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":64 * def __getitem__(self, char* fname): * cdef int fid = FDConvert(fname) * if fid < 0: raise KeyError(fname) # <<<<<<<<<<<<<< @@ -3553,23 +3783,21 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_6__getitem__(struct __pyx_ __pyx_t_1 = ((__pyx_v_fid < 0) != 0); if (__pyx_t_1) { __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_fname); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_2)); - __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyObject_Call(__pyx_builtin_KeyError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - goto __pyx_L3; } - __pyx_L3:; - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":65 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":65 * cdef int fid = FDConvert(fname) * if fid < 0: raise KeyError(fname) * return self.vector.value(fid) # <<<<<<<<<<<<<< @@ -3583,8 +3811,15 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_6__getitem__(struct __pyx_ __pyx_t_2 = 0; goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":62 + * return self * 1 + * + * def __getitem__(self, char* fname): # <<<<<<<<<<<<<< + * cdef int fid = FDConvert(fname) + * if fid < 0: raise KeyError(fname) + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); @@ -3596,6 +3831,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_6__getitem__(struct __pyx_ return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":67 + * return self.vector.value(fid) + * + * def __setitem__(self, char* fname, float value): # <<<<<<<<<<<<<< + * cdef int fid = FDConvert(fname) + * if fid < 0: raise KeyError(fname) + */ + /* Python wrapper */ static int __pyx_pw_4cdec_5_cdec_12SparseVector_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_fname, PyObject *__pyx_arg_value); /*proto*/ static int __pyx_pw_4cdec_5_cdec_12SparseVector_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_fname, PyObject *__pyx_arg_value) { @@ -3620,18 +3863,12 @@ static int __pyx_pw_4cdec_5_cdec_12SparseVector_9__setitem__(PyObject *__pyx_v_s return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4cdec_5_cdec_12SparseVector_8__setitem__(((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_self), ((char *)__pyx_v_fname), ((float)__pyx_v_value)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":67 - * return self.vector.value(fid) - * - * def __setitem__(self, char* fname, float value): # <<<<<<<<<<<<<< - * cdef int fid = FDConvert(fname) - * if fid < 0: raise KeyError(fname) - */ - static int __pyx_pf_4cdec_5_cdec_12SparseVector_8__setitem__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self, char *__pyx_v_fname, float __pyx_v_value) { int __pyx_v_fid; int __pyx_r; @@ -3644,7 +3881,7 @@ static int __pyx_pf_4cdec_5_cdec_12SparseVector_8__setitem__(struct __pyx_obj_4c int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setitem__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":68 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":68 * * def __setitem__(self, char* fname, float value): * cdef int fid = FDConvert(fname) # <<<<<<<<<<<<<< @@ -3653,7 +3890,7 @@ static int __pyx_pf_4cdec_5_cdec_12SparseVector_8__setitem__(struct __pyx_obj_4c */ __pyx_v_fid = FD::Convert(__pyx_v_fname); - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":69 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":69 * def __setitem__(self, char* fname, float value): * cdef int fid = FDConvert(fname) * if fid < 0: raise KeyError(fname) # <<<<<<<<<<<<<< @@ -3663,23 +3900,21 @@ static int __pyx_pf_4cdec_5_cdec_12SparseVector_8__setitem__(struct __pyx_obj_4c __pyx_t_1 = ((__pyx_v_fid < 0) != 0); if (__pyx_t_1) { __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_fname); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_2)); - __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyObject_Call(__pyx_builtin_KeyError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - goto __pyx_L3; } - __pyx_L3:; - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":70 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":70 * cdef int fid = FDConvert(fname) * if fid < 0: raise KeyError(fname) * self.vector.set_value(fid, value) # <<<<<<<<<<<<<< @@ -3688,6 +3923,15 @@ static int __pyx_pf_4cdec_5_cdec_12SparseVector_8__setitem__(struct __pyx_obj_4c */ __pyx_v_self->vector->set_value(__pyx_v_fid, __pyx_v_value); + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":67 + * return self.vector.value(fid) + * + * def __setitem__(self, char* fname, float value): # <<<<<<<<<<<<<< + * cdef int fid = FDConvert(fname) + * if fid < 0: raise KeyError(fname) + */ + + /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; @@ -3701,6 +3945,14 @@ static int __pyx_pf_4cdec_5_cdec_12SparseVector_8__setitem__(struct __pyx_obj_4c } static PyObject *__pyx_gb_4cdec_5_cdec_12SparseVector_12generator1(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ +/* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":72 + * self.vector.set_value(fid, value) + * + * def __iter__(self): # <<<<<<<<<<<<<< + * cdef FastSparseVector[weight_t].const_iterator* it = new FastSparseVector[weight_t].const_iterator(self.vector[0], False) + * cdef unsigned i + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_11__iter__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_11__iter__(PyObject *__pyx_v_self) { @@ -3708,18 +3960,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_11__iter__(PyObject *__pyx __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_12SparseVector_10__iter__(((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":72 - * self.vector.set_value(fid, value) - * - * def __iter__(self): # <<<<<<<<<<<<<< - * cdef FastSparseVector[weight_t].const_iterator* it = new FastSparseVector[weight_t].const_iterator(self.vector[0], False) - * cdef unsigned i - */ - static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_10__iter__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self) { struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__ *__pyx_cur_scope; PyObject *__pyx_r = NULL; @@ -3744,6 +3990,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_10__iter__(struct __pyx_ob return (PyObject *) gen; } + /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; @@ -3765,6 +4012,15 @@ static PyObject *__pyx_gb_4cdec_5_cdec_12SparseVector_12generator1(__pyx_Generat PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + int __pyx_t_7; + char const *__pyx_t_8; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + PyObject *__pyx_t_13 = NULL; + PyObject *__pyx_t_14 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -3780,7 +4036,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_12SparseVector_12generator1(__pyx_Generat __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":73 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":73 * * def __iter__(self): * cdef FastSparseVector[weight_t].const_iterator* it = new FastSparseVector[weight_t].const_iterator(self.vector[0], False) # <<<<<<<<<<<<<< @@ -3789,7 +4045,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_12SparseVector_12generator1(__pyx_Generat */ __pyx_cur_scope->__pyx_v_it = new FastSparseVector::const_iterator((__pyx_cur_scope->__pyx_v_self->vector[0]), 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":75 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":75 * cdef FastSparseVector[weight_t].const_iterator* it = new FastSparseVector[weight_t].const_iterator(self.vector[0], False) * cdef unsigned i * try: # <<<<<<<<<<<<<< @@ -3798,7 +4054,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_12SparseVector_12generator1(__pyx_Generat */ /*try:*/ { - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":76 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":76 * cdef unsigned i * try: * for i in range(self.vector.size()): # <<<<<<<<<<<<<< @@ -3809,26 +4065,26 @@ static PyObject *__pyx_gb_4cdec_5_cdec_12SparseVector_12generator1(__pyx_Generat for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_cur_scope->__pyx_v_i = __pyx_t_2; - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":77 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":77 * try: * for i in range(self.vector.size()): * yield (str(FDConvert(it[0].ptr().first).c_str()), it[0].ptr().second) # <<<<<<<<<<<<<< * pinc(it[0]) # ++it * finally: */ - __pyx_t_3 = __Pyx_PyBytes_FromString(FD::Convert((__pyx_cur_scope->__pyx_v_it[0]).operator->()->first).c_str()); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L5;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L5;} + __pyx_t_3 = __Pyx_PyBytes_FromString(FD::Convert((__pyx_cur_scope->__pyx_v_it[0]).operator->()->first).c_str()); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_GOTREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_3)); - __Pyx_GIVEREF(((PyObject *)__pyx_t_3)); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L5;} + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; - __pyx_t_4 = PyFloat_FromDouble((__pyx_cur_scope->__pyx_v_it[0]).operator->()->second); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L5;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = PyFloat_FromDouble((__pyx_cur_scope->__pyx_v_it[0]).operator->()->second); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L5;} + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); @@ -3836,7 +4092,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_12SparseVector_12generator1(__pyx_Generat __Pyx_GIVEREF(__pyx_t_4); __pyx_t_3 = 0; __pyx_t_4 = 0; - __pyx_r = ((PyObject *)__pyx_t_5); + __pyx_r = __pyx_t_5; __pyx_t_5 = 0; __pyx_cur_scope->__pyx_t_0 = __pyx_t_1; __pyx_cur_scope->__pyx_t_1 = __pyx_t_2; @@ -3848,9 +4104,9 @@ static PyObject *__pyx_gb_4cdec_5_cdec_12SparseVector_12generator1(__pyx_Generat __pyx_L9_resume_from_yield:; __pyx_t_1 = __pyx_cur_scope->__pyx_t_0; __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L5;} + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L5_error;} - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":78 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":78 * for i in range(self.vector.size()): * yield (str(FDConvert(it[0].ptr().first).c_str()), it[0].ptr().second) * pinc(it[0]) # ++it # <<<<<<<<<<<<<< @@ -3861,7 +4117,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_12SparseVector_12generator1(__pyx_Generat } } - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":80 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":80 * pinc(it[0]) # ++it * finally: * del it # <<<<<<<<<<<<<< @@ -3869,38 +4125,59 @@ static PyObject *__pyx_gb_4cdec_5_cdec_12SparseVector_12generator1(__pyx_Generat * def dot(self, other): */ /*finally:*/ { - int __pyx_why; - PyObject *__pyx_exc_type, *__pyx_exc_value, *__pyx_exc_tb; - int __pyx_exc_lineno; - __pyx_exc_type = 0; __pyx_exc_value = 0; __pyx_exc_tb = 0; __pyx_exc_lineno = 0; - __pyx_why = 0; goto __pyx_L6; - __pyx_L5: { - __pyx_why = 4; + /*normal exit:*/{ + delete __pyx_cur_scope->__pyx_v_it; + goto __pyx_L6; + } + /*exception exit:*/{ + __pyx_L5_error:; + __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_ErrFetch(&__pyx_exc_type, &__pyx_exc_value, &__pyx_exc_tb); - __pyx_exc_lineno = __pyx_lineno; - goto __pyx_L6; - } - __pyx_L6:; - delete __pyx_cur_scope->__pyx_v_it; - switch (__pyx_why) { - case 4: { - __Pyx_ErrRestore(__pyx_exc_type, __pyx_exc_value, __pyx_exc_tb); - __pyx_lineno = __pyx_exc_lineno; - __pyx_exc_type = 0; - __pyx_exc_value = 0; - __pyx_exc_tb = 0; - goto __pyx_L1_error; + if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); + if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11) < 0)) __Pyx_ErrFetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); + __Pyx_XGOTREF(__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_11); + __Pyx_XGOTREF(__pyx_t_12); + __Pyx_XGOTREF(__pyx_t_13); + __Pyx_XGOTREF(__pyx_t_14); + __pyx_t_6 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_8 = __pyx_filename; + { + delete __pyx_cur_scope->__pyx_v_it; + } + if (PY_MAJOR_VERSION >= 3) { + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); } + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_ErrRestore(__pyx_t_9, __pyx_t_10, __pyx_t_11); + __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; + __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_8; + goto __pyx_L1_error; } + __pyx_L6:; } - PyErr_SetNone(PyExc_StopIteration); - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); + + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":72 + * self.vector.set_value(fid, value) + * + * def __iter__(self): # <<<<<<<<<<<<<< + * cdef FastSparseVector[weight_t].const_iterator* it = new FastSparseVector[weight_t].const_iterator(self.vector[0], False) + * cdef unsigned i + */ + + /* function exit code */ + PyErr_SetNone(PyExc_StopIteration); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; @@ -3911,6 +4188,14 @@ static PyObject *__pyx_gb_4cdec_5_cdec_12SparseVector_12generator1(__pyx_Generat return NULL; } +/* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":82 + * del it + * + * def dot(self, other): # <<<<<<<<<<<<<< + * """vector.dot(SparseVector/DenseVector other) -> Dot product of the two vectors.""" + * if isinstance(other, DenseVector): + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_14dot(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ static char __pyx_doc_4cdec_5_cdec_12SparseVector_13dot[] = "vector.dot(SparseVector/DenseVector other) -> Dot product of the two vectors."; @@ -3919,18 +4204,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_14dot(PyObject *__pyx_v_se __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("dot (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_12SparseVector_13dot(((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_self), ((PyObject *)__pyx_v_other)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":82 - * del it - * - * def dot(self, other): # <<<<<<<<<<<<<< - * """vector.dot(SparseVector/DenseVector other) -> Dot product of the two vectors.""" - * if isinstance(other, DenseVector): - */ - static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_13dot(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -3943,7 +4222,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_13dot(struct __pyx_obj_4cd int __pyx_clineno = 0; __Pyx_RefNannySetupContext("dot", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":84 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":84 * def dot(self, other): * """vector.dot(SparseVector/DenseVector other) -> Dot product of the two vectors.""" * if isinstance(other, DenseVector): # <<<<<<<<<<<<<< @@ -3954,7 +4233,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_13dot(struct __pyx_obj_4cd __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":85 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":85 * """vector.dot(SparseVector/DenseVector other) -> Dot product of the two vectors.""" * if isinstance(other, DenseVector): * return self.vector.dot(( other).vector[0]) # <<<<<<<<<<<<<< @@ -3967,10 +4246,9 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_13dot(struct __pyx_obj_4cd __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - goto __pyx_L3; } - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":86 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":86 * if isinstance(other, DenseVector): * return self.vector.dot(( other).vector[0]) * elif isinstance(other, SparseVector): # <<<<<<<<<<<<<< @@ -3981,7 +4259,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_13dot(struct __pyx_obj_4cd __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":87 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":87 * return self.vector.dot(( other).vector[0]) * elif isinstance(other, SparseVector): * return self.vector.dot(( other).vector[0]) # <<<<<<<<<<<<<< @@ -3994,33 +4272,38 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_13dot(struct __pyx_obj_4cd __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - goto __pyx_L3; } - __pyx_L3:; - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":88 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":88 * elif isinstance(other, SparseVector): * return self.vector.dot(( other).vector[0]) * raise TypeError('cannot take the dot product of %s and SparseVector' % type(other)) # <<<<<<<<<<<<<< * * def __richcmp__(SparseVector x, SparseVector y, int op): */ - __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_3), ((PyObject *)Py_TYPE(__pyx_v_other))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_cannot_take_the_dot_product_of_s, ((PyObject *)Py_TYPE(__pyx_v_other))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 88; __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 = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_3)); - __Pyx_GIVEREF(((PyObject *)__pyx_t_3)); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; + __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 = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":82 + * del it + * + * def dot(self, other): # <<<<<<<<<<<<<< + * """vector.dot(SparseVector/DenseVector other) -> Dot product of the two vectors.""" + * if isinstance(other, DenseVector): + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); @@ -4032,6 +4315,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_13dot(struct __pyx_obj_4cd return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":90 + * raise TypeError('cannot take the dot product of %s and SparseVector' % type(other)) + * + * def __richcmp__(SparseVector x, SparseVector y, int op): # <<<<<<<<<<<<<< + * if op == 2: # == + * return x.vector[0] == y.vector[0] + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_16__richcmp__(PyObject *__pyx_v_x, PyObject *__pyx_v_y, int __pyx_v_op); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_16__richcmp__(PyObject *__pyx_v_x, PyObject *__pyx_v_y, int __pyx_v_op) { @@ -4044,6 +4335,8 @@ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_16__richcmp__(PyObject *__ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_4cdec_5_cdec_SparseVector, 1, "x", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_4cdec_5_cdec_SparseVector, 1, "y", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_4cdec_5_cdec_12SparseVector_15__richcmp__(((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_x), ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_y), ((int)__pyx_v_op)); + + /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; @@ -4052,14 +4345,6 @@ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_16__richcmp__(PyObject *__ return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":90 - * raise TypeError('cannot take the dot product of %s and SparseVector' % type(other)) - * - * def __richcmp__(SparseVector x, SparseVector y, int op): # <<<<<<<<<<<<<< - * if op == 2: # == - * return x.vector[0] == y.vector[0] - */ - static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_15__richcmp__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_x, struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_y, int __pyx_v_op) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -4070,7 +4355,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_15__richcmp__(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__richcmp__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":93 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":93 * if op == 2: # == * return x.vector[0] == y.vector[0] * elif op == 3: # != # <<<<<<<<<<<<<< @@ -4079,7 +4364,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_15__richcmp__(struct __pyx */ switch (__pyx_v_op) { - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":91 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":91 * * def __richcmp__(SparseVector x, SparseVector y, int op): * if op == 2: # == # <<<<<<<<<<<<<< @@ -4088,7 +4373,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_15__richcmp__(struct __pyx */ case 2: - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":92 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":92 * def __richcmp__(SparseVector x, SparseVector y, int op): * if op == 2: # == * return x.vector[0] == y.vector[0] # <<<<<<<<<<<<<< @@ -4103,7 +4388,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_15__richcmp__(struct __pyx goto __pyx_L0; break; - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":93 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":93 * if op == 2: # == * return x.vector[0] == y.vector[0] * elif op == 3: # != # <<<<<<<<<<<<<< @@ -4112,7 +4397,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_15__richcmp__(struct __pyx */ case 3: - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":94 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":94 * return x.vector[0] == y.vector[0] * elif op == 3: # != * return not (x == y) # <<<<<<<<<<<<<< @@ -4129,23 +4414,31 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_15__richcmp__(struct __pyx __pyx_t_1 = 0; goto __pyx_L0; break; + default: break; } - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":95 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":95 * elif op == 3: # != * return not (x == y) * raise NotImplemented('comparison not implemented for SparseVector') # <<<<<<<<<<<<<< * * def __len__(self): */ - __pyx_t_1 = PyObject_Call(__pyx_builtin_NotImplemented, ((PyObject *)__pyx_k_tuple_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_NotImplemented, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":90 + * raise TypeError('cannot take the dot product of %s and SparseVector' % type(other)) + * + * def __richcmp__(SparseVector x, SparseVector y, int op): # <<<<<<<<<<<<<< + * if op == 2: # == + * return x.vector[0] == y.vector[0] + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cdec._cdec.SparseVector.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -4156,6 +4449,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_15__richcmp__(struct __pyx return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":97 + * raise NotImplemented('comparison not implemented for SparseVector') + * + * def __len__(self): # <<<<<<<<<<<<<< + * return self.vector.size() + * + */ + /* Python wrapper */ static Py_ssize_t __pyx_pw_4cdec_5_cdec_12SparseVector_18__len__(PyObject *__pyx_v_self); /*proto*/ static Py_ssize_t __pyx_pw_4cdec_5_cdec_12SparseVector_18__len__(PyObject *__pyx_v_self) { @@ -4163,24 +4464,18 @@ static Py_ssize_t __pyx_pw_4cdec_5_cdec_12SparseVector_18__len__(PyObject *__pyx __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_12SparseVector_17__len__(((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":97 - * raise NotImplemented('comparison not implemented for SparseVector') - * - * def __len__(self): # <<<<<<<<<<<<<< - * return self.vector.size() - * - */ - static Py_ssize_t __pyx_pf_4cdec_5_cdec_12SparseVector_17__len__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":98 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":98 * * def __len__(self): * return self.vector.size() # <<<<<<<<<<<<<< @@ -4190,12 +4485,28 @@ static Py_ssize_t __pyx_pf_4cdec_5_cdec_12SparseVector_17__len__(struct __pyx_ob __pyx_r = __pyx_v_self->vector->size(); goto __pyx_L0; - __pyx_r = 0; + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":97 + * raise NotImplemented('comparison not implemented for SparseVector') + * + * def __len__(self): # <<<<<<<<<<<<<< + * return self.vector.size() + * + */ + + /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":100 + * return self.vector.size() + * + * def __contains__(self, char* fname): # <<<<<<<<<<<<<< + * return self.vector.nonzero(FDConvert(fname)) + * + */ + /* Python wrapper */ static int __pyx_pw_4cdec_5_cdec_12SparseVector_20__contains__(PyObject *__pyx_v_self, PyObject *__pyx_arg_fname); /*proto*/ static int __pyx_pw_4cdec_5_cdec_12SparseVector_20__contains__(PyObject *__pyx_v_self, PyObject *__pyx_arg_fname) { @@ -4216,24 +4527,18 @@ static int __pyx_pw_4cdec_5_cdec_12SparseVector_20__contains__(PyObject *__pyx_v return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4cdec_5_cdec_12SparseVector_19__contains__(((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_self), ((char *)__pyx_v_fname)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":100 - * return self.vector.size() - * - * def __contains__(self, char* fname): # <<<<<<<<<<<<<< - * return self.vector.nonzero(FDConvert(fname)) - * - */ - static int __pyx_pf_4cdec_5_cdec_12SparseVector_19__contains__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self, char *__pyx_v_fname) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__contains__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":101 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":101 * * def __contains__(self, char* fname): * return self.vector.nonzero(FDConvert(fname)) # <<<<<<<<<<<<<< @@ -4243,12 +4548,28 @@ static int __pyx_pf_4cdec_5_cdec_12SparseVector_19__contains__(struct __pyx_obj_ __pyx_r = __pyx_v_self->vector->nonzero(FD::Convert(__pyx_v_fname)); goto __pyx_L0; - __pyx_r = 0; + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":100 + * return self.vector.size() + * + * def __contains__(self, char* fname): # <<<<<<<<<<<<<< + * return self.vector.nonzero(FDConvert(fname)) + * + */ + + /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":103 + * return self.vector.nonzero(FDConvert(fname)) + * + * def __neg__(self): # <<<<<<<<<<<<<< + * cdef SparseVector result = SparseVector.__new__(SparseVector) + * result.vector = new FastSparseVector[weight_t](self.vector[0]) + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_22__neg__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_22__neg__(PyObject *__pyx_v_self) { @@ -4256,18 +4577,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_22__neg__(PyObject *__pyx_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__neg__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_12SparseVector_21__neg__(((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":103 - * return self.vector.nonzero(FDConvert(fname)) - * - * def __neg__(self): # <<<<<<<<<<<<<< - * cdef SparseVector result = SparseVector.__new__(SparseVector) - * result.vector = new FastSparseVector[weight_t](self.vector[0]) - */ - static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_21__neg__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self) { struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_result = 0; PyObject *__pyx_r = NULL; @@ -4278,20 +4593,20 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_21__neg__(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__neg__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":104 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":104 * * def __neg__(self): * cdef SparseVector result = SparseVector.__new__(SparseVector) # <<<<<<<<<<<<<< * result.vector = new FastSparseVector[weight_t](self.vector[0]) * result.vector[0] *= -1.0 */ - __pyx_t_1 = __pyx_tp_new_4cdec_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SparseVector)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_tp_new_4cdec_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SparseVector)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4cdec_5_cdec_SparseVector)))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_result = ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_t_1); __pyx_t_1 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":105 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":105 * def __neg__(self): * cdef SparseVector result = SparseVector.__new__(SparseVector) * result.vector = new FastSparseVector[weight_t](self.vector[0]) # <<<<<<<<<<<<<< @@ -4300,7 +4615,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_21__neg__(struct __pyx_obj */ __pyx_v_result->vector = new FastSparseVector((__pyx_v_self->vector[0])); - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":106 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":106 * cdef SparseVector result = SparseVector.__new__(SparseVector) * result.vector = new FastSparseVector[weight_t](self.vector[0]) * result.vector[0] *= -1.0 # <<<<<<<<<<<<<< @@ -4309,7 +4624,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_21__neg__(struct __pyx_obj */ (__pyx_v_result->vector[0]) *= -1.0; - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":107 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":107 * result.vector = new FastSparseVector[weight_t](self.vector[0]) * result.vector[0] *= -1.0 * return result # <<<<<<<<<<<<<< @@ -4321,8 +4636,15 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_21__neg__(struct __pyx_obj __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":103 + * return self.vector.nonzero(FDConvert(fname)) + * + * def __neg__(self): # <<<<<<<<<<<<<< + * cdef SparseVector result = SparseVector.__new__(SparseVector) + * result.vector = new FastSparseVector[weight_t](self.vector[0]) + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cdec._cdec.SparseVector.__neg__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -4334,6 +4656,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_21__neg__(struct __pyx_obj return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":109 + * return result + * + * def __iadd__(SparseVector self, SparseVector other): # <<<<<<<<<<<<<< + * self.vector[0] += other.vector[0] + * return self + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_24__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_24__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { @@ -4345,6 +4675,8 @@ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_24__iadd__(PyObject *__pyx __Pyx_RefNannySetupContext("__iadd__ (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_4cdec_5_cdec_SparseVector, 1, "other", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_4cdec_5_cdec_12SparseVector_23__iadd__(((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_self), ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_other)); + + /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; @@ -4353,20 +4685,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_24__iadd__(PyObject *__pyx return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":109 - * return result - * - * def __iadd__(SparseVector self, SparseVector other): # <<<<<<<<<<<<<< - * self.vector[0] += other.vector[0] - * return self - */ - static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_23__iadd__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self, struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_other) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__iadd__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":110 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":110 * * def __iadd__(SparseVector self, SparseVector other): * self.vector[0] += other.vector[0] # <<<<<<<<<<<<<< @@ -4375,7 +4699,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_23__iadd__(struct __pyx_ob */ (__pyx_v_self->vector[0]) += (__pyx_v_other->vector[0]); - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":111 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":111 * def __iadd__(SparseVector self, SparseVector other): * self.vector[0] += other.vector[0] * return self # <<<<<<<<<<<<<< @@ -4387,13 +4711,29 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_23__iadd__(struct __pyx_ob __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":109 + * return result + * + * def __iadd__(SparseVector self, SparseVector other): # <<<<<<<<<<<<<< + * self.vector[0] += other.vector[0] + * return self + */ + + /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":113 + * return self + * + * def __isub__(SparseVector self, SparseVector other): # <<<<<<<<<<<<<< + * self.vector[0] -= other.vector[0] + * return self + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_26__isub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_26__isub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { @@ -4405,6 +4745,8 @@ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_26__isub__(PyObject *__pyx __Pyx_RefNannySetupContext("__isub__ (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_4cdec_5_cdec_SparseVector, 1, "other", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_4cdec_5_cdec_12SparseVector_25__isub__(((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_self), ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_other)); + + /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; @@ -4413,20 +4755,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_26__isub__(PyObject *__pyx return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":113 - * return self - * - * def __isub__(SparseVector self, SparseVector other): # <<<<<<<<<<<<<< - * self.vector[0] -= other.vector[0] - * return self - */ - static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_25__isub__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self, struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_other) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__isub__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":114 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":114 * * def __isub__(SparseVector self, SparseVector other): * self.vector[0] -= other.vector[0] # <<<<<<<<<<<<<< @@ -4435,7 +4769,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_25__isub__(struct __pyx_ob */ (__pyx_v_self->vector[0]) -= (__pyx_v_other->vector[0]); - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":115 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":115 * def __isub__(SparseVector self, SparseVector other): * self.vector[0] -= other.vector[0] * return self # <<<<<<<<<<<<<< @@ -4447,13 +4781,29 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_25__isub__(struct __pyx_ob __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":113 + * return self + * + * def __isub__(SparseVector self, SparseVector other): # <<<<<<<<<<<<<< + * self.vector[0] -= other.vector[0] + * return self + */ + + /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":117 + * return self + * + * def __imul__(SparseVector self, float scalar): # <<<<<<<<<<<<<< + * self.vector[0] *= scalar + * return self + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_28__imul__(PyObject *__pyx_v_self, PyObject *__pyx_arg_scalar); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_28__imul__(PyObject *__pyx_v_self, PyObject *__pyx_arg_scalar) { @@ -4474,24 +4824,18 @@ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_28__imul__(PyObject *__pyx return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4cdec_5_cdec_12SparseVector_27__imul__(((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_self), ((float)__pyx_v_scalar)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":117 - * return self - * - * def __imul__(SparseVector self, float scalar): # <<<<<<<<<<<<<< - * self.vector[0] *= scalar - * return self - */ - static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_27__imul__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self, float __pyx_v_scalar) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__imul__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":118 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":118 * * def __imul__(SparseVector self, float scalar): * self.vector[0] *= scalar # <<<<<<<<<<<<<< @@ -4500,7 +4844,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_27__imul__(struct __pyx_ob */ (__pyx_v_self->vector[0]) *= __pyx_v_scalar; - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":119 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":119 * def __imul__(SparseVector self, float scalar): * self.vector[0] *= scalar * return self # <<<<<<<<<<<<<< @@ -4512,13 +4856,29 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_27__imul__(struct __pyx_ob __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":117 + * return self + * + * def __imul__(SparseVector self, float scalar): # <<<<<<<<<<<<<< + * self.vector[0] *= scalar + * return self + */ + + /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":121 + * return self + * + * def __idiv__(SparseVector self, float scalar): # <<<<<<<<<<<<<< + * self.vector[0] /= scalar + * return self + */ + /* Python wrapper */ #if PY_MAJOR_VERSION < 3 static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_30__idiv__(PyObject *__pyx_v_self, PyObject *__pyx_arg_scalar); /*proto*/ @@ -4540,26 +4900,20 @@ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_30__idiv__(PyObject *__pyx return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4cdec_5_cdec_12SparseVector_29__idiv__(((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_self), ((float)__pyx_v_scalar)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } #endif /*!(#if PY_MAJOR_VERSION < 3)*/ -/* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":121 - * return self - * - * def __idiv__(SparseVector self, float scalar): # <<<<<<<<<<<<<< - * self.vector[0] /= scalar - * return self - */ - #if PY_MAJOR_VERSION < 3 static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_29__idiv__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self, float __pyx_v_scalar) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__idiv__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":122 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":122 * * def __idiv__(SparseVector self, float scalar): * self.vector[0] /= scalar # <<<<<<<<<<<<<< @@ -4568,7 +4922,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_29__idiv__(struct __pyx_ob */ (__pyx_v_self->vector[0]) /= __pyx_v_scalar; - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":123 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":123 * def __idiv__(SparseVector self, float scalar): * self.vector[0] /= scalar * return self # <<<<<<<<<<<<<< @@ -4580,7 +4934,15 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_29__idiv__(struct __pyx_ob __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":121 + * return self + * + * def __idiv__(SparseVector self, float scalar): # <<<<<<<<<<<<<< + * self.vector[0] /= scalar + * return self + */ + + /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); @@ -4588,6 +4950,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_29__idiv__(struct __pyx_ob } #endif /*!(#if PY_MAJOR_VERSION < 3)*/ +/* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":125 + * return self + * + * def __add__(SparseVector x, SparseVector y): # <<<<<<<<<<<<<< + * cdef SparseVector result = SparseVector.__new__(SparseVector) + * result.vector = new FastSparseVector[weight_t](x.vector[0] + y.vector[0]) + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_32__add__(PyObject *__pyx_v_x, PyObject *__pyx_v_y); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_32__add__(PyObject *__pyx_v_x, PyObject *__pyx_v_y) { @@ -4600,6 +4970,8 @@ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_32__add__(PyObject *__pyx_ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_4cdec_5_cdec_SparseVector, 1, "x", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_4cdec_5_cdec_SparseVector, 1, "y", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_4cdec_5_cdec_12SparseVector_31__add__(((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_x), ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_y)); + + /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; @@ -4608,14 +4980,6 @@ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_32__add__(PyObject *__pyx_ return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":125 - * return self - * - * def __add__(SparseVector x, SparseVector y): # <<<<<<<<<<<<<< - * cdef SparseVector result = SparseVector.__new__(SparseVector) - * result.vector = new FastSparseVector[weight_t](x.vector[0] + y.vector[0]) - */ - static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_31__add__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_x, struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_y) { struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_result = 0; PyObject *__pyx_r = NULL; @@ -4626,20 +4990,20 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_31__add__(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__add__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":126 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":126 * * def __add__(SparseVector x, SparseVector y): * cdef SparseVector result = SparseVector.__new__(SparseVector) # <<<<<<<<<<<<<< * result.vector = new FastSparseVector[weight_t](x.vector[0] + y.vector[0]) * return result */ - __pyx_t_1 = __pyx_tp_new_4cdec_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SparseVector)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_tp_new_4cdec_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SparseVector)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4cdec_5_cdec_SparseVector)))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_result = ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_t_1); __pyx_t_1 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":127 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":127 * def __add__(SparseVector x, SparseVector y): * cdef SparseVector result = SparseVector.__new__(SparseVector) * result.vector = new FastSparseVector[weight_t](x.vector[0] + y.vector[0]) # <<<<<<<<<<<<<< @@ -4648,7 +5012,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_31__add__(struct __pyx_obj */ __pyx_v_result->vector = new FastSparseVector(((__pyx_v_x->vector[0]) + (__pyx_v_y->vector[0]))); - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":128 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":128 * cdef SparseVector result = SparseVector.__new__(SparseVector) * result.vector = new FastSparseVector[weight_t](x.vector[0] + y.vector[0]) * return result # <<<<<<<<<<<<<< @@ -4660,8 +5024,15 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_31__add__(struct __pyx_obj __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":125 + * return self + * + * def __add__(SparseVector x, SparseVector y): # <<<<<<<<<<<<<< + * cdef SparseVector result = SparseVector.__new__(SparseVector) + * result.vector = new FastSparseVector[weight_t](x.vector[0] + y.vector[0]) + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cdec._cdec.SparseVector.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -4673,9 +5044,17 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_31__add__(struct __pyx_obj return __pyx_r; } -/* Python wrapper */ -static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_34__sub__(PyObject *__pyx_v_x, PyObject *__pyx_v_y); /*proto*/ -static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_34__sub__(PyObject *__pyx_v_x, PyObject *__pyx_v_y) { +/* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":130 + * return result + * + * def __sub__(SparseVector x, SparseVector y): # <<<<<<<<<<<<<< + * cdef SparseVector result = SparseVector.__new__(SparseVector) + * result.vector = new FastSparseVector[weight_t](x.vector[0] - y.vector[0]) + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_34__sub__(PyObject *__pyx_v_x, PyObject *__pyx_v_y); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_34__sub__(PyObject *__pyx_v_x, PyObject *__pyx_v_y) { CYTHON_UNUSED int __pyx_lineno = 0; CYTHON_UNUSED const char *__pyx_filename = NULL; CYTHON_UNUSED int __pyx_clineno = 0; @@ -4685,6 +5064,8 @@ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_34__sub__(PyObject *__pyx_ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_4cdec_5_cdec_SparseVector, 1, "x", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_4cdec_5_cdec_SparseVector, 1, "y", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_4cdec_5_cdec_12SparseVector_33__sub__(((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_x), ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_y)); + + /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; @@ -4693,14 +5074,6 @@ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_34__sub__(PyObject *__pyx_ return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":130 - * return result - * - * def __sub__(SparseVector x, SparseVector y): # <<<<<<<<<<<<<< - * cdef SparseVector result = SparseVector.__new__(SparseVector) - * result.vector = new FastSparseVector[weight_t](x.vector[0] - y.vector[0]) - */ - static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_33__sub__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_x, struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_y) { struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_result = 0; PyObject *__pyx_r = NULL; @@ -4711,20 +5084,20 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_33__sub__(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__sub__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":131 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":131 * * def __sub__(SparseVector x, SparseVector y): * cdef SparseVector result = SparseVector.__new__(SparseVector) # <<<<<<<<<<<<<< * result.vector = new FastSparseVector[weight_t](x.vector[0] - y.vector[0]) * return result */ - __pyx_t_1 = __pyx_tp_new_4cdec_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SparseVector)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_tp_new_4cdec_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SparseVector)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4cdec_5_cdec_SparseVector)))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_result = ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_t_1); __pyx_t_1 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":132 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":132 * def __sub__(SparseVector x, SparseVector y): * cdef SparseVector result = SparseVector.__new__(SparseVector) * result.vector = new FastSparseVector[weight_t](x.vector[0] - y.vector[0]) # <<<<<<<<<<<<<< @@ -4733,7 +5106,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_33__sub__(struct __pyx_obj */ __pyx_v_result->vector = new FastSparseVector(((__pyx_v_x->vector[0]) - (__pyx_v_y->vector[0]))); - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":133 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":133 * cdef SparseVector result = SparseVector.__new__(SparseVector) * result.vector = new FastSparseVector[weight_t](x.vector[0] - y.vector[0]) * return result # <<<<<<<<<<<<<< @@ -4745,8 +5118,15 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_33__sub__(struct __pyx_obj __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":130 + * return result + * + * def __sub__(SparseVector x, SparseVector y): # <<<<<<<<<<<<<< + * cdef SparseVector result = SparseVector.__new__(SparseVector) + * result.vector = new FastSparseVector[weight_t](x.vector[0] - y.vector[0]) + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cdec._cdec.SparseVector.__sub__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -4758,6 +5138,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_33__sub__(struct __pyx_obj return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":135 + * return result + * + * def __mul__(x, y): # <<<<<<<<<<<<<< + * cdef SparseVector vector + * cdef float scalar + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_36__mul__(PyObject *__pyx_v_x, PyObject *__pyx_v_y); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_36__mul__(PyObject *__pyx_v_x, PyObject *__pyx_v_y) { @@ -4765,18 +5153,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_36__mul__(PyObject *__pyx_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__mul__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_12SparseVector_35__mul__(((PyObject *)__pyx_v_x), ((PyObject *)__pyx_v_y)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":135 - * return result - * - * def __mul__(x, y): # <<<<<<<<<<<<<< - * cdef SparseVector vector - * cdef float scalar - */ - static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_35__mul__(PyObject *__pyx_v_x, PyObject *__pyx_v_y) { struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_vector = 0; float __pyx_v_scalar; @@ -4792,7 +5174,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_35__mul__(PyObject *__pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__mul__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":138 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":138 * cdef SparseVector vector * cdef float scalar * if isinstance(x, SparseVector): vector, scalar = x, y # <<<<<<<<<<<<<< @@ -4813,7 +5195,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_35__mul__(PyObject *__pyx_ } /*else*/ { - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":139 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":139 * cdef float scalar * if isinstance(x, SparseVector): vector, scalar = x, y * else: vector, scalar = y, x # <<<<<<<<<<<<<< @@ -4830,20 +5212,20 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_35__mul__(PyObject *__pyx_ } __pyx_L3:; - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":140 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":140 * if isinstance(x, SparseVector): vector, scalar = x, y * else: vector, scalar = y, x * cdef SparseVector result = SparseVector.__new__(SparseVector) # <<<<<<<<<<<<<< * result.vector = new FastSparseVector[weight_t](vector.vector[0] * scalar) * return result */ - __pyx_t_3 = __pyx_tp_new_4cdec_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SparseVector)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __pyx_tp_new_4cdec_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SparseVector)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_4cdec_5_cdec_SparseVector)))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_result = ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_t_3); __pyx_t_3 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":141 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":141 * else: vector, scalar = y, x * cdef SparseVector result = SparseVector.__new__(SparseVector) * result.vector = new FastSparseVector[weight_t](vector.vector[0] * scalar) # <<<<<<<<<<<<<< @@ -4852,7 +5234,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_35__mul__(PyObject *__pyx_ */ __pyx_v_result->vector = new FastSparseVector(((__pyx_v_vector->vector[0]) * __pyx_v_scalar)); - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":142 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":142 * cdef SparseVector result = SparseVector.__new__(SparseVector) * result.vector = new FastSparseVector[weight_t](vector.vector[0] * scalar) * return result # <<<<<<<<<<<<<< @@ -4864,8 +5246,15 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_35__mul__(PyObject *__pyx_ __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":135 + * return result + * + * def __mul__(x, y): # <<<<<<<<<<<<<< + * cdef SparseVector vector + * cdef float scalar + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("cdec._cdec.SparseVector.__mul__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -4878,6 +5267,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_35__mul__(PyObject *__pyx_ return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":144 + * return result + * + * def __div__(x, y): # <<<<<<<<<<<<<< + * cdef SparseVector vector + * cdef float scalar + */ + /* Python wrapper */ #if PY_MAJOR_VERSION < 3 static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_38__div__(PyObject *__pyx_v_x, PyObject *__pyx_v_y); /*proto*/ @@ -4886,19 +5283,13 @@ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_38__div__(PyObject *__pyx_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__div__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_12SparseVector_37__div__(((PyObject *)__pyx_v_x), ((PyObject *)__pyx_v_y)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } #endif /*!(#if PY_MAJOR_VERSION < 3)*/ -/* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":144 - * return result - * - * def __div__(x, y): # <<<<<<<<<<<<<< - * cdef SparseVector vector - * cdef float scalar - */ - #if PY_MAJOR_VERSION < 3 static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_37__div__(PyObject *__pyx_v_x, PyObject *__pyx_v_y) { struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_vector = 0; @@ -4915,7 +5306,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_37__div__(PyObject *__pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__div__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":147 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":147 * cdef SparseVector vector * cdef float scalar * if isinstance(x, SparseVector): vector, scalar = x, y # <<<<<<<<<<<<<< @@ -4936,7 +5327,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_37__div__(PyObject *__pyx_ } /*else*/ { - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":148 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":148 * cdef float scalar * if isinstance(x, SparseVector): vector, scalar = x, y * else: vector, scalar = y, x # <<<<<<<<<<<<<< @@ -4953,20 +5344,20 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_37__div__(PyObject *__pyx_ } __pyx_L3:; - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":149 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":149 * if isinstance(x, SparseVector): vector, scalar = x, y * else: vector, scalar = y, x * cdef SparseVector result = SparseVector.__new__(SparseVector) # <<<<<<<<<<<<<< * result.vector = new FastSparseVector[weight_t](vector.vector[0] / scalar) * return result */ - __pyx_t_3 = __pyx_tp_new_4cdec_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SparseVector)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __pyx_tp_new_4cdec_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SparseVector)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_4cdec_5_cdec_SparseVector)))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_result = ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_t_3); __pyx_t_3 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":150 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":150 * else: vector, scalar = y, x * cdef SparseVector result = SparseVector.__new__(SparseVector) * result.vector = new FastSparseVector[weight_t](vector.vector[0] / scalar) # <<<<<<<<<<<<<< @@ -4974,7 +5365,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_37__div__(PyObject *__pyx_ */ __pyx_v_result->vector = new FastSparseVector(((__pyx_v_vector->vector[0]) / __pyx_v_scalar)); - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":151 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":151 * cdef SparseVector result = SparseVector.__new__(SparseVector) * result.vector = new FastSparseVector[weight_t](vector.vector[0] / scalar) * return result # <<<<<<<<<<<<<< @@ -4984,8 +5375,15 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_37__div__(PyObject *__pyx_ __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":144 + * return result + * + * def __div__(x, y): # <<<<<<<<<<<<<< + * cdef SparseVector vector + * cdef float scalar + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("cdec._cdec.SparseVector.__div__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -4999,6 +5397,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_37__div__(PyObject *__pyx_ } #endif /*!(#if PY_MAJOR_VERSION < 3)*/ +/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":5 + * import cdec.sa._sa as _sa + * + * def _phrase(phrase): # <<<<<<<<<<<<<< + * return ' '.join(w.encode('utf8') if isinstance(w, unicode) else str(w) for w in phrase) + * + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_1_phrase(PyObject *__pyx_self, PyObject *__pyx_v_phrase); /*proto*/ static PyMethodDef __pyx_mdef_4cdec_5_cdec_1_phrase = {__Pyx_NAMESTR("_phrase"), (PyCFunction)__pyx_pw_4cdec_5_cdec_1_phrase, METH_O, __Pyx_DOCSTR(0)}; @@ -5007,12 +5413,14 @@ static PyObject *__pyx_pw_4cdec_5_cdec_1_phrase(PyObject *__pyx_self, PyObject * __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_phrase (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec__phrase(__pyx_self, ((PyObject *)__pyx_v_phrase)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_4cdec_5_cdec_7_phrase_2generator18(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":6 +/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":6 * * def _phrase(phrase): * return ' '.join(w.encode('utf8') if isinstance(w, unicode) else str(w) for w in phrase) # <<<<<<<<<<<<<< @@ -5044,6 +5452,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7_phrase_genexpr(PyObject *__pyx_self) { return (PyObject *) gen; } + /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; @@ -5108,8 +5517,9 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7_phrase_2generator18(__pyx_GeneratorObje } else { __pyx_t_4 = __pyx_t_3(__pyx_t_1); if (unlikely(!__pyx_t_4)) { - if (PyErr_Occurred()) { - if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); + 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[2]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; @@ -5117,15 +5527,14 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7_phrase_2generator18(__pyx_GeneratorObje __Pyx_GOTREF(__pyx_t_4); } __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_w); - __Pyx_XDECREF(__pyx_cur_scope->__pyx_v_w); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_w, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); - __pyx_cur_scope->__pyx_v_w = __pyx_t_4; __pyx_t_4 = 0; __pyx_t_5 = PyUnicode_Check(__pyx_cur_scope->__pyx_v_w); if ((__pyx_t_5 != 0)) { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_w, __pyx_n_s__encode); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_w, __pyx_n_s_encode); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_k_tuple_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = __pyx_t_7; @@ -5136,9 +5545,9 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7_phrase_2generator18(__pyx_GeneratorObje __Pyx_INCREF(__pyx_cur_scope->__pyx_v_w); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_cur_scope->__pyx_v_w); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_w); - __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_4 = __pyx_t_6; __pyx_t_6 = 0; } @@ -5162,6 +5571,8 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7_phrase_2generator18(__pyx_GeneratorObje if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* function exit code */ PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; @@ -5178,7 +5589,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7_phrase_2generator18(__pyx_GeneratorObje return NULL; } -/* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":5 +/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":5 * import cdec.sa._sa as _sa * * def _phrase(phrase): # <<<<<<<<<<<<<< @@ -5192,7 +5603,6 @@ static PyObject *__pyx_pf_4cdec_5_cdec__phrase(CYTHON_UNUSED PyObject *__pyx_sel __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; @@ -5207,7 +5617,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec__phrase(CYTHON_UNUSED PyObject *__pyx_sel __Pyx_INCREF(__pyx_cur_scope->__pyx_v_phrase); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_phrase); - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":6 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":6 * * def _phrase(phrase): * return ' '.join(w.encode('utf8') if isinstance(w, unicode) else str(w) for w in phrase) # <<<<<<<<<<<<<< @@ -5215,29 +5625,27 @@ static PyObject *__pyx_pf_4cdec_5_cdec__phrase(CYTHON_UNUSED PyObject *__pyx_sel * cdef class NT: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_kp_s_7), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_pf_4cdec_5_cdec_7_phrase_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __pyx_pf_4cdec_5_cdec_7_phrase_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); - __Pyx_GIVEREF(__pyx_t_2); - __pyx_t_2 = 0; - __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyString_Join(__pyx_kp_s__4, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":5 + * import cdec.sa._sa as _sa + * + * def _phrase(phrase): # <<<<<<<<<<<<<< + * return ' '.join(w.encode('utf8') if isinstance(w, unicode) else str(w) for w in phrase) + * + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("cdec._cdec._phrase", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -5247,6 +5655,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec__phrase(CYTHON_UNUSED PyObject *__pyx_sel return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":11 + * cdef public bytes cat + * cdef public unsigned ref + * def __init__(self, bytes cat, unsigned ref=0): # <<<<<<<<<<<<<< + * """NT(bytes cat, int ref=0) -> Non-terminal from category `cat`.""" + * self.cat = cat + */ + /* Python wrapper */ static int __pyx_pw_4cdec_5_cdec_2NT_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4cdec_5_cdec_2NT___init__[] = "NT(bytes cat, int ref=0) -> Non-terminal from category `cat`."; @@ -5263,7 +5679,7 @@ static int __pyx_pw_4cdec_5_cdec_2NT_1__init__(PyObject *__pyx_v_self, PyObject __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__cat,&__pyx_n_s__ref,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cat,&__pyx_n_s_ref,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; @@ -5277,11 +5693,11 @@ static int __pyx_pw_4cdec_5_cdec_2NT_1__init__(PyObject *__pyx_v_self, PyObject kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cat)) != 0)) kw_args--; + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cat)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { - PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ref); + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ref); if (value) { values[1] = value; kw_args--; } } } @@ -5298,7 +5714,7 @@ static int __pyx_pw_4cdec_5_cdec_2NT_1__init__(PyObject *__pyx_v_self, PyObject } __pyx_v_cat = ((PyObject*)values[0]); if (values[1]) { - __pyx_v_ref = __Pyx_PyInt_AsUnsignedInt(values[1]); if (unlikely((__pyx_v_ref == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_ref = __Pyx_PyInt_As_unsigned_int(values[1]); if (unlikely((__pyx_v_ref == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_ref = ((unsigned int)0); } @@ -5313,6 +5729,8 @@ static int __pyx_pw_4cdec_5_cdec_2NT_1__init__(PyObject *__pyx_v_self, PyObject __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cat), (&PyBytes_Type), 1, "cat", 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_4cdec_5_cdec_2NT___init__(((struct __pyx_obj_4cdec_5_cdec_NT *)__pyx_v_self), __pyx_v_cat, __pyx_v_ref); + + /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = -1; @@ -5321,33 +5739,25 @@ static int __pyx_pw_4cdec_5_cdec_2NT_1__init__(PyObject *__pyx_v_self, PyObject return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":11 - * cdef public bytes cat - * cdef public unsigned ref - * def __init__(self, bytes cat, unsigned ref=0): # <<<<<<<<<<<<<< - * """NT(bytes cat, int ref=0) -> Non-terminal from category `cat`.""" - * self.cat = cat - */ - static int __pyx_pf_4cdec_5_cdec_2NT___init__(struct __pyx_obj_4cdec_5_cdec_NT *__pyx_v_self, PyObject *__pyx_v_cat, unsigned int __pyx_v_ref) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":13 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":13 * def __init__(self, bytes cat, unsigned ref=0): * """NT(bytes cat, int ref=0) -> Non-terminal from category `cat`.""" * self.cat = cat # <<<<<<<<<<<<<< * self.ref = ref * */ - __Pyx_INCREF(((PyObject *)__pyx_v_cat)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_cat)); + __Pyx_INCREF(__pyx_v_cat); + __Pyx_GIVEREF(__pyx_v_cat); __Pyx_GOTREF(__pyx_v_self->cat); - __Pyx_DECREF(((PyObject *)__pyx_v_self->cat)); + __Pyx_DECREF(__pyx_v_self->cat); __pyx_v_self->cat = __pyx_v_cat; - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":14 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":14 * """NT(bytes cat, int ref=0) -> Non-terminal from category `cat`.""" * self.cat = cat * self.ref = ref # <<<<<<<<<<<<<< @@ -5356,11 +5766,28 @@ static int __pyx_pf_4cdec_5_cdec_2NT___init__(struct __pyx_obj_4cdec_5_cdec_NT * */ __pyx_v_self->ref = __pyx_v_ref; + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":11 + * cdef public bytes cat + * cdef public unsigned ref + * def __init__(self, bytes cat, unsigned ref=0): # <<<<<<<<<<<<<< + * """NT(bytes cat, int ref=0) -> Non-terminal from category `cat`.""" + * self.cat = cat + */ + + /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":16 + * self.ref = ref + * + * def __str__(self): # <<<<<<<<<<<<<< + * if self.ref > 0: + * return '[%s,%d]' % (self.cat, self.ref) + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_2NT_3__str__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_2NT_3__str__(PyObject *__pyx_v_self) { @@ -5368,18 +5795,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_2NT_3__str__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__str__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_2NT_2__str__(((struct __pyx_obj_4cdec_5_cdec_NT *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":16 - * self.ref = ref - * - * def __str__(self): # <<<<<<<<<<<<<< - * if self.ref > 0: - * return '[%s,%d]' % (self.cat, self.ref) - */ - static PyObject *__pyx_pf_4cdec_5_cdec_2NT_2__str__(struct __pyx_obj_4cdec_5_cdec_NT *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -5391,7 +5812,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_2NT_2__str__(struct __pyx_obj_4cdec_5_cde int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__str__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":17 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":17 * * def __str__(self): * if self.ref > 0: # <<<<<<<<<<<<<< @@ -5401,7 +5822,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_2NT_2__str__(struct __pyx_obj_4cdec_5_cde __pyx_t_1 = ((__pyx_v_self->ref > 0) != 0); if (__pyx_t_1) { - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":18 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":18 * def __str__(self): * if self.ref > 0: * return '[%s,%d]' % (self.cat, self.ref) # <<<<<<<<<<<<<< @@ -5409,27 +5830,25 @@ static PyObject *__pyx_pf_4cdec_5_cdec_2NT_2__str__(struct __pyx_obj_4cdec_5_cde * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = PyLong_FromUnsignedLong(__pyx_v_self->ref); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->ref); 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_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __Pyx_INCREF(((PyObject *)__pyx_v_self->cat)); - PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self->cat)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_self->cat)); + __Pyx_INCREF(__pyx_v_self->cat); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->cat); + __Pyx_GIVEREF(__pyx_v_self->cat); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_8), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); - __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - __pyx_r = ((PyObject *)__pyx_t_2); + __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_s_d, __pyx_t_3); 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_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - goto __pyx_L3; } - __pyx_L3:; - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":19 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":19 * if self.ref > 0: * return '[%s,%d]' % (self.cat, self.ref) * return '[%s]' % self.cat # <<<<<<<<<<<<<< @@ -5437,14 +5856,21 @@ static PyObject *__pyx_pf_4cdec_5_cdec_2NT_2__str__(struct __pyx_obj_4cdec_5_cde * cdef class NTRef: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_9), ((PyObject *)__pyx_v_self->cat)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); - __pyx_r = ((PyObject *)__pyx_t_2); + __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_s, __pyx_v_self->cat); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":16 + * self.ref = ref + * + * def __str__(self): # <<<<<<<<<<<<<< + * if self.ref > 0: + * return '[%s,%d]' % (self.cat, self.ref) + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); @@ -5456,6 +5882,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_2NT_2__str__(struct __pyx_obj_4cdec_5_cde return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":9 + * + * cdef class NT: + * cdef public bytes cat # <<<<<<<<<<<<<< + * cdef public unsigned ref + * def __init__(self, bytes cat, unsigned ref=0): + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_2NT_3cat_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_2NT_3cat_1__get__(PyObject *__pyx_v_self) { @@ -5463,28 +5897,22 @@ static PyObject *__pyx_pw_4cdec_5_cdec_2NT_3cat_1__get__(PyObject *__pyx_v_self) __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_2NT_3cat___get__(((struct __pyx_obj_4cdec_5_cdec_NT *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":9 - * - * cdef class NT: - * cdef public bytes cat # <<<<<<<<<<<<<< - * cdef public unsigned ref - * def __init__(self, bytes cat, unsigned ref=0): - */ - static PyObject *__pyx_pf_4cdec_5_cdec_2NT_3cat___get__(struct __pyx_obj_4cdec_5_cdec_NT *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(((PyObject *)__pyx_v_self->cat)); - __pyx_r = ((PyObject *)__pyx_v_self->cat); + __Pyx_INCREF(__pyx_v_self->cat); + __pyx_r = __pyx_v_self->cat; goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); + /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); @@ -5498,6 +5926,8 @@ static int __pyx_pw_4cdec_5_cdec_2NT_3cat_3__set__(PyObject *__pyx_v_self, PyObj __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_2NT_3cat_2__set__(((struct __pyx_obj_4cdec_5_cdec_NT *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -5505,20 +5935,25 @@ static int __pyx_pw_4cdec_5_cdec_2NT_3cat_3__set__(PyObject *__pyx_v_self, PyObj static int __pyx_pf_4cdec_5_cdec_2NT_3cat_2__set__(struct __pyx_obj_4cdec_5_cdec_NT *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - if (!(likely(PyBytes_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_v_value)->tp_name), 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_INCREF(__pyx_v_value); - __Pyx_GIVEREF(__pyx_v_value); + if (!(likely(PyBytes_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_value)->tp_name), 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->cat); - __Pyx_DECREF(((PyObject *)__pyx_v_self->cat)); - __pyx_v_self->cat = ((PyObject*)__pyx_v_value); + __Pyx_DECREF(__pyx_v_self->cat); + __pyx_v_self->cat = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cdec._cdec.NT.cat.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; @@ -5533,6 +5968,8 @@ static int __pyx_pw_4cdec_5_cdec_2NT_3cat_5__del__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_2NT_3cat_4__del__(((struct __pyx_obj_4cdec_5_cdec_NT *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -5544,14 +5981,23 @@ static int __pyx_pf_4cdec_5_cdec_2NT_3cat_4__del__(struct __pyx_obj_4cdec_5_cdec __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->cat); - __Pyx_DECREF(((PyObject *)__pyx_v_self->cat)); + __Pyx_DECREF(__pyx_v_self->cat); __pyx_v_self->cat = ((PyObject*)Py_None); + /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":10 + * cdef class NT: + * cdef public bytes cat + * cdef public unsigned ref # <<<<<<<<<<<<<< + * def __init__(self, bytes cat, unsigned ref=0): + * """NT(bytes cat, int ref=0) -> Non-terminal from category `cat`.""" + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_2NT_3ref_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_2NT_3ref_1__get__(PyObject *__pyx_v_self) { @@ -5559,18 +6005,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_2NT_3ref_1__get__(PyObject *__pyx_v_self) __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_2NT_3ref___get__(((struct __pyx_obj_4cdec_5_cdec_NT *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":10 - * cdef class NT: - * cdef public bytes cat - * cdef public unsigned ref # <<<<<<<<<<<<<< - * def __init__(self, bytes cat, unsigned ref=0): - * """NT(bytes cat, int ref=0) -> Non-terminal from category `cat`.""" - */ - static PyObject *__pyx_pf_4cdec_5_cdec_2NT_3ref___get__(struct __pyx_obj_4cdec_5_cdec_NT *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -5580,14 +6020,13 @@ static PyObject *__pyx_pf_4cdec_5_cdec_2NT_3ref___get__(struct __pyx_obj_4cdec_5 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyLong_FromUnsignedLong(__pyx_v_self->ref); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->ref); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cdec._cdec.NT.ref.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -5605,6 +6044,8 @@ static int __pyx_pw_4cdec_5_cdec_2NT_3ref_3__set__(PyObject *__pyx_v_self, PyObj __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_2NT_3ref_2__set__(((struct __pyx_obj_4cdec_5_cdec_NT *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -5617,9 +6058,10 @@ static int __pyx_pf_4cdec_5_cdec_2NT_3ref_2__set__(struct __pyx_obj_4cdec_5_cdec const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - __pyx_t_1 = __Pyx_PyInt_AsUnsignedInt(__pyx_v_value); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->ref = __pyx_t_1; + /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; @@ -5630,6 +6072,14 @@ static int __pyx_pf_4cdec_5_cdec_2NT_3ref_2__set__(struct __pyx_obj_4cdec_5_cdec return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":23 + * cdef class NTRef: + * cdef public unsigned ref + * def __init__(self, unsigned ref): # <<<<<<<<<<<<<< + * """NTRef(int ref) -> Non-terminal reference.""" + * self.ref = ref + */ + /* Python wrapper */ static int __pyx_pw_4cdec_5_cdec_5NTRef_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4cdec_5_cdec_5NTRef___init__[] = "NTRef(int ref) -> Non-terminal reference."; @@ -5645,7 +6095,7 @@ static int __pyx_pw_4cdec_5_cdec_5NTRef_1__init__(PyObject *__pyx_v_self, PyObje __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__ref,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ref,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; @@ -5658,7 +6108,7 @@ static int __pyx_pw_4cdec_5_cdec_5NTRef_1__init__(PyObject *__pyx_v_self, PyObje kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ref)) != 0)) kw_args--; + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ref)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { @@ -5669,7 +6119,7 @@ static int __pyx_pw_4cdec_5_cdec_5NTRef_1__init__(PyObject *__pyx_v_self, PyObje } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } - __pyx_v_ref = __Pyx_PyInt_AsUnsignedInt(values[0]); if (unlikely((__pyx_v_ref == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_ref = __Pyx_PyInt_As_unsigned_int(values[0]); if (unlikely((__pyx_v_ref == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; @@ -5680,24 +6130,18 @@ static int __pyx_pw_4cdec_5_cdec_5NTRef_1__init__(PyObject *__pyx_v_self, PyObje return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4cdec_5_cdec_5NTRef___init__(((struct __pyx_obj_4cdec_5_cdec_NTRef *)__pyx_v_self), __pyx_v_ref); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":23 - * cdef class NTRef: - * cdef public unsigned ref - * def __init__(self, unsigned ref): # <<<<<<<<<<<<<< - * """NTRef(int ref) -> Non-terminal reference.""" - * self.ref = ref - */ - static int __pyx_pf_4cdec_5_cdec_5NTRef___init__(struct __pyx_obj_4cdec_5_cdec_NTRef *__pyx_v_self, unsigned int __pyx_v_ref) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":25 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":25 * def __init__(self, unsigned ref): * """NTRef(int ref) -> Non-terminal reference.""" * self.ref = ref # <<<<<<<<<<<<<< @@ -5706,11 +6150,28 @@ static int __pyx_pf_4cdec_5_cdec_5NTRef___init__(struct __pyx_obj_4cdec_5_cdec_N */ __pyx_v_self->ref = __pyx_v_ref; + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":23 + * cdef class NTRef: + * cdef public unsigned ref + * def __init__(self, unsigned ref): # <<<<<<<<<<<<<< + * """NTRef(int ref) -> Non-terminal reference.""" + * self.ref = ref + */ + + /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":27 + * self.ref = ref + * + * def __str__(self): # <<<<<<<<<<<<<< + * return '[%d]' % self.ref + * + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_5NTRef_3__str__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_5NTRef_3__str__(PyObject *__pyx_v_self) { @@ -5718,18 +6179,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_5NTRef_3__str__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__str__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_5NTRef_2__str__(((struct __pyx_obj_4cdec_5_cdec_NTRef *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":27 - * self.ref = ref - * - * def __str__(self): # <<<<<<<<<<<<<< - * return '[%d]' % self.ref - * - */ - static PyObject *__pyx_pf_4cdec_5_cdec_5NTRef_2__str__(struct __pyx_obj_4cdec_5_cdec_NTRef *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -5740,7 +6195,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5NTRef_2__str__(struct __pyx_obj_4cdec_5_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__str__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":28 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":28 * * def __str__(self): * return '[%d]' % self.ref # <<<<<<<<<<<<<< @@ -5748,17 +6203,24 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5NTRef_2__str__(struct __pyx_obj_4cdec_5_ * cdef TRule convert_rule(_sa.Rule rule): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyLong_FromUnsignedLong(__pyx_v_self->ref); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->ref); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_10), __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_d, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_r = ((PyObject *)__pyx_t_2); + __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":27 + * self.ref = ref + * + * def __str__(self): # <<<<<<<<<<<<<< + * return '[%d]' % self.ref + * + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); @@ -5770,6 +6232,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5NTRef_2__str__(struct __pyx_obj_4cdec_5_ return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":22 + * + * cdef class NTRef: + * cdef public unsigned ref # <<<<<<<<<<<<<< + * def __init__(self, unsigned ref): + * """NTRef(int ref) -> Non-terminal reference.""" + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_5NTRef_3ref_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_5NTRef_3ref_1__get__(PyObject *__pyx_v_self) { @@ -5777,18 +6247,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_5NTRef_3ref_1__get__(PyObject *__pyx_v_se __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_5NTRef_3ref___get__(((struct __pyx_obj_4cdec_5_cdec_NTRef *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":22 - * - * cdef class NTRef: - * cdef public unsigned ref # <<<<<<<<<<<<<< - * def __init__(self, unsigned ref): - * """NTRef(int ref) -> Non-terminal reference.""" - */ - static PyObject *__pyx_pf_4cdec_5_cdec_5NTRef_3ref___get__(struct __pyx_obj_4cdec_5_cdec_NTRef *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -5798,14 +6262,13 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5NTRef_3ref___get__(struct __pyx_obj_4cde int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyLong_FromUnsignedLong(__pyx_v_self->ref); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->ref); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cdec._cdec.NTRef.ref.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -5823,6 +6286,8 @@ static int __pyx_pw_4cdec_5_cdec_5NTRef_3ref_3__set__(PyObject *__pyx_v_self, Py __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_5NTRef_3ref_2__set__(((struct __pyx_obj_4cdec_5_cdec_NTRef *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -5835,9 +6300,10 @@ static int __pyx_pf_4cdec_5_cdec_5NTRef_3ref_2__set__(struct __pyx_obj_4cdec_5_c const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - __pyx_t_1 = __Pyx_PyInt_AsUnsignedInt(__pyx_v_value); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->ref = __pyx_t_1; + /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; @@ -5848,7 +6314,7 @@ static int __pyx_pf_4cdec_5_cdec_5NTRef_3ref_2__set__(struct __pyx_obj_4cdec_5_c return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":30 +/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":30 * return '[%d]' % self.ref * * cdef TRule convert_rule(_sa.Rule rule): # <<<<<<<<<<<<<< @@ -5879,7 +6345,7 @@ static struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_f_4cdec_5_cdec_convert_rule(st int __pyx_clineno = 0; __Pyx_RefNannySetupContext("convert_rule", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":31 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":31 * * cdef TRule convert_rule(_sa.Rule rule): * lhs = _sa.sym_tocat(rule.lhs) # <<<<<<<<<<<<<< @@ -5888,7 +6354,7 @@ static struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_f_4cdec_5_cdec_convert_rule(st */ __pyx_v_lhs = __pyx_f_4cdec_2sa_3_sa_sym_tocat(__pyx_v_rule->lhs); - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":32 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":32 * cdef TRule convert_rule(_sa.Rule rule): * lhs = _sa.sym_tocat(rule.lhs) * scores = dict(rule.scores) # <<<<<<<<<<<<<< @@ -5900,13 +6366,13 @@ static struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_f_4cdec_5_cdec_convert_rule(st __Pyx_INCREF(((PyObject *)__pyx_v_rule->scores)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_rule->scores)); __Pyx_GIVEREF(((PyObject *)__pyx_v_rule->scores)); - __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyDict_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyDict_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_scores = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":33 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":33 * lhs = _sa.sym_tocat(rule.lhs) * scores = dict(rule.scores) * f, e = [], [] # <<<<<<<<<<<<<< @@ -5922,7 +6388,7 @@ static struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_f_4cdec_5_cdec_convert_rule(st __pyx_v_e = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":34 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":34 * scores = dict(rule.scores) * f, e = [], [] * cdef int* fsyms = rule.f.syms # <<<<<<<<<<<<<< @@ -5932,7 +6398,7 @@ static struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_f_4cdec_5_cdec_convert_rule(st __pyx_t_3 = __pyx_v_rule->f->syms; __pyx_v_fsyms = __pyx_t_3; - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":35 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":35 * f, e = [], [] * cdef int* fsyms = rule.f.syms * for i in range(rule.f.n): # <<<<<<<<<<<<<< @@ -5943,7 +6409,7 @@ static struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_f_4cdec_5_cdec_convert_rule(st for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { __pyx_v_i = __pyx_t_5; - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":36 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":36 * cdef int* fsyms = rule.f.syms * for i in range(rule.f.n): * if _sa.sym_isvar(fsyms[i]): # <<<<<<<<<<<<<< @@ -5953,7 +6419,7 @@ static struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_f_4cdec_5_cdec_convert_rule(st __pyx_t_6 = (__pyx_f_4cdec_2sa_3_sa_sym_isvar((__pyx_v_fsyms[__pyx_v_i])) != 0); if (__pyx_t_6) { - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":37 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":37 * for i in range(rule.f.n): * if _sa.sym_isvar(fsyms[i]): * f.append(NT(_sa.sym_tocat(fsyms[i]))) # <<<<<<<<<<<<<< @@ -5961,22 +6427,22 @@ static struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_f_4cdec_5_cdec_convert_rule(st * f.append(_sa.sym_tostring(fsyms[i])) */ __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_f_4cdec_2sa_3_sa_sym_tocat((__pyx_v_fsyms[__pyx_v_i]))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_1)); - __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_NT)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_NT)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_f, __pyx_t_1); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L5; } /*else*/ { - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":39 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":39 * f.append(NT(_sa.sym_tocat(fsyms[i]))) * else: * f.append(_sa.sym_tostring(fsyms[i])) # <<<<<<<<<<<<<< @@ -5984,14 +6450,14 @@ static struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_f_4cdec_5_cdec_convert_rule(st * for i in range(rule.e.n): */ __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_f_4cdec_2sa_3_sa_sym_tostring((__pyx_v_fsyms[__pyx_v_i]))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); - __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_f, ((PyObject *)__pyx_t_1)); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_f, __pyx_t_1); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L5:; } - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":40 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":40 * else: * f.append(_sa.sym_tostring(fsyms[i])) * cdef int* esyms = rule.e.syms # <<<<<<<<<<<<<< @@ -6001,7 +6467,7 @@ static struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_f_4cdec_5_cdec_convert_rule(st __pyx_t_3 = __pyx_v_rule->e->syms; __pyx_v_esyms = __pyx_t_3; - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":41 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":41 * f.append(_sa.sym_tostring(fsyms[i])) * cdef int* esyms = rule.e.syms * for i in range(rule.e.n): # <<<<<<<<<<<<<< @@ -6012,7 +6478,7 @@ static struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_f_4cdec_5_cdec_convert_rule(st for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { __pyx_v_i = __pyx_t_5; - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":42 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":42 * cdef int* esyms = rule.e.syms * for i in range(rule.e.n): * if _sa.sym_isvar(esyms[i]): # <<<<<<<<<<<<<< @@ -6022,30 +6488,30 @@ static struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_f_4cdec_5_cdec_convert_rule(st __pyx_t_6 = (__pyx_f_4cdec_2sa_3_sa_sym_isvar((__pyx_v_esyms[__pyx_v_i])) != 0); if (__pyx_t_6) { - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":43 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":43 * for i in range(rule.e.n): * if _sa.sym_isvar(esyms[i]): * e.append(NTRef(_sa.sym_getindex(esyms[i]))) # <<<<<<<<<<<<<< * else: * e.append(_sa.sym_tostring(esyms[i])) */ - __pyx_t_1 = PyInt_FromLong(__pyx_f_4cdec_2sa_3_sa_sym_getindex((__pyx_v_esyms[__pyx_v_i]))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_f_4cdec_2sa_3_sa_sym_getindex((__pyx_v_esyms[__pyx_v_i]))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 43; __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 = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_NTRef)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_NTRef)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_e, __pyx_t_1); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L8; } /*else*/ { - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":45 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":45 * e.append(NTRef(_sa.sym_getindex(esyms[i]))) * else: * e.append(_sa.sym_tostring(esyms[i])) # <<<<<<<<<<<<<< @@ -6053,23 +6519,23 @@ static struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_f_4cdec_5_cdec_convert_rule(st * return TRule(lhs, f, e, scores, a) */ __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_f_4cdec_2sa_3_sa_sym_tostring((__pyx_v_esyms[__pyx_v_i]))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); - __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_e, ((PyObject *)__pyx_t_1)); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_e, __pyx_t_1); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L8:; } - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":46 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":46 * else: * e.append(_sa.sym_tostring(esyms[i])) * a = list(rule.alignments()) # <<<<<<<<<<<<<< * return TRule(lhs, f, e, scores, a) * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_rule), __pyx_n_s__alignments); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_rule), __pyx_n_s_alignments); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -6077,13 +6543,13 @@ static struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_f_4cdec_5_cdec_convert_rule(st PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_a = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":47 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":47 * e.append(_sa.sym_tostring(esyms[i])) * a = list(rule.alignments()) * return TRule(lhs, f, e, scores, a) # <<<<<<<<<<<<<< @@ -6092,33 +6558,40 @@ static struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_f_4cdec_5_cdec_convert_rule(st */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_lhs); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_2)); - __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); - __Pyx_INCREF(((PyObject *)__pyx_v_f)); - PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_f)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_f)); - __Pyx_INCREF(((PyObject *)__pyx_v_e)); - PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_v_e)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_e)); - __Pyx_INCREF(((PyObject *)__pyx_v_scores)); - PyTuple_SET_ITEM(__pyx_t_1, 3, ((PyObject *)__pyx_v_scores)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_scores)); - __Pyx_INCREF(((PyObject *)__pyx_v_a)); - PyTuple_SET_ITEM(__pyx_t_1, 4, ((PyObject *)__pyx_v_a)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_a)); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_f); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_f); + __Pyx_GIVEREF(__pyx_v_f); + __Pyx_INCREF(__pyx_v_e); + PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_e); + __Pyx_GIVEREF(__pyx_v_e); + __Pyx_INCREF(__pyx_v_scores); + PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_scores); + __Pyx_GIVEREF(__pyx_v_scores); + __Pyx_INCREF(__pyx_v_a); + PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_v_a); + __Pyx_GIVEREF(__pyx_v_a); __pyx_t_2 = 0; - __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_TRule)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_TRule)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = ((struct __pyx_obj_4cdec_5_cdec_TRule *)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; - __pyx_r = ((struct __pyx_obj_4cdec_5_cdec_TRule *)Py_None); __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":30 + * return '[%d]' % self.ref + * + * cdef TRule convert_rule(_sa.Rule rule): # <<<<<<<<<<<<<< + * lhs = _sa.sym_tocat(rule.lhs) + * scores = dict(rule.scores) + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); @@ -6134,6 +6607,14 @@ static struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_f_4cdec_5_cdec_convert_rule(st return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":52 + * cdef shared_ptr[grammar.TRule]* rule + * + * def __init__(self, lhs, f, e, scores, a=None, text=None): # <<<<<<<<<<<<<< + * """TRule(lhs, f, e, scores, a=None) -> Translation rule. + * lhs: left hand side non-terminal + */ + /* Python wrapper */ static int __pyx_pw_4cdec_5_cdec_5TRule_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4cdec_5_cdec_5TRule___init__[] = "TRule(lhs, f, e, scores, a=None) -> Translation rule.\n lhs: left hand side non-terminal\n f: source phrase (list of words/NT)\n e: target phrase (list of words/NTRef)\n scores: dictionary of feature scores\n a: optional list of alignment points"; @@ -6146,6 +6627,7 @@ static int __pyx_pw_4cdec_5_cdec_5TRule_1__init__(PyObject *__pyx_v_self, PyObje PyObject *__pyx_v_e = 0; PyObject *__pyx_v_scores = 0; PyObject *__pyx_v_a = 0; + PyObject *__pyx_v_text = 0; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -6153,21 +6635,15 @@ static int __pyx_pw_4cdec_5_cdec_5TRule_1__init__(PyObject *__pyx_v_self, PyObje __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__lhs,&__pyx_n_s__f,&__pyx_n_s__e,&__pyx_n_s__scores,&__pyx_n_s__a,0}; - PyObject* values[5] = {0,0,0,0,0}; - - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":52 - * cdef shared_ptr[grammar.TRule]* rule - * - * def __init__(self, lhs, f, e, scores, a=None): # <<<<<<<<<<<<<< - * """TRule(lhs, f, e, scores, a=None) -> Translation rule. - * lhs: left hand side non-terminal - */ + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lhs,&__pyx_n_s_f,&__pyx_n_s_e,&__pyx_n_s_scores,&__pyx_n_s_a,&__pyx_n_s_text,0}; + PyObject* values[6] = {0,0,0,0,0,0}; values[4] = ((PyObject *)Py_None); + values[5] = ((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 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); @@ -6179,34 +6655,40 @@ static int __pyx_pw_4cdec_5_cdec_5TRule_1__init__(PyObject *__pyx_v_self, PyObje kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__lhs)) != 0)) kw_args--; + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_lhs)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: - if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__f)) != 0)) kw_args--; + if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_f)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 0, 4, 5, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("__init__", 0, 4, 6, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: - if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__e)) != 0)) kw_args--; + if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_e)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 0, 4, 5, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("__init__", 0, 4, 6, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: - if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__scores)) != 0)) kw_args--; + if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_scores)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 0, 4, 5, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("__init__", 0, 4, 6, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (kw_args > 0) { - PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__a); + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_a); if (value) { values[4] = value; kw_args--; } } + case 5: + if (kw_args > 0) { + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_text); + if (value) { values[5] = value; kw_args--; } + } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { + case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5); case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4); case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); @@ -6221,36 +6703,40 @@ static int __pyx_pw_4cdec_5_cdec_5TRule_1__init__(PyObject *__pyx_v_self, PyObje __pyx_v_e = values[2]; __pyx_v_scores = values[3]; __pyx_v_a = values[4]; + __pyx_v_text = values[5]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 4, 5, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("__init__", 0, 4, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("cdec._cdec.TRule.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_4cdec_5_cdec_5TRule___init__(((struct __pyx_obj_4cdec_5_cdec_TRule *)__pyx_v_self), __pyx_v_lhs, __pyx_v_f, __pyx_v_e, __pyx_v_scores, __pyx_v_a); + __pyx_r = __pyx_pf_4cdec_5_cdec_5TRule___init__(((struct __pyx_obj_4cdec_5_cdec_TRule *)__pyx_v_self), __pyx_v_lhs, __pyx_v_f, __pyx_v_e, __pyx_v_scores, __pyx_v_a, __pyx_v_text); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static int __pyx_pf_4cdec_5_cdec_5TRule___init__(struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_f, PyObject *__pyx_v_e, PyObject *__pyx_v_scores, PyObject *__pyx_v_a) { +static int __pyx_pf_4cdec_5_cdec_5TRule___init__(struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_f, PyObject *__pyx_v_e, PyObject *__pyx_v_scores, PyObject *__pyx_v_a, PyObject *__pyx_v_text) { int __pyx_r; __Pyx_RefNannyDeclarations TRule *__pyx_t_1; int __pyx_t_2; + std::string __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":59 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":59 * scores: dictionary of feature scores * a: optional list of alignment points""" * self.rule = new shared_ptr[grammar.TRule](new grammar.TRule()) # <<<<<<<<<<<<<< - * self.lhs = lhs - * self.e = e + * if lhs: + * self.lhs = lhs */ try { __pyx_t_1 = new TRule(); @@ -6260,73 +6746,157 @@ static int __pyx_pf_4cdec_5_cdec_5TRule___init__(struct __pyx_obj_4cdec_5_cdec_T } __pyx_v_self->rule = new boost::shared_ptr(__pyx_t_1); - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":60 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":60 * a: optional list of alignment points""" * self.rule = new shared_ptr[grammar.TRule](new grammar.TRule()) - * self.lhs = lhs # <<<<<<<<<<<<<< - * self.e = e - * self.f = f + * if lhs: # <<<<<<<<<<<<<< + * self.lhs = lhs + * if e: */ - if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__lhs, __pyx_v_lhs) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_lhs); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__pyx_t_2) { - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":61 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":61 * self.rule = new shared_ptr[grammar.TRule](new grammar.TRule()) - * self.lhs = lhs - * self.e = e # <<<<<<<<<<<<<< - * self.f = f - * self.scores = scores - */ - if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__e, __pyx_v_e) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":62 - * self.lhs = lhs - * self.e = e - * self.f = f # <<<<<<<<<<<<<< - * self.scores = scores + * if lhs: + * self.lhs = lhs # <<<<<<<<<<<<<< + * if e: + * self.e = e + */ + if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_lhs, __pyx_v_lhs) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L3; + } + __pyx_L3:; + + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":62 + * if lhs: + * self.lhs = lhs + * if e: # <<<<<<<<<<<<<< + * self.e = e + * if f: + */ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_e); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__pyx_t_2) { + + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":63 + * self.lhs = lhs + * if e: + * self.e = e # <<<<<<<<<<<<<< + * if f: + * self.f = f + */ + if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_e, __pyx_v_e) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L4; + } + __pyx_L4:; + + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":64 + * if e: + * self.e = e + * if f: # <<<<<<<<<<<<<< + * self.f = f + * if scores: + */ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_f); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__pyx_t_2) { + + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":65 + * self.e = e + * if f: + * self.f = f # <<<<<<<<<<<<<< + * if scores: + * self.scores = scores + */ + if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_f, __pyx_v_f) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L5; + } + __pyx_L5:; + + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":66 + * if f: + * self.f = f + * if scores: # <<<<<<<<<<<<<< + * self.scores = scores * if a: */ - if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__f, __pyx_v_f) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_scores); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__pyx_t_2) { - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":63 - * self.e = e - * self.f = f - * self.scores = scores # <<<<<<<<<<<<<< + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":67 + * self.f = f + * if scores: + * self.scores = scores # <<<<<<<<<<<<<< * if a: - * self.a = a + * self.a = a */ - if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__scores, __pyx_v_scores) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_scores, __pyx_v_scores) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L6; + } + __pyx_L6:; - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":64 - * self.f = f - * self.scores = scores + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":68 + * if scores: + * self.scores = scores * if a: # <<<<<<<<<<<<<< - * self.a = a - * self.rule.get().ComputeArity() + * self.a = a + * if text: */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_a); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_a); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_2) { - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":65 - * self.scores = scores + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":69 + * self.scores = scores + * if a: + * self.a = a # <<<<<<<<<<<<<< + * if text: + * self.rule.get().ReadFromString(text, 0) + */ + if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_a, __pyx_v_a) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L7; + } + __pyx_L7:; + + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":70 * if a: - * self.a = a # <<<<<<<<<<<<<< + * self.a = a + * if text: # <<<<<<<<<<<<<< + * self.rule.get().ReadFromString(text, 0) + * self.rule.get().ComputeArity() + */ + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_text); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__pyx_t_2) { + + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":71 + * self.a = a + * if text: + * self.rule.get().ReadFromString(text, 0) # <<<<<<<<<<<<<< * self.rule.get().ComputeArity() * */ - if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__a, __pyx_v_a) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - goto __pyx_L3; + __pyx_t_3 = __pyx_convert_string_from_py_(__pyx_v_text); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_self->rule->get()->ReadFromString(__pyx_t_3, 0); + goto __pyx_L8; } - __pyx_L3:; + __pyx_L8:; - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":66 - * if a: - * self.a = a + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":72 + * if text: + * self.rule.get().ReadFromString(text, 0) * self.rule.get().ComputeArity() # <<<<<<<<<<<<<< * * def __dealloc__(self): */ __pyx_v_self->rule->get()->ComputeArity(); + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":52 + * cdef shared_ptr[grammar.TRule]* rule + * + * def __init__(self, lhs, f, e, scores, a=None, text=None): # <<<<<<<<<<<<<< + * """TRule(lhs, f, e, scores, a=None) -> Translation rule. + * lhs: left hand side non-terminal + */ + + /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; @@ -6337,28 +6907,30 @@ static int __pyx_pf_4cdec_5_cdec_5TRule___init__(struct __pyx_obj_4cdec_5_cdec_T return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":74 + * self.rule.get().ComputeArity() + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * del self.rule + * + */ + /* Python wrapper */ static void __pyx_pw_4cdec_5_cdec_5TRule_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_4cdec_5_cdec_5TRule_3__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_4cdec_5_cdec_5TRule_2__dealloc__(((struct __pyx_obj_4cdec_5_cdec_TRule *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); } -/* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":68 - * self.rule.get().ComputeArity() - * - * def __dealloc__(self): # <<<<<<<<<<<<<< - * del self.rule - * - */ - -static void __pyx_pf_4cdec_5_cdec_5TRule_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self) { +static void __pyx_pf_4cdec_5_cdec_5TRule_2__dealloc__(struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":69 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":75 * * def __dealloc__(self): * del self.rule # <<<<<<<<<<<<<< @@ -6367,9 +6939,26 @@ static void __pyx_pf_4cdec_5_cdec_5TRule_2__dealloc__(CYTHON_UNUSED struct __pyx */ delete __pyx_v_self->rule; + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":74 + * self.rule.get().ComputeArity() + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * del self.rule + * + */ + + /* function exit code */ __Pyx_RefNannyFinishContext(); } +/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":78 + * + * property arity: + * def __get__(self): # <<<<<<<<<<<<<< + * return self.rule.get().arity_ + * + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_5TRule_5arity_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_5TRule_5arity_1__get__(PyObject *__pyx_v_self) { @@ -6377,18 +6966,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_5TRule_5arity_1__get__(PyObject *__pyx_v_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_5TRule_5arity___get__(((struct __pyx_obj_4cdec_5_cdec_TRule *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":72 - * - * property arity: - * def __get__(self): # <<<<<<<<<<<<<< - * return self.rule.get().arity_ - * - */ - static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_5arity___get__(struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -6398,7 +6981,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_5arity___get__(struct __pyx_obj_4c int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":73 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":79 * property arity: * def __get__(self): * return self.rule.get().arity_ # <<<<<<<<<<<<<< @@ -6406,14 +6989,21 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_5arity___get__(struct __pyx_obj_4c * property f: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyInt_FromLong(__pyx_v_self->rule->get()->arity_); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->rule->get()->arity_); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":78 + * + * property arity: + * def __get__(self): # <<<<<<<<<<<<<< + * return self.rule.get().arity_ + * + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cdec._cdec.TRule.arity.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -6424,6 +7014,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_5arity___get__(struct __pyx_obj_4c return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":82 + * + * property f: + * def __get__(self): # <<<<<<<<<<<<<< + * cdef vector[WordID]* f_ = &self.rule.get().f_ + * cdef WordID w + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_5TRule_1f_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_5TRule_1f_1__get__(PyObject *__pyx_v_self) { @@ -6431,18 +7029,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_5TRule_1f_1__get__(PyObject *__pyx_v_self __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_5TRule_1f___get__(((struct __pyx_obj_4cdec_5_cdec_TRule *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":76 - * - * property f: - * def __get__(self): # <<<<<<<<<<<<<< - * cdef vector[WordID]* f_ = &self.rule.get().f_ - * cdef WordID w - */ - static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_1f___get__(struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self) { std::vector *__pyx_v_f_; WordID __pyx_v_w; @@ -6457,12 +7049,13 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_1f___get__(struct __pyx_obj_4cdec_ int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; + int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":77 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":83 * property f: * def __get__(self): * cdef vector[WordID]* f_ = &self.rule.get().f_ # <<<<<<<<<<<<<< @@ -6471,19 +7064,19 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_1f___get__(struct __pyx_obj_4cdec_ */ __pyx_v_f_ = (&__pyx_v_self->rule->get()->f_); - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":79 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":85 * cdef vector[WordID]* f_ = &self.rule.get().f_ * cdef WordID w * cdef f = [] # <<<<<<<<<<<<<< * cdef unsigned i * cdef int idx = 0 */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_v_f = ((PyObject *)__pyx_t_1); + __pyx_v_f = __pyx_t_1; __pyx_t_1 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":81 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":87 * cdef f = [] * cdef unsigned i * cdef int idx = 0 # <<<<<<<<<<<<<< @@ -6492,7 +7085,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_1f___get__(struct __pyx_obj_4cdec_ */ __pyx_v_idx = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":82 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":88 * cdef unsigned i * cdef int idx = 0 * for i in range(f_.size()): # <<<<<<<<<<<<<< @@ -6503,7 +7096,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_1f___get__(struct __pyx_obj_4cdec_ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { __pyx_v_i = __pyx_t_3; - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":83 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":89 * cdef int idx = 0 * for i in range(f_.size()): * w = f_[0][i] # <<<<<<<<<<<<<< @@ -6512,7 +7105,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_1f___get__(struct __pyx_obj_4cdec_ */ __pyx_v_w = ((__pyx_v_f_[0])[__pyx_v_i]); - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":84 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":90 * for i in range(f_.size()): * w = f_[0][i] * if w < 0: # <<<<<<<<<<<<<< @@ -6522,7 +7115,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_1f___get__(struct __pyx_obj_4cdec_ __pyx_t_4 = ((__pyx_v_w < 0) != 0); if (__pyx_t_4) { - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":85 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":91 * w = f_[0][i] * if w < 0: * idx += 1 # <<<<<<<<<<<<<< @@ -6531,66 +7124,62 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_1f___get__(struct __pyx_obj_4cdec_ */ __pyx_v_idx = (__pyx_v_idx + 1); - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":86 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":92 * if w < 0: * idx += 1 * f.append(NT(TDConvert(-w).c_str(), idx)) # <<<<<<<<<<<<<< * else: * f.append(unicode(TDConvert(w).c_str(), encoding='utf8')) */ - __pyx_t_1 = __Pyx_PyBytes_FromString(TD::Convert((-__pyx_v_w)).c_str()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); - __pyx_t_5 = PyInt_FromLong(__pyx_v_idx); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyBytes_FromString(TD::Convert((-__pyx_v_w)).c_str()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_idx); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_1)); - __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_1 = 0; __pyx_t_5 = 0; - __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_NT)), ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_NT)), __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_f, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_7 = __Pyx_PyObject_Append(__pyx_v_f, __pyx_t_5); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L5; } /*else*/ { - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":88 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":94 * f.append(NT(TDConvert(-w).c_str(), idx)) * else: * f.append(unicode(TDConvert(w).c_str(), encoding='utf8')) # <<<<<<<<<<<<<< * return f * */ - __pyx_t_6 = __Pyx_PyBytes_FromString(TD::Convert(__pyx_v_w).c_str()); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_6)); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyBytes_FromString(TD::Convert(__pyx_v_w).c_str()); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_6)); - __Pyx_GIVEREF(((PyObject *)__pyx_t_6)); - __pyx_t_6 = 0; - __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_6)); - if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__encoding), ((PyObject *)__pyx_n_s__utf8)) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_f, __pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_encoding, __pyx_n_s_utf8) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), __pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 94; __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_5); __pyx_t_5 = 0; + __pyx_t_7 = __Pyx_PyObject_Append(__pyx_v_f, __pyx_t_1); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L5:; } - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":89 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":95 * else: * f.append(unicode(TDConvert(w).c_str(), encoding='utf8')) * return f # <<<<<<<<<<<<<< @@ -6602,8 +7191,15 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_1f___get__(struct __pyx_obj_4cdec_ __pyx_r = __pyx_v_f; goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":82 + * + * property f: + * def __get__(self): # <<<<<<<<<<<<<< + * cdef vector[WordID]* f_ = &self.rule.get().f_ + * cdef WordID w + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_5); @@ -6617,6 +7213,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_1f___get__(struct __pyx_obj_4cdec_ return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":97 + * return f + * + * def __set__(self, f): # <<<<<<<<<<<<<< + * cdef vector[WordID]* f_ = &self.rule.get().f_ + * f_.resize(len(f)) + */ + /* Python wrapper */ static int __pyx_pw_4cdec_5_cdec_5TRule_1f_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_f); /*proto*/ static int __pyx_pw_4cdec_5_cdec_5TRule_1f_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_f) { @@ -6624,18 +7228,12 @@ static int __pyx_pw_4cdec_5_cdec_5TRule_1f_3__set__(PyObject *__pyx_v_self, PyOb __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_5TRule_1f_2__set__(((struct __pyx_obj_4cdec_5_cdec_TRule *)__pyx_v_self), ((PyObject *)__pyx_v_f)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":91 - * return f - * - * def __set__(self, f): # <<<<<<<<<<<<<< - * cdef vector[WordID]* f_ = &self.rule.get().f_ - * f_.resize(len(f)) - */ - static int __pyx_pf_4cdec_5_cdec_5TRule_1f_2__set__(struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self, PyObject *__pyx_v_f) { std::vector *__pyx_v_f_; unsigned int __pyx_v_i; @@ -6655,7 +7253,7 @@ static int __pyx_pf_4cdec_5_cdec_5TRule_1f_2__set__(struct __pyx_obj_4cdec_5_cde int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":92 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":98 * * def __set__(self, f): * cdef vector[WordID]* f_ = &self.rule.get().f_ # <<<<<<<<<<<<<< @@ -6664,17 +7262,17 @@ static int __pyx_pf_4cdec_5_cdec_5TRule_1f_2__set__(struct __pyx_obj_4cdec_5_cde */ __pyx_v_f_ = (&__pyx_v_self->rule->get()->f_); - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":93 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":99 * def __set__(self, f): * cdef vector[WordID]* f_ = &self.rule.get().f_ * f_.resize(len(f)) # <<<<<<<<<<<<<< * cdef unsigned i * cdef int idx = 0 */ - __pyx_t_1 = PyObject_Length(__pyx_v_f); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Length(__pyx_v_f); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_f_->resize(__pyx_t_1); - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":95 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":101 * f_.resize(len(f)) * cdef unsigned i * cdef int idx = 0 # <<<<<<<<<<<<<< @@ -6683,76 +7281,84 @@ static int __pyx_pf_4cdec_5_cdec_5TRule_1f_2__set__(struct __pyx_obj_4cdec_5_cde */ __pyx_v_idx = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":96 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":102 * cdef unsigned i * cdef int idx = 0 * for i in range(len(f)): # <<<<<<<<<<<<<< * if isinstance(f[i], NT): * f_[0][i] = -TDConvert(( f[i]).cat) */ - __pyx_t_1 = PyObject_Length(__pyx_v_f); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Length(__pyx_v_f); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":97 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":103 * cdef int idx = 0 * for i in range(len(f)): * if isinstance(f[i], NT): # <<<<<<<<<<<<<< * f_[0][i] = -TDConvert(( f[i]).cat) * else: */ - __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_f, __pyx_v_i, sizeof(unsigned int)+1, PyLong_FromUnsignedLong, 0, 0, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_f, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_TypeCheck(__pyx_t_3, ((PyObject*)__pyx_ptype_4cdec_5_cdec_NT)); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":98 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":104 * for i in range(len(f)): * if isinstance(f[i], NT): * f_[0][i] = -TDConvert(( f[i]).cat) # <<<<<<<<<<<<<< * else: * fi = as_str(f[i]) */ - __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_f, __pyx_v_i, sizeof(unsigned int)+1, PyLong_FromUnsignedLong, 0, 0, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_f, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = __Pyx_PyObject_AsString(((PyObject *)((struct __pyx_obj_4cdec_5_cdec_NT *)__pyx_t_3)->cat)); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_AsString(((struct __pyx_obj_4cdec_5_cdec_NT *)__pyx_t_3)->cat); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; ((__pyx_v_f_[0])[__pyx_v_i]) = (-TD::Convert(__pyx_t_6)); goto __pyx_L5; } /*else*/ { - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":100 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":106 * f_[0][i] = -TDConvert(( f[i]).cat) * else: * fi = as_str(f[i]) # <<<<<<<<<<<<<< * f_[0][i] = TDConvert(fi) * */ - __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_f, __pyx_v_i, sizeof(unsigned int)+1, PyLong_FromUnsignedLong, 0, 0, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_f, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = ((PyObject *)__pyx_f_4cdec_5_cdec_as_str(__pyx_t_3, NULL)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __pyx_f_4cdec_5_cdec_as_str(__pyx_t_3, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_XDECREF(((PyObject *)__pyx_v_fi)); - __pyx_v_fi = ((PyObject*)__pyx_t_7); + __Pyx_XDECREF_SET(__pyx_v_fi, ((PyObject*)__pyx_t_7)); __pyx_t_7 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":101 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":107 * else: * fi = as_str(f[i]) * f_[0][i] = TDConvert(fi) # <<<<<<<<<<<<<< * * property e: */ - __pyx_t_6 = __Pyx_PyObject_AsString(((PyObject *)__pyx_v_fi)); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_fi); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} ((__pyx_v_f_[0])[__pyx_v_i]) = TD::Convert(__pyx_t_6); } __pyx_L5:; } + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":97 + * return f + * + * def __set__(self, f): # <<<<<<<<<<<<<< + * cdef vector[WordID]* f_ = &self.rule.get().f_ + * f_.resize(len(f)) + */ + + /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; @@ -6766,6 +7372,14 @@ static int __pyx_pf_4cdec_5_cdec_5TRule_1f_2__set__(struct __pyx_obj_4cdec_5_cde return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":110 + * + * property e: + * def __get__(self): # <<<<<<<<<<<<<< + * cdef vector[WordID]* e_ = &self.rule.get().e_ + * cdef WordID w + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_5TRule_1e_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_5TRule_1e_1__get__(PyObject *__pyx_v_self) { @@ -6773,18 +7387,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_5TRule_1e_1__get__(PyObject *__pyx_v_self __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_5TRule_1e___get__(((struct __pyx_obj_4cdec_5_cdec_TRule *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":104 - * - * property e: - * def __get__(self): # <<<<<<<<<<<<<< - * cdef vector[WordID]* e_ = &self.rule.get().e_ - * cdef WordID w - */ - static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_1e___get__(struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self) { std::vector *__pyx_v_e_; WordID __pyx_v_w; @@ -6798,13 +7406,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_1e___get__(struct __pyx_obj_4cdec_ unsigned int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; - PyObject *__pyx_t_6 = NULL; + int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":105 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":111 * property e: * def __get__(self): * cdef vector[WordID]* e_ = &self.rule.get().e_ # <<<<<<<<<<<<<< @@ -6813,19 +7422,19 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_1e___get__(struct __pyx_obj_4cdec_ */ __pyx_v_e_ = (&__pyx_v_self->rule->get()->e_); - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":107 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":113 * cdef vector[WordID]* e_ = &self.rule.get().e_ * cdef WordID w * cdef e = [] # <<<<<<<<<<<<<< * cdef unsigned i * cdef int idx = 0 */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_v_e = ((PyObject *)__pyx_t_1); + __pyx_v_e = __pyx_t_1; __pyx_t_1 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":109 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":115 * cdef e = [] * cdef unsigned i * cdef int idx = 0 # <<<<<<<<<<<<<< @@ -6834,7 +7443,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_1e___get__(struct __pyx_obj_4cdec_ */ __pyx_v_idx = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":110 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":116 * cdef unsigned i * cdef int idx = 0 * for i in range(e_.size()): # <<<<<<<<<<<<<< @@ -6845,7 +7454,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_1e___get__(struct __pyx_obj_4cdec_ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { __pyx_v_i = __pyx_t_3; - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":111 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":117 * cdef int idx = 0 * for i in range(e_.size()): * w = e_[0][i] # <<<<<<<<<<<<<< @@ -6854,7 +7463,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_1e___get__(struct __pyx_obj_4cdec_ */ __pyx_v_w = ((__pyx_v_e_[0])[__pyx_v_i]); - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":112 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":118 * for i in range(e_.size()): * w = e_[0][i] * if w < 1: # <<<<<<<<<<<<<< @@ -6864,7 +7473,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_1e___get__(struct __pyx_obj_4cdec_ __pyx_t_4 = ((__pyx_v_w < 1) != 0); if (__pyx_t_4) { - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":113 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":119 * w = e_[0][i] * if w < 1: * idx += 1 # <<<<<<<<<<<<<< @@ -6873,61 +7482,57 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_1e___get__(struct __pyx_obj_4cdec_ */ __pyx_v_idx = (__pyx_v_idx + 1); - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":114 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":120 * if w < 1: * idx += 1 * e.append(NTRef(1-w)) # <<<<<<<<<<<<<< * else: * e.append(unicode(TDConvert(w).c_str(), encoding='utf8')) */ - __pyx_t_1 = PyInt_FromLong((1 - __pyx_v_w)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_From_long((1 - __pyx_v_w)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_NTRef)), ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_NTRef)), __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_Append(__pyx_v_e, __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 114; __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_5); __pyx_t_5 = 0; + __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_e, __pyx_t_1); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L5; } /*else*/ { - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":116 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":122 * e.append(NTRef(1-w)) * else: * e.append(unicode(TDConvert(w).c_str(), encoding='utf8')) # <<<<<<<<<<<<<< * return e * */ - __pyx_t_5 = __Pyx_PyBytes_FromString(TD::Convert(__pyx_v_w).c_str()); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_5)); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyBytes_FromString(TD::Convert(__pyx_v_w).c_str()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_5)); - __Pyx_GIVEREF(((PyObject *)__pyx_t_5)); - __pyx_t_5 = 0; - __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_5)); - if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__encoding), ((PyObject *)__pyx_n_s__utf8)) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_Append(__pyx_v_e, __pyx_t_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_encoding, __pyx_n_s_utf8) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), __pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_e, __pyx_t_7); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __pyx_L5:; } - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":117 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":123 * else: * e.append(unicode(TDConvert(w).c_str(), encoding='utf8')) * return e # <<<<<<<<<<<<<< @@ -6939,12 +7544,19 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_1e___get__(struct __pyx_obj_4cdec_ __pyx_r = __pyx_v_e; goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":110 + * + * property e: + * def __get__(self): # <<<<<<<<<<<<<< + * cdef vector[WordID]* e_ = &self.rule.get().e_ + * cdef WordID w + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("cdec._cdec.TRule.e.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -6954,6 +7566,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_1e___get__(struct __pyx_obj_4cdec_ return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":125 + * return e + * + * def __set__(self, e): # <<<<<<<<<<<<<< + * cdef vector[WordID]* e_ = &self.rule.get().e_ + * e_.resize(len(e)) + */ + /* Python wrapper */ static int __pyx_pw_4cdec_5_cdec_5TRule_1e_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_e); /*proto*/ static int __pyx_pw_4cdec_5_cdec_5TRule_1e_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_e) { @@ -6961,18 +7581,12 @@ static int __pyx_pw_4cdec_5_cdec_5TRule_1e_3__set__(PyObject *__pyx_v_self, PyOb __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_5TRule_1e_2__set__(((struct __pyx_obj_4cdec_5_cdec_TRule *)__pyx_v_self), ((PyObject *)__pyx_v_e)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":119 - * return e - * - * def __set__(self, e): # <<<<<<<<<<<<<< - * cdef vector[WordID]* e_ = &self.rule.get().e_ - * e_.resize(len(e)) - */ - static int __pyx_pf_4cdec_5_cdec_5TRule_1e_2__set__(struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self, PyObject *__pyx_v_e) { std::vector *__pyx_v_e_; unsigned int __pyx_v_i; @@ -6992,7 +7606,7 @@ static int __pyx_pf_4cdec_5_cdec_5TRule_1e_2__set__(struct __pyx_obj_4cdec_5_cde int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":120 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":126 * * def __set__(self, e): * cdef vector[WordID]* e_ = &self.rule.get().e_ # <<<<<<<<<<<<<< @@ -7001,92 +7615,100 @@ static int __pyx_pf_4cdec_5_cdec_5TRule_1e_2__set__(struct __pyx_obj_4cdec_5_cde */ __pyx_v_e_ = (&__pyx_v_self->rule->get()->e_); - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":121 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":127 * def __set__(self, e): * cdef vector[WordID]* e_ = &self.rule.get().e_ * e_.resize(len(e)) # <<<<<<<<<<<<<< * cdef unsigned i * for i in range(len(e)): */ - __pyx_t_1 = PyObject_Length(__pyx_v_e); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Length(__pyx_v_e); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_e_->resize(__pyx_t_1); - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":123 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":129 * e_.resize(len(e)) * cdef unsigned i * for i in range(len(e)): # <<<<<<<<<<<<<< * if isinstance(e[i], NTRef): * e_[0][i] = 1-e[i].ref */ - __pyx_t_1 = PyObject_Length(__pyx_v_e); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Length(__pyx_v_e); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":124 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":130 * cdef unsigned i * for i in range(len(e)): * if isinstance(e[i], NTRef): # <<<<<<<<<<<<<< * e_[0][i] = 1-e[i].ref * else: */ - __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_e, __pyx_v_i, sizeof(unsigned int)+1, PyLong_FromUnsignedLong, 0, 0, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_e, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_TypeCheck(__pyx_t_3, ((PyObject*)__pyx_ptype_4cdec_5_cdec_NTRef)); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":125 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":131 * for i in range(len(e)): * if isinstance(e[i], NTRef): * e_[0][i] = 1-e[i].ref # <<<<<<<<<<<<<< * else: * ei = as_str(e[i]) */ - __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_e, __pyx_v_i, sizeof(unsigned int)+1, PyLong_FromUnsignedLong, 0, 0, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_e, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__ref); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_ref); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyNumber_Subtract(__pyx_int_1, __pyx_t_6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyNumber_Subtract(__pyx_int_1, __pyx_t_6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_7 = __Pyx_PyInt_from_py_WordID(__pyx_t_3); if (unlikely((__pyx_t_7 == (WordID)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyInt_As_WordID(__pyx_t_3); if (unlikely((__pyx_t_7 == (WordID)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; ((__pyx_v_e_[0])[__pyx_v_i]) = __pyx_t_7; goto __pyx_L5; } /*else*/ { - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":127 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":133 * e_[0][i] = 1-e[i].ref * else: * ei = as_str(e[i]) # <<<<<<<<<<<<<< * e_[0][i] = TDConvert(ei) * */ - __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_e, __pyx_v_i, sizeof(unsigned int)+1, PyLong_FromUnsignedLong, 0, 0, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_e, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = ((PyObject *)__pyx_f_4cdec_5_cdec_as_str(__pyx_t_3, NULL)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __pyx_f_4cdec_5_cdec_as_str(__pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_XDECREF(((PyObject *)__pyx_v_ei)); - __pyx_v_ei = ((PyObject*)__pyx_t_6); + __Pyx_XDECREF_SET(__pyx_v_ei, ((PyObject*)__pyx_t_6)); __pyx_t_6 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":128 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":134 * else: * ei = as_str(e[i]) * e_[0][i] = TDConvert(ei) # <<<<<<<<<<<<<< * * property a: */ - __pyx_t_8 = __Pyx_PyObject_AsString(((PyObject *)__pyx_v_ei)); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_PyObject_AsString(__pyx_v_ei); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} ((__pyx_v_e_[0])[__pyx_v_i]) = TD::Convert(__pyx_t_8); } __pyx_L5:; } + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":125 + * return e + * + * def __set__(self, e): # <<<<<<<<<<<<<< + * cdef vector[WordID]* e_ = &self.rule.get().e_ + * e_.resize(len(e)) + */ + + /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; @@ -7101,6 +7723,14 @@ static int __pyx_pf_4cdec_5_cdec_5TRule_1e_2__set__(struct __pyx_obj_4cdec_5_cde } static PyObject *__pyx_gb_4cdec_5_cdec_5TRule_1a_2generator2(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ +/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":137 + * + * property a: + * def __get__(self): # <<<<<<<<<<<<<< + * cdef unsigned i + * cdef vector[grammar.AlignmentPoint]* a = &self.rule.get().a_ + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_5TRule_1a_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_5TRule_1a_1__get__(PyObject *__pyx_v_self) { @@ -7108,18 +7738,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_5TRule_1a_1__get__(PyObject *__pyx_v_self __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_5TRule_1a___get__(((struct __pyx_obj_4cdec_5_cdec_TRule *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":131 - * - * property a: - * def __get__(self): # <<<<<<<<<<<<<< - * cdef unsigned i - * cdef vector[grammar.AlignmentPoint]* a = &self.rule.get().a_ - */ - static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_1a___get__(struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self) { struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__ *__pyx_cur_scope; PyObject *__pyx_r = NULL; @@ -7138,12 +7762,13 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_1a___get__(struct __pyx_obj_4cdec_ __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); { - __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_5_cdec_5TRule_1a_2generator2, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_5_cdec_5TRule_1a_2generator2, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } + /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; @@ -7178,9 +7803,9 @@ static PyObject *__pyx_gb_4cdec_5_cdec_5TRule_1a_2generator2(__pyx_GeneratorObje return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":133 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":139 * def __get__(self): * cdef unsigned i * cdef vector[grammar.AlignmentPoint]* a = &self.rule.get().a_ # <<<<<<<<<<<<<< @@ -7189,7 +7814,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_5TRule_1a_2generator2(__pyx_GeneratorObje */ __pyx_cur_scope->__pyx_v_a = (&__pyx_cur_scope->__pyx_v_self->rule->get()->a_); - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":134 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":140 * cdef unsigned i * cdef vector[grammar.AlignmentPoint]* a = &self.rule.get().a_ * for i in range(a.size()): # <<<<<<<<<<<<<< @@ -7200,18 +7825,18 @@ static PyObject *__pyx_gb_4cdec_5_cdec_5TRule_1a_2generator2(__pyx_GeneratorObje for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_cur_scope->__pyx_v_i = __pyx_t_2; - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":135 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":141 * cdef vector[grammar.AlignmentPoint]* a = &self.rule.get().a_ * for i in range(a.size()): * yield (a[0][i].s_, a[0][i].t_) # <<<<<<<<<<<<<< * * def __set__(self, a): */ - __pyx_t_3 = PyInt_FromLong(((__pyx_cur_scope->__pyx_v_a[0])[__pyx_cur_scope->__pyx_v_i]).s_); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyInt_From_short(((__pyx_cur_scope->__pyx_v_a[0])[__pyx_cur_scope->__pyx_v_i]).s_); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyInt_FromLong(((__pyx_cur_scope->__pyx_v_a[0])[__pyx_cur_scope->__pyx_v_i]).t_); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyInt_From_short(((__pyx_cur_scope->__pyx_v_a[0])[__pyx_cur_scope->__pyx_v_i]).t_); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); @@ -7219,7 +7844,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_5TRule_1a_2generator2(__pyx_GeneratorObje __Pyx_GIVEREF(__pyx_t_4); __pyx_t_3 = 0; __pyx_t_4 = 0; - __pyx_r = ((PyObject *)__pyx_t_5); + __pyx_r = __pyx_t_5; __pyx_t_5 = 0; __pyx_cur_scope->__pyx_t_0 = __pyx_t_1; __pyx_cur_scope->__pyx_t_1 = __pyx_t_2; @@ -7231,8 +7856,18 @@ static PyObject *__pyx_gb_4cdec_5_cdec_5TRule_1a_2generator2(__pyx_GeneratorObje __pyx_L6_resume_from_yield:; __pyx_t_1 = __pyx_cur_scope->__pyx_t_0; __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":137 + * + * property a: + * def __get__(self): # <<<<<<<<<<<<<< + * cdef unsigned i + * cdef vector[grammar.AlignmentPoint]* a = &self.rule.get().a_ + */ + + /* function exit code */ PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; @@ -7248,6 +7883,14 @@ static PyObject *__pyx_gb_4cdec_5_cdec_5TRule_1a_2generator2(__pyx_GeneratorObje return NULL; } +/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":143 + * yield (a[0][i].s_, a[0][i].t_) + * + * def __set__(self, a): # <<<<<<<<<<<<<< + * cdef vector[grammar.AlignmentPoint]* a_ = &self.rule.get().a_ + * a_.resize(len(a)) + */ + /* Python wrapper */ static int __pyx_pw_4cdec_5_cdec_5TRule_1a_4__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_a); /*proto*/ static int __pyx_pw_4cdec_5_cdec_5TRule_1a_4__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_a) { @@ -7255,18 +7898,12 @@ static int __pyx_pw_4cdec_5_cdec_5TRule_1a_4__set__(PyObject *__pyx_v_self, PyOb __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_5TRule_1a_3__set__(((struct __pyx_obj_4cdec_5_cdec_TRule *)__pyx_v_self), ((PyObject *)__pyx_v_a)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":137 - * yield (a[0][i].s_, a[0][i].t_) - * - * def __set__(self, a): # <<<<<<<<<<<<<< - * cdef vector[grammar.AlignmentPoint]* a_ = &self.rule.get().a_ - * a_.resize(len(a)) - */ - static int __pyx_pf_4cdec_5_cdec_5TRule_1a_3__set__(struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self, PyObject *__pyx_v_a) { std::vector *__pyx_v_a_; unsigned int __pyx_v_i; @@ -7288,7 +7925,7 @@ static int __pyx_pf_4cdec_5_cdec_5TRule_1a_3__set__(struct __pyx_obj_4cdec_5_cde int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":138 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":144 * * def __set__(self, a): * cdef vector[grammar.AlignmentPoint]* a_ = &self.rule.get().a_ # <<<<<<<<<<<<<< @@ -7297,35 +7934,35 @@ static int __pyx_pf_4cdec_5_cdec_5TRule_1a_3__set__(struct __pyx_obj_4cdec_5_cde */ __pyx_v_a_ = (&__pyx_v_self->rule->get()->a_); - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":139 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":145 * def __set__(self, a): * cdef vector[grammar.AlignmentPoint]* a_ = &self.rule.get().a_ * a_.resize(len(a)) # <<<<<<<<<<<<<< * cdef unsigned i * cdef int s, t */ - __pyx_t_1 = PyObject_Length(__pyx_v_a); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Length(__pyx_v_a); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_a_->resize(__pyx_t_1); - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":142 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":148 * cdef unsigned i * cdef int s, t * for i in range(len(a)): # <<<<<<<<<<<<<< * s, t = a[i] * a_[0][i] = grammar.AlignmentPoint(s, t) */ - __pyx_t_1 = PyObject_Length(__pyx_v_a); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Length(__pyx_v_a); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":143 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":149 * cdef int s, t * for i in range(len(a)): * s, t = a[i] # <<<<<<<<<<<<<< * a_[0][i] = grammar.AlignmentPoint(s, t) * */ - __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_a, __pyx_v_i, sizeof(unsigned int)+1, PyLong_FromUnsignedLong, 0, 0, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_a, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) { PyObject* sequence = __pyx_t_3; @@ -7337,7 +7974,7 @@ static int __pyx_pf_4cdec_5_cdec_5TRule_1a_3__set__(struct __pyx_obj_4cdec_5_cde if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - {__pyx_filename = __pyx_f[2]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[2]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { @@ -7350,16 +7987,15 @@ static int __pyx_pf_4cdec_5_cdec_5TRule_1a_3__set__(struct __pyx_obj_4cdec_5_cde __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); #else - __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); #endif __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } else - { + } else { Py_ssize_t index = -1; - __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext; @@ -7367,7 +8003,7 @@ static int __pyx_pf_4cdec_5_cdec_5TRule_1a_3__set__(struct __pyx_obj_4cdec_5_cde __Pyx_GOTREF(__pyx_t_4); index = 1; __pyx_t_5 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = NULL; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L6_unpacking_done; @@ -7375,17 +8011,17 @@ static int __pyx_pf_4cdec_5_cdec_5TRule_1a_3__set__(struct __pyx_obj_4cdec_5_cde __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - {__pyx_filename = __pyx_f[2]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[2]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L6_unpacking_done:; } - __pyx_t_8 = __Pyx_PyInt_AsInt(__pyx_t_4); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_9 = __Pyx_PyInt_AsInt(__pyx_t_5); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_s = __pyx_t_8; __pyx_v_t = __pyx_t_9; - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":144 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":150 * for i in range(len(a)): * s, t = a[i] * a_[0][i] = grammar.AlignmentPoint(s, t) # <<<<<<<<<<<<<< @@ -7395,6 +8031,15 @@ static int __pyx_pf_4cdec_5_cdec_5TRule_1a_3__set__(struct __pyx_obj_4cdec_5_cde ((__pyx_v_a_[0])[__pyx_v_i]) = AlignmentPoint(__pyx_v_s, __pyx_v_t); } + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":143 + * yield (a[0][i].s_, a[0][i].t_) + * + * def __set__(self, a): # <<<<<<<<<<<<<< + * cdef vector[grammar.AlignmentPoint]* a_ = &self.rule.get().a_ + * a_.resize(len(a)) + */ + + /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; @@ -7409,6 +8054,14 @@ static int __pyx_pf_4cdec_5_cdec_5TRule_1a_3__set__(struct __pyx_obj_4cdec_5_cde return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":153 + * + * property scores: + * def __get__(self): # <<<<<<<<<<<<<< + * cdef SparseVector scores = SparseVector.__new__(SparseVector) + * scores.vector = new FastSparseVector[double](self.rule.get().scores_) + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_5TRule_6scores_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_5TRule_6scores_1__get__(PyObject *__pyx_v_self) { @@ -7416,18 +8069,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_5TRule_6scores_1__get__(PyObject *__pyx_v __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_5TRule_6scores___get__(((struct __pyx_obj_4cdec_5_cdec_TRule *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":147 - * - * property scores: - * def __get__(self): # <<<<<<<<<<<<<< - * cdef SparseVector scores = SparseVector.__new__(SparseVector) - * scores.vector = new FastSparseVector[double](self.rule.get().scores_) - */ - static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_6scores___get__(struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self) { struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_scores = 0; PyObject *__pyx_r = NULL; @@ -7438,20 +8085,20 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_6scores___get__(struct __pyx_obj_4 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":148 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":154 * property scores: * def __get__(self): * cdef SparseVector scores = SparseVector.__new__(SparseVector) # <<<<<<<<<<<<<< * scores.vector = new FastSparseVector[double](self.rule.get().scores_) * return scores */ - __pyx_t_1 = __pyx_tp_new_4cdec_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SparseVector)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_tp_new_4cdec_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SparseVector)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4cdec_5_cdec_SparseVector)))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4cdec_5_cdec_SparseVector)))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_scores = ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_t_1); __pyx_t_1 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":149 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":155 * def __get__(self): * cdef SparseVector scores = SparseVector.__new__(SparseVector) * scores.vector = new FastSparseVector[double](self.rule.get().scores_) # <<<<<<<<<<<<<< @@ -7460,7 +8107,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_6scores___get__(struct __pyx_obj_4 */ __pyx_v_scores->vector = new FastSparseVector(__pyx_v_self->rule->get()->scores_); - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":150 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":156 * cdef SparseVector scores = SparseVector.__new__(SparseVector) * scores.vector = new FastSparseVector[double](self.rule.get().scores_) * return scores # <<<<<<<<<<<<<< @@ -7472,8 +8119,15 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_6scores___get__(struct __pyx_obj_4 __pyx_r = ((PyObject *)__pyx_v_scores); goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":153 + * + * property scores: + * def __get__(self): # <<<<<<<<<<<<<< + * cdef SparseVector scores = SparseVector.__new__(SparseVector) + * scores.vector = new FastSparseVector[double](self.rule.get().scores_) + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cdec._cdec.TRule.scores.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -7485,6 +8139,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_6scores___get__(struct __pyx_obj_4 return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":158 + * return scores + * + * def __set__(self, scores): # <<<<<<<<<<<<<< + * cdef FastSparseVector[double]* scores_ = &self.rule.get().scores_ + * scores_.clear() + */ + /* Python wrapper */ static int __pyx_pw_4cdec_5_cdec_5TRule_6scores_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_scores); /*proto*/ static int __pyx_pw_4cdec_5_cdec_5TRule_6scores_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_scores) { @@ -7492,18 +8154,12 @@ static int __pyx_pw_4cdec_5_cdec_5TRule_6scores_3__set__(PyObject *__pyx_v_self, __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_5TRule_6scores_2__set__(((struct __pyx_obj_4cdec_5_cdec_TRule *)__pyx_v_self), ((PyObject *)__pyx_v_scores)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":152 - * return scores - * - * def __set__(self, scores): # <<<<<<<<<<<<<< - * cdef FastSparseVector[double]* scores_ = &self.rule.get().scores_ - * scores_.clear() - */ - static int __pyx_pf_4cdec_5_cdec_5TRule_6scores_2__set__(struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self, PyObject *__pyx_v_scores) { FastSparseVector *__pyx_v_scores_; int __pyx_v_fid; @@ -7528,7 +8184,7 @@ static int __pyx_pf_4cdec_5_cdec_5TRule_6scores_2__set__(struct __pyx_obj_4cdec_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":153 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":159 * * def __set__(self, scores): * cdef FastSparseVector[double]* scores_ = &self.rule.get().scores_ # <<<<<<<<<<<<<< @@ -7537,7 +8193,7 @@ static int __pyx_pf_4cdec_5_cdec_5TRule_6scores_2__set__(struct __pyx_obj_4cdec_ */ __pyx_v_scores_ = (&__pyx_v_self->rule->get()->scores_); - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":154 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":160 * def __set__(self, scores): * cdef FastSparseVector[double]* scores_ = &self.rule.get().scores_ * scores_.clear() # <<<<<<<<<<<<<< @@ -7546,23 +8202,23 @@ static int __pyx_pf_4cdec_5_cdec_5TRule_6scores_2__set__(struct __pyx_obj_4cdec_ */ __pyx_v_scores_->clear(); - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":157 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":163 * cdef int fid * cdef float fval * for fname, fval in scores.items(): # <<<<<<<<<<<<<< * fn = as_str(fname) * fid = FDConvert(fn) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_scores, __pyx_n_s__items); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_scores, __pyx_n_s_items); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) { __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0; __pyx_t_4 = NULL; } else { - __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext; } @@ -7571,23 +8227,24 @@ static int __pyx_pf_4cdec_5_cdec_5TRule_6scores_2__set__(struct __pyx_obj_4cdec_ if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_1)) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_1)) { if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_2 = __pyx_t_4(__pyx_t_1); if (unlikely(!__pyx_t_2)) { - if (PyErr_Occurred()) { - if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); - else {__pyx_filename = __pyx_f[2]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + 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[2]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -7603,7 +8260,7 @@ static int __pyx_pf_4cdec_5_cdec_5TRule_6scores_2__set__(struct __pyx_obj_4cdec_ if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - {__pyx_filename = __pyx_f[2]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[2]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { @@ -7616,16 +8273,15 @@ static int __pyx_pf_4cdec_5_cdec_5TRule_6scores_2__set__(struct __pyx_obj_4cdec_ __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); #else - __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - } else - { + } else { Py_ssize_t index = -1; - __pyx_t_7 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext; @@ -7633,7 +8289,7 @@ static int __pyx_pf_4cdec_5_cdec_5TRule_6scores_2__set__(struct __pyx_obj_4cdec_ __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L6_unpacking_done; @@ -7641,40 +8297,38 @@ static int __pyx_pf_4cdec_5_cdec_5TRule_6scores_2__set__(struct __pyx_obj_4cdec_ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - {__pyx_filename = __pyx_f[2]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[2]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L6_unpacking_done:; } - __pyx_t_9 = __pyx_PyFloat_AsFloat(__pyx_t_6); if (unlikely((__pyx_t_9 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = __pyx_PyFloat_AsFloat(__pyx_t_6); if (unlikely((__pyx_t_9 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_XDECREF(__pyx_v_fname); - __pyx_v_fname = __pyx_t_5; + __Pyx_XDECREF_SET(__pyx_v_fname, __pyx_t_5); __pyx_t_5 = 0; __pyx_v_fval = __pyx_t_9; - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":158 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":164 * cdef float fval * for fname, fval in scores.items(): * fn = as_str(fname) # <<<<<<<<<<<<<< * fid = FDConvert(fn) * if fid < 0: raise KeyError(fname) */ - __pyx_t_2 = ((PyObject *)__pyx_f_4cdec_5_cdec_as_str(__pyx_v_fname, NULL)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_f_4cdec_5_cdec_as_str(__pyx_v_fname, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_XDECREF(((PyObject *)__pyx_v_fn)); - __pyx_v_fn = ((PyObject*)__pyx_t_2); + __Pyx_XDECREF_SET(__pyx_v_fn, ((PyObject*)__pyx_t_2)); __pyx_t_2 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":159 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":165 * for fname, fval in scores.items(): * fn = as_str(fname) * fid = FDConvert(fn) # <<<<<<<<<<<<<< * if fid < 0: raise KeyError(fname) * scores_.set_value(fid, fval) */ - __pyx_t_10 = __Pyx_PyObject_AsString(((PyObject *)__pyx_v_fn)); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = __Pyx_PyObject_AsString(__pyx_v_fn); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fid = FD::Convert(__pyx_t_10); - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":160 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":166 * fn = as_str(fname) * fid = FDConvert(fn) * if fid < 0: raise KeyError(fname) # <<<<<<<<<<<<<< @@ -7683,22 +8337,20 @@ static int __pyx_pf_4cdec_5_cdec_5TRule_6scores_2__set__(struct __pyx_obj_4cdec_ */ __pyx_t_11 = ((__pyx_v_fid < 0) != 0); if (__pyx_t_11) { - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_fname); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_fname); __Pyx_GIVEREF(__pyx_v_fname); - __pyx_t_6 = PyObject_Call(__pyx_builtin_KeyError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - {__pyx_filename = __pyx_f[2]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - goto __pyx_L7; + {__pyx_filename = __pyx_f[2]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_L7:; - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":161 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":167 * fid = FDConvert(fn) * if fid < 0: raise KeyError(fname) * scores_.set_value(fid, fval) # <<<<<<<<<<<<<< @@ -7709,6 +8361,15 @@ static int __pyx_pf_4cdec_5_cdec_5TRule_6scores_2__set__(struct __pyx_obj_4cdec_ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":158 + * return scores + * + * def __set__(self, scores): # <<<<<<<<<<<<<< + * cdef FastSparseVector[double]* scores_ = &self.rule.get().scores_ + * scores_.clear() + */ + + /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; @@ -7726,6 +8387,14 @@ static int __pyx_pf_4cdec_5_cdec_5TRule_6scores_2__set__(struct __pyx_obj_4cdec_ return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":170 + * + * property lhs: + * def __get__(self): # <<<<<<<<<<<<<< + * return NT(TDConvert(-self.rule.get().lhs_).c_str()) + * + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_5TRule_3lhs_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_5TRule_3lhs_1__get__(PyObject *__pyx_v_self) { @@ -7733,18 +8402,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_5TRule_3lhs_1__get__(PyObject *__pyx_v_se __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_5TRule_3lhs___get__(((struct __pyx_obj_4cdec_5_cdec_TRule *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":164 - * - * property lhs: - * def __get__(self): # <<<<<<<<<<<<<< - * return NT(TDConvert(-self.rule.get().lhs_).c_str()) - * - */ - static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_3lhs___get__(struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -7755,7 +8418,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_3lhs___get__(struct __pyx_obj_4cde int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":165 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":171 * property lhs: * def __get__(self): * return NT(TDConvert(-self.rule.get().lhs_).c_str()) # <<<<<<<<<<<<<< @@ -7763,22 +8426,29 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_3lhs___get__(struct __pyx_obj_4cde * def __set__(self, lhs): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBytes_FromString(TD::Convert((-__pyx_v_self->rule->get()->lhs_)).c_str()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyBytes_FromString(TD::Convert((-__pyx_v_self->rule->get()->lhs_)).c_str()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 171; __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 = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_1)); - __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_NT)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_NT)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":170 + * + * property lhs: + * def __get__(self): # <<<<<<<<<<<<<< + * return NT(TDConvert(-self.rule.get().lhs_).c_str()) + * + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); @@ -7790,6 +8460,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_3lhs___get__(struct __pyx_obj_4cde return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":173 + * return NT(TDConvert(-self.rule.get().lhs_).c_str()) + * + * def __set__(self, lhs): # <<<<<<<<<<<<<< + * if not isinstance(lhs, NT): + * lhs = NT(lhs) + */ + /* Python wrapper */ static int __pyx_pw_4cdec_5_cdec_5TRule_3lhs_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_lhs); /*proto*/ static int __pyx_pw_4cdec_5_cdec_5TRule_3lhs_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_lhs) { @@ -7797,18 +8475,12 @@ static int __pyx_pw_4cdec_5_cdec_5TRule_3lhs_3__set__(PyObject *__pyx_v_self, Py __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_5TRule_3lhs_2__set__(((struct __pyx_obj_4cdec_5_cdec_TRule *)__pyx_v_self), ((PyObject *)__pyx_v_lhs)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":167 - * return NT(TDConvert(-self.rule.get().lhs_).c_str()) - * - * def __set__(self, lhs): # <<<<<<<<<<<<<< - * if not isinstance(lhs, NT): - * lhs = NT(lhs) - */ - static int __pyx_pf_4cdec_5_cdec_5TRule_3lhs_2__set__(struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self, PyObject *__pyx_v_lhs) { int __pyx_r; __Pyx_RefNannyDeclarations @@ -7823,7 +8495,7 @@ static int __pyx_pf_4cdec_5_cdec_5TRule_3lhs_2__set__(struct __pyx_obj_4cdec_5_c __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_lhs); - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":168 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":174 * * def __set__(self, lhs): * if not isinstance(lhs, NT): # <<<<<<<<<<<<<< @@ -7834,38 +8506,46 @@ static int __pyx_pf_4cdec_5_cdec_5TRule_3lhs_2__set__(struct __pyx_obj_4cdec_5_c __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); if (__pyx_t_2) { - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":169 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":175 * def __set__(self, lhs): * if not isinstance(lhs, NT): * lhs = NT(lhs) # <<<<<<<<<<<<<< * self.rule.get().lhs_ = -TDConvert(( lhs).cat) * */ - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_lhs); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_lhs); __Pyx_GIVEREF(__pyx_v_lhs); - __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_NT)), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_NT)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_v_lhs); - __pyx_v_lhs = __pyx_t_4; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF_SET(__pyx_v_lhs, __pyx_t_4); __pyx_t_4 = 0; goto __pyx_L3; } __pyx_L3:; - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":170 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":176 * if not isinstance(lhs, NT): * lhs = NT(lhs) * self.rule.get().lhs_ = -TDConvert(( lhs).cat) # <<<<<<<<<<<<<< * * def __str__(self): */ - __pyx_t_5 = __Pyx_PyObject_AsString(((PyObject *)((struct __pyx_obj_4cdec_5_cdec_NT *)__pyx_v_lhs)->cat)); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_AsString(((struct __pyx_obj_4cdec_5_cdec_NT *)__pyx_v_lhs)->cat); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->rule->get()->lhs_ = (-TD::Convert(__pyx_t_5)); + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":173 + * return NT(TDConvert(-self.rule.get().lhs_).c_str()) + * + * def __set__(self, lhs): # <<<<<<<<<<<<<< + * if not isinstance(lhs, NT): + * lhs = NT(lhs) + */ + + /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; @@ -7879,6 +8559,14 @@ static int __pyx_pf_4cdec_5_cdec_5TRule_3lhs_2__set__(struct __pyx_obj_4cdec_5_c return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":178 + * self.rule.get().lhs_ = -TDConvert(( lhs).cat) + * + * def __str__(self): # <<<<<<<<<<<<<< + * scores = ' '.join('%s=%s' % feat for feat in self.scores) + * return '%s ||| %s ||| %s ||| %s' % (self.lhs, + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_5TRule_5__str__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_5TRule_5__str__(PyObject *__pyx_v_self) { @@ -7886,12 +8574,14 @@ static PyObject *__pyx_pw_4cdec_5_cdec_5TRule_5__str__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__str__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_5TRule_4__str__(((struct __pyx_obj_4cdec_5_cdec_TRule *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_4cdec_5_cdec_5TRule_7__str___2generator19(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":173 +/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":179 * * def __str__(self): * scores = ' '.join('%s=%s' % feat for feat in self.scores) # <<<<<<<<<<<<<< @@ -7917,12 +8607,13 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_7__str___genexpr(PyObject *__pyx_s __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); { - __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_5_cdec_5TRule_7__str___2generator19, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_5_cdec_5TRule_7__str___2generator19, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } + /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; @@ -7956,15 +8647,15 @@ static PyObject *__pyx_gb_4cdec_5_cdec_5TRule_7__str___2generator19(__pyx_Genera return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self), __pyx_n_s__scores); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self), __pyx_n_s_scores); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (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[2]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; } @@ -7973,36 +8664,36 @@ static PyObject *__pyx_gb_4cdec_5_cdec_5TRule_7__str___2generator19(__pyx_Genera if (!__pyx_t_4 && 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[2]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __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[2]; __pyx_lineno = 179; __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[2]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_2)) { 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[2]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __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[2]; __pyx_lineno = 179; __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[2]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_1 = __pyx_t_4(__pyx_t_2); if (unlikely(!__pyx_t_1)) { - if (PyErr_Occurred()) { - if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); - else {__pyx_filename = __pyx_f[2]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + 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[2]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_1); } __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_feat); - __Pyx_XDECREF(__pyx_cur_scope->__pyx_v_feat); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_feat, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); - __pyx_cur_scope->__pyx_v_feat = __pyx_t_1; __pyx_t_1 = 0; - __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_11), __pyx_cur_scope->__pyx_v_feat); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); - __pyx_r = ((PyObject *)__pyx_t_1); + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_s_s, __pyx_cur_scope->__pyx_v_feat); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; __pyx_t_1 = 0; __Pyx_XGIVEREF(__pyx_t_2); __pyx_cur_scope->__pyx_t_0 = __pyx_t_2; @@ -8019,9 +8710,11 @@ static PyObject *__pyx_gb_4cdec_5_cdec_5TRule_7__str___2generator19(__pyx_Genera __Pyx_XGOTREF(__pyx_t_2); __pyx_t_3 = __pyx_cur_scope->__pyx_t_1; __pyx_t_4 = __pyx_cur_scope->__pyx_t_2; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* function exit code */ PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; @@ -8036,7 +8729,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_5TRule_7__str___2generator19(__pyx_Genera return NULL; } -/* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":172 +/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":178 * self.rule.get().lhs_ = -TDConvert(( lhs).cat) * * def __str__(self): # <<<<<<<<<<<<<< @@ -8068,30 +8761,22 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_4__str__(struct __pyx_obj_4cdec_5_ __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":173 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":179 * * def __str__(self): * scores = ' '.join('%s=%s' % feat for feat in self.scores) # <<<<<<<<<<<<<< * return '%s ||| %s ||| %s ||| %s' % (self.lhs, * _phrase(self.f), _phrase(self.e), scores) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_kp_s_7), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_pf_4cdec_5_cdec_5TRule_7__str___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __pyx_pf_4cdec_5_cdec_5TRule_7__str___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); - __Pyx_GIVEREF(__pyx_t_2); - __pyx_t_2 = 0; - __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyString_Join(__pyx_kp_s__4, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - __pyx_v_scores = __pyx_t_2; + __pyx_v_scores = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":174 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":180 * def __str__(self): * scores = ' '.join('%s=%s' % feat for feat in self.scores) * return '%s ||| %s ||| %s ||| %s' % (self.lhs, # <<<<<<<<<<<<<< @@ -8099,65 +8784,80 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_4__str__(struct __pyx_obj_4cdec_5_ * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s__lhs); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_lhs); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":175 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":181 * scores = ' '.join('%s=%s' % feat for feat in self.scores) * return '%s ||| %s ||| %s ||| %s' % (self.lhs, * _phrase(self.f), _phrase(self.e), scores) # <<<<<<<<<<<<<< * * cdef class MRule(TRule): */ - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s___phrase); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s__f); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); - __Pyx_GIVEREF(__pyx_t_1); - __pyx_t_1 = 0; - __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_phrase); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s___phrase); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s__e); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_f); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_phrase); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_e); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; - __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":180 + * def __str__(self): + * scores = ' '.join('%s=%s' % feat for feat in self.scores) + * return '%s ||| %s ||| %s ||| %s' % (self.lhs, # <<<<<<<<<<<<<< + * _phrase(self.f), _phrase(self.e), scores) + * + */ + __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1); - __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_scores); PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_v_scores); __Pyx_GIVEREF(__pyx_v_scores); __pyx_t_2 = 0; - __pyx_t_1 = 0; - __pyx_t_3 = 0; - __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_12), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); - __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; - __pyx_r = ((PyObject *)__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_s_s_s_s, __pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":178 + * self.rule.get().lhs_ = -TDConvert(( lhs).cat) + * + * def __str__(self): # <<<<<<<<<<<<<< + * scores = ' '.join('%s=%s' % feat for feat in self.scores) + * return '%s ||| %s ||| %s ||| %s' % (self.lhs, + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); @@ -8174,6 +8874,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_4__str__(struct __pyx_obj_4cdec_5_ return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":184 + * + * cdef class MRule(TRule): + * def __init__(self, lhs, rhs, scores): # <<<<<<<<<<<<<< + * """MRule(lhs, rhs, scores, a=None) -> Monolingual rule. + * lhs: left hand side non-terminal + */ + /* Python wrapper */ static int __pyx_pw_4cdec_5_cdec_5MRule_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4cdec_5_cdec_5MRule___init__[] = "MRule(lhs, rhs, scores, a=None) -> Monolingual rule.\n lhs: left hand side non-terminal\n rhs: right hand side phrase (list of words/NT)\n scores: dictionary of feature scores"; @@ -8191,7 +8899,7 @@ static int __pyx_pw_4cdec_5_cdec_5MRule_1__init__(PyObject *__pyx_v_self, PyObje __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__lhs,&__pyx_n_s__rhs,&__pyx_n_s__scores,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lhs,&__pyx_n_s_rhs,&__pyx_n_s_scores,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; @@ -8206,21 +8914,21 @@ static int __pyx_pw_4cdec_5_cdec_5MRule_1__init__(PyObject *__pyx_v_self, PyObje kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__lhs)) != 0)) kw_args--; + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_lhs)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: - if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__rhs)) != 0)) kw_args--; + if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_rhs)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: - if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__scores)) != 0)) kw_args--; + if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_scores)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 184; __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[2]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -8235,25 +8943,19 @@ static int __pyx_pw_4cdec_5_cdec_5MRule_1__init__(PyObject *__pyx_v_self, PyObje } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("cdec._cdec.MRule.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4cdec_5_cdec_5MRule___init__(((struct __pyx_obj_4cdec_5_cdec_MRule *)__pyx_v_self), __pyx_v_lhs, __pyx_v_rhs, __pyx_v_scores); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":178 - * - * cdef class MRule(TRule): - * def __init__(self, lhs, rhs, scores): # <<<<<<<<<<<<<< - * """MRule(lhs, rhs, scores, a=None) -> Monolingual rule. - * lhs: left hand side non-terminal - */ - static int __pyx_pf_4cdec_5_cdec_5MRule___init__(struct __pyx_obj_4cdec_5_cdec_MRule *__pyx_v_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, PyObject *__pyx_v_scores) { unsigned int __pyx_v_i; PyObject *__pyx_v_e = NULL; @@ -8273,7 +8975,7 @@ static int __pyx_pf_4cdec_5_cdec_5MRule___init__(struct __pyx_obj_4cdec_5_cdec_M int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":183 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":189 * rhs: right hand side phrase (list of words/NT) * scores: dictionary of feature scores""" * cdef unsigned i = 1 # <<<<<<<<<<<<<< @@ -8282,19 +8984,19 @@ static int __pyx_pf_4cdec_5_cdec_5MRule___init__(struct __pyx_obj_4cdec_5_cdec_M */ __pyx_v_i = 1; - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":184 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":190 * scores: dictionary of feature scores""" * cdef unsigned i = 1 * e = [] # <<<<<<<<<<<<<< * for s in rhs: * if isinstance(s, NT): */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_e = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":185 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":191 * cdef unsigned i = 1 * e = [] * for s in rhs: # <<<<<<<<<<<<<< @@ -8305,7 +9007,7 @@ static int __pyx_pf_4cdec_5_cdec_5MRule___init__(struct __pyx_obj_4cdec_5_cdec_M __pyx_t_1 = __pyx_v_rhs; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = NULL; } else { - __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_rhs); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_rhs); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; } @@ -8313,33 +9015,33 @@ static int __pyx_pf_4cdec_5_cdec_5MRule___init__(struct __pyx_obj_4cdec_5_cdec_M if (!__pyx_t_3 && PyList_CheckExact(__pyx_t_1)) { if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_3 && PyTuple_CheckExact(__pyx_t_1)) { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_4 = __pyx_t_3(__pyx_t_1); if (unlikely(!__pyx_t_4)) { - if (PyErr_Occurred()) { - if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); - else {__pyx_filename = __pyx_f[2]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + 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[2]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_4); } - __Pyx_XDECREF(__pyx_v_s); - __pyx_v_s = __pyx_t_4; + __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_4); __pyx_t_4 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":186 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":192 * e = [] * for s in rhs: * if isinstance(s, NT): # <<<<<<<<<<<<<< @@ -8350,27 +9052,27 @@ static int __pyx_pf_4cdec_5_cdec_5MRule___init__(struct __pyx_obj_4cdec_5_cdec_M __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":187 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":193 * for s in rhs: * if isinstance(s, NT): * e.append(NTRef(i)) # <<<<<<<<<<<<<< * i += 1 * else: */ - __pyx_t_4 = PyLong_FromUnsignedLong(__pyx_v_i); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_i); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_NTRef)), ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_NTRef)), __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; - __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_e, __pyx_t_4); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_e, __pyx_t_4); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":188 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":194 * if isinstance(s, NT): * e.append(NTRef(i)) * i += 1 # <<<<<<<<<<<<<< @@ -8382,27 +9084,27 @@ static int __pyx_pf_4cdec_5_cdec_5MRule___init__(struct __pyx_obj_4cdec_5_cdec_M } /*else*/ { - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":190 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":196 * i += 1 * else: * e.append(s) # <<<<<<<<<<<<<< * super(MRule, self).__init__(lhs, rhs, e, scores, None) * */ - __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_e, __pyx_v_s); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_e, __pyx_v_s); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L5:; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":191 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":197 * else: * e.append(s) * super(MRule, self).__init__(lhs, rhs, e, scores, None) # <<<<<<<<<<<<<< * * cdef class Grammar: */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_MRule))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_MRule))); @@ -8410,13 +9112,13 @@ static int __pyx_pf_4cdec_5_cdec_5MRule___init__(struct __pyx_obj_4cdec_5_cdec_M __Pyx_INCREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); - __pyx_t_4 = PyObject_Call(__pyx_builtin_super, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s____init__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_init); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyTuple_New(5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_lhs); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_lhs); @@ -8424,21 +9126,30 @@ static int __pyx_pf_4cdec_5_cdec_5MRule___init__(struct __pyx_obj_4cdec_5_cdec_M __Pyx_INCREF(__pyx_v_rhs); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_rhs); __Pyx_GIVEREF(__pyx_v_rhs); - __Pyx_INCREF(((PyObject *)__pyx_v_e)); - PyTuple_SET_ITEM(__pyx_t_4, 2, ((PyObject *)__pyx_v_e)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_e)); + __Pyx_INCREF(__pyx_v_e); + PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_e); + __Pyx_GIVEREF(__pyx_v_e); __Pyx_INCREF(__pyx_v_scores); PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_v_scores); __Pyx_GIVEREF(__pyx_v_scores); __Pyx_INCREF(Py_None); PyTuple_SET_ITEM(__pyx_t_4, 4, Py_None); __Pyx_GIVEREF(Py_None); - __pyx_t_7 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":184 + * + * cdef class MRule(TRule): + * def __init__(self, lhs, rhs, scores): # <<<<<<<<<<<<<< + * """MRule(lhs, rhs, scores, a=None) -> Monolingual rule. + * lhs: left hand side non-terminal + */ + + /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; @@ -8454,28 +9165,30 @@ static int __pyx_pf_4cdec_5_cdec_5MRule___init__(struct __pyx_obj_4cdec_5_cdec_M return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":202 + * cdef shared_ptr[grammar.Grammar]* grammar + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * del self.grammar + * + */ + /* Python wrapper */ static void __pyx_pw_4cdec_5_cdec_7Grammar_1__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_4cdec_5_cdec_7Grammar_1__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_4cdec_5_cdec_7Grammar___dealloc__(((struct __pyx_obj_4cdec_5_cdec_Grammar *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); } -/* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":196 - * cdef shared_ptr[grammar.Grammar]* grammar - * - * def __dealloc__(self): # <<<<<<<<<<<<<< - * del self.grammar - * - */ - -static void __pyx_pf_4cdec_5_cdec_7Grammar___dealloc__(CYTHON_UNUSED struct __pyx_obj_4cdec_5_cdec_Grammar *__pyx_v_self) { +static void __pyx_pf_4cdec_5_cdec_7Grammar___dealloc__(struct __pyx_obj_4cdec_5_cdec_Grammar *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":197 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":203 * * def __dealloc__(self): * del self.grammar # <<<<<<<<<<<<<< @@ -8484,10 +9197,27 @@ static void __pyx_pf_4cdec_5_cdec_7Grammar___dealloc__(CYTHON_UNUSED struct __py */ delete __pyx_v_self->grammar; + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":202 + * cdef shared_ptr[grammar.Grammar]* grammar + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * del self.grammar + * + */ + + /* function exit code */ __Pyx_RefNannyFinishContext(); } static PyObject *__pyx_gb_4cdec_5_cdec_7Grammar_4generator3(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ +/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":205 + * del self.grammar + * + * def __iter__(self): # <<<<<<<<<<<<<< + * cdef grammar.const_GrammarIter* root = self.grammar.get().GetRoot() + * cdef grammar.const_RuleBin* rbin = root.GetRules() + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_7Grammar_3__iter__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_7Grammar_3__iter__(PyObject *__pyx_v_self) { @@ -8495,18 +9225,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_7Grammar_3__iter__(PyObject *__pyx_v_self __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_7Grammar_2__iter__(((struct __pyx_obj_4cdec_5_cdec_Grammar *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":199 - * del self.grammar - * - * def __iter__(self): # <<<<<<<<<<<<<< - * cdef grammar.const_GrammarIter* root = self.grammar.get().GetRoot() - * cdef grammar.const_RuleBin* rbin = root.GetRules() - */ - static PyObject *__pyx_pf_4cdec_5_cdec_7Grammar_2__iter__(struct __pyx_obj_4cdec_5_cdec_Grammar *__pyx_v_self) { struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__ *__pyx_cur_scope; PyObject *__pyx_r = NULL; @@ -8525,12 +9249,13 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Grammar_2__iter__(struct __pyx_obj_4cdec __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); { - __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_5_cdec_7Grammar_4generator3, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_5_cdec_7Grammar_4generator3, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } + /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; @@ -8563,9 +9288,9 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7Grammar_4generator3(__pyx_GeneratorObjec return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":200 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":206 * * def __iter__(self): * cdef grammar.const_GrammarIter* root = self.grammar.get().GetRoot() # <<<<<<<<<<<<<< @@ -8574,7 +9299,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7Grammar_4generator3(__pyx_GeneratorObjec */ __pyx_cur_scope->__pyx_v_root = __pyx_cur_scope->__pyx_v_self->grammar->get()->GetRoot(); - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":201 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":207 * def __iter__(self): * cdef grammar.const_GrammarIter* root = self.grammar.get().GetRoot() * cdef grammar.const_RuleBin* rbin = root.GetRules() # <<<<<<<<<<<<<< @@ -8583,7 +9308,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7Grammar_4generator3(__pyx_GeneratorObjec */ __pyx_cur_scope->__pyx_v_rbin = __pyx_cur_scope->__pyx_v_root->GetRules(); - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":204 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":210 * cdef TRule trule * cdef unsigned i * for i in range(rbin.GetNumRules()): # <<<<<<<<<<<<<< @@ -8594,23 +9319,22 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7Grammar_4generator3(__pyx_GeneratorObjec for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_cur_scope->__pyx_v_i = __pyx_t_2; - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":205 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":211 * cdef unsigned i * for i in range(rbin.GetNumRules()): * trule = TRule.__new__(TRule) # <<<<<<<<<<<<<< * trule.rule = new shared_ptr[grammar.TRule](rbin.GetIthRule(i)) * yield trule */ - __pyx_t_3 = __pyx_tp_new_4cdec_5_cdec_TRule(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_TRule)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __pyx_tp_new_4cdec_5_cdec_TRule(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_TRule)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_4cdec_5_cdec_TRule)))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_4cdec_5_cdec_TRule)))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_trule)); - __Pyx_XDECREF(((PyObject *)__pyx_cur_scope->__pyx_v_trule)); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_trule, ((struct __pyx_obj_4cdec_5_cdec_TRule *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); - __pyx_cur_scope->__pyx_v_trule = ((struct __pyx_obj_4cdec_5_cdec_TRule *)__pyx_t_3); __pyx_t_3 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":206 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":212 * for i in range(rbin.GetNumRules()): * trule = TRule.__new__(TRule) * trule.rule = new shared_ptr[grammar.TRule](rbin.GetIthRule(i)) # <<<<<<<<<<<<<< @@ -8619,7 +9343,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7Grammar_4generator3(__pyx_GeneratorObjec */ __pyx_cur_scope->__pyx_v_trule->rule = new boost::shared_ptr(__pyx_cur_scope->__pyx_v_rbin->GetIthRule(__pyx_cur_scope->__pyx_v_i)); - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":207 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":213 * trule = TRule.__new__(TRule) * trule.rule = new shared_ptr[grammar.TRule](rbin.GetIthRule(i)) * yield trule # <<<<<<<<<<<<<< @@ -8638,8 +9362,18 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7Grammar_4generator3(__pyx_GeneratorObjec __pyx_L6_resume_from_yield:; __pyx_t_1 = __pyx_cur_scope->__pyx_t_0; __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":205 + * del self.grammar + * + * def __iter__(self): # <<<<<<<<<<<<<< + * cdef grammar.const_GrammarIter* root = self.grammar.get().GetRoot() + * cdef grammar.const_RuleBin* rbin = root.GetRules() + */ + + /* function exit code */ PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; @@ -8653,6 +9387,14 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7Grammar_4generator3(__pyx_GeneratorObjec return NULL; } +/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":216 + * + * property name: + * def __get__(self): # <<<<<<<<<<<<<< + * str(self.grammar.get().GetGrammarName().c_str()) + * + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_7Grammar_4name_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_7Grammar_4name_1__get__(PyObject *__pyx_v_self) { @@ -8660,18 +9402,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_7Grammar_4name_1__get__(PyObject *__pyx_v __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_7Grammar_4name___get__(((struct __pyx_obj_4cdec_5_cdec_Grammar *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":210 - * - * property name: - * def __get__(self): # <<<<<<<<<<<<<< - * str(self.grammar.get().GetGrammarName().c_str()) - * - */ - static PyObject *__pyx_pf_4cdec_5_cdec_7Grammar_4name___get__(struct __pyx_obj_4cdec_5_cdec_Grammar *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -8682,25 +9418,34 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Grammar_4name___get__(struct __pyx_obj_4 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":211 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":217 * property name: * def __get__(self): * str(self.grammar.get().GetGrammarName().c_str()) # <<<<<<<<<<<<<< * * def __set__(self, name): */ - __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->grammar->get()->GetGrammarName().c_str()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->grammar->get()->GetGrammarName().c_str()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 217; __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 = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_1)); - __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":216 + * + * property name: + * def __get__(self): # <<<<<<<<<<<<<< + * str(self.grammar.get().GetGrammarName().c_str()) + * + */ + + /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; @@ -8714,6 +9459,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Grammar_4name___get__(struct __pyx_obj_4 return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":219 + * str(self.grammar.get().GetGrammarName().c_str()) + * + * def __set__(self, name): # <<<<<<<<<<<<<< + * name = as_str(name) + * self.grammar.get().SetGrammarName(name) + */ + /* Python wrapper */ static int __pyx_pw_4cdec_5_cdec_7Grammar_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/ static int __pyx_pw_4cdec_5_cdec_7Grammar_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_name) { @@ -8721,18 +9474,12 @@ static int __pyx_pw_4cdec_5_cdec_7Grammar_4name_3__set__(PyObject *__pyx_v_self, __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_7Grammar_4name_2__set__(((struct __pyx_obj_4cdec_5_cdec_Grammar *)__pyx_v_self), ((PyObject *)__pyx_v_name)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":213 - * str(self.grammar.get().GetGrammarName().c_str()) - * - * def __set__(self, name): # <<<<<<<<<<<<<< - * name = as_str(name) - * self.grammar.get().SetGrammarName(name) - */ - static int __pyx_pf_4cdec_5_cdec_7Grammar_4name_2__set__(struct __pyx_obj_4cdec_5_cdec_Grammar *__pyx_v_self, PyObject *__pyx_v_name) { int __pyx_r; __Pyx_RefNannyDeclarations @@ -8744,29 +9491,37 @@ static int __pyx_pf_4cdec_5_cdec_7Grammar_4name_2__set__(struct __pyx_obj_4cdec_ __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_name); - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":214 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":220 * * def __set__(self, name): * name = as_str(name) # <<<<<<<<<<<<<< * self.grammar.get().SetGrammarName(name) * */ - __pyx_t_1 = ((PyObject *)__pyx_f_4cdec_5_cdec_as_str(__pyx_v_name, NULL)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_f_4cdec_5_cdec_as_str(__pyx_v_name, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_v_name); - __pyx_v_name = __pyx_t_1; + __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_1); __pyx_t_1 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":215 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":221 * def __set__(self, name): * name = as_str(name) * self.grammar.get().SetGrammarName(name) # <<<<<<<<<<<<<< * * cdef class TextGrammar(Grammar): */ - __pyx_t_2 = __pyx_convert_string_from_py_(__pyx_v_name); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_convert_string_from_py_(__pyx_v_name); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->grammar->get()->SetGrammarName(__pyx_t_2); + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":219 + * str(self.grammar.get().GetGrammarName().c_str()) + * + * def __set__(self, name): # <<<<<<<<<<<<<< + * name = as_str(name) + * self.grammar.get().SetGrammarName(name) + */ + + /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; @@ -8779,6 +9534,14 @@ static int __pyx_pf_4cdec_5_cdec_7Grammar_4name_2__set__(struct __pyx_obj_4cdec_ return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":224 + * + * cdef class TextGrammar(Grammar): + * def __init__(self, rules): # <<<<<<<<<<<<<< + * """TextGrammar(rules) -> SCFG Grammar containing the rules.""" + * self.grammar = new shared_ptr[grammar.Grammar](new grammar.TextGrammar()) + */ + /* Python wrapper */ static int __pyx_pw_4cdec_5_cdec_11TextGrammar_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4cdec_5_cdec_11TextGrammar___init__[] = "TextGrammar(rules) -> SCFG Grammar containing the rules."; @@ -8794,7 +9557,7 @@ static int __pyx_pw_4cdec_5_cdec_11TextGrammar_1__init__(PyObject *__pyx_v_self, __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__rules,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_rules,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; @@ -8807,11 +9570,11 @@ static int __pyx_pw_4cdec_5_cdec_11TextGrammar_1__init__(PyObject *__pyx_v_self, kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__rules)) != 0)) kw_args--; + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_rules)) != 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, "__init__") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -8822,25 +9585,19 @@ static int __pyx_pw_4cdec_5_cdec_11TextGrammar_1__init__(PyObject *__pyx_v_self, } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("cdec._cdec.TextGrammar.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4cdec_5_cdec_11TextGrammar___init__(((struct __pyx_obj_4cdec_5_cdec_TextGrammar *)__pyx_v_self), __pyx_v_rules); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":218 - * - * cdef class TextGrammar(Grammar): - * def __init__(self, rules): # <<<<<<<<<<<<<< - * """TextGrammar(rules) -> SCFG Grammar containing the rules.""" - * self.grammar = new shared_ptr[grammar.Grammar](new grammar.TextGrammar()) - */ - static int __pyx_pf_4cdec_5_cdec_11TextGrammar___init__(struct __pyx_obj_4cdec_5_cdec_TextGrammar *__pyx_v_self, PyObject *__pyx_v_rules) { TextGrammar *__pyx_v__g; PyObject *__pyx_v_trule = NULL; @@ -8857,7 +9614,7 @@ static int __pyx_pf_4cdec_5_cdec_11TextGrammar___init__(struct __pyx_obj_4cdec_5 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":220 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":226 * def __init__(self, rules): * """TextGrammar(rules) -> SCFG Grammar containing the rules.""" * self.grammar = new shared_ptr[grammar.Grammar](new grammar.TextGrammar()) # <<<<<<<<<<<<<< @@ -8866,7 +9623,7 @@ static int __pyx_pf_4cdec_5_cdec_11TextGrammar___init__(struct __pyx_obj_4cdec_5 */ __pyx_v_self->__pyx_base.grammar = new boost::shared_ptr(new TextGrammar()); - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":221 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":227 * """TextGrammar(rules) -> SCFG Grammar containing the rules.""" * self.grammar = new shared_ptr[grammar.Grammar](new grammar.TextGrammar()) * cdef grammar.TextGrammar* _g = self.grammar.get() # <<<<<<<<<<<<<< @@ -8875,7 +9632,7 @@ static int __pyx_pf_4cdec_5_cdec_11TextGrammar___init__(struct __pyx_obj_4cdec_5 */ __pyx_v__g = ((TextGrammar *)__pyx_v_self->__pyx_base.grammar->get()); - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":222 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":228 * self.grammar = new shared_ptr[grammar.Grammar](new grammar.TextGrammar()) * cdef grammar.TextGrammar* _g = self.grammar.get() * for trule in rules: # <<<<<<<<<<<<<< @@ -8886,7 +9643,7 @@ static int __pyx_pf_4cdec_5_cdec_11TextGrammar___init__(struct __pyx_obj_4cdec_5 __pyx_t_1 = __pyx_v_rules; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = NULL; } else { - __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_rules); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_rules); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; } @@ -8894,33 +9651,33 @@ static int __pyx_pf_4cdec_5_cdec_11TextGrammar___init__(struct __pyx_obj_4cdec_5 if (!__pyx_t_3 && PyList_CheckExact(__pyx_t_1)) { if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_3 && PyTuple_CheckExact(__pyx_t_1)) { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_4 = __pyx_t_3(__pyx_t_1); if (unlikely(!__pyx_t_4)) { - if (PyErr_Occurred()) { - if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); - else {__pyx_filename = __pyx_f[2]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + 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[2]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_4); } - __Pyx_XDECREF(__pyx_v_trule); - __pyx_v_trule = __pyx_t_4; + __Pyx_XDECREF_SET(__pyx_v_trule, __pyx_t_4); __pyx_t_4 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":223 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":229 * cdef grammar.TextGrammar* _g = self.grammar.get() * for trule in rules: * if isinstance(trule, _sa.Rule): # <<<<<<<<<<<<<< @@ -8931,23 +9688,22 @@ static int __pyx_pf_4cdec_5_cdec_11TextGrammar___init__(struct __pyx_obj_4cdec_5 __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":224 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":230 * for trule in rules: * if isinstance(trule, _sa.Rule): * trule = convert_rule(trule) # <<<<<<<<<<<<<< * elif not isinstance(trule, TRule): * raise ValueError('the grammar should contain TRule objects') */ - if (!(likely(((__pyx_v_trule) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_trule, __pyx_ptype_4cdec_2sa_3_sa_Rule))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_4 = ((PyObject *)__pyx_f_4cdec_5_cdec_convert_rule(((struct __pyx_obj_4cdec_2sa_3_sa_Rule *)__pyx_v_trule))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(((__pyx_v_trule) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_trule, __pyx_ptype_4cdec_2sa_3_sa_Rule))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = ((PyObject *)__pyx_f_4cdec_5_cdec_convert_rule(((struct __pyx_obj_4cdec_2sa_3_sa_Rule *)__pyx_v_trule))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_v_trule); - __pyx_v_trule = __pyx_t_4; + __Pyx_DECREF_SET(__pyx_v_trule, __pyx_t_4); __pyx_t_4 = 0; goto __pyx_L5; } - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":225 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":231 * if isinstance(trule, _sa.Rule): * trule = convert_rule(trule) * elif not isinstance(trule, TRule): # <<<<<<<<<<<<<< @@ -8958,22 +9714,21 @@ static int __pyx_pf_4cdec_5_cdec_11TextGrammar___init__(struct __pyx_obj_4cdec_5 __pyx_t_5 = ((!(__pyx_t_6 != 0)) != 0); if (__pyx_t_5) { - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":226 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":232 * trule = convert_rule(trule) * elif not isinstance(trule, TRule): * raise ValueError('the grammar should contain TRule objects') # <<<<<<<<<<<<<< * _g.AddRule(( trule).rule[0]) */ - __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_14), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 232; __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[2]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - goto __pyx_L5; + {__pyx_filename = __pyx_f[2]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L5:; - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":227 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":233 * elif not isinstance(trule, TRule): * raise ValueError('the grammar should contain TRule objects') * _g.AddRule(( trule).rule[0]) # <<<<<<<<<<<<<< @@ -8982,6 +9737,15 @@ static int __pyx_pf_4cdec_5_cdec_11TextGrammar___init__(struct __pyx_obj_4cdec_5 } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":224 + * + * cdef class TextGrammar(Grammar): + * def __init__(self, rules): # <<<<<<<<<<<<<< + * """TextGrammar(rules) -> SCFG Grammar containing the rules.""" + * self.grammar = new shared_ptr[grammar.Grammar](new grammar.TextGrammar()) + */ + + /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; @@ -8995,29 +9759,31 @@ static int __pyx_pf_4cdec_5_cdec_11TextGrammar___init__(struct __pyx_obj_4cdec_5 return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":8 + * cdef MT19937* rng + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * del self.hg + * if self.rng != NULL: + */ + /* Python wrapper */ static void __pyx_pw_4cdec_5_cdec_10Hypergraph_1__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_4cdec_5_cdec_10Hypergraph_1__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_4cdec_5_cdec_10Hypergraph___dealloc__(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); } -/* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":8 - * cdef MT19937* rng - * - * def __dealloc__(self): # <<<<<<<<<<<<<< - * del self.hg - * if self.rng != NULL: - */ - static void __pyx_pf_4cdec_5_cdec_10Hypergraph___dealloc__(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self) { __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":9 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":9 * * def __dealloc__(self): * del self.hg # <<<<<<<<<<<<<< @@ -9026,7 +9792,7 @@ static void __pyx_pf_4cdec_5_cdec_10Hypergraph___dealloc__(struct __pyx_obj_4cde */ delete __pyx_v_self->hg; - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":10 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":10 * def __dealloc__(self): * del self.hg * if self.rng != NULL: # <<<<<<<<<<<<<< @@ -9036,7 +9802,7 @@ static void __pyx_pf_4cdec_5_cdec_10Hypergraph___dealloc__(struct __pyx_obj_4cde __pyx_t_1 = ((__pyx_v_self->rng != NULL) != 0); if (__pyx_t_1) { - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":11 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":11 * del self.hg * if self.rng != NULL: * del self.rng # <<<<<<<<<<<<<< @@ -9048,10 +9814,19 @@ static void __pyx_pf_4cdec_5_cdec_10Hypergraph___dealloc__(struct __pyx_obj_4cde } __pyx_L3:; + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":8 + * cdef MT19937* rng + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * del self.hg + * if self.rng != NULL: + */ + + /* function exit code */ __Pyx_RefNannyFinishContext(); } -/* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":13 +/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":13 * del self.rng * * cdef MT19937* _rng(self): # <<<<<<<<<<<<<< @@ -9069,7 +9844,7 @@ static MT19937 *__pyx_f_4cdec_5_cdec_10Hypergraph__rng(struct __pyx_obj_4cdec_5_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_rng", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":14 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":14 * * cdef MT19937* _rng(self): * if self.rng == NULL: # <<<<<<<<<<<<<< @@ -9079,7 +9854,7 @@ static MT19937 *__pyx_f_4cdec_5_cdec_10Hypergraph__rng(struct __pyx_obj_4cdec_5_ __pyx_t_1 = ((__pyx_v_self->rng == NULL) != 0); if (__pyx_t_1) { - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":15 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":15 * cdef MT19937* _rng(self): * if self.rng == NULL: * self.rng = new MT19937() # <<<<<<<<<<<<<< @@ -9097,7 +9872,7 @@ static MT19937 *__pyx_f_4cdec_5_cdec_10Hypergraph__rng(struct __pyx_obj_4cdec_5_ } __pyx_L3:; - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":16 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":16 * if self.rng == NULL: * self.rng = new MT19937() * return self.rng # <<<<<<<<<<<<<< @@ -9107,16 +9882,31 @@ static MT19937 *__pyx_f_4cdec_5_cdec_10Hypergraph__rng(struct __pyx_obj_4cdec_5_ __pyx_r = __pyx_v_self->rng; goto __pyx_L0; - __pyx_r = 0; - goto __pyx_L0; + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":13 + * del self.rng + * + * cdef MT19937* _rng(self): # <<<<<<<<<<<<<< + * if self.rng == NULL: + * self.rng = new MT19937() + */ + + /* function exit code */ __pyx_L1_error:; - __Pyx_WriteUnraisable("cdec._cdec.Hypergraph._rng", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_WriteUnraisable("cdec._cdec.Hypergraph._rng", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":18 + * return self.rng + * + * def viterbi(self): # <<<<<<<<<<<<<< + * """hg.viterbi() -> String for the best hypothesis in the hypergraph.""" + * cdef vector[WordID] trans + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_3viterbi(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_4cdec_5_cdec_10Hypergraph_2viterbi[] = "hg.viterbi() -> String for the best hypothesis in the hypergraph."; @@ -9125,18 +9915,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_3viterbi(PyObject *__pyx_v_s __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("viterbi (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_2viterbi(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":18 - * return self.rng - * - * def viterbi(self): # <<<<<<<<<<<<<< - * """hg.viterbi() -> String for the best hypothesis in the hypergraph.""" - * cdef vector[WordID] trans - */ - static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_2viterbi(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self) { std::vector __pyx_v_trans; PyObject *__pyx_r = NULL; @@ -9148,7 +9932,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_2viterbi(struct __pyx_obj_4c int __pyx_clineno = 0; __Pyx_RefNannySetupContext("viterbi", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":21 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":21 * """hg.viterbi() -> String for the best hypothesis in the hypergraph.""" * cdef vector[WordID] trans * hypergraph.ViterbiESentence(self.hg[0], &trans) # <<<<<<<<<<<<<< @@ -9157,7 +9941,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_2viterbi(struct __pyx_obj_4c */ ViterbiESentence((__pyx_v_self->hg[0]), (&__pyx_v_trans)); - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":22 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":22 * cdef vector[WordID] trans * hypergraph.ViterbiESentence(self.hg[0], &trans) * return unicode(GetString(trans).c_str(), 'utf8') # <<<<<<<<<<<<<< @@ -9166,24 +9950,31 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_2viterbi(struct __pyx_obj_4c */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBytes_FromString(TD::GetString(__pyx_v_trans).c_str()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_1)); - __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); - __Pyx_INCREF(((PyObject *)__pyx_n_s__utf8)); - PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_n_s__utf8)); - __Pyx_GIVEREF(((PyObject *)__pyx_n_s__utf8)); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_INCREF(__pyx_n_s_utf8); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_utf8); + __Pyx_GIVEREF(__pyx_n_s_utf8); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":18 + * return self.rng + * + * def viterbi(self): # <<<<<<<<<<<<<< + * """hg.viterbi() -> String for the best hypothesis in the hypergraph.""" + * cdef vector[WordID] trans + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); @@ -9195,6 +9986,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_2viterbi(struct __pyx_obj_4c return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":24 + * return unicode(GetString(trans).c_str(), 'utf8') + * + * def viterbi_trees(self): # <<<<<<<<<<<<<< + * """hg.viterbi_trees() -> (f_tree, e_tree) + * f_tree: Source tree for the best hypothesis in the hypergraph. + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_5viterbi_trees(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_4cdec_5_cdec_10Hypergraph_4viterbi_trees[] = "hg.viterbi_trees() -> (f_tree, e_tree)\n f_tree: Source tree for the best hypothesis in the hypergraph.\n e_tree: Target tree for the best hypothesis in the hypergraph.\n "; @@ -9203,18 +10002,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_5viterbi_trees(PyObject *__p __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("viterbi_trees (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_4viterbi_trees(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":24 - * return unicode(GetString(trans).c_str(), 'utf8') - * - * def viterbi_trees(self): # <<<<<<<<<<<<<< - * """hg.viterbi_trees() -> (f_tree, e_tree) - * f_tree: Source tree for the best hypothesis in the hypergraph. - */ - static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_4viterbi_trees(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self) { PyObject *__pyx_v_f_tree = NULL; PyObject *__pyx_v_e_tree = NULL; @@ -9227,7 +10020,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_4viterbi_trees(struct __pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("viterbi_trees", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":29 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":29 * e_tree: Target tree for the best hypothesis in the hypergraph. * """ * f_tree = unicode(hypergraph.ViterbiFTree(self.hg[0]).c_str(), 'utf8') # <<<<<<<<<<<<<< @@ -9235,22 +10028,22 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_4viterbi_trees(struct __pyx_ * return (f_tree, e_tree) */ __pyx_t_1 = __Pyx_PyBytes_FromString(ViterbiFTree((__pyx_v_self->hg[0])).c_str()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_1)); - __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); - __Pyx_INCREF(((PyObject *)__pyx_n_s__utf8)); - PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_n_s__utf8)); - __Pyx_GIVEREF(((PyObject *)__pyx_n_s__utf8)); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_INCREF(__pyx_n_s_utf8); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_utf8); + __Pyx_GIVEREF(__pyx_n_s_utf8); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_f_tree = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":30 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":30 * """ * f_tree = unicode(hypergraph.ViterbiFTree(self.hg[0]).c_str(), 'utf8') * e_tree = unicode(hypergraph.ViterbiETree(self.hg[0]).c_str(), 'utf8') # <<<<<<<<<<<<<< @@ -9258,22 +10051,22 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_4viterbi_trees(struct __pyx_ * */ __pyx_t_1 = __Pyx_PyBytes_FromString(ViterbiETree((__pyx_v_self->hg[0])).c_str()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_1)); - __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); - __Pyx_INCREF(((PyObject *)__pyx_n_s__utf8)); - PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_n_s__utf8)); - __Pyx_GIVEREF(((PyObject *)__pyx_n_s__utf8)); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_INCREF(__pyx_n_s_utf8); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_utf8); + __Pyx_GIVEREF(__pyx_n_s_utf8); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_e_tree = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":31 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":31 * f_tree = unicode(hypergraph.ViterbiFTree(self.hg[0]).c_str(), 'utf8') * e_tree = unicode(hypergraph.ViterbiETree(self.hg[0]).c_str(), 'utf8') * return (f_tree, e_tree) # <<<<<<<<<<<<<< @@ -9283,18 +10076,25 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_4viterbi_trees(struct __pyx_ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_INCREF(((PyObject *)__pyx_v_f_tree)); - PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_f_tree)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_f_tree)); - __Pyx_INCREF(((PyObject *)__pyx_v_e_tree)); - PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_e_tree)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_e_tree)); - __pyx_r = ((PyObject *)__pyx_t_1); + __Pyx_INCREF(__pyx_v_f_tree); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_f_tree); + __Pyx_GIVEREF(__pyx_v_f_tree); + __Pyx_INCREF(__pyx_v_e_tree); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_e_tree); + __Pyx_GIVEREF(__pyx_v_e_tree); + __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":24 + * return unicode(GetString(trans).c_str(), 'utf8') + * + * def viterbi_trees(self): # <<<<<<<<<<<<<< + * """hg.viterbi_trees() -> (f_tree, e_tree) + * f_tree: Source tree for the best hypothesis in the hypergraph. + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); @@ -9308,6 +10108,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_4viterbi_trees(struct __pyx_ return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":33 + * return (f_tree, e_tree) + * + * def viterbi_features(self): # <<<<<<<<<<<<<< + * """hg.viterbi_features() -> SparseVector with the features corresponding + * to the best derivation in the hypergraph.""" + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_7viterbi_features(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_4cdec_5_cdec_10Hypergraph_6viterbi_features[] = "hg.viterbi_features() -> SparseVector with the features corresponding\n to the best derivation in the hypergraph."; @@ -9316,18 +10124,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_7viterbi_features(PyObject * __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("viterbi_features (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_6viterbi_features(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":33 - * return (f_tree, e_tree) - * - * def viterbi_features(self): # <<<<<<<<<<<<<< - * """hg.viterbi_features() -> SparseVector with the features corresponding - * to the best derivation in the hypergraph.""" - */ - static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_6viterbi_features(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self) { struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_fmap = 0; PyObject *__pyx_r = NULL; @@ -9338,20 +10140,20 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_6viterbi_features(struct __p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("viterbi_features", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":36 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":36 * """hg.viterbi_features() -> SparseVector with the features corresponding * to the best derivation in the hypergraph.""" * cdef SparseVector fmap = SparseVector.__new__(SparseVector) # <<<<<<<<<<<<<< * fmap.vector = new FastSparseVector[weight_t](hypergraph.ViterbiFeatures(self.hg[0])) * return fmap */ - __pyx_t_1 = __pyx_tp_new_4cdec_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SparseVector)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_tp_new_4cdec_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SparseVector)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4cdec_5_cdec_SparseVector)))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fmap = ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_t_1); __pyx_t_1 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":37 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":37 * to the best derivation in the hypergraph.""" * cdef SparseVector fmap = SparseVector.__new__(SparseVector) * fmap.vector = new FastSparseVector[weight_t](hypergraph.ViterbiFeatures(self.hg[0])) # <<<<<<<<<<<<<< @@ -9360,7 +10162,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_6viterbi_features(struct __p */ __pyx_v_fmap->vector = new FastSparseVector(ViterbiFeatures((__pyx_v_self->hg[0]))); - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":38 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":38 * cdef SparseVector fmap = SparseVector.__new__(SparseVector) * fmap.vector = new FastSparseVector[weight_t](hypergraph.ViterbiFeatures(self.hg[0])) * return fmap # <<<<<<<<<<<<<< @@ -9372,8 +10174,15 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_6viterbi_features(struct __p __pyx_r = ((PyObject *)__pyx_v_fmap); goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":33 + * return (f_tree, e_tree) + * + * def viterbi_features(self): # <<<<<<<<<<<<<< + * """hg.viterbi_features() -> SparseVector with the features corresponding + * to the best derivation in the hypergraph.""" + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cdec._cdec.Hypergraph.viterbi_features", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -9385,6 +10194,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_6viterbi_features(struct __p return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":40 + * return fmap + * + * def viterbi_forest(self): # <<<<<<<<<<<<<< + * cdef Hypergraph hg = Hypergraph() + * hg.hg = new hypergraph.Hypergraph(self.hg[0].CreateViterbiHypergraph(NULL).get()[0]) + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_9viterbi_forest(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_9viterbi_forest(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { @@ -9392,18 +10209,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_9viterbi_forest(PyObject *__ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("viterbi_forest (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_8viterbi_forest(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":40 - * return fmap - * - * def viterbi_forest(self): # <<<<<<<<<<<<<< - * cdef Hypergraph hg = Hypergraph() - * hg.hg = new hypergraph.Hypergraph(self.hg[0].CreateViterbiHypergraph(NULL).get()[0]) - */ - static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_8viterbi_forest(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self) { struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_hg = 0; PyObject *__pyx_r = NULL; @@ -9414,19 +10225,19 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_8viterbi_forest(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("viterbi_forest", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":41 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":41 * * def viterbi_forest(self): * cdef Hypergraph hg = Hypergraph() # <<<<<<<<<<<<<< * hg.hg = new hypergraph.Hypergraph(self.hg[0].CreateViterbiHypergraph(NULL).get()[0]) * return hg */ - __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_Hypergraph)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_Hypergraph)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_hg = ((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_t_1); __pyx_t_1 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":42 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":42 * def viterbi_forest(self): * cdef Hypergraph hg = Hypergraph() * hg.hg = new hypergraph.Hypergraph(self.hg[0].CreateViterbiHypergraph(NULL).get()[0]) # <<<<<<<<<<<<<< @@ -9435,7 +10246,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_8viterbi_forest(struct __pyx */ __pyx_v_hg->hg = new Hypergraph(((__pyx_v_self->hg[0]).CreateViterbiHypergraph(NULL).get()[0])); - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":43 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":43 * cdef Hypergraph hg = Hypergraph() * hg.hg = new hypergraph.Hypergraph(self.hg[0].CreateViterbiHypergraph(NULL).get()[0]) * return hg # <<<<<<<<<<<<<< @@ -9447,8 +10258,15 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_8viterbi_forest(struct __pyx __pyx_r = ((PyObject *)__pyx_v_hg); goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":40 + * return fmap + * + * def viterbi_forest(self): # <<<<<<<<<<<<<< + * cdef Hypergraph hg = Hypergraph() + * hg.hg = new hypergraph.Hypergraph(self.hg[0].CreateViterbiHypergraph(NULL).get()[0]) + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cdec._cdec.Hypergraph.viterbi_forest", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -9460,6 +10278,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_8viterbi_forest(struct __pyx return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":45 + * return hg + * + * def viterbi_joshua(self): # <<<<<<<<<<<<<< + * """hg.viterbi_joshua() -> Joshua representation of the best derivation.""" + * return unicode(hypergraph.JoshuaVisualizationString(self.hg[0]).c_str(), 'utf8') + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_11viterbi_joshua(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_4cdec_5_cdec_10Hypergraph_10viterbi_joshua[] = "hg.viterbi_joshua() -> Joshua representation of the best derivation."; @@ -9468,18 +10294,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_11viterbi_joshua(PyObject *_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("viterbi_joshua (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_10viterbi_joshua(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":45 - * return hg - * - * def viterbi_joshua(self): # <<<<<<<<<<<<<< - * """hg.viterbi_joshua() -> Joshua representation of the best derivation.""" - * return unicode(hypergraph.JoshuaVisualizationString(self.hg[0]).c_str(), 'utf8') - */ - static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_10viterbi_joshua(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -9490,7 +10310,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_10viterbi_joshua(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("viterbi_joshua", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":47 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":47 * def viterbi_joshua(self): * """hg.viterbi_joshua() -> Joshua representation of the best derivation.""" * return unicode(hypergraph.JoshuaVisualizationString(self.hg[0]).c_str(), 'utf8') # <<<<<<<<<<<<<< @@ -9499,24 +10319,31 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_10viterbi_joshua(struct __py */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBytes_FromString(JoshuaVisualizationString((__pyx_v_self->hg[0])).c_str()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_1)); - __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); - __Pyx_INCREF(((PyObject *)__pyx_n_s__utf8)); - PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_n_s__utf8)); - __Pyx_GIVEREF(((PyObject *)__pyx_n_s__utf8)); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __Pyx_INCREF(__pyx_n_s_utf8); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_utf8); + __Pyx_GIVEREF(__pyx_n_s_utf8); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":45 + * return hg + * + * def viterbi_joshua(self): # <<<<<<<<<<<<<< + * """hg.viterbi_joshua() -> Joshua representation of the best derivation.""" + * return unicode(hypergraph.JoshuaVisualizationString(self.hg[0]).c_str(), 'utf8') + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); @@ -9529,6 +10356,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_10viterbi_joshua(struct __py } static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_14generator4(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ +/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":49 + * return unicode(hypergraph.JoshuaVisualizationString(self.hg[0]).c_str(), 'utf8') + * + * def kbest(self, size): # <<<<<<<<<<<<<< + * """hg.kbest(size) -> List of k-best hypotheses in the hypergraph.""" + * cdef kbest.KBestDerivations[vector[WordID], kbest.ESentenceTraversal]* derivations = new kbest.KBestDerivations[vector[WordID], kbest.ESentenceTraversal](self.hg[0], size) + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_13kbest(PyObject *__pyx_v_self, PyObject *__pyx_v_size); /*proto*/ static char __pyx_doc_4cdec_5_cdec_10Hypergraph_12kbest[] = "hg.kbest(size) -> List of k-best hypotheses in the hypergraph."; @@ -9537,18 +10372,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_13kbest(PyObject *__pyx_v_se __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("kbest (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_12kbest(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self), ((PyObject *)__pyx_v_size)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":49 - * return unicode(hypergraph.JoshuaVisualizationString(self.hg[0]).c_str(), 'utf8') - * - * def kbest(self, size): # <<<<<<<<<<<<<< - * """hg.kbest(size) -> List of k-best hypotheses in the hypergraph.""" - * cdef kbest.KBestDerivations[vector[WordID], kbest.ESentenceTraversal]* derivations = new kbest.KBestDerivations[vector[WordID], kbest.ESentenceTraversal](self.hg[0], size) - */ - static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_12kbest(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self, PyObject *__pyx_v_size) { struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest *__pyx_cur_scope; PyObject *__pyx_r = NULL; @@ -9576,6 +10405,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_12kbest(struct __pyx_obj_4cd return (PyObject *) gen; } + /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; @@ -9597,6 +10427,15 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_14generator4(__pyx_Generator int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + int __pyx_t_7; + char const *__pyx_t_8; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + PyObject *__pyx_t_13 = NULL; + PyObject *__pyx_t_14 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -9612,17 +10451,17 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_14generator4(__pyx_Generator __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":51 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":51 * def kbest(self, size): * """hg.kbest(size) -> List of k-best hypotheses in the hypergraph.""" * cdef kbest.KBestDerivations[vector[WordID], kbest.ESentenceTraversal]* derivations = new kbest.KBestDerivations[vector[WordID], kbest.ESentenceTraversal](self.hg[0], size) # <<<<<<<<<<<<<< * cdef kbest.KBestDerivations[vector[WordID], kbest.ESentenceTraversal].Derivation* derivation * cdef unsigned k */ - __pyx_t_1 = __Pyx_PyInt_AsUnsignedInt(__pyx_cur_scope->__pyx_v_size); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_cur_scope->__pyx_v_size); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_cur_scope->__pyx_v_derivations = new KBest::KBestDerivations,ESentenceTraversal>((__pyx_cur_scope->__pyx_v_self->hg[0]), __pyx_t_1); - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":54 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":54 * cdef kbest.KBestDerivations[vector[WordID], kbest.ESentenceTraversal].Derivation* derivation * cdef unsigned k * try: # <<<<<<<<<<<<<< @@ -9631,18 +10470,18 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_14generator4(__pyx_Generator */ /*try:*/ { - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":55 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":55 * cdef unsigned k * try: * for k in range(size): # <<<<<<<<<<<<<< * derivation = derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) * if not derivation: break */ - __pyx_t_2 = __Pyx_PyInt_AsLong(__pyx_cur_scope->__pyx_v_size); if (unlikely((__pyx_t_2 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L5;} + __pyx_t_2 = __Pyx_PyInt_As_long(__pyx_cur_scope->__pyx_v_size); if (unlikely((__pyx_t_2 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L5_error;} for (__pyx_t_1 = 0; __pyx_t_1 < __pyx_t_2; __pyx_t_1+=1) { __pyx_cur_scope->__pyx_v_k = __pyx_t_1; - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":56 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":56 * try: * for k in range(size): * derivation = derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) # <<<<<<<<<<<<<< @@ -9651,7 +10490,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_14generator4(__pyx_Generator */ __pyx_cur_scope->__pyx_v_derivation = __pyx_cur_scope->__pyx_v_derivations->LazyKthBest((__pyx_cur_scope->__pyx_v_self->hg->nodes_.size() - 1), __pyx_cur_scope->__pyx_v_k); - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":57 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":57 * for k in range(size): * derivation = derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) * if not derivation: break # <<<<<<<<<<<<<< @@ -9661,30 +10500,28 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_14generator4(__pyx_Generator __pyx_t_3 = ((!(__pyx_cur_scope->__pyx_v_derivation != 0)) != 0); if (__pyx_t_3) { goto __pyx_L8_break; - goto __pyx_L9; } - __pyx_L9:; - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":58 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":58 * derivation = derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) * if not derivation: break * yield unicode(GetString(derivation._yield).c_str(), 'utf8') # <<<<<<<<<<<<<< * finally: * del derivations */ - __pyx_t_4 = __Pyx_PyBytes_FromString(TD::GetString(__pyx_cur_scope->__pyx_v_derivation->yield).c_str()); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L5;} - __Pyx_GOTREF(((PyObject *)__pyx_t_4)); - __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L5;} + __pyx_t_4 = __Pyx_PyBytes_FromString(TD::GetString(__pyx_cur_scope->__pyx_v_derivation->yield).c_str()); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_GOTREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_4)); - __Pyx_GIVEREF(((PyObject *)__pyx_t_4)); - __Pyx_INCREF(((PyObject *)__pyx_n_s__utf8)); - PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_n_s__utf8)); - __Pyx_GIVEREF(((PyObject *)__pyx_n_s__utf8)); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + __Pyx_INCREF(__pyx_n_s_utf8); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_n_s_utf8); + __Pyx_GIVEREF(__pyx_n_s_utf8); __pyx_t_4 = 0; - __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L5;} + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; __pyx_cur_scope->__pyx_t_0 = __pyx_t_1; @@ -9697,12 +10534,12 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_14generator4(__pyx_Generator __pyx_L10_resume_from_yield:; __pyx_t_1 = __pyx_cur_scope->__pyx_t_0; __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L5;} + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L5_error;} } __pyx_L8_break:; } - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":60 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":60 * yield unicode(GetString(derivation._yield).c_str(), 'utf8') * finally: * del derivations # <<<<<<<<<<<<<< @@ -9710,32 +10547,53 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_14generator4(__pyx_Generator * def kbest_trees(self, size): */ /*finally:*/ { - int __pyx_why; - PyObject *__pyx_exc_type, *__pyx_exc_value, *__pyx_exc_tb; - int __pyx_exc_lineno; - __pyx_exc_type = 0; __pyx_exc_value = 0; __pyx_exc_tb = 0; __pyx_exc_lineno = 0; - __pyx_why = 0; goto __pyx_L6; - __pyx_L5: { - __pyx_why = 4; - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_ErrFetch(&__pyx_exc_type, &__pyx_exc_value, &__pyx_exc_tb); - __pyx_exc_lineno = __pyx_lineno; + /*normal exit:*/{ + delete __pyx_cur_scope->__pyx_v_derivations; goto __pyx_L6; } - __pyx_L6:; - delete __pyx_cur_scope->__pyx_v_derivations; - switch (__pyx_why) { - case 4: { - __Pyx_ErrRestore(__pyx_exc_type, __pyx_exc_value, __pyx_exc_tb); - __pyx_lineno = __pyx_exc_lineno; - __pyx_exc_type = 0; - __pyx_exc_value = 0; - __pyx_exc_tb = 0; - goto __pyx_L1_error; + /*exception exit:*/{ + __pyx_L5_error:; + __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); + if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11) < 0)) __Pyx_ErrFetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); + __Pyx_XGOTREF(__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_11); + __Pyx_XGOTREF(__pyx_t_12); + __Pyx_XGOTREF(__pyx_t_13); + __Pyx_XGOTREF(__pyx_t_14); + __pyx_t_6 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_8 = __pyx_filename; + { + delete __pyx_cur_scope->__pyx_v_derivations; + } + if (PY_MAJOR_VERSION >= 3) { + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); } + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_ErrRestore(__pyx_t_9, __pyx_t_10, __pyx_t_11); + __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; + __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_8; + goto __pyx_L1_error; } + __pyx_L6:; } + + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":49 + * return unicode(hypergraph.JoshuaVisualizationString(self.hg[0]).c_str(), 'utf8') + * + * def kbest(self, size): # <<<<<<<<<<<<<< + * """hg.kbest(size) -> List of k-best hypotheses in the hypergraph.""" + * cdef kbest.KBestDerivations[vector[WordID], kbest.ESentenceTraversal]* derivations = new kbest.KBestDerivations[vector[WordID], kbest.ESentenceTraversal](self.hg[0], size) + */ + + /* function exit code */ PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; @@ -9751,6 +10609,14 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_14generator4(__pyx_Generator } static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_17generator5(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ +/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":62 + * del derivations + * + * def kbest_trees(self, size): # <<<<<<<<<<<<<< + * """hg.kbest_trees(size) -> List of k-best trees in the hypergraph.""" + * cdef kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal]* f_derivations = new kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal](self.hg[0], size) + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_16kbest_trees(PyObject *__pyx_v_self, PyObject *__pyx_v_size); /*proto*/ static char __pyx_doc_4cdec_5_cdec_10Hypergraph_15kbest_trees[] = "hg.kbest_trees(size) -> List of k-best trees in the hypergraph."; @@ -9759,18 +10625,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_16kbest_trees(PyObject *__py __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("kbest_trees (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_15kbest_trees(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self), ((PyObject *)__pyx_v_size)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":62 - * del derivations - * - * def kbest_trees(self, size): # <<<<<<<<<<<<<< - * """hg.kbest_trees(size) -> List of k-best trees in the hypergraph.""" - * cdef kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal]* f_derivations = new kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal](self.hg[0], size) - */ - static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_15kbest_trees(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self, PyObject *__pyx_v_size) { struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees *__pyx_cur_scope; PyObject *__pyx_r = NULL; @@ -9798,6 +10658,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_15kbest_trees(struct __pyx_o return (PyObject *) gen; } + /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; @@ -9821,6 +10682,15 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_17generator5(__pyx_Generator int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + int __pyx_t_9; + char const *__pyx_t_10; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + PyObject *__pyx_t_13 = NULL; + PyObject *__pyx_t_14 = NULL; + PyObject *__pyx_t_15 = NULL; + PyObject *__pyx_t_16 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -9836,27 +10706,27 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_17generator5(__pyx_Generator __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":64 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":64 * def kbest_trees(self, size): * """hg.kbest_trees(size) -> List of k-best trees in the hypergraph.""" * cdef kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal]* f_derivations = new kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal](self.hg[0], size) # <<<<<<<<<<<<<< * cdef kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal].Derivation* f_derivation * cdef kbest.KBestDerivations[vector[WordID], kbest.ETreeTraversal]* e_derivations = new kbest.KBestDerivations[vector[WordID], kbest.ETreeTraversal](self.hg[0], size) */ - __pyx_t_1 = __Pyx_PyInt_AsUnsignedInt(__pyx_cur_scope->__pyx_v_size); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_cur_scope->__pyx_v_size); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_cur_scope->__pyx_v_f_derivations = new KBest::KBestDerivations,FTreeTraversal>((__pyx_cur_scope->__pyx_v_self->hg[0]), __pyx_t_1); - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":66 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":66 * cdef kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal]* f_derivations = new kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal](self.hg[0], size) * cdef kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal].Derivation* f_derivation * cdef kbest.KBestDerivations[vector[WordID], kbest.ETreeTraversal]* e_derivations = new kbest.KBestDerivations[vector[WordID], kbest.ETreeTraversal](self.hg[0], size) # <<<<<<<<<<<<<< * cdef kbest.KBestDerivations[vector[WordID], kbest.ETreeTraversal].Derivation* e_derivation * cdef unsigned k */ - __pyx_t_1 = __Pyx_PyInt_AsUnsignedInt(__pyx_cur_scope->__pyx_v_size); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_cur_scope->__pyx_v_size); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_cur_scope->__pyx_v_e_derivations = new KBest::KBestDerivations,ETreeTraversal>((__pyx_cur_scope->__pyx_v_self->hg[0]), __pyx_t_1); - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":69 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":69 * cdef kbest.KBestDerivations[vector[WordID], kbest.ETreeTraversal].Derivation* e_derivation * cdef unsigned k * try: # <<<<<<<<<<<<<< @@ -9865,18 +10735,18 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_17generator5(__pyx_Generator */ /*try:*/ { - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":70 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":70 * cdef unsigned k * try: * for k in range(size): # <<<<<<<<<<<<<< * f_derivation = f_derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) * e_derivation = e_derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) */ - __pyx_t_2 = __Pyx_PyInt_AsLong(__pyx_cur_scope->__pyx_v_size); if (unlikely((__pyx_t_2 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L5;} + __pyx_t_2 = __Pyx_PyInt_As_long(__pyx_cur_scope->__pyx_v_size); if (unlikely((__pyx_t_2 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L5_error;} for (__pyx_t_1 = 0; __pyx_t_1 < __pyx_t_2; __pyx_t_1+=1) { __pyx_cur_scope->__pyx_v_k = __pyx_t_1; - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":71 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":71 * try: * for k in range(size): * f_derivation = f_derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) # <<<<<<<<<<<<<< @@ -9885,7 +10755,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_17generator5(__pyx_Generator */ __pyx_cur_scope->__pyx_v_f_derivation = __pyx_cur_scope->__pyx_v_f_derivations->LazyKthBest((__pyx_cur_scope->__pyx_v_self->hg->nodes_.size() - 1), __pyx_cur_scope->__pyx_v_k); - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":72 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":72 * for k in range(size): * f_derivation = f_derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) * e_derivation = e_derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) # <<<<<<<<<<<<<< @@ -9894,7 +10764,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_17generator5(__pyx_Generator */ __pyx_cur_scope->__pyx_v_e_derivation = __pyx_cur_scope->__pyx_v_e_derivations->LazyKthBest((__pyx_cur_scope->__pyx_v_self->hg->nodes_.size() - 1), __pyx_cur_scope->__pyx_v_k); - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":73 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":73 * f_derivation = f_derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) * e_derivation = e_derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) * if not f_derivation or not e_derivation: break # <<<<<<<<<<<<<< @@ -9910,78 +10780,74 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_17generator5(__pyx_Generator } if (__pyx_t_5) { goto __pyx_L8_break; - goto __pyx_L9; } - __pyx_L9:; - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":74 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":74 * e_derivation = e_derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) * if not f_derivation or not e_derivation: break * f_tree = unicode(GetString(f_derivation._yield).c_str(), 'utf8') # <<<<<<<<<<<<<< * e_tree = unicode(GetString(e_derivation._yield).c_str(), 'utf8') * yield (f_tree, e_tree) */ - __pyx_t_6 = __Pyx_PyBytes_FromString(TD::GetString(__pyx_cur_scope->__pyx_v_f_derivation->yield).c_str()); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L5;} - __Pyx_GOTREF(((PyObject *)__pyx_t_6)); - __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L5;} + __pyx_t_6 = __Pyx_PyBytes_FromString(TD::GetString(__pyx_cur_scope->__pyx_v_f_derivation->yield).c_str()); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_GOTREF(__pyx_t_7); - PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_t_6)); - __Pyx_GIVEREF(((PyObject *)__pyx_t_6)); - __Pyx_INCREF(((PyObject *)__pyx_n_s__utf8)); - PyTuple_SET_ITEM(__pyx_t_7, 1, ((PyObject *)__pyx_n_s__utf8)); - __Pyx_GIVEREF(((PyObject *)__pyx_n_s__utf8)); + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); + __Pyx_GIVEREF(__pyx_t_6); + __Pyx_INCREF(__pyx_n_s_utf8); + PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_n_s_utf8); + __Pyx_GIVEREF(__pyx_n_s_utf8); __pyx_t_6 = 0; - __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L5;} + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; - __Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_f_tree)); - __Pyx_XDECREF(((PyObject *)__pyx_cur_scope->__pyx_v_f_tree)); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_f_tree); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_f_tree, ((PyObject*)__pyx_t_6)); __Pyx_GIVEREF(__pyx_t_6); - __pyx_cur_scope->__pyx_v_f_tree = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":75 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":75 * if not f_derivation or not e_derivation: break * f_tree = unicode(GetString(f_derivation._yield).c_str(), 'utf8') * e_tree = unicode(GetString(e_derivation._yield).c_str(), 'utf8') # <<<<<<<<<<<<<< * yield (f_tree, e_tree) * finally: */ - __pyx_t_6 = __Pyx_PyBytes_FromString(TD::GetString(__pyx_cur_scope->__pyx_v_e_derivation->yield).c_str()); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L5;} - __Pyx_GOTREF(((PyObject *)__pyx_t_6)); - __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L5;} + __pyx_t_6 = __Pyx_PyBytes_FromString(TD::GetString(__pyx_cur_scope->__pyx_v_e_derivation->yield).c_str()); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_GOTREF(__pyx_t_7); - PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_t_6)); - __Pyx_GIVEREF(((PyObject *)__pyx_t_6)); - __Pyx_INCREF(((PyObject *)__pyx_n_s__utf8)); - PyTuple_SET_ITEM(__pyx_t_7, 1, ((PyObject *)__pyx_n_s__utf8)); - __Pyx_GIVEREF(((PyObject *)__pyx_n_s__utf8)); + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); + __Pyx_GIVEREF(__pyx_t_6); + __Pyx_INCREF(__pyx_n_s_utf8); + PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_n_s_utf8); + __Pyx_GIVEREF(__pyx_n_s_utf8); __pyx_t_6 = 0; - __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L5;} + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; - __Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_e_tree)); - __Pyx_XDECREF(((PyObject *)__pyx_cur_scope->__pyx_v_e_tree)); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_e_tree); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_e_tree, ((PyObject*)__pyx_t_6)); __Pyx_GIVEREF(__pyx_t_6); - __pyx_cur_scope->__pyx_v_e_tree = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":76 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":76 * f_tree = unicode(GetString(f_derivation._yield).c_str(), 'utf8') * e_tree = unicode(GetString(e_derivation._yield).c_str(), 'utf8') * yield (f_tree, e_tree) # <<<<<<<<<<<<<< * finally: * del f_derivations */ - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L5;} + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_GOTREF(__pyx_t_6); - __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_f_tree)); - PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_cur_scope->__pyx_v_f_tree)); - __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_f_tree)); - __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_e_tree)); - PyTuple_SET_ITEM(__pyx_t_6, 1, ((PyObject *)__pyx_cur_scope->__pyx_v_e_tree)); - __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_e_tree)); - __pyx_r = ((PyObject *)__pyx_t_6); + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_f_tree); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_cur_scope->__pyx_v_f_tree); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_f_tree); + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_e_tree); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_cur_scope->__pyx_v_e_tree); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_e_tree); + __pyx_r = __pyx_t_6; __pyx_t_6 = 0; __pyx_cur_scope->__pyx_t_0 = __pyx_t_1; __pyx_cur_scope->__pyx_t_1 = __pyx_t_2; @@ -9993,12 +10859,12 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_17generator5(__pyx_Generator __pyx_L10_resume_from_yield:; __pyx_t_1 = __pyx_cur_scope->__pyx_t_0; __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L5;} + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L5_error;} } __pyx_L8_break:; } - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":78 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":78 * yield (f_tree, e_tree) * finally: * del f_derivations # <<<<<<<<<<<<<< @@ -10006,41 +10872,79 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_17generator5(__pyx_Generator * */ /*finally:*/ { - int __pyx_why; - PyObject *__pyx_exc_type, *__pyx_exc_value, *__pyx_exc_tb; - int __pyx_exc_lineno; - __pyx_exc_type = 0; __pyx_exc_value = 0; __pyx_exc_tb = 0; __pyx_exc_lineno = 0; - __pyx_why = 0; goto __pyx_L6; - __pyx_L5: { - __pyx_why = 4; - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_ErrFetch(&__pyx_exc_type, &__pyx_exc_value, &__pyx_exc_tb); - __pyx_exc_lineno = __pyx_lineno; + /*normal exit:*/{ + delete __pyx_cur_scope->__pyx_v_f_derivations; + + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":79 + * finally: + * del f_derivations + * del e_derivations # <<<<<<<<<<<<<< + * + * def kbest_features(self, size): + */ + delete __pyx_cur_scope->__pyx_v_e_derivations; goto __pyx_L6; } - __pyx_L6:; - delete __pyx_cur_scope->__pyx_v_f_derivations; + /*exception exit:*/{ + __pyx_L5_error:; + __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16); + if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13) < 0)) __Pyx_ErrFetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13); + __Pyx_XGOTREF(__pyx_t_11); + __Pyx_XGOTREF(__pyx_t_12); + __Pyx_XGOTREF(__pyx_t_13); + __Pyx_XGOTREF(__pyx_t_14); + __Pyx_XGOTREF(__pyx_t_15); + __Pyx_XGOTREF(__pyx_t_16); + __pyx_t_8 = __pyx_lineno; __pyx_t_9 = __pyx_clineno; __pyx_t_10 = __pyx_filename; + { + + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":78 + * yield (f_tree, e_tree) + * finally: + * del f_derivations # <<<<<<<<<<<<<< + * del e_derivations + * + */ + delete __pyx_cur_scope->__pyx_v_f_derivations; - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":79 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":79 * finally: * del f_derivations * del e_derivations # <<<<<<<<<<<<<< * * def kbest_features(self, size): */ - delete __pyx_cur_scope->__pyx_v_e_derivations; - switch (__pyx_why) { - case 4: { - __Pyx_ErrRestore(__pyx_exc_type, __pyx_exc_value, __pyx_exc_tb); - __pyx_lineno = __pyx_exc_lineno; - __pyx_exc_type = 0; - __pyx_exc_value = 0; - __pyx_exc_tb = 0; - goto __pyx_L1_error; + delete __pyx_cur_scope->__pyx_v_e_derivations; + } + if (PY_MAJOR_VERSION >= 3) { + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_XGIVEREF(__pyx_t_15); + __Pyx_XGIVEREF(__pyx_t_16); + __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16); } + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_ErrRestore(__pyx_t_11, __pyx_t_12, __pyx_t_13); + __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; + __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_9; __pyx_filename = __pyx_t_10; + goto __pyx_L1_error; } + __pyx_L6:; } + + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":62 + * del derivations + * + * def kbest_trees(self, size): # <<<<<<<<<<<<<< + * """hg.kbest_trees(size) -> List of k-best trees in the hypergraph.""" + * cdef kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal]* f_derivations = new kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal](self.hg[0], size) + */ + + /* function exit code */ PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; @@ -10056,6 +10960,14 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_17generator5(__pyx_Generator } static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_20generator6(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ +/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":81 + * del e_derivations + * + * def kbest_features(self, size): # <<<<<<<<<<<<<< + * """hg.kbest_trees(size) -> List of k-best feature vectors in the hypergraph.""" + * cdef kbest.KBestDerivations[FastSparseVector[weight_t], kbest.FeatureVectorTraversal]* derivations = new kbest.KBestDerivations[FastSparseVector[weight_t], kbest.FeatureVectorTraversal](self.hg[0], size) + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_19kbest_features(PyObject *__pyx_v_self, PyObject *__pyx_v_size); /*proto*/ static char __pyx_doc_4cdec_5_cdec_10Hypergraph_18kbest_features[] = "hg.kbest_trees(size) -> List of k-best feature vectors in the hypergraph."; @@ -10064,18 +10976,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_19kbest_features(PyObject *_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("kbest_features (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_18kbest_features(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self), ((PyObject *)__pyx_v_size)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":81 - * del e_derivations - * - * def kbest_features(self, size): # <<<<<<<<<<<<<< - * """hg.kbest_trees(size) -> List of k-best feature vectors in the hypergraph.""" - * cdef kbest.KBestDerivations[FastSparseVector[weight_t], kbest.FeatureVectorTraversal]* derivations = new kbest.KBestDerivations[FastSparseVector[weight_t], kbest.FeatureVectorTraversal](self.hg[0], size) - */ - static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_18kbest_features(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self, PyObject *__pyx_v_size) { struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features *__pyx_cur_scope; PyObject *__pyx_r = NULL; @@ -10103,6 +11009,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_18kbest_features(struct __py return (PyObject *) gen; } + /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; @@ -10123,6 +11030,15 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_20generator6(__pyx_Generator long __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + int __pyx_t_6; + char const *__pyx_t_7; + PyObject *__pyx_t_8 = NULL; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + PyObject *__pyx_t_13 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -10138,17 +11054,17 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_20generator6(__pyx_Generator __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":83 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":83 * def kbest_features(self, size): * """hg.kbest_trees(size) -> List of k-best feature vectors in the hypergraph.""" * cdef kbest.KBestDerivations[FastSparseVector[weight_t], kbest.FeatureVectorTraversal]* derivations = new kbest.KBestDerivations[FastSparseVector[weight_t], kbest.FeatureVectorTraversal](self.hg[0], size) # <<<<<<<<<<<<<< * cdef kbest.KBestDerivations[FastSparseVector[weight_t], kbest.FeatureVectorTraversal].Derivation* derivation * cdef SparseVector fmap */ - __pyx_t_1 = __Pyx_PyInt_AsUnsignedInt(__pyx_cur_scope->__pyx_v_size); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_cur_scope->__pyx_v_size); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_cur_scope->__pyx_v_derivations = new KBest::KBestDerivations,FeatureVectorTraversal>((__pyx_cur_scope->__pyx_v_self->hg[0]), __pyx_t_1); - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":87 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":87 * cdef SparseVector fmap * cdef unsigned k * try: # <<<<<<<<<<<<<< @@ -10157,18 +11073,18 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_20generator6(__pyx_Generator */ /*try:*/ { - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":88 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":88 * cdef unsigned k * try: * for k in range(size): # <<<<<<<<<<<<<< * derivation = derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) * if not derivation: break */ - __pyx_t_2 = __Pyx_PyInt_AsLong(__pyx_cur_scope->__pyx_v_size); if (unlikely((__pyx_t_2 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L5;} + __pyx_t_2 = __Pyx_PyInt_As_long(__pyx_cur_scope->__pyx_v_size); if (unlikely((__pyx_t_2 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L5_error;} for (__pyx_t_1 = 0; __pyx_t_1 < __pyx_t_2; __pyx_t_1+=1) { __pyx_cur_scope->__pyx_v_k = __pyx_t_1; - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":89 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":89 * try: * for k in range(size): * derivation = derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) # <<<<<<<<<<<<<< @@ -10177,7 +11093,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_20generator6(__pyx_Generator */ __pyx_cur_scope->__pyx_v_derivation = __pyx_cur_scope->__pyx_v_derivations->LazyKthBest((__pyx_cur_scope->__pyx_v_self->hg->nodes_.size() - 1), __pyx_cur_scope->__pyx_v_k); - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":90 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":90 * for k in range(size): * derivation = derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) * if not derivation: break # <<<<<<<<<<<<<< @@ -10187,27 +11103,24 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_20generator6(__pyx_Generator __pyx_t_3 = ((!(__pyx_cur_scope->__pyx_v_derivation != 0)) != 0); if (__pyx_t_3) { goto __pyx_L8_break; - goto __pyx_L9; } - __pyx_L9:; - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":91 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":91 * derivation = derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) * if not derivation: break * fmap = SparseVector.__new__(SparseVector) # <<<<<<<<<<<<<< * fmap.vector = new FastSparseVector[weight_t](derivation._yield) * yield fmap */ - __pyx_t_4 = __pyx_tp_new_4cdec_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SparseVector)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L5;} + __pyx_t_4 = __pyx_tp_new_4cdec_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SparseVector)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_GOTREF(__pyx_t_4); - if (!(likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_4cdec_5_cdec_SparseVector)))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L5;} + if (!(likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_4cdec_5_cdec_SparseVector)))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_fmap)); - __Pyx_XDECREF(((PyObject *)__pyx_cur_scope->__pyx_v_fmap)); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_fmap, ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_t_4)); __Pyx_GIVEREF(__pyx_t_4); - __pyx_cur_scope->__pyx_v_fmap = ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_t_4); __pyx_t_4 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":92 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":92 * if not derivation: break * fmap = SparseVector.__new__(SparseVector) * fmap.vector = new FastSparseVector[weight_t](derivation._yield) # <<<<<<<<<<<<<< @@ -10216,7 +11129,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_20generator6(__pyx_Generator */ __pyx_cur_scope->__pyx_v_fmap->vector = new FastSparseVector(__pyx_cur_scope->__pyx_v_derivation->yield); - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":93 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":93 * fmap = SparseVector.__new__(SparseVector) * fmap.vector = new FastSparseVector[weight_t](derivation._yield) * yield fmap # <<<<<<<<<<<<<< @@ -10235,12 +11148,12 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_20generator6(__pyx_Generator __pyx_L10_resume_from_yield:; __pyx_t_1 = __pyx_cur_scope->__pyx_t_0; __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L5;} + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L5_error;} } __pyx_L8_break:; } - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":95 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":95 * yield fmap * finally: * del derivations # <<<<<<<<<<<<<< @@ -10248,31 +11161,52 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_20generator6(__pyx_Generator * def sample(self, unsigned n): */ /*finally:*/ { - int __pyx_why; - PyObject *__pyx_exc_type, *__pyx_exc_value, *__pyx_exc_tb; - int __pyx_exc_lineno; - __pyx_exc_type = 0; __pyx_exc_value = 0; __pyx_exc_tb = 0; __pyx_exc_lineno = 0; - __pyx_why = 0; goto __pyx_L6; - __pyx_L5: { - __pyx_why = 4; - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_ErrFetch(&__pyx_exc_type, &__pyx_exc_value, &__pyx_exc_tb); - __pyx_exc_lineno = __pyx_lineno; + /*normal exit:*/{ + delete __pyx_cur_scope->__pyx_v_derivations; goto __pyx_L6; } - __pyx_L6:; - delete __pyx_cur_scope->__pyx_v_derivations; - switch (__pyx_why) { - case 4: { - __Pyx_ErrRestore(__pyx_exc_type, __pyx_exc_value, __pyx_exc_tb); - __pyx_lineno = __pyx_exc_lineno; - __pyx_exc_type = 0; - __pyx_exc_value = 0; - __pyx_exc_tb = 0; - goto __pyx_L1_error; + /*exception exit:*/{ + __pyx_L5_error:; + __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13); + if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10) < 0)) __Pyx_ErrFetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_8); + __Pyx_XGOTREF(__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_11); + __Pyx_XGOTREF(__pyx_t_12); + __Pyx_XGOTREF(__pyx_t_13); + __pyx_t_5 = __pyx_lineno; __pyx_t_6 = __pyx_clineno; __pyx_t_7 = __pyx_filename; + { + delete __pyx_cur_scope->__pyx_v_derivations; + } + if (PY_MAJOR_VERSION >= 3) { + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13); } + __Pyx_XGIVEREF(__pyx_t_8); + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_ErrRestore(__pyx_t_8, __pyx_t_9, __pyx_t_10); + __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; + __pyx_lineno = __pyx_t_5; __pyx_clineno = __pyx_t_6; __pyx_filename = __pyx_t_7; + goto __pyx_L1_error; } + __pyx_L6:; } + + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":81 + * del e_derivations + * + * def kbest_features(self, size): # <<<<<<<<<<<<<< + * """hg.kbest_trees(size) -> List of k-best feature vectors in the hypergraph.""" + * cdef kbest.KBestDerivations[FastSparseVector[weight_t], kbest.FeatureVectorTraversal]* derivations = new kbest.KBestDerivations[FastSparseVector[weight_t], kbest.FeatureVectorTraversal](self.hg[0], size) + */ + + /* function exit code */ PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; @@ -10287,6 +11221,14 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_20generator6(__pyx_Generator } static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_23generator7(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ +/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":97 + * del derivations + * + * def sample(self, unsigned n): # <<<<<<<<<<<<<< + * """hg.sample(n) -> Sample of n hypotheses from the hypergraph.""" + * cdef vector[hypergraph.Hypothesis]* hypos = new vector[hypergraph.Hypothesis]() + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_22sample(PyObject *__pyx_v_self, PyObject *__pyx_arg_n); /*proto*/ static char __pyx_doc_4cdec_5_cdec_10Hypergraph_21sample[] = "hg.sample(n) -> Sample of n hypotheses from the hypergraph."; @@ -10299,7 +11241,7 @@ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_22sample(PyObject *__pyx_v_s __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sample (wrapper)", 0); assert(__pyx_arg_n); { - __pyx_v_n = __Pyx_PyInt_AsUnsignedInt(__pyx_arg_n); if (unlikely((__pyx_v_n == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_n = __Pyx_PyInt_As_unsigned_int(__pyx_arg_n); if (unlikely((__pyx_v_n == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -10308,18 +11250,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_22sample(PyObject *__pyx_v_s return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_21sample(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self), ((unsigned int)__pyx_v_n)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":97 - * del derivations - * - * def sample(self, unsigned n): # <<<<<<<<<<<<<< - * """hg.sample(n) -> Sample of n hypotheses from the hypergraph.""" - * cdef vector[hypergraph.Hypothesis]* hypos = new vector[hypergraph.Hypothesis]() - */ - static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_21sample(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self, unsigned int __pyx_v_n) { struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample *__pyx_cur_scope; PyObject *__pyx_r = NULL; @@ -10345,6 +11281,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_21sample(struct __pyx_obj_4c return (PyObject *) gen; } + /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; @@ -10366,6 +11303,15 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_23generator7(__pyx_Generator unsigned int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + int __pyx_t_7; + char const *__pyx_t_8; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + PyObject *__pyx_t_13 = NULL; + PyObject *__pyx_t_14 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -10381,7 +11327,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_23generator7(__pyx_Generator __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":99 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":99 * def sample(self, unsigned n): * """hg.sample(n) -> Sample of n hypotheses from the hypergraph.""" * cdef vector[hypergraph.Hypothesis]* hypos = new vector[hypergraph.Hypothesis]() # <<<<<<<<<<<<<< @@ -10396,7 +11342,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_23generator7(__pyx_Generator } __pyx_cur_scope->__pyx_v_hypos = __pyx_t_1; - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":100 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":100 * """hg.sample(n) -> Sample of n hypotheses from the hypergraph.""" * cdef vector[hypergraph.Hypothesis]* hypos = new vector[hypergraph.Hypothesis]() * hypergraph.sample_hypotheses(self.hg[0], n, self._rng(), hypos) # <<<<<<<<<<<<<< @@ -10405,7 +11351,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_23generator7(__pyx_Generator */ HypergraphSampler::sample_hypotheses((__pyx_cur_scope->__pyx_v_self->hg[0]), __pyx_cur_scope->__pyx_v_n, ((struct __pyx_vtabstruct_4cdec_5_cdec_Hypergraph *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_rng(__pyx_cur_scope->__pyx_v_self), __pyx_cur_scope->__pyx_v_hypos); - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":102 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":102 * hypergraph.sample_hypotheses(self.hg[0], n, self._rng(), hypos) * cdef unsigned k * try: # <<<<<<<<<<<<<< @@ -10414,7 +11360,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_23generator7(__pyx_Generator */ /*try:*/ { - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":103 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":103 * cdef unsigned k * try: * for k in range(hypos.size()): # <<<<<<<<<<<<<< @@ -10425,26 +11371,26 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_23generator7(__pyx_Generator for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { __pyx_cur_scope->__pyx_v_k = __pyx_t_3; - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":104 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":104 * try: * for k in range(hypos.size()): * yield unicode(GetString(hypos[0][k].words).c_str(), 'utf8') # <<<<<<<<<<<<<< * finally: * del hypos */ - __pyx_t_4 = __Pyx_PyBytes_FromString(TD::GetString(((__pyx_cur_scope->__pyx_v_hypos[0])[__pyx_cur_scope->__pyx_v_k]).words).c_str()); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L5;} - __Pyx_GOTREF(((PyObject *)__pyx_t_4)); - __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L5;} + __pyx_t_4 = __Pyx_PyBytes_FromString(TD::GetString(((__pyx_cur_scope->__pyx_v_hypos[0])[__pyx_cur_scope->__pyx_v_k]).words).c_str()); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_GOTREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_4)); - __Pyx_GIVEREF(((PyObject *)__pyx_t_4)); - __Pyx_INCREF(((PyObject *)__pyx_n_s__utf8)); - PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_n_s__utf8)); - __Pyx_GIVEREF(((PyObject *)__pyx_n_s__utf8)); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + __Pyx_INCREF(__pyx_n_s_utf8); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_n_s_utf8); + __Pyx_GIVEREF(__pyx_n_s_utf8); __pyx_t_4 = 0; - __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L5;} + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; __pyx_cur_scope->__pyx_t_0 = __pyx_t_2; @@ -10457,11 +11403,11 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_23generator7(__pyx_Generator __pyx_L9_resume_from_yield:; __pyx_t_2 = __pyx_cur_scope->__pyx_t_0; __pyx_t_3 = __pyx_cur_scope->__pyx_t_1; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L5;} + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L5_error;} } } - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":106 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":106 * yield unicode(GetString(hypos[0][k].words).c_str(), 'utf8') * finally: * del hypos # <<<<<<<<<<<<<< @@ -10469,32 +11415,53 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_23generator7(__pyx_Generator * def sample_trees(self, unsigned n): */ /*finally:*/ { - int __pyx_why; - PyObject *__pyx_exc_type, *__pyx_exc_value, *__pyx_exc_tb; - int __pyx_exc_lineno; - __pyx_exc_type = 0; __pyx_exc_value = 0; __pyx_exc_tb = 0; __pyx_exc_lineno = 0; - __pyx_why = 0; goto __pyx_L6; - __pyx_L5: { - __pyx_why = 4; - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_ErrFetch(&__pyx_exc_type, &__pyx_exc_value, &__pyx_exc_tb); - __pyx_exc_lineno = __pyx_lineno; + /*normal exit:*/{ + delete __pyx_cur_scope->__pyx_v_hypos; goto __pyx_L6; } - __pyx_L6:; - delete __pyx_cur_scope->__pyx_v_hypos; - switch (__pyx_why) { - case 4: { - __Pyx_ErrRestore(__pyx_exc_type, __pyx_exc_value, __pyx_exc_tb); - __pyx_lineno = __pyx_exc_lineno; - __pyx_exc_type = 0; - __pyx_exc_value = 0; - __pyx_exc_tb = 0; - goto __pyx_L1_error; + /*exception exit:*/{ + __pyx_L5_error:; + __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); + if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11) < 0)) __Pyx_ErrFetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); + __Pyx_XGOTREF(__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_11); + __Pyx_XGOTREF(__pyx_t_12); + __Pyx_XGOTREF(__pyx_t_13); + __Pyx_XGOTREF(__pyx_t_14); + __pyx_t_6 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_8 = __pyx_filename; + { + delete __pyx_cur_scope->__pyx_v_hypos; + } + if (PY_MAJOR_VERSION >= 3) { + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); } + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_ErrRestore(__pyx_t_9, __pyx_t_10, __pyx_t_11); + __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; + __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_8; + goto __pyx_L1_error; } + __pyx_L6:; } + + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":97 + * del derivations + * + * def sample(self, unsigned n): # <<<<<<<<<<<<<< + * """hg.sample(n) -> Sample of n hypotheses from the hypergraph.""" + * cdef vector[hypergraph.Hypothesis]* hypos = new vector[hypergraph.Hypothesis]() + */ + + /* function exit code */ PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; @@ -10510,6 +11477,14 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_23generator7(__pyx_Generator } static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_26generator8(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ +/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":108 + * del hypos + * + * def sample_trees(self, unsigned n): # <<<<<<<<<<<<<< + * """hg.sample_trees(n) -> Sample of n trees from the hypergraph.""" + * cdef vector[string]* trees = new vector[string]() + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_25sample_trees(PyObject *__pyx_v_self, PyObject *__pyx_arg_n); /*proto*/ static char __pyx_doc_4cdec_5_cdec_10Hypergraph_24sample_trees[] = "hg.sample_trees(n) -> Sample of n trees from the hypergraph."; @@ -10522,7 +11497,7 @@ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_25sample_trees(PyObject *__p __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sample_trees (wrapper)", 0); assert(__pyx_arg_n); { - __pyx_v_n = __Pyx_PyInt_AsUnsignedInt(__pyx_arg_n); if (unlikely((__pyx_v_n == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_n = __Pyx_PyInt_As_unsigned_int(__pyx_arg_n); if (unlikely((__pyx_v_n == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -10531,18 +11506,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_25sample_trees(PyObject *__p return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_24sample_trees(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self), ((unsigned int)__pyx_v_n)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":108 - * del hypos - * - * def sample_trees(self, unsigned n): # <<<<<<<<<<<<<< - * """hg.sample_trees(n) -> Sample of n trees from the hypergraph.""" - * cdef vector[string]* trees = new vector[string]() - */ - static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_24sample_trees(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self, unsigned int __pyx_v_n) { struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees *__pyx_cur_scope; PyObject *__pyx_r = NULL; @@ -10568,6 +11537,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_24sample_trees(struct __pyx_ return (PyObject *) gen; } + /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; @@ -10589,6 +11559,15 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_26generator8(__pyx_Generator unsigned int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + int __pyx_t_7; + char const *__pyx_t_8; + PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_10 = NULL; + PyObject *__pyx_t_11 = NULL; + PyObject *__pyx_t_12 = NULL; + PyObject *__pyx_t_13 = NULL; + PyObject *__pyx_t_14 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -10604,7 +11583,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_26generator8(__pyx_Generator __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":110 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":110 * def sample_trees(self, unsigned n): * """hg.sample_trees(n) -> Sample of n trees from the hypergraph.""" * cdef vector[string]* trees = new vector[string]() # <<<<<<<<<<<<<< @@ -10619,7 +11598,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_26generator8(__pyx_Generator } __pyx_cur_scope->__pyx_v_trees = __pyx_t_1; - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":111 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":111 * """hg.sample_trees(n) -> Sample of n trees from the hypergraph.""" * cdef vector[string]* trees = new vector[string]() * hypergraph.sample_trees(self.hg[0], n, self._rng(), trees) # <<<<<<<<<<<<<< @@ -10628,7 +11607,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_26generator8(__pyx_Generator */ HypergraphSampler::sample_trees((__pyx_cur_scope->__pyx_v_self->hg[0]), __pyx_cur_scope->__pyx_v_n, ((struct __pyx_vtabstruct_4cdec_5_cdec_Hypergraph *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_rng(__pyx_cur_scope->__pyx_v_self), __pyx_cur_scope->__pyx_v_trees); - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":113 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":113 * hypergraph.sample_trees(self.hg[0], n, self._rng(), trees) * cdef unsigned k * try: # <<<<<<<<<<<<<< @@ -10637,7 +11616,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_26generator8(__pyx_Generator */ /*try:*/ { - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":114 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":114 * cdef unsigned k * try: * for k in range(trees.size()): # <<<<<<<<<<<<<< @@ -10648,26 +11627,26 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_26generator8(__pyx_Generator for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { __pyx_cur_scope->__pyx_v_k = __pyx_t_3; - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":115 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":115 * try: * for k in range(trees.size()): * yield unicode(trees[0][k].c_str(), 'utf8') # <<<<<<<<<<<<<< * finally: * del trees */ - __pyx_t_4 = __Pyx_PyBytes_FromString(((__pyx_cur_scope->__pyx_v_trees[0])[__pyx_cur_scope->__pyx_v_k]).c_str()); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L5;} - __Pyx_GOTREF(((PyObject *)__pyx_t_4)); - __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L5;} + __pyx_t_4 = __Pyx_PyBytes_FromString(((__pyx_cur_scope->__pyx_v_trees[0])[__pyx_cur_scope->__pyx_v_k]).c_str()); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_GOTREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_4)); - __Pyx_GIVEREF(((PyObject *)__pyx_t_4)); - __Pyx_INCREF(((PyObject *)__pyx_n_s__utf8)); - PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_n_s__utf8)); - __Pyx_GIVEREF(((PyObject *)__pyx_n_s__utf8)); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + __Pyx_INCREF(__pyx_n_s_utf8); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_n_s_utf8); + __Pyx_GIVEREF(__pyx_n_s_utf8); __pyx_t_4 = 0; - __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L5;} + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L5_error;} __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; __pyx_cur_scope->__pyx_t_0 = __pyx_t_2; @@ -10680,11 +11659,11 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_26generator8(__pyx_Generator __pyx_L9_resume_from_yield:; __pyx_t_2 = __pyx_cur_scope->__pyx_t_0; __pyx_t_3 = __pyx_cur_scope->__pyx_t_1; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L5;} + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L5_error;} } } - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":117 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":117 * yield unicode(trees[0][k].c_str(), 'utf8') * finally: * del trees # <<<<<<<<<<<<<< @@ -10692,32 +11671,53 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_26generator8(__pyx_Generator * def intersect(self, inp): */ /*finally:*/ { - int __pyx_why; - PyObject *__pyx_exc_type, *__pyx_exc_value, *__pyx_exc_tb; - int __pyx_exc_lineno; - __pyx_exc_type = 0; __pyx_exc_value = 0; __pyx_exc_tb = 0; __pyx_exc_lineno = 0; - __pyx_why = 0; goto __pyx_L6; - __pyx_L5: { - __pyx_why = 4; - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_ErrFetch(&__pyx_exc_type, &__pyx_exc_value, &__pyx_exc_tb); - __pyx_exc_lineno = __pyx_lineno; + /*normal exit:*/{ + delete __pyx_cur_scope->__pyx_v_trees; goto __pyx_L6; } - __pyx_L6:; - delete __pyx_cur_scope->__pyx_v_trees; - switch (__pyx_why) { - case 4: { - __Pyx_ErrRestore(__pyx_exc_type, __pyx_exc_value, __pyx_exc_tb); - __pyx_lineno = __pyx_exc_lineno; - __pyx_exc_type = 0; - __pyx_exc_value = 0; - __pyx_exc_tb = 0; - goto __pyx_L1_error; + /*exception exit:*/{ + __pyx_L5_error:; + __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); + if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11) < 0)) __Pyx_ErrFetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); + __Pyx_XGOTREF(__pyx_t_9); + __Pyx_XGOTREF(__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_11); + __Pyx_XGOTREF(__pyx_t_12); + __Pyx_XGOTREF(__pyx_t_13); + __Pyx_XGOTREF(__pyx_t_14); + __pyx_t_6 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_8 = __pyx_filename; + { + delete __pyx_cur_scope->__pyx_v_trees; + } + if (PY_MAJOR_VERSION >= 3) { + __Pyx_XGIVEREF(__pyx_t_12); + __Pyx_XGIVEREF(__pyx_t_13); + __Pyx_XGIVEREF(__pyx_t_14); + __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); } + __Pyx_XGIVEREF(__pyx_t_9); + __Pyx_XGIVEREF(__pyx_t_10); + __Pyx_XGIVEREF(__pyx_t_11); + __Pyx_ErrRestore(__pyx_t_9, __pyx_t_10, __pyx_t_11); + __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; + __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_8; + goto __pyx_L1_error; } + __pyx_L6:; } + + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":108 + * del hypos + * + * def sample_trees(self, unsigned n): # <<<<<<<<<<<<<< + * """hg.sample_trees(n) -> Sample of n trees from the hypergraph.""" + * cdef vector[string]* trees = new vector[string]() + */ + + /* function exit code */ PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; @@ -10732,6 +11732,14 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_26generator8(__pyx_Generator return NULL; } +/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":119 + * del trees + * + * def intersect(self, inp): # <<<<<<<<<<<<<< + * """hg.intersect(Lattice/string): Intersect the hypergraph with the provided reference.""" + * cdef Lattice lat + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_28intersect(PyObject *__pyx_v_self, PyObject *__pyx_v_inp); /*proto*/ static char __pyx_doc_4cdec_5_cdec_10Hypergraph_27intersect[] = "hg.intersect(Lattice/string): Intersect the hypergraph with the provided reference."; @@ -10740,18 +11748,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_28intersect(PyObject *__pyx_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("intersect (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_27intersect(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self), ((PyObject *)__pyx_v_inp)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":119 - * del trees - * - * def intersect(self, inp): # <<<<<<<<<<<<<< - * """hg.intersect(Lattice/string): Intersect the hypergraph with the provided reference.""" - * cdef Lattice lat - */ - static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_27intersect(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self, PyObject *__pyx_v_inp) { struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_lat = 0; PyObject *__pyx_r = NULL; @@ -10765,7 +11767,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_27intersect(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("intersect", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":122 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":122 * """hg.intersect(Lattice/string): Intersect the hypergraph with the provided reference.""" * cdef Lattice lat * if isinstance(inp, Lattice): # <<<<<<<<<<<<<< @@ -10776,19 +11778,21 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_27intersect(struct __pyx_obj __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":123 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":123 * cdef Lattice lat * if isinstance(inp, Lattice): * lat = inp # <<<<<<<<<<<<<< * elif isinstance(inp, basestring): * lat = Lattice(inp) */ - __Pyx_INCREF(((PyObject *)((struct __pyx_obj_4cdec_5_cdec_Lattice *)__pyx_v_inp))); - __pyx_v_lat = ((struct __pyx_obj_4cdec_5_cdec_Lattice *)__pyx_v_inp); + __pyx_t_3 = __pyx_v_inp; + __Pyx_INCREF(__pyx_t_3); + __pyx_v_lat = ((struct __pyx_obj_4cdec_5_cdec_Lattice *)__pyx_t_3); + __pyx_t_3 = 0; goto __pyx_L3; } - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":124 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":124 * if isinstance(inp, Lattice): * lat = inp * elif isinstance(inp, basestring): # <<<<<<<<<<<<<< @@ -10799,7 +11803,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_27intersect(struct __pyx_obj __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":125 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":125 * lat = inp * elif isinstance(inp, basestring): * lat = Lattice(inp) # <<<<<<<<<<<<<< @@ -10811,39 +11815,39 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_27intersect(struct __pyx_obj __Pyx_INCREF(__pyx_v_inp); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_inp); __Pyx_GIVEREF(__pyx_v_inp); - __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_Lattice)), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_Lattice)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_lat = ((struct __pyx_obj_4cdec_5_cdec_Lattice *)__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L3; } /*else*/ { - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":127 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":127 * lat = Lattice(inp) * else: * raise TypeError('cannot intersect hypergraph with %s' % type(inp)) # <<<<<<<<<<<<<< * return hypergraph.Intersect(lat.lattice[0], self.hg) * */ - __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_15), ((PyObject *)Py_TYPE(__pyx_v_inp))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_4)); + __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_cannot_intersect_hypergraph_with, ((PyObject *)Py_TYPE(__pyx_v_inp))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 127; __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[3]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_4)); - __Pyx_GIVEREF(((PyObject *)__pyx_t_4)); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; {__pyx_filename = __pyx_f[3]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L3:; - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":128 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":128 * else: * raise TypeError('cannot intersect hypergraph with %s' % type(inp)) * return hypergraph.Intersect(lat.lattice[0], self.hg) # <<<<<<<<<<<<<< @@ -10857,8 +11861,15 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_27intersect(struct __pyx_obj __pyx_t_4 = 0; goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":119 + * del trees + * + * def intersect(self, inp): # <<<<<<<<<<<<<< + * """hg.intersect(Lattice/string): Intersect the hypergraph with the provided reference.""" + * cdef Lattice lat + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); @@ -10871,6 +11882,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_27intersect(struct __pyx_obj return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":130 + * return hypergraph.Intersect(lat.lattice[0], self.hg) + * + * def prune(self, beam_alpha=0, density=0, **kwargs): # <<<<<<<<<<<<<< + * """hg.prune(beam_alpha=0, density=0): Prune the hypergraph. + * beam_alpha: use beam pruning + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_30prune(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4cdec_5_cdec_10Hypergraph_29prune[] = "hg.prune(beam_alpha=0, density=0): Prune the hypergraph.\n beam_alpha: use beam pruning\n density: use density pruning"; @@ -10887,7 +11906,7 @@ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_30prune(PyObject *__pyx_v_se __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL; __Pyx_GOTREF(__pyx_v_kwargs); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__beam_alpha,&__pyx_n_s__density,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_beam_alpha,&__pyx_n_s_density,0}; PyObject* values[2] = {0,0}; values[0] = ((PyObject *)__pyx_int_0); values[1] = ((PyObject *)__pyx_int_0); @@ -10904,12 +11923,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_30prune(PyObject *__pyx_v_se switch (pos_args) { case 0: if (kw_args > 0) { - PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__beam_alpha); + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_beam_alpha); if (value) { values[0] = value; kw_args--; } } case 1: if (kw_args > 0) { - PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__density); + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_density); if (value) { values[1] = value; kw_args--; } } } @@ -10937,19 +11956,13 @@ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_30prune(PyObject *__pyx_v_se return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_29prune(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self), __pyx_v_beam_alpha, __pyx_v_density, __pyx_v_kwargs); + + /* function exit code */ __Pyx_XDECREF(__pyx_v_kwargs); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":130 - * return hypergraph.Intersect(lat.lattice[0], self.hg) - * - * def prune(self, beam_alpha=0, density=0, **kwargs): # <<<<<<<<<<<<<< - * """hg.prune(beam_alpha=0, density=0): Prune the hypergraph. - * beam_alpha: use beam pruning - */ - static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_29prune(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self, PyObject *__pyx_v_beam_alpha, PyObject *__pyx_v_density, PyObject *__pyx_v_kwargs) { std::vector *__pyx_v_preserve_mask; PyObject *__pyx_r = NULL; @@ -10963,7 +11976,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_29prune(struct __pyx_obj_4cd int __pyx_clineno = 0; __Pyx_RefNannySetupContext("prune", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":134 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":134 * beam_alpha: use beam pruning * density: use density pruning""" * cdef hypergraph.EdgeMask* preserve_mask = NULL # <<<<<<<<<<<<<< @@ -10972,18 +11985,18 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_29prune(struct __pyx_obj_4cd */ __pyx_v_preserve_mask = NULL; - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":135 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":135 * density: use density pruning""" * cdef hypergraph.EdgeMask* preserve_mask = NULL * if 'csplit_preserve_full_word' in kwargs: # <<<<<<<<<<<<<< * preserve_mask = new hypergraph.EdgeMask(self.hg.edges_.size()) * preserve_mask[0][hypergraph.GetFullWordEdgeIndex(self.hg[0])] = True */ - __pyx_t_1 = (__Pyx_PyDict_Contains(((PyObject *)__pyx_n_s_16), ((PyObject *)__pyx_v_kwargs), Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = (__Pyx_PyDict_Contains(__pyx_n_s_csplit_preserve_full_word, __pyx_v_kwargs, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":136 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":136 * cdef hypergraph.EdgeMask* preserve_mask = NULL * if 'csplit_preserve_full_word' in kwargs: * preserve_mask = new hypergraph.EdgeMask(self.hg.edges_.size()) # <<<<<<<<<<<<<< @@ -10992,7 +12005,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_29prune(struct __pyx_obj_4cd */ __pyx_v_preserve_mask = new std::vector(__pyx_v_self->hg->edges_.size()); - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":137 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":137 * if 'csplit_preserve_full_word' in kwargs: * preserve_mask = new hypergraph.EdgeMask(self.hg.edges_.size()) * preserve_mask[0][hypergraph.GetFullWordEdgeIndex(self.hg[0])] = True # <<<<<<<<<<<<<< @@ -11004,7 +12017,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_29prune(struct __pyx_obj_4cd } __pyx_L3:; - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":138 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":138 * preserve_mask = new hypergraph.EdgeMask(self.hg.edges_.size()) * preserve_mask[0][hypergraph.GetFullWordEdgeIndex(self.hg[0])] = True * self.hg.PruneInsideOutside(beam_alpha, density, preserve_mask, False, 1, False) # <<<<<<<<<<<<<< @@ -11015,7 +12028,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_29prune(struct __pyx_obj_4cd __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_v_density); if (unlikely((__pyx_t_4 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->hg->PruneInsideOutside(__pyx_t_3, __pyx_t_4, __pyx_v_preserve_mask, 0, 1.0, 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":139 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":139 * preserve_mask[0][hypergraph.GetFullWordEdgeIndex(self.hg[0])] = True * self.hg.PruneInsideOutside(beam_alpha, density, preserve_mask, False, 1, False) * if preserve_mask: # <<<<<<<<<<<<<< @@ -11025,7 +12038,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_29prune(struct __pyx_obj_4cd __pyx_t_2 = (__pyx_v_preserve_mask != 0); if (__pyx_t_2) { - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":140 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":140 * self.hg.PruneInsideOutside(beam_alpha, density, preserve_mask, False, 1, False) * if preserve_mask: * del preserve_mask # <<<<<<<<<<<<<< @@ -11037,6 +12050,15 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_29prune(struct __pyx_obj_4cd } __pyx_L4:; + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":130 + * return hypergraph.Intersect(lat.lattice[0], self.hg) + * + * def prune(self, beam_alpha=0, density=0, **kwargs): # <<<<<<<<<<<<<< + * """hg.prune(beam_alpha=0, density=0): Prune the hypergraph. + * beam_alpha: use beam pruning + */ + + /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; @@ -11048,6 +12070,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_29prune(struct __pyx_obj_4cd return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":142 + * del preserve_mask + * + * def lattice(self): # TODO direct hg -> lattice conversion in cdec # <<<<<<<<<<<<<< + * """hg.lattice() -> Lattice corresponding to the hypergraph.""" + * cdef bytes plf = hypergraph.AsPLF(self.hg[0], True).c_str() + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_32lattice(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_4cdec_5_cdec_10Hypergraph_31lattice[] = "hg.lattice() -> Lattice corresponding to the hypergraph."; @@ -11056,18 +12086,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_32lattice(PyObject *__pyx_v_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("lattice (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_31lattice(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":142 - * del preserve_mask - * - * def lattice(self): # TODO direct hg -> lattice conversion in cdec # <<<<<<<<<<<<<< - * """hg.lattice() -> Lattice corresponding to the hypergraph.""" - * cdef bytes plf = hypergraph.AsPLF(self.hg[0], True).c_str() - */ - static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_31lattice(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self) { PyObject *__pyx_v_plf = 0; PyObject *__pyx_r = NULL; @@ -11080,7 +12104,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_31lattice(struct __pyx_obj_4 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("lattice", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":144 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":144 * def lattice(self): # TODO direct hg -> lattice conversion in cdec * """hg.lattice() -> Lattice corresponding to the hypergraph.""" * cdef bytes plf = hypergraph.AsPLF(self.hg[0], True).c_str() # <<<<<<<<<<<<<< @@ -11088,11 +12112,11 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_31lattice(struct __pyx_obj_4 * */ __pyx_t_1 = __Pyx_PyBytes_FromString(HypergraphIO::AsPLF((__pyx_v_self->hg[0]), 1).c_str()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __Pyx_GOTREF(__pyx_t_1); __pyx_v_plf = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":145 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":145 * """hg.lattice() -> Lattice corresponding to the hypergraph.""" * cdef bytes plf = hypergraph.AsPLF(self.hg[0], True).c_str() * return Lattice(eval(plf)) # <<<<<<<<<<<<<< @@ -11103,41 +12127,48 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_31lattice(struct __pyx_obj_4 __pyx_t_1 = __Pyx_Globals(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); - if (((PyObject *)__pyx_v_plf)) { - if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__plf), ((PyObject *)__pyx_v_plf)) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + if (__pyx_v_plf) { + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_plf, __pyx_v_plf) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (((PyObject *)__pyx_v_self)) { - if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_v_self)) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_self, ((PyObject *)__pyx_v_self)) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __Pyx_INCREF(((PyObject *)__pyx_v_plf)); - PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_plf)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_plf)); - PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_t_1)); - __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); - PyTuple_SET_ITEM(__pyx_t_3, 2, ((PyObject *)__pyx_t_2)); - __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); + __Pyx_INCREF(__pyx_v_plf); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_plf); + __Pyx_GIVEREF(__pyx_v_plf); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_2); __pyx_t_1 = 0; __pyx_t_2 = 0; - __pyx_t_2 = PyObject_Call(__pyx_builtin_eval, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_eval, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_Lattice)), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_Lattice)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":142 + * del preserve_mask + * + * def lattice(self): # TODO direct hg -> lattice conversion in cdec # <<<<<<<<<<<<<< + * """hg.lattice() -> Lattice corresponding to the hypergraph.""" + * cdef bytes plf = hypergraph.AsPLF(self.hg[0], True).c_str() + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); @@ -11151,6 +12182,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_31lattice(struct __pyx_obj_4 return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":147 + * return Lattice(eval(plf)) + * + * def plf(self): # <<<<<<<<<<<<<< + * """hg.plf() -> Lattice PLF representation corresponding to the hypergraph.""" + * return bytes(hypergraph.AsPLF(self.hg[0], True).c_str()) + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_34plf(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_4cdec_5_cdec_10Hypergraph_33plf[] = "hg.plf() -> Lattice PLF representation corresponding to the hypergraph."; @@ -11159,18 +12198,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_34plf(PyObject *__pyx_v_self __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("plf (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_33plf(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":147 - * return Lattice(eval(plf)) - * - * def plf(self): # <<<<<<<<<<<<<< - * """hg.plf() -> Lattice PLF representation corresponding to the hypergraph.""" - * return bytes(hypergraph.AsPLF(self.hg[0], True).c_str()) - */ - static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_33plf(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -11181,7 +12214,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_33plf(struct __pyx_obj_4cdec int __pyx_clineno = 0; __Pyx_RefNannySetupContext("plf", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":149 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":149 * def plf(self): * """hg.plf() -> Lattice PLF representation corresponding to the hypergraph.""" * return bytes(hypergraph.AsPLF(self.hg[0], True).c_str()) # <<<<<<<<<<<<<< @@ -11190,21 +12223,28 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_33plf(struct __pyx_obj_4cdec */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBytes_FromString(HypergraphIO::AsPLF((__pyx_v_self->hg[0]), 1).c_str()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_1)); - __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyBytes_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyBytes_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":147 + * return Lattice(eval(plf)) + * + * def plf(self): # <<<<<<<<<<<<<< + * """hg.plf() -> Lattice PLF representation corresponding to the hypergraph.""" + * return bytes(hypergraph.AsPLF(self.hg[0], True).c_str()) + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); @@ -11216,6 +12256,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_33plf(struct __pyx_obj_4cdec return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":151 + * return bytes(hypergraph.AsPLF(self.hg[0], True).c_str()) + * + * def reweight(self, weights): # <<<<<<<<<<<<<< + * """hg.reweight(SparseVector/DenseVector): Reweight the hypergraph with a new vector.""" + * if isinstance(weights, SparseVector): + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_36reweight(PyObject *__pyx_v_self, PyObject *__pyx_v_weights); /*proto*/ static char __pyx_doc_4cdec_5_cdec_10Hypergraph_35reweight[] = "hg.reweight(SparseVector/DenseVector): Reweight the hypergraph with a new vector."; @@ -11224,18 +12272,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_36reweight(PyObject *__pyx_v __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("reweight (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_35reweight(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self), ((PyObject *)__pyx_v_weights)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":151 - * return bytes(hypergraph.AsPLF(self.hg[0], True).c_str()) - * - * def reweight(self, weights): # <<<<<<<<<<<<<< - * """hg.reweight(SparseVector/DenseVector): Reweight the hypergraph with a new vector.""" - * if isinstance(weights, SparseVector): - */ - static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_35reweight(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self, PyObject *__pyx_v_weights) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -11248,7 +12290,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_35reweight(struct __pyx_obj_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("reweight", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":153 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":153 * def reweight(self, weights): * """hg.reweight(SparseVector/DenseVector): Reweight the hypergraph with a new vector.""" * if isinstance(weights, SparseVector): # <<<<<<<<<<<<<< @@ -11259,7 +12301,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_35reweight(struct __pyx_obj_ __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":154 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":154 * """hg.reweight(SparseVector/DenseVector): Reweight the hypergraph with a new vector.""" * if isinstance(weights, SparseVector): * self.hg.Reweight(( weights).vector[0]) # <<<<<<<<<<<<<< @@ -11270,7 +12312,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_35reweight(struct __pyx_obj_ goto __pyx_L3; } - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":155 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":155 * if isinstance(weights, SparseVector): * self.hg.Reweight(( weights).vector[0]) * elif isinstance(weights, DenseVector): # <<<<<<<<<<<<<< @@ -11281,7 +12323,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_35reweight(struct __pyx_obj_ __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":156 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":156 * self.hg.Reweight(( weights).vector[0]) * elif isinstance(weights, DenseVector): * self.hg.Reweight(( weights).vector[0]) # <<<<<<<<<<<<<< @@ -11293,29 +12335,38 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_35reweight(struct __pyx_obj_ } /*else*/ { - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":158 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":158 * self.hg.Reweight(( weights).vector[0]) * else: * raise TypeError('cannot reweight hypergraph with %s' % type(weights)) # <<<<<<<<<<<<<< * * property edges: */ - __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_17), ((PyObject *)Py_TYPE(__pyx_v_weights))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_cannot_reweight_hypergraph_with, ((PyObject *)Py_TYPE(__pyx_v_weights))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 158; __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[3]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_3)); - __Pyx_GIVEREF(((PyObject *)__pyx_t_3)); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; + __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[3]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L3:; + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":151 + * return bytes(hypergraph.AsPLF(self.hg[0], True).c_str()) + * + * def reweight(self, weights): # <<<<<<<<<<<<<< + * """hg.reweight(SparseVector/DenseVector): Reweight the hypergraph with a new vector.""" + * if isinstance(weights, SparseVector): + */ + + /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; @@ -11330,6 +12381,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_35reweight(struct __pyx_obj_ } static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_5edges_2generator9(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ +/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":161 + * + * property edges: + * def __get__(self): # <<<<<<<<<<<<<< + * cdef unsigned i + * for i in range(self.hg.edges_.size()): + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_5edges_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_5edges_1__get__(PyObject *__pyx_v_self) { @@ -11337,18 +12396,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_5edges_1__get__(PyObject *__ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_5edges___get__(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":161 - * - * property edges: - * def __get__(self): # <<<<<<<<<<<<<< - * cdef unsigned i - * for i in range(self.hg.edges_.size()): - */ - static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_5edges___get__(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self) { struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__ *__pyx_cur_scope; PyObject *__pyx_r = NULL; @@ -11373,6 +12426,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_5edges___get__(struct __pyx_ return (PyObject *) gen; } + /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; @@ -11408,7 +12462,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_5edges_2generator9(__pyx_Gen __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":163 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":163 * def __get__(self): * cdef unsigned i * for i in range(self.hg.edges_.size()): # <<<<<<<<<<<<<< @@ -11419,14 +12473,14 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_5edges_2generator9(__pyx_Gen for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_cur_scope->__pyx_v_i = __pyx_t_2; - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":164 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":164 * cdef unsigned i * for i in range(self.hg.edges_.size()): * yield HypergraphEdge().init(self.hg, i) # <<<<<<<<<<<<<< * * property nodes: */ - __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_HypergraphEdge)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_HypergraphEdge)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = ((struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphEdge *)((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)__pyx_t_3)->__pyx_vtab)->init(((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)__pyx_t_3), __pyx_cur_scope->__pyx_v_self->hg, __pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); @@ -11445,6 +12499,16 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_5edges_2generator9(__pyx_Gen __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":161 + * + * property edges: + * def __get__(self): # <<<<<<<<<<<<<< + * cdef unsigned i + * for i in range(self.hg.edges_.size()): + */ + + /* function exit code */ PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; @@ -11460,6 +12524,14 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_5edges_2generator9(__pyx_Gen } static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_5nodes_2generator10(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ +/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":167 + * + * property nodes: + * def __get__(self): # <<<<<<<<<<<<<< + * cdef unsigned i + * for i in range(self.hg.nodes_.size()): + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_5nodes_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_5nodes_1__get__(PyObject *__pyx_v_self) { @@ -11467,18 +12539,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_5nodes_1__get__(PyObject *__ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_5nodes___get__(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":167 - * - * property nodes: - * def __get__(self): # <<<<<<<<<<<<<< - * cdef unsigned i - * for i in range(self.hg.nodes_.size()): - */ - static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_5nodes___get__(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self) { struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__ *__pyx_cur_scope; PyObject *__pyx_r = NULL; @@ -11503,6 +12569,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_5nodes___get__(struct __pyx_ return (PyObject *) gen; } + /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; @@ -11538,7 +12605,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_5nodes_2generator10(__pyx_Ge __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":169 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":169 * def __get__(self): * cdef unsigned i * for i in range(self.hg.nodes_.size()): # <<<<<<<<<<<<<< @@ -11549,14 +12616,14 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_5nodes_2generator10(__pyx_Ge for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_cur_scope->__pyx_v_i = __pyx_t_2; - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":170 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":170 * cdef unsigned i * for i in range(self.hg.nodes_.size()): * yield HypergraphNode().init(self.hg, i) # <<<<<<<<<<<<<< * * property goal: */ - __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_HypergraphNode)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_HypergraphNode)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = ((struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphNode *)((struct __pyx_obj_4cdec_5_cdec_HypergraphNode *)__pyx_t_3)->__pyx_vtab)->init(((struct __pyx_obj_4cdec_5_cdec_HypergraphNode *)__pyx_t_3), __pyx_cur_scope->__pyx_v_self->hg, __pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); @@ -11575,6 +12642,16 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_5nodes_2generator10(__pyx_Ge __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":167 + * + * property nodes: + * def __get__(self): # <<<<<<<<<<<<<< + * cdef unsigned i + * for i in range(self.hg.nodes_.size()): + */ + + /* function exit code */ PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; @@ -11589,6 +12666,14 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_5nodes_2generator10(__pyx_Ge return NULL; } +/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":173 + * + * property goal: + * def __get__(self): # <<<<<<<<<<<<<< + * return HypergraphNode().init(self.hg, self.hg.GoalNode()) + * + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_4goal_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_4goal_1__get__(PyObject *__pyx_v_self) { @@ -11596,18 +12681,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_4goal_1__get__(PyObject *__p __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_4goal___get__(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":173 - * - * property goal: - * def __get__(self): # <<<<<<<<<<<<<< - * return HypergraphNode().init(self.hg, self.hg.GoalNode()) - * - */ - static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_4goal___get__(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -11618,7 +12697,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_4goal___get__(struct __pyx_o int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":174 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":174 * property goal: * def __get__(self): * return HypergraphNode().init(self.hg, self.hg.GoalNode()) # <<<<<<<<<<<<<< @@ -11626,7 +12705,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_4goal___get__(struct __pyx_o * property npaths: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_HypergraphNode)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_HypergraphNode)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = ((struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphNode *)((struct __pyx_obj_4cdec_5_cdec_HypergraphNode *)__pyx_t_1)->__pyx_vtab)->init(((struct __pyx_obj_4cdec_5_cdec_HypergraphNode *)__pyx_t_1), __pyx_v_self->hg, __pyx_v_self->hg->GoalNode()); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); @@ -11635,8 +12714,15 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_4goal___get__(struct __pyx_o __pyx_t_2 = 0; goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":173 + * + * property goal: + * def __get__(self): # <<<<<<<<<<<<<< + * return HypergraphNode().init(self.hg, self.hg.GoalNode()) + * + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); @@ -11648,6 +12734,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_4goal___get__(struct __pyx_o return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":177 + * + * property npaths: + * def __get__(self): # <<<<<<<<<<<<<< + * return self.hg.NumberOfPaths() + * + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_6npaths_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_6npaths_1__get__(PyObject *__pyx_v_self) { @@ -11655,18 +12749,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_6npaths_1__get__(PyObject *_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_6npaths___get__(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":177 - * - * property npaths: - * def __get__(self): # <<<<<<<<<<<<<< - * return self.hg.NumberOfPaths() - * - */ - static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_6npaths___get__(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -11676,7 +12764,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_6npaths___get__(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":178 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":178 * property npaths: * def __get__(self): * return self.hg.NumberOfPaths() # <<<<<<<<<<<<<< @@ -11690,8 +12778,15 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_6npaths___get__(struct __pyx __pyx_t_1 = 0; goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":177 + * + * property npaths: + * def __get__(self): # <<<<<<<<<<<<<< + * return self.hg.NumberOfPaths() + * + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cdec._cdec.Hypergraph.npaths.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -11702,6 +12797,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_6npaths___get__(struct __pyx return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":180 + * return self.hg.NumberOfPaths() + * + * def inside_outside(self): # <<<<<<<<<<<<<< + * """hg.inside_outside() -> SparseVector with inside-outside scores for each feature.""" + * cdef FastSparseVector[prob_t]* result = new FastSparseVector[prob_t]() + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_38inside_outside(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_4cdec_5_cdec_10Hypergraph_37inside_outside[] = "hg.inside_outside() -> SparseVector with inside-outside scores for each feature."; @@ -11710,18 +12813,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_38inside_outside(PyObject *_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("inside_outside (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_37inside_outside(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":180 - * return self.hg.NumberOfPaths() - * - * def inside_outside(self): # <<<<<<<<<<<<<< - * """hg.inside_outside() -> SparseVector with inside-outside scores for each feature.""" - * cdef FastSparseVector[prob_t]* result = new FastSparseVector[prob_t]() - */ - static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_37inside_outside(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self) { FastSparseVector *__pyx_v_result; prob_t __pyx_v_z; @@ -11738,7 +12835,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_37inside_outside(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("inside_outside", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":182 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":182 * def inside_outside(self): * """hg.inside_outside() -> SparseVector with inside-outside scores for each feature.""" * cdef FastSparseVector[prob_t]* result = new FastSparseVector[prob_t]() # <<<<<<<<<<<<<< @@ -11747,7 +12844,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_37inside_outside(struct __py */ __pyx_v_result = new FastSparseVector(); - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":183 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":183 * """hg.inside_outside() -> SparseVector with inside-outside scores for each feature.""" * cdef FastSparseVector[prob_t]* result = new FastSparseVector[prob_t]() * cdef prob_t z = hypergraph.InsideOutside(self.hg[0], result) # <<<<<<<<<<<<<< @@ -11756,7 +12853,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_37inside_outside(struct __py */ __pyx_v_z = InsideOutside, EdgeFeaturesAndProbWeightFunction>((__pyx_v_self->hg[0]), __pyx_v_result); - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":184 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":184 * cdef FastSparseVector[prob_t]* result = new FastSparseVector[prob_t]() * cdef prob_t z = hypergraph.InsideOutside(self.hg[0], result) * result[0] /= z # <<<<<<<<<<<<<< @@ -11765,20 +12862,20 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_37inside_outside(struct __py */ (__pyx_v_result[0]) /= __pyx_v_z; - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":185 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":185 * cdef prob_t z = hypergraph.InsideOutside(self.hg[0], result) * result[0] /= z * cdef SparseVector vector = SparseVector.__new__(SparseVector) # <<<<<<<<<<<<<< * vector.vector = new FastSparseVector[double]() * cdef FastSparseVector[prob_t].const_iterator* it = new FastSparseVector[prob_t].const_iterator(result[0], False) */ - __pyx_t_1 = __pyx_tp_new_4cdec_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SparseVector)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_tp_new_4cdec_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SparseVector)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4cdec_5_cdec_SparseVector)))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_vector = ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_t_1); __pyx_t_1 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":186 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":186 * result[0] /= z * cdef SparseVector vector = SparseVector.__new__(SparseVector) * vector.vector = new FastSparseVector[double]() # <<<<<<<<<<<<<< @@ -11787,7 +12884,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_37inside_outside(struct __py */ __pyx_v_vector->vector = new FastSparseVector(); - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":187 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":187 * cdef SparseVector vector = SparseVector.__new__(SparseVector) * vector.vector = new FastSparseVector[double]() * cdef FastSparseVector[prob_t].const_iterator* it = new FastSparseVector[prob_t].const_iterator(result[0], False) # <<<<<<<<<<<<<< @@ -11796,7 +12893,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_37inside_outside(struct __py */ __pyx_v_it = new FastSparseVector::const_iterator((__pyx_v_result[0]), 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":189 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":189 * cdef FastSparseVector[prob_t].const_iterator* it = new FastSparseVector[prob_t].const_iterator(result[0], False) * cdef unsigned i * for i in range(result.size()): # <<<<<<<<<<<<<< @@ -11807,7 +12904,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_37inside_outside(struct __py for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { __pyx_v_i = __pyx_t_3; - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":190 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":190 * cdef unsigned i * for i in range(result.size()): * vector.vector.set_value(it[0].ptr().first, log(it[0].ptr().second)) # <<<<<<<<<<<<<< @@ -11816,7 +12913,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_37inside_outside(struct __py */ __pyx_v_vector->vector->set_value((__pyx_v_it[0]).operator->()->first, log((__pyx_v_it[0]).operator->()->second)); - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":191 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":191 * for i in range(result.size()): * vector.vector.set_value(it[0].ptr().first, log(it[0].ptr().second)) * pinc(it[0]) # ++it # <<<<<<<<<<<<<< @@ -11826,7 +12923,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_37inside_outside(struct __py (++(__pyx_v_it[0])); } - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":192 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":192 * vector.vector.set_value(it[0].ptr().first, log(it[0].ptr().second)) * pinc(it[0]) # ++it * del it # <<<<<<<<<<<<<< @@ -11835,7 +12932,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_37inside_outside(struct __py */ delete __pyx_v_it; - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":193 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":193 * pinc(it[0]) # ++it * del it * del result # <<<<<<<<<<<<<< @@ -11844,7 +12941,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_37inside_outside(struct __py */ delete __pyx_v_result; - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":194 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":194 * del it * del result * return vector # <<<<<<<<<<<<<< @@ -11856,8 +12953,15 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_37inside_outside(struct __py __pyx_r = ((PyObject *)__pyx_v_vector); goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":180 + * return self.hg.NumberOfPaths() + * + * def inside_outside(self): # <<<<<<<<<<<<<< + * """hg.inside_outside() -> SparseVector with inside-outside scores for each feature.""" + * cdef FastSparseVector[prob_t]* result = new FastSparseVector[prob_t]() + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cdec._cdec.Hypergraph.inside_outside", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -11869,7 +12973,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_37inside_outside(struct __py return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":201 +/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":201 * cdef public TRule trule * * cdef init(self, hypergraph.Hypergraph* hg, unsigned i): # <<<<<<<<<<<<<< @@ -11886,7 +12990,7 @@ static PyObject *__pyx_f_4cdec_5_cdec_14HypergraphEdge_init(struct __pyx_obj_4cd int __pyx_clineno = 0; __Pyx_RefNannySetupContext("init", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":202 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":202 * * cdef init(self, hypergraph.Hypergraph* hg, unsigned i): * self.hg = hg # <<<<<<<<<<<<<< @@ -11895,7 +12999,7 @@ static PyObject *__pyx_f_4cdec_5_cdec_14HypergraphEdge_init(struct __pyx_obj_4cd */ __pyx_v_self->hg = __pyx_v_hg; - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":203 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":203 * cdef init(self, hypergraph.Hypergraph* hg, unsigned i): * self.hg = hg * self.edge = &hg.edges_[i] # <<<<<<<<<<<<<< @@ -11904,14 +13008,14 @@ static PyObject *__pyx_f_4cdec_5_cdec_14HypergraphEdge_init(struct __pyx_obj_4cd */ __pyx_v_self->edge = (&(__pyx_v_hg->edges_[__pyx_v_i])); - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":204 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":204 * self.hg = hg * self.edge = &hg.edges_[i] * self.trule = TRule.__new__(TRule) # <<<<<<<<<<<<<< * self.trule.rule = new shared_ptr[grammar.TRule](self.edge.rule_) * return self */ - __pyx_t_1 = __pyx_tp_new_4cdec_5_cdec_TRule(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_TRule)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_tp_new_4cdec_5_cdec_TRule(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_TRule)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4cdec_5_cdec_TRule)))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GIVEREF(__pyx_t_1); @@ -11920,7 +13024,7 @@ static PyObject *__pyx_f_4cdec_5_cdec_14HypergraphEdge_init(struct __pyx_obj_4cd __pyx_v_self->trule = ((struct __pyx_obj_4cdec_5_cdec_TRule *)__pyx_t_1); __pyx_t_1 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":205 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":205 * self.edge = &hg.edges_[i] * self.trule = TRule.__new__(TRule) * self.trule.rule = new shared_ptr[grammar.TRule](self.edge.rule_) # <<<<<<<<<<<<<< @@ -11929,7 +13033,7 @@ static PyObject *__pyx_f_4cdec_5_cdec_14HypergraphEdge_init(struct __pyx_obj_4cd */ __pyx_v_self->trule->rule = new boost::shared_ptr(__pyx_v_self->edge->rule_); - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":206 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":206 * self.trule = TRule.__new__(TRule) * self.trule.rule = new shared_ptr[grammar.TRule](self.edge.rule_) * return self # <<<<<<<<<<<<<< @@ -11941,8 +13045,15 @@ static PyObject *__pyx_f_4cdec_5_cdec_14HypergraphEdge_init(struct __pyx_obj_4cd __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":201 + * cdef public TRule trule + * + * cdef init(self, hypergraph.Hypergraph* hg, unsigned i): # <<<<<<<<<<<<<< + * self.hg = hg + * self.edge = &hg.edges_[i] + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cdec._cdec.HypergraphEdge.init", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -11953,6 +13064,14 @@ static PyObject *__pyx_f_4cdec_5_cdec_14HypergraphEdge_init(struct __pyx_obj_4cd return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":208 + * return self + * + * def __len__(self): # <<<<<<<<<<<<<< + * return self.edge.tail_nodes_.size() + * + */ + /* Python wrapper */ static Py_ssize_t __pyx_pw_4cdec_5_cdec_14HypergraphEdge_1__len__(PyObject *__pyx_v_self); /*proto*/ static Py_ssize_t __pyx_pw_4cdec_5_cdec_14HypergraphEdge_1__len__(PyObject *__pyx_v_self) { @@ -11960,24 +13079,18 @@ static Py_ssize_t __pyx_pw_4cdec_5_cdec_14HypergraphEdge_1__len__(PyObject *__py __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_14HypergraphEdge___len__(((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":208 - * return self - * - * def __len__(self): # <<<<<<<<<<<<<< - * return self.edge.tail_nodes_.size() - * - */ - -static Py_ssize_t __pyx_pf_4cdec_5_cdec_14HypergraphEdge___len__(struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *__pyx_v_self) { - Py_ssize_t __pyx_r; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__len__", 0); - - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":209 +static Py_ssize_t __pyx_pf_4cdec_5_cdec_14HypergraphEdge___len__(struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *__pyx_v_self) { + Py_ssize_t __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__len__", 0); + + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":209 * * def __len__(self): * return self.edge.tail_nodes_.size() # <<<<<<<<<<<<<< @@ -11987,12 +13100,28 @@ static Py_ssize_t __pyx_pf_4cdec_5_cdec_14HypergraphEdge___len__(struct __pyx_ob __pyx_r = __pyx_v_self->edge->tail_nodes_.size(); goto __pyx_L0; - __pyx_r = 0; + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":208 + * return self + * + * def __len__(self): # <<<<<<<<<<<<<< + * return self.edge.tail_nodes_.size() + * + */ + + /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":212 + * + * property head_node: + * def __get__(self): # <<<<<<<<<<<<<< + * return HypergraphNode().init(self.hg, self.edge.head_node_) + * + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphEdge_9head_node_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphEdge_9head_node_1__get__(PyObject *__pyx_v_self) { @@ -12000,18 +13129,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphEdge_9head_node_1__get__(PyOb __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_14HypergraphEdge_9head_node___get__(((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":212 - * - * property head_node: - * def __get__(self): # <<<<<<<<<<<<<< - * return HypergraphNode().init(self.hg, self.edge.head_node_) - * - */ - static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_9head_node___get__(struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -12022,7 +13145,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_9head_node___get__(struc int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":213 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":213 * property head_node: * def __get__(self): * return HypergraphNode().init(self.hg, self.edge.head_node_) # <<<<<<<<<<<<<< @@ -12030,7 +13153,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_9head_node___get__(struc * property tail_nodes: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_HypergraphNode)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_HypergraphNode)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = ((struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphNode *)((struct __pyx_obj_4cdec_5_cdec_HypergraphNode *)__pyx_t_1)->__pyx_vtab)->init(((struct __pyx_obj_4cdec_5_cdec_HypergraphNode *)__pyx_t_1), __pyx_v_self->hg, __pyx_v_self->edge->head_node_); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); @@ -12039,8 +13162,15 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_9head_node___get__(struc __pyx_t_2 = 0; goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":212 + * + * property head_node: + * def __get__(self): # <<<<<<<<<<<<<< + * return HypergraphNode().init(self.hg, self.edge.head_node_) + * + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); @@ -12053,6 +13183,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_9head_node___get__(struc } static PyObject *__pyx_gb_4cdec_5_cdec_14HypergraphEdge_10tail_nodes_2generator11(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ +/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":216 + * + * property tail_nodes: + * def __get__(self): # <<<<<<<<<<<<<< + * cdef unsigned i + * for i in range(self.edge.tail_nodes_.size()): + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphEdge_10tail_nodes_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphEdge_10tail_nodes_1__get__(PyObject *__pyx_v_self) { @@ -12060,18 +13198,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphEdge_10tail_nodes_1__get__(Py __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_14HypergraphEdge_10tail_nodes___get__(((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":216 - * - * property tail_nodes: - * def __get__(self): # <<<<<<<<<<<<<< - * cdef unsigned i - * for i in range(self.edge.tail_nodes_.size()): - */ - static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_10tail_nodes___get__(struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *__pyx_v_self) { struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__ *__pyx_cur_scope; PyObject *__pyx_r = NULL; @@ -12096,6 +13228,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_10tail_nodes___get__(str return (PyObject *) gen; } + /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; @@ -12131,7 +13264,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_14HypergraphEdge_10tail_nodes_2generator1 __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":218 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":218 * def __get__(self): * cdef unsigned i * for i in range(self.edge.tail_nodes_.size()): # <<<<<<<<<<<<<< @@ -12142,14 +13275,14 @@ static PyObject *__pyx_gb_4cdec_5_cdec_14HypergraphEdge_10tail_nodes_2generator1 for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_cur_scope->__pyx_v_i = __pyx_t_2; - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":219 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":219 * cdef unsigned i * for i in range(self.edge.tail_nodes_.size()): * yield HypergraphNode().init(self.hg, self.edge.tail_nodes_[i]) # <<<<<<<<<<<<<< * * property span: */ - __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_HypergraphNode)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_HypergraphNode)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = ((struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphNode *)((struct __pyx_obj_4cdec_5_cdec_HypergraphNode *)__pyx_t_3)->__pyx_vtab)->init(((struct __pyx_obj_4cdec_5_cdec_HypergraphNode *)__pyx_t_3), __pyx_cur_scope->__pyx_v_self->hg, (__pyx_cur_scope->__pyx_v_self->edge->tail_nodes_[__pyx_cur_scope->__pyx_v_i])); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); @@ -12168,6 +13301,16 @@ static PyObject *__pyx_gb_4cdec_5_cdec_14HypergraphEdge_10tail_nodes_2generator1 __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":216 + * + * property tail_nodes: + * def __get__(self): # <<<<<<<<<<<<<< + * cdef unsigned i + * for i in range(self.edge.tail_nodes_.size()): + */ + + /* function exit code */ PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; @@ -12182,6 +13325,14 @@ static PyObject *__pyx_gb_4cdec_5_cdec_14HypergraphEdge_10tail_nodes_2generator1 return NULL; } +/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":222 + * + * property span: + * def __get__(self): # <<<<<<<<<<<<<< + * return (self.edge.i_, self.edge.j_) + * + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphEdge_4span_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphEdge_4span_1__get__(PyObject *__pyx_v_self) { @@ -12189,18 +13340,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphEdge_4span_1__get__(PyObject __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_14HypergraphEdge_4span___get__(((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":222 - * - * property span: - * def __get__(self): # <<<<<<<<<<<<<< - * return (self.edge.i_, self.edge.j_) - * - */ - static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_4span___get__(struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -12212,7 +13357,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_4span___get__(struct __p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":223 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":223 * property span: * def __get__(self): * return (self.edge.i_, self.edge.j_) # <<<<<<<<<<<<<< @@ -12220,9 +13365,9 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_4span___get__(struct __p * property src_span: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyInt_FromLong(__pyx_v_self->edge->i_); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_From_short(__pyx_v_self->edge->i_); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyInt_FromLong(__pyx_v_self->edge->j_); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyInt_From_short(__pyx_v_self->edge->j_); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); @@ -12232,12 +13377,19 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_4span___get__(struct __p __Pyx_GIVEREF(__pyx_t_2); __pyx_t_1 = 0; __pyx_t_2 = 0; - __pyx_r = ((PyObject *)__pyx_t_3); + __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":222 + * + * property span: + * def __get__(self): # <<<<<<<<<<<<<< + * return (self.edge.i_, self.edge.j_) + * + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); @@ -12250,6 +13402,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_4span___get__(struct __p return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":226 + * + * property src_span: + * def __get__(self): # <<<<<<<<<<<<<< + * return (self.edge.prev_i_, self.edge.prev_j_) + * + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphEdge_8src_span_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphEdge_8src_span_1__get__(PyObject *__pyx_v_self) { @@ -12257,18 +13417,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphEdge_8src_span_1__get__(PyObj __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_14HypergraphEdge_8src_span___get__(((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":226 - * - * property src_span: - * def __get__(self): # <<<<<<<<<<<<<< - * return (self.edge.prev_i_, self.edge.prev_j_) - * - */ - static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_8src_span___get__(struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -12280,7 +13434,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_8src_span___get__(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":227 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":227 * property src_span: * def __get__(self): * return (self.edge.prev_i_, self.edge.prev_j_) # <<<<<<<<<<<<<< @@ -12288,9 +13442,9 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_8src_span___get__(struct * property feature_values: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyInt_FromLong(__pyx_v_self->edge->prev_i_); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_From_short(__pyx_v_self->edge->prev_i_); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyInt_FromLong(__pyx_v_self->edge->prev_j_); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyInt_From_short(__pyx_v_self->edge->prev_j_); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); @@ -12300,12 +13454,19 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_8src_span___get__(struct __Pyx_GIVEREF(__pyx_t_2); __pyx_t_1 = 0; __pyx_t_2 = 0; - __pyx_r = ((PyObject *)__pyx_t_3); + __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":226 + * + * property src_span: + * def __get__(self): # <<<<<<<<<<<<<< + * return (self.edge.prev_i_, self.edge.prev_j_) + * + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); @@ -12318,6 +13479,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_8src_span___get__(struct return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":230 + * + * property feature_values: + * def __get__(self): # <<<<<<<<<<<<<< + * cdef SparseVector vector = SparseVector.__new__(SparseVector) + * vector.vector = new FastSparseVector[double](self.edge.feature_values_) + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphEdge_14feature_values_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphEdge_14feature_values_1__get__(PyObject *__pyx_v_self) { @@ -12325,18 +13494,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphEdge_14feature_values_1__get_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_14HypergraphEdge_14feature_values___get__(((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":230 - * - * property feature_values: - * def __get__(self): # <<<<<<<<<<<<<< - * cdef SparseVector vector = SparseVector.__new__(SparseVector) - * vector.vector = new FastSparseVector[double](self.edge.feature_values_) - */ - static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_14feature_values___get__(struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *__pyx_v_self) { struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_vector = 0; PyObject *__pyx_r = NULL; @@ -12347,20 +13510,20 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_14feature_values___get__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":231 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":231 * property feature_values: * def __get__(self): * cdef SparseVector vector = SparseVector.__new__(SparseVector) # <<<<<<<<<<<<<< * vector.vector = new FastSparseVector[double](self.edge.feature_values_) * return vector */ - __pyx_t_1 = __pyx_tp_new_4cdec_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SparseVector)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_tp_new_4cdec_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SparseVector)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4cdec_5_cdec_SparseVector)))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_vector = ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_t_1); __pyx_t_1 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":232 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":232 * def __get__(self): * cdef SparseVector vector = SparseVector.__new__(SparseVector) * vector.vector = new FastSparseVector[double](self.edge.feature_values_) # <<<<<<<<<<<<<< @@ -12369,7 +13532,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_14feature_values___get__ */ __pyx_v_vector->vector = new FastSparseVector(__pyx_v_self->edge->feature_values_); - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":233 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":233 * cdef SparseVector vector = SparseVector.__new__(SparseVector) * vector.vector = new FastSparseVector[double](self.edge.feature_values_) * return vector # <<<<<<<<<<<<<< @@ -12381,8 +13544,15 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_14feature_values___get__ __pyx_r = ((PyObject *)__pyx_v_vector); goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":230 + * + * property feature_values: + * def __get__(self): # <<<<<<<<<<<<<< + * cdef SparseVector vector = SparseVector.__new__(SparseVector) + * vector.vector = new FastSparseVector[double](self.edge.feature_values_) + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cdec._cdec.HypergraphEdge.feature_values.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -12394,6 +13564,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_14feature_values___get__ return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":236 + * + * property prob: + * def __get__(self): # <<<<<<<<<<<<<< + * return self.edge.edge_prob_.as_float() + * + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphEdge_4prob_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphEdge_4prob_1__get__(PyObject *__pyx_v_self) { @@ -12401,18 +13579,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphEdge_4prob_1__get__(PyObject __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_14HypergraphEdge_4prob___get__(((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":236 - * - * property prob: - * def __get__(self): # <<<<<<<<<<<<<< - * return self.edge.edge_prob_.as_float() - * - */ - static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_4prob___get__(struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -12422,7 +13594,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_4prob___get__(struct __p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":237 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":237 * property prob: * def __get__(self): * return self.edge.edge_prob_.as_float() # <<<<<<<<<<<<<< @@ -12436,8 +13608,15 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_4prob___get__(struct __p __pyx_t_1 = 0; goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":236 + * + * property prob: + * def __get__(self): # <<<<<<<<<<<<<< + * return self.edge.edge_prob_.as_float() + * + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cdec._cdec.HypergraphEdge.prob.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -12448,6 +13627,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_4prob___get__(struct __p return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":239 + * return self.edge.edge_prob_.as_float() + * + * def __richcmp__(HypergraphEdge x, HypergraphEdge y, int op): # <<<<<<<<<<<<<< + * if op == 2: # == + * return x.edge == y.edge + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphEdge_3__richcmp__(PyObject *__pyx_v_x, PyObject *__pyx_v_y, int __pyx_v_op); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphEdge_3__richcmp__(PyObject *__pyx_v_x, PyObject *__pyx_v_y, int __pyx_v_op) { @@ -12460,6 +13647,8 @@ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphEdge_3__richcmp__(PyObject *_ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_4cdec_5_cdec_HypergraphEdge, 1, "x", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_4cdec_5_cdec_HypergraphEdge, 1, "y", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_4cdec_5_cdec_14HypergraphEdge_2__richcmp__(((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)__pyx_v_x), ((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)__pyx_v_y), ((int)__pyx_v_op)); + + /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; @@ -12468,14 +13657,6 @@ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphEdge_3__richcmp__(PyObject *_ return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":239 - * return self.edge.edge_prob_.as_float() - * - * def __richcmp__(HypergraphEdge x, HypergraphEdge y, int op): # <<<<<<<<<<<<<< - * if op == 2: # == - * return x.edge == y.edge - */ - static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_2__richcmp__(struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *__pyx_v_x, struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *__pyx_v_y, int __pyx_v_op) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -12486,7 +13667,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_2__richcmp__(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__richcmp__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":242 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":242 * if op == 2: # == * return x.edge == y.edge * elif op == 3: # != # <<<<<<<<<<<<<< @@ -12495,7 +13676,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_2__richcmp__(struct __py */ switch (__pyx_v_op) { - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":240 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":240 * * def __richcmp__(HypergraphEdge x, HypergraphEdge y, int op): * if op == 2: # == # <<<<<<<<<<<<<< @@ -12504,7 +13685,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_2__richcmp__(struct __py */ case 2: - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":241 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":241 * def __richcmp__(HypergraphEdge x, HypergraphEdge y, int op): * if op == 2: # == * return x.edge == y.edge # <<<<<<<<<<<<<< @@ -12519,7 +13700,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_2__richcmp__(struct __py goto __pyx_L0; break; - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":242 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":242 * if op == 2: # == * return x.edge == y.edge * elif op == 3: # != # <<<<<<<<<<<<<< @@ -12528,7 +13709,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_2__richcmp__(struct __py */ case 3: - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":243 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":243 * return x.edge == y.edge * elif op == 3: # != * return not (x == y) # <<<<<<<<<<<<<< @@ -12545,23 +13726,31 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_2__richcmp__(struct __py __pyx_t_1 = 0; goto __pyx_L0; break; + default: break; } - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":244 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":244 * elif op == 3: # != * return not (x == y) * raise NotImplemented('comparison not implemented for HypergraphEdge') # <<<<<<<<<<<<<< * * cdef class HypergraphNode: */ - __pyx_t_1 = PyObject_Call(__pyx_builtin_NotImplemented, ((PyObject *)__pyx_k_tuple_19), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_NotImplemented, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[3]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":239 + * return self.edge.edge_prob_.as_float() + * + * def __richcmp__(HypergraphEdge x, HypergraphEdge y, int op): # <<<<<<<<<<<<<< + * if op == 2: # == + * return x.edge == y.edge + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cdec._cdec.HypergraphEdge.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -12572,6 +13761,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_2__richcmp__(struct __py return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":199 + * cdef hypergraph.Hypergraph* hg + * cdef hypergraph.HypergraphEdge* edge + * cdef public TRule trule # <<<<<<<<<<<<<< + * + * cdef init(self, hypergraph.Hypergraph* hg, unsigned i): + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphEdge_5trule_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphEdge_5trule_1__get__(PyObject *__pyx_v_self) { @@ -12579,18 +13776,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphEdge_5trule_1__get__(PyObject __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_14HypergraphEdge_5trule___get__(((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":199 - * cdef hypergraph.Hypergraph* hg - * cdef hypergraph.HypergraphEdge* edge - * cdef public TRule trule # <<<<<<<<<<<<<< - * - * cdef init(self, hypergraph.Hypergraph* hg, unsigned i): - */ - static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_5trule___get__(struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -12600,7 +13791,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_5trule___get__(struct __ __pyx_r = ((PyObject *)__pyx_v_self->trule); goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); + /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); @@ -12614,6 +13805,8 @@ static int __pyx_pw_4cdec_5_cdec_14HypergraphEdge_5trule_3__set__(PyObject *__py __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_14HypergraphEdge_5trule_2__set__(((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -12621,20 +13814,25 @@ static int __pyx_pw_4cdec_5_cdec_14HypergraphEdge_5trule_3__set__(PyObject *__py static int __pyx_pf_4cdec_5_cdec_14HypergraphEdge_5trule_2__set__(struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_4cdec_5_cdec_TRule))))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_INCREF(__pyx_v_value); - __Pyx_GIVEREF(__pyx_v_value); + __pyx_t_1 = __pyx_v_value; + __Pyx_INCREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->trule); __Pyx_DECREF(((PyObject *)__pyx_v_self->trule)); - __pyx_v_self->trule = ((struct __pyx_obj_4cdec_5_cdec_TRule *)__pyx_v_value); + __pyx_v_self->trule = ((struct __pyx_obj_4cdec_5_cdec_TRule *)__pyx_t_1); + __pyx_t_1 = 0; + /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cdec._cdec.HypergraphEdge.trule.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; @@ -12649,6 +13847,8 @@ static int __pyx_pw_4cdec_5_cdec_14HypergraphEdge_5trule_5__del__(PyObject *__py __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_14HypergraphEdge_5trule_4__del__(((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -12663,12 +13863,13 @@ static int __pyx_pf_4cdec_5_cdec_14HypergraphEdge_5trule_4__del__(struct __pyx_o __Pyx_DECREF(((PyObject *)__pyx_v_self->trule)); __pyx_v_self->trule = ((struct __pyx_obj_4cdec_5_cdec_TRule *)Py_None); + /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":250 +/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":250 * cdef hypergraph.HypergraphNode* node * * cdef init(self, hypergraph.Hypergraph* hg, unsigned i): # <<<<<<<<<<<<<< @@ -12681,7 +13882,7 @@ static PyObject *__pyx_f_4cdec_5_cdec_14HypergraphNode_init(struct __pyx_obj_4cd __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("init", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":251 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":251 * * cdef init(self, hypergraph.Hypergraph* hg, unsigned i): * self.hg = hg # <<<<<<<<<<<<<< @@ -12690,7 +13891,7 @@ static PyObject *__pyx_f_4cdec_5_cdec_14HypergraphNode_init(struct __pyx_obj_4cd */ __pyx_v_self->hg = __pyx_v_hg; - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":252 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":252 * cdef init(self, hypergraph.Hypergraph* hg, unsigned i): * self.hg = hg * self.node = &hg.nodes_[i] # <<<<<<<<<<<<<< @@ -12699,7 +13900,7 @@ static PyObject *__pyx_f_4cdec_5_cdec_14HypergraphNode_init(struct __pyx_obj_4cd */ __pyx_v_self->node = (&(__pyx_v_hg->nodes_[__pyx_v_i])); - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":253 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":253 * self.hg = hg * self.node = &hg.nodes_[i] * return self # <<<<<<<<<<<<<< @@ -12711,13 +13912,29 @@ static PyObject *__pyx_f_4cdec_5_cdec_14HypergraphNode_init(struct __pyx_obj_4cd __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":250 + * cdef hypergraph.HypergraphNode* node + * + * cdef init(self, hypergraph.Hypergraph* hg, unsigned i): # <<<<<<<<<<<<<< + * self.hg = hg + * self.node = &hg.nodes_[i] + */ + + /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":256 + * + * property id: + * def __get__(self): # <<<<<<<<<<<<<< + * return self.node.id_ + * + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphNode_2id_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphNode_2id_1__get__(PyObject *__pyx_v_self) { @@ -12725,18 +13942,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphNode_2id_1__get__(PyObject *_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_14HypergraphNode_2id___get__(((struct __pyx_obj_4cdec_5_cdec_HypergraphNode *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":256 - * - * property id: - * def __get__(self): # <<<<<<<<<<<<<< - * return self.node.id_ - * - */ - static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphNode_2id___get__(struct __pyx_obj_4cdec_5_cdec_HypergraphNode *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -12746,7 +13957,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphNode_2id___get__(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":257 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":257 * property id: * def __get__(self): * return self.node.id_ # <<<<<<<<<<<<<< @@ -12754,14 +13965,21 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphNode_2id___get__(struct __pyx * property in_edges: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyInt_FromLong(__pyx_v_self->node->id_); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->node->id_); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":256 + * + * property id: + * def __get__(self): # <<<<<<<<<<<<<< + * return self.node.id_ + * + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cdec._cdec.HypergraphNode.id.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -12773,6 +13991,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphNode_2id___get__(struct __pyx } static PyObject *__pyx_gb_4cdec_5_cdec_14HypergraphNode_8in_edges_2generator12(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ +/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":260 + * + * property in_edges: + * def __get__(self): # <<<<<<<<<<<<<< + * cdef unsigned i + * for i in range(self.node.in_edges_.size()): + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphNode_8in_edges_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphNode_8in_edges_1__get__(PyObject *__pyx_v_self) { @@ -12780,18 +14006,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphNode_8in_edges_1__get__(PyObj __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_14HypergraphNode_8in_edges___get__(((struct __pyx_obj_4cdec_5_cdec_HypergraphNode *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":260 - * - * property in_edges: - * def __get__(self): # <<<<<<<<<<<<<< - * cdef unsigned i - * for i in range(self.node.in_edges_.size()): - */ - static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphNode_8in_edges___get__(struct __pyx_obj_4cdec_5_cdec_HypergraphNode *__pyx_v_self) { struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__ *__pyx_cur_scope; PyObject *__pyx_r = NULL; @@ -12816,6 +14036,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphNode_8in_edges___get__(struct return (PyObject *) gen; } + /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; @@ -12851,7 +14072,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_14HypergraphNode_8in_edges_2generator12(_ __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":262 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":262 * def __get__(self): * cdef unsigned i * for i in range(self.node.in_edges_.size()): # <<<<<<<<<<<<<< @@ -12862,14 +14083,14 @@ static PyObject *__pyx_gb_4cdec_5_cdec_14HypergraphNode_8in_edges_2generator12(_ for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_cur_scope->__pyx_v_i = __pyx_t_2; - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":263 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":263 * cdef unsigned i * for i in range(self.node.in_edges_.size()): * yield HypergraphEdge().init(self.hg, self.node.in_edges_[i]) # <<<<<<<<<<<<<< * * property out_edges: */ - __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_HypergraphEdge)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_HypergraphEdge)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = ((struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphEdge *)((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)__pyx_t_3)->__pyx_vtab)->init(((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)__pyx_t_3), __pyx_cur_scope->__pyx_v_self->hg, (__pyx_cur_scope->__pyx_v_self->node->in_edges_[__pyx_cur_scope->__pyx_v_i])); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); @@ -12888,6 +14109,16 @@ static PyObject *__pyx_gb_4cdec_5_cdec_14HypergraphNode_8in_edges_2generator12(_ __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":260 + * + * property in_edges: + * def __get__(self): # <<<<<<<<<<<<<< + * cdef unsigned i + * for i in range(self.node.in_edges_.size()): + */ + + /* function exit code */ PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; @@ -12903,6 +14134,14 @@ static PyObject *__pyx_gb_4cdec_5_cdec_14HypergraphNode_8in_edges_2generator12(_ } static PyObject *__pyx_gb_4cdec_5_cdec_14HypergraphNode_9out_edges_2generator13(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ +/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":266 + * + * property out_edges: + * def __get__(self): # <<<<<<<<<<<<<< + * cdef unsigned i + * for i in range(self.node.out_edges_.size()): + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphNode_9out_edges_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphNode_9out_edges_1__get__(PyObject *__pyx_v_self) { @@ -12910,18 +14149,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphNode_9out_edges_1__get__(PyOb __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_14HypergraphNode_9out_edges___get__(((struct __pyx_obj_4cdec_5_cdec_HypergraphNode *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":266 - * - * property out_edges: - * def __get__(self): # <<<<<<<<<<<<<< - * cdef unsigned i - * for i in range(self.node.out_edges_.size()): - */ - static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphNode_9out_edges___get__(struct __pyx_obj_4cdec_5_cdec_HypergraphNode *__pyx_v_self) { struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__ *__pyx_cur_scope; PyObject *__pyx_r = NULL; @@ -12946,6 +14179,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphNode_9out_edges___get__(struc return (PyObject *) gen; } + /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; @@ -12981,7 +14215,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_14HypergraphNode_9out_edges_2generator13( __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":268 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":268 * def __get__(self): * cdef unsigned i * for i in range(self.node.out_edges_.size()): # <<<<<<<<<<<<<< @@ -12992,14 +14226,14 @@ static PyObject *__pyx_gb_4cdec_5_cdec_14HypergraphNode_9out_edges_2generator13( for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_cur_scope->__pyx_v_i = __pyx_t_2; - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":269 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":269 * cdef unsigned i * for i in range(self.node.out_edges_.size()): * yield HypergraphEdge().init(self.hg, self.node.out_edges_[i]) # <<<<<<<<<<<<<< * * property span: */ - __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_HypergraphEdge)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_HypergraphEdge)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = ((struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphEdge *)((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)__pyx_t_3)->__pyx_vtab)->init(((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)__pyx_t_3), __pyx_cur_scope->__pyx_v_self->hg, (__pyx_cur_scope->__pyx_v_self->node->out_edges_[__pyx_cur_scope->__pyx_v_i])); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); @@ -13018,6 +14252,16 @@ static PyObject *__pyx_gb_4cdec_5_cdec_14HypergraphNode_9out_edges_2generator13( __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":266 + * + * property out_edges: + * def __get__(self): # <<<<<<<<<<<<<< + * cdef unsigned i + * for i in range(self.node.out_edges_.size()): + */ + + /* function exit code */ PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; @@ -13032,6 +14276,14 @@ static PyObject *__pyx_gb_4cdec_5_cdec_14HypergraphNode_9out_edges_2generator13( return NULL; } +/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":272 + * + * property span: + * def __get__(self): # <<<<<<<<<<<<<< + * return next(self.in_edges).span + * + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphNode_4span_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphNode_4span_1__get__(PyObject *__pyx_v_self) { @@ -13039,18 +14291,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphNode_4span_1__get__(PyObject __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_14HypergraphNode_4span___get__(((struct __pyx_obj_4cdec_5_cdec_HypergraphNode *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":272 - * - * property span: - * def __get__(self): # <<<<<<<<<<<<<< - * return next(self.in_edges).span - * - */ - static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphNode_4span___get__(struct __pyx_obj_4cdec_5_cdec_HypergraphNode *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -13061,7 +14307,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphNode_4span___get__(struct __p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":273 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":273 * property span: * def __get__(self): * return next(self.in_edges).span # <<<<<<<<<<<<<< @@ -13069,20 +14315,27 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphNode_4span___get__(struct __p * property cat: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__in_edges); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_in_edges); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyIter_Next(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__span); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_span); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":272 + * + * property span: + * def __get__(self): # <<<<<<<<<<<<<< + * return next(self.in_edges).span + * + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); @@ -13094,6 +14347,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphNode_4span___get__(struct __p return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":276 + * + * property cat: + * def __get__(self): # <<<<<<<<<<<<<< + * if self.node.cat_: + * return str(TDConvert(-self.node.cat_).c_str()) + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphNode_3cat_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphNode_3cat_1__get__(PyObject *__pyx_v_self) { @@ -13101,18 +14362,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphNode_3cat_1__get__(PyObject * __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_14HypergraphNode_3cat___get__(((struct __pyx_obj_4cdec_5_cdec_HypergraphNode *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":276 - * - * property cat: - * def __get__(self): # <<<<<<<<<<<<<< - * if self.node.cat_: - * return str(TDConvert(-self.node.cat_).c_str()) - */ - static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphNode_3cat___get__(struct __pyx_obj_4cdec_5_cdec_HypergraphNode *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -13124,7 +14379,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphNode_3cat___get__(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":277 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":277 * property cat: * def __get__(self): * if self.node.cat_: # <<<<<<<<<<<<<< @@ -13134,7 +14389,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphNode_3cat___get__(struct __py __pyx_t_1 = (__pyx_v_self->node->cat_ != 0); if (__pyx_t_1) { - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":278 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":278 * def __get__(self): * if self.node.cat_: * return str(TDConvert(-self.node.cat_).c_str()) # <<<<<<<<<<<<<< @@ -13143,22 +14398,29 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphNode_3cat___get__(struct __py */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __Pyx_PyBytes_FromString(TD::Convert((-__pyx_v_self->node->cat_)).c_str()); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_2)); - __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - goto __pyx_L3; } - __pyx_L3:; + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":276 + * + * property cat: + * def __get__(self): # <<<<<<<<<<<<<< + * if self.node.cat_: + * return str(TDConvert(-self.node.cat_).c_str()) + */ + + /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; @@ -13172,6 +14434,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphNode_3cat___get__(struct __py return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":280 + * return str(TDConvert(-self.node.cat_).c_str()) + * + * def __richcmp__(HypergraphNode x, HypergraphNode y, int op): # <<<<<<<<<<<<<< + * if op == 2: # == + * return x.node == y.node + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphNode_1__richcmp__(PyObject *__pyx_v_x, PyObject *__pyx_v_y, int __pyx_v_op); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphNode_1__richcmp__(PyObject *__pyx_v_x, PyObject *__pyx_v_y, int __pyx_v_op) { @@ -13184,6 +14454,8 @@ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphNode_1__richcmp__(PyObject *_ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_4cdec_5_cdec_HypergraphNode, 1, "x", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_4cdec_5_cdec_HypergraphNode, 1, "y", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_4cdec_5_cdec_14HypergraphNode___richcmp__(((struct __pyx_obj_4cdec_5_cdec_HypergraphNode *)__pyx_v_x), ((struct __pyx_obj_4cdec_5_cdec_HypergraphNode *)__pyx_v_y), ((int)__pyx_v_op)); + + /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; @@ -13192,14 +14464,6 @@ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphNode_1__richcmp__(PyObject *_ return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":280 - * return str(TDConvert(-self.node.cat_).c_str()) - * - * def __richcmp__(HypergraphNode x, HypergraphNode y, int op): # <<<<<<<<<<<<<< - * if op == 2: # == - * return x.node == y.node - */ - static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphNode___richcmp__(struct __pyx_obj_4cdec_5_cdec_HypergraphNode *__pyx_v_x, struct __pyx_obj_4cdec_5_cdec_HypergraphNode *__pyx_v_y, int __pyx_v_op) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -13210,7 +14474,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphNode___richcmp__(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__richcmp__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":283 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":283 * if op == 2: # == * return x.node == y.node * elif op == 3: # != # <<<<<<<<<<<<<< @@ -13219,7 +14483,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphNode___richcmp__(struct __pyx */ switch (__pyx_v_op) { - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":281 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":281 * * def __richcmp__(HypergraphNode x, HypergraphNode y, int op): * if op == 2: # == # <<<<<<<<<<<<<< @@ -13228,7 +14492,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphNode___richcmp__(struct __pyx */ case 2: - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":282 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":282 * def __richcmp__(HypergraphNode x, HypergraphNode y, int op): * if op == 2: # == * return x.node == y.node # <<<<<<<<<<<<<< @@ -13243,7 +14507,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphNode___richcmp__(struct __pyx goto __pyx_L0; break; - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":283 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":283 * if op == 2: # == * return x.node == y.node * elif op == 3: # != # <<<<<<<<<<<<<< @@ -13252,7 +14516,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphNode___richcmp__(struct __pyx */ case 3: - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":284 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":284 * return x.node == y.node * elif op == 3: # != * return not (x == y) # <<<<<<<<<<<<<< @@ -13268,21 +14532,29 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphNode___richcmp__(struct __pyx __pyx_t_1 = 0; goto __pyx_L0; break; + default: break; } - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":285 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":285 * elif op == 3: # != * return not (x == y) * raise NotImplemented('comparison not implemented for HypergraphNode') # <<<<<<<<<<<<<< */ - __pyx_t_1 = PyObject_Call(__pyx_builtin_NotImplemented, ((PyObject *)__pyx_k_tuple_21), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_NotImplemented, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[3]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":280 + * return str(TDConvert(-self.node.cat_).c_str()) + * + * def __richcmp__(HypergraphNode x, HypergraphNode y, int op): # <<<<<<<<<<<<<< + * if op == 2: # == + * return x.node == y.node + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cdec._cdec.HypergraphNode.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -13293,6 +14565,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphNode___richcmp__(struct __pyx return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":6 + * cdef lattice.Lattice* lattice + * + * def __cinit__(self): # <<<<<<<<<<<<<< + * self.lattice = new lattice.Lattice() + * + */ + /* Python wrapper */ static int __pyx_pw_4cdec_5_cdec_7Lattice_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_4cdec_5_cdec_7Lattice_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { @@ -13303,24 +14583,18 @@ static int __pyx_pw_4cdec_5_cdec_7Lattice_1__cinit__(PyObject *__pyx_v_self, PyO __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; __pyx_r = __pyx_pf_4cdec_5_cdec_7Lattice___cinit__(((struct __pyx_obj_4cdec_5_cdec_Lattice *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi":6 - * cdef lattice.Lattice* lattice - * - * def __cinit__(self): # <<<<<<<<<<<<<< - * self.lattice = new lattice.Lattice() - * - */ - static int __pyx_pf_4cdec_5_cdec_7Lattice___cinit__(struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi":7 + /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":7 * * def __cinit__(self): * self.lattice = new lattice.Lattice() # <<<<<<<<<<<<<< @@ -13329,11 +14603,28 @@ static int __pyx_pf_4cdec_5_cdec_7Lattice___cinit__(struct __pyx_obj_4cdec_5_cde */ __pyx_v_self->lattice = new Lattice(); + /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":6 + * cdef lattice.Lattice* lattice + * + * def __cinit__(self): # <<<<<<<<<<<<<< + * self.lattice = new lattice.Lattice() + * + */ + + /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":9 + * self.lattice = new lattice.Lattice() + * + * def __init__(self, inp): # <<<<<<<<<<<<<< + * """Lattice(tuple) -> Lattice from node list. + * Lattice(string) -> Lattice from PLF representation.""" + */ + /* Python wrapper */ static int __pyx_pw_4cdec_5_cdec_7Lattice_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4cdec_5_cdec_7Lattice_2__init__[] = "Lattice(tuple) -> Lattice from node list.\n Lattice(string) -> Lattice from PLF representation."; @@ -13349,7 +14640,7 @@ static int __pyx_pw_4cdec_5_cdec_7Lattice_3__init__(PyObject *__pyx_v_self, PyOb __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__inp,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_inp,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; @@ -13362,7 +14653,7 @@ static int __pyx_pw_4cdec_5_cdec_7Lattice_3__init__(PyObject *__pyx_v_self, PyOb kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__inp)) != 0)) kw_args--; + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_inp)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { @@ -13384,18 +14675,12 @@ static int __pyx_pw_4cdec_5_cdec_7Lattice_3__init__(PyObject *__pyx_v_self, PyOb return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4cdec_5_cdec_7Lattice_2__init__(((struct __pyx_obj_4cdec_5_cdec_Lattice *)__pyx_v_self), __pyx_v_inp); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi":9 - * self.lattice = new lattice.Lattice() - * - * def __init__(self, inp): # <<<<<<<<<<<<<< - * """Lattice(tuple) -> Lattice from node list. - * Lattice(string) -> Lattice from PLF representation.""" - */ - static int __pyx_pf_4cdec_5_cdec_7Lattice_2__init__(struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self, PyObject *__pyx_v_inp) { PyObject *__pyx_v_i = NULL; PyObject *__pyx_v_arcs = NULL; @@ -13414,7 +14699,7 @@ static int __pyx_pf_4cdec_5_cdec_7Lattice_2__init__(struct __pyx_obj_4cdec_5_cde int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi":12 + /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":12 * """Lattice(tuple) -> Lattice from node list. * Lattice(string) -> Lattice from PLF representation.""" * if isinstance(inp, tuple): # <<<<<<<<<<<<<< @@ -13425,7 +14710,7 @@ static int __pyx_pf_4cdec_5_cdec_7Lattice_2__init__(struct __pyx_obj_4cdec_5_cde __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi":13 + /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":13 * Lattice(string) -> Lattice from PLF representation.""" * if isinstance(inp, tuple): * self.lattice.resize(len(inp)) # <<<<<<<<<<<<<< @@ -13435,7 +14720,7 @@ static int __pyx_pf_4cdec_5_cdec_7Lattice_2__init__(struct __pyx_obj_4cdec_5_cde __pyx_t_3 = PyObject_Length(__pyx_v_inp); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->lattice->resize(__pyx_t_3); - /* "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi":14 + /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":14 * if isinstance(inp, tuple): * self.lattice.resize(len(inp)) * for i, arcs in enumerate(inp): # <<<<<<<<<<<<<< @@ -13470,41 +14755,40 @@ static int __pyx_pf_4cdec_5_cdec_7Lattice_2__init__(struct __pyx_obj_4cdec_5_cde } else { __pyx_t_7 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_7)) { - if (PyErr_Occurred()) { - if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); + 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[4]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_7); } - __Pyx_XDECREF(__pyx_v_arcs); - __pyx_v_arcs = __pyx_t_7; + __Pyx_XDECREF_SET(__pyx_v_arcs, __pyx_t_7); __pyx_t_7 = 0; __Pyx_INCREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_v_i); - __pyx_v_i = __pyx_t_4; + __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_4); __pyx_t_7 = PyNumber_Add(__pyx_t_4, __pyx_int_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = __pyx_t_7; __pyx_t_7 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi":15 + /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":15 * self.lattice.resize(len(inp)) * for i, arcs in enumerate(inp): * self[i] = arcs # <<<<<<<<<<<<<< * elif isinstance(inp, basestring): * lattice.ConvertTextOrPLF(as_str(inp), self.lattice) */ - if (PyObject_SetItem(((PyObject *)__pyx_v_self), __pyx_v_i, __pyx_v_arcs) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_self), __pyx_v_i, __pyx_v_arcs) < 0)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L3; } - /* "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi":16 + /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":16 * for i, arcs in enumerate(inp): * self[i] = arcs * elif isinstance(inp, basestring): # <<<<<<<<<<<<<< @@ -13515,14 +14799,14 @@ static int __pyx_pf_4cdec_5_cdec_7Lattice_2__init__(struct __pyx_obj_4cdec_5_cde __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi":17 + /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":17 * self[i] = arcs * elif isinstance(inp, basestring): * lattice.ConvertTextOrPLF(as_str(inp), self.lattice) # <<<<<<<<<<<<<< * else: * raise TypeError('cannot create lattice from %s' % type(inp)) */ - __pyx_t_4 = ((PyObject *)__pyx_f_4cdec_5_cdec_as_str(__pyx_v_inp, NULL)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __pyx_f_4cdec_5_cdec_as_str(__pyx_v_inp, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = __pyx_convert_string_from_py_(__pyx_t_4); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -13531,29 +14815,38 @@ static int __pyx_pf_4cdec_5_cdec_7Lattice_2__init__(struct __pyx_obj_4cdec_5_cde } /*else*/ { - /* "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi":19 + /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":19 * lattice.ConvertTextOrPLF(as_str(inp), self.lattice) * else: * raise TypeError('cannot create lattice from %s' % type(inp)) # <<<<<<<<<<<<<< * * def __dealloc__(self): */ - __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_22), ((PyObject *)Py_TYPE(__pyx_v_inp))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_4)); + __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_cannot_create_lattice_from_s, ((PyObject *)Py_TYPE(__pyx_v_inp))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_4)); - __Pyx_GIVEREF(((PyObject *)__pyx_t_4)); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; {__pyx_filename = __pyx_f[4]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L3:; + /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":9 + * self.lattice = new lattice.Lattice() + * + * def __init__(self, inp): # <<<<<<<<<<<<<< + * """Lattice(tuple) -> Lattice from node list. + * Lattice(string) -> Lattice from PLF representation.""" + */ + + /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; @@ -13569,28 +14862,30 @@ static int __pyx_pf_4cdec_5_cdec_7Lattice_2__init__(struct __pyx_obj_4cdec_5_cde return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":21 + * raise TypeError('cannot create lattice from %s' % type(inp)) + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * del self.lattice + * + */ + /* Python wrapper */ static void __pyx_pw_4cdec_5_cdec_7Lattice_5__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_4cdec_5_cdec_7Lattice_5__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_4cdec_5_cdec_7Lattice_4__dealloc__(((struct __pyx_obj_4cdec_5_cdec_Lattice *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); } -/* "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi":21 - * raise TypeError('cannot create lattice from %s' % type(inp)) - * - * def __dealloc__(self): # <<<<<<<<<<<<<< - * del self.lattice - * - */ - -static void __pyx_pf_4cdec_5_cdec_7Lattice_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self) { +static void __pyx_pf_4cdec_5_cdec_7Lattice_4__dealloc__(struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi":22 + /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":22 * * def __dealloc__(self): * del self.lattice # <<<<<<<<<<<<<< @@ -13599,9 +14894,26 @@ static void __pyx_pf_4cdec_5_cdec_7Lattice_4__dealloc__(CYTHON_UNUSED struct __p */ delete __pyx_v_self->lattice; + /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":21 + * raise TypeError('cannot create lattice from %s' % type(inp)) + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * del self.lattice + * + */ + + /* function exit code */ __Pyx_RefNannyFinishContext(); } +/* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":24 + * del self.lattice + * + * def __getitem__(self, int index): # <<<<<<<<<<<<<< + * if not 0 <= index < len(self): + * raise IndexError('lattice index out of range') + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_7Lattice_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_index); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_7Lattice_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_index) { @@ -13613,7 +14925,7 @@ static PyObject *__pyx_pw_4cdec_5_cdec_7Lattice_7__getitem__(PyObject *__pyx_v_s __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0); assert(__pyx_arg_index); { - __pyx_v_index = __Pyx_PyInt_AsInt(__pyx_arg_index); if (unlikely((__pyx_v_index == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_index = __Pyx_PyInt_As_int(__pyx_arg_index); if (unlikely((__pyx_v_index == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -13622,18 +14934,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_7Lattice_7__getitem__(PyObject *__pyx_v_s return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4cdec_5_cdec_7Lattice_6__getitem__(((struct __pyx_obj_4cdec_5_cdec_Lattice *)__pyx_v_self), ((int)__pyx_v_index)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi":24 - * del self.lattice - * - * def __getitem__(self, int index): # <<<<<<<<<<<<<< - * if not 0 <= index < len(self): - * raise IndexError('lattice index out of range') - */ - static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_6__getitem__(struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self, int __pyx_v_index) { PyObject *__pyx_v_arcs = NULL; std::vector __pyx_v_arc_vector; @@ -13656,7 +14962,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_6__getitem__(struct __pyx_obj_4c int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getitem__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi":25 + /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":25 * * def __getitem__(self, int index): * if not 0 <= index < len(self): # <<<<<<<<<<<<<< @@ -13671,23 +14977,21 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_6__getitem__(struct __pyx_obj_4c __pyx_t_3 = ((!(__pyx_t_1 != 0)) != 0); if (__pyx_t_3) { - /* "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi":26 + /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":26 * def __getitem__(self, int index): * if not 0 <= index < len(self): * raise IndexError('lattice index out of range') # <<<<<<<<<<<<<< * arcs = [] * cdef vector[lattice.LatticeArc] arc_vector = self.lattice[0][index] */ - __pyx_t_4 = PyObject_Call(__pyx_builtin_IndexError, ((PyObject *)__pyx_k_tuple_24), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 26; __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[4]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - goto __pyx_L3; } - __pyx_L3:; - /* "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi":27 + /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":27 * if not 0 <= index < len(self): * raise IndexError('lattice index out of range') * arcs = [] # <<<<<<<<<<<<<< @@ -13699,7 +15003,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_6__getitem__(struct __pyx_obj_4c __pyx_v_arcs = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi":28 + /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":28 * raise IndexError('lattice index out of range') * arcs = [] * cdef vector[lattice.LatticeArc] arc_vector = self.lattice[0][index] # <<<<<<<<<<<<<< @@ -13708,7 +15012,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_6__getitem__(struct __pyx_obj_4c */ __pyx_v_arc_vector = ((__pyx_v_self->lattice[0])[__pyx_v_index]); - /* "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi":31 + /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":31 * cdef lattice.LatticeArc* arc * cdef unsigned i * for i in range(arc_vector.size()): # <<<<<<<<<<<<<< @@ -13719,7 +15023,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_6__getitem__(struct __pyx_obj_4c for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; - /* "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi":32 + /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":32 * cdef unsigned i * for i in range(arc_vector.size()): * arc = &arc_vector[i] # <<<<<<<<<<<<<< @@ -13728,7 +15032,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_6__getitem__(struct __pyx_obj_4c */ __pyx_v_arc = (&(__pyx_v_arc_vector[__pyx_v_i])); - /* "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi":33 + /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":33 * for i in range(arc_vector.size()): * arc = &arc_vector[i] * label = unicode(TDConvert(arc.label).c_str(), 'utf8') # <<<<<<<<<<<<<< @@ -13736,23 +15040,22 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_6__getitem__(struct __pyx_obj_4c * return tuple(arcs) */ __pyx_t_4 = __Pyx_PyBytes_FromString(TD::Convert(__pyx_v_arc->label).c_str()); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_4)); + __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); - PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_t_4)); - __Pyx_GIVEREF(((PyObject *)__pyx_t_4)); - __Pyx_INCREF(((PyObject *)__pyx_n_s__utf8)); - PyTuple_SET_ITEM(__pyx_t_7, 1, ((PyObject *)__pyx_n_s__utf8)); - __Pyx_GIVEREF(((PyObject *)__pyx_n_s__utf8)); + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + __Pyx_INCREF(__pyx_n_s_utf8); + PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_n_s_utf8); + __Pyx_GIVEREF(__pyx_n_s_utf8); __pyx_t_4 = 0; - __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; - __Pyx_XDECREF(((PyObject *)__pyx_v_label)); - __pyx_v_label = ((PyObject*)__pyx_t_4); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF_SET(__pyx_v_label, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi":34 + /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":34 * arc = &arc_vector[i] * label = unicode(TDConvert(arc.label).c_str(), 'utf8') * arcs.append((label, arc.cost, arc.dist2next)) # <<<<<<<<<<<<<< @@ -13761,24 +15064,24 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_6__getitem__(struct __pyx_obj_4c */ __pyx_t_4 = PyFloat_FromDouble(__pyx_v_arc->cost); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = PyInt_FromLong(__pyx_v_arc->dist2next); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_arc->dist2next); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); - __Pyx_INCREF(((PyObject *)__pyx_v_label)); - PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_v_label)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_label)); + __Pyx_INCREF(__pyx_v_label); + PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_label); + __Pyx_GIVEREF(__pyx_v_label); PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_4 = 0; __pyx_t_7 = 0; - __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_arcs, ((PyObject *)__pyx_t_8)); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_arcs, __pyx_t_8); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } - /* "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi":35 + /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":35 * label = unicode(TDConvert(arc.label).c_str(), 'utf8') * arcs.append((label, arc.cost, arc.dist2next)) * return tuple(arcs) # <<<<<<<<<<<<<< @@ -13786,14 +15089,21 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_6__getitem__(struct __pyx_obj_4c * def __setitem__(self, int index, tuple arcs): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_8 = ((PyObject *)PyList_AsTuple(__pyx_v_arcs)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_8)); - __pyx_r = ((PyObject *)__pyx_t_8); + __pyx_t_8 = PyList_AsTuple(__pyx_v_arcs); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __pyx_r = __pyx_t_8; __pyx_t_8 = 0; goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":24 + * del self.lattice + * + * def __getitem__(self, int index): # <<<<<<<<<<<<<< + * if not 0 <= index < len(self): + * raise IndexError('lattice index out of range') + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_7); @@ -13808,6 +15118,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_6__getitem__(struct __pyx_obj_4c return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":37 + * return tuple(arcs) + * + * def __setitem__(self, int index, tuple arcs): # <<<<<<<<<<<<<< + * if not 0 <= index < len(self): + * raise IndexError('lattice index out of range') + */ + /* Python wrapper */ static int __pyx_pw_4cdec_5_cdec_7Lattice_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_index, PyObject *__pyx_v_arcs); /*proto*/ static int __pyx_pw_4cdec_5_cdec_7Lattice_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_index, PyObject *__pyx_v_arcs) { @@ -13819,7 +15137,7 @@ static int __pyx_pw_4cdec_5_cdec_7Lattice_9__setitem__(PyObject *__pyx_v_self, P __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0); assert(__pyx_arg_index); { - __pyx_v_index = __Pyx_PyInt_AsInt(__pyx_arg_index); if (unlikely((__pyx_v_index == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_index = __Pyx_PyInt_As_int(__pyx_arg_index); if (unlikely((__pyx_v_index == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -13829,6 +15147,8 @@ static int __pyx_pw_4cdec_5_cdec_7Lattice_9__setitem__(PyObject *__pyx_v_self, P __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arcs), (&PyTuple_Type), 1, "arcs", 1))) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_4cdec_5_cdec_7Lattice_8__setitem__(((struct __pyx_obj_4cdec_5_cdec_Lattice *)__pyx_v_self), ((int)__pyx_v_index), ((PyObject*)__pyx_v_arcs)); + + /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = -1; @@ -13837,14 +15157,6 @@ static int __pyx_pw_4cdec_5_cdec_7Lattice_9__setitem__(PyObject *__pyx_v_self, P return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi":37 - * return tuple(arcs) - * - * def __setitem__(self, int index, tuple arcs): # <<<<<<<<<<<<<< - * if not 0 <= index < len(self): - * raise IndexError('lattice index out of range') - */ - static int __pyx_pf_4cdec_5_cdec_7Lattice_8__setitem__(struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self, int __pyx_v_index, PyObject *__pyx_v_arcs) { LatticeArc *__pyx_v_arc; PyObject *__pyx_v_label = NULL; @@ -13871,7 +15183,7 @@ static int __pyx_pf_4cdec_5_cdec_7Lattice_8__setitem__(struct __pyx_obj_4cdec_5_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setitem__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi":38 + /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":38 * * def __setitem__(self, int index, tuple arcs): * if not 0 <= index < len(self): # <<<<<<<<<<<<<< @@ -13886,34 +15198,32 @@ static int __pyx_pf_4cdec_5_cdec_7Lattice_8__setitem__(struct __pyx_obj_4cdec_5_ __pyx_t_3 = ((!(__pyx_t_1 != 0)) != 0); if (__pyx_t_3) { - /* "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi":39 + /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":39 * def __setitem__(self, int index, tuple arcs): * if not 0 <= index < len(self): * raise IndexError('lattice index out of range') # <<<<<<<<<<<<<< * cdef lattice.LatticeArc* arc * for (label, cost, dist2next) in arcs: */ - __pyx_t_4 = PyObject_Call(__pyx_builtin_IndexError, ((PyObject *)__pyx_k_tuple_25), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 39; __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[4]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - goto __pyx_L3; } - __pyx_L3:; - /* "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi":41 + /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":41 * raise IndexError('lattice index out of range') * cdef lattice.LatticeArc* arc * for (label, cost, dist2next) in arcs: # <<<<<<<<<<<<<< * label_str = as_str(label) * arc = new lattice.LatticeArc(TDConvert(label_str), cost, dist2next) */ - if (unlikely(((PyObject *)__pyx_v_arcs) == Py_None)) { + if (unlikely(__pyx_v_arcs == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[4]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_4 = ((PyObject *)__pyx_v_arcs); __Pyx_INCREF(__pyx_t_4); __pyx_t_2 = 0; + __pyx_t_4 = __pyx_v_arcs; __Pyx_INCREF(__pyx_t_4); __pyx_t_2 = 0; for (;;) { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_4)) break; #if CYTHON_COMPILING_IN_CPYTHON @@ -13955,8 +15265,7 @@ static int __pyx_pf_4cdec_5_cdec_7Lattice_8__setitem__(struct __pyx_obj_4cdec_5_ __Pyx_GOTREF(__pyx_t_8); #endif __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } else - { + } else { Py_ssize_t index = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); @@ -13979,42 +15288,38 @@ static int __pyx_pf_4cdec_5_cdec_7Lattice_8__setitem__(struct __pyx_obj_4cdec_5_ {__pyx_filename = __pyx_f[4]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L7_unpacking_done:; } - __Pyx_XDECREF(__pyx_v_label); - __pyx_v_label = __pyx_t_6; + __Pyx_XDECREF_SET(__pyx_v_label, __pyx_t_6); __pyx_t_6 = 0; - __Pyx_XDECREF(__pyx_v_cost); - __pyx_v_cost = __pyx_t_7; + __Pyx_XDECREF_SET(__pyx_v_cost, __pyx_t_7); __pyx_t_7 = 0; - __Pyx_XDECREF(__pyx_v_dist2next); - __pyx_v_dist2next = __pyx_t_8; + __Pyx_XDECREF_SET(__pyx_v_dist2next, __pyx_t_8); __pyx_t_8 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi":42 + /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":42 * cdef lattice.LatticeArc* arc * for (label, cost, dist2next) in arcs: * label_str = as_str(label) # <<<<<<<<<<<<<< * arc = new lattice.LatticeArc(TDConvert(label_str), cost, dist2next) * self.lattice[0][index].push_back(arc[0]) */ - __pyx_t_5 = ((PyObject *)__pyx_f_4cdec_5_cdec_as_str(__pyx_v_label, NULL)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __pyx_f_4cdec_5_cdec_as_str(__pyx_v_label, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_XDECREF(((PyObject *)__pyx_v_label_str)); - __pyx_v_label_str = ((PyObject*)__pyx_t_5); + __Pyx_XDECREF_SET(__pyx_v_label_str, ((PyObject*)__pyx_t_5)); __pyx_t_5 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi":43 + /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":43 * for (label, cost, dist2next) in arcs: * label_str = as_str(label) * arc = new lattice.LatticeArc(TDConvert(label_str), cost, dist2next) # <<<<<<<<<<<<<< * self.lattice[0][index].push_back(arc[0]) * del arc */ - __pyx_t_11 = __Pyx_PyObject_AsString(((PyObject *)__pyx_v_label_str)); if (unlikely((!__pyx_t_11) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = __Pyx_PyObject_AsString(__pyx_v_label_str); if (unlikely((!__pyx_t_11) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = __pyx_PyFloat_AsDouble(__pyx_v_cost); if (unlikely((__pyx_t_12 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_13 = __Pyx_PyInt_AsInt(__pyx_v_dist2next); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_v_dist2next); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_arc = new LatticeArc(TD::Convert(__pyx_t_11), __pyx_t_12, __pyx_t_13); - /* "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi":44 + /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":44 * label_str = as_str(label) * arc = new lattice.LatticeArc(TDConvert(label_str), cost, dist2next) * self.lattice[0][index].push_back(arc[0]) # <<<<<<<<<<<<<< @@ -14023,7 +15328,7 @@ static int __pyx_pf_4cdec_5_cdec_7Lattice_8__setitem__(struct __pyx_obj_4cdec_5_ */ ((__pyx_v_self->lattice[0])[__pyx_v_index]).push_back((__pyx_v_arc[0])); - /* "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi":45 + /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":45 * arc = new lattice.LatticeArc(TDConvert(label_str), cost, dist2next) * self.lattice[0][index].push_back(arc[0]) * del arc # <<<<<<<<<<<<<< @@ -14034,6 +15339,15 @@ static int __pyx_pf_4cdec_5_cdec_7Lattice_8__setitem__(struct __pyx_obj_4cdec_5_ } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":37 + * return tuple(arcs) + * + * def __setitem__(self, int index, tuple arcs): # <<<<<<<<<<<<<< + * if not 0 <= index < len(self): + * raise IndexError('lattice index out of range') + */ + + /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; @@ -14054,6 +15368,14 @@ static int __pyx_pf_4cdec_5_cdec_7Lattice_8__setitem__(struct __pyx_obj_4cdec_5_ return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":47 + * del arc + * + * def __len__(self): # <<<<<<<<<<<<<< + * return self.lattice.size() + * + */ + /* Python wrapper */ static Py_ssize_t __pyx_pw_4cdec_5_cdec_7Lattice_11__len__(PyObject *__pyx_v_self); /*proto*/ static Py_ssize_t __pyx_pw_4cdec_5_cdec_7Lattice_11__len__(PyObject *__pyx_v_self) { @@ -14061,24 +15383,18 @@ static Py_ssize_t __pyx_pw_4cdec_5_cdec_7Lattice_11__len__(PyObject *__pyx_v_sel __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_7Lattice_10__len__(((struct __pyx_obj_4cdec_5_cdec_Lattice *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi":47 - * del arc - * - * def __len__(self): # <<<<<<<<<<<<<< - * return self.lattice.size() - * - */ - static Py_ssize_t __pyx_pf_4cdec_5_cdec_7Lattice_10__len__(struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi":48 + /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":48 * * def __len__(self): * return self.lattice.size() # <<<<<<<<<<<<<< @@ -14088,24 +15404,21 @@ static Py_ssize_t __pyx_pf_4cdec_5_cdec_7Lattice_10__len__(struct __pyx_obj_4cde __pyx_r = __pyx_v_self->lattice->size(); goto __pyx_L0; - __pyx_r = 0; - __pyx_L0:; - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* Python wrapper */ -static PyObject *__pyx_pw_4cdec_5_cdec_7Lattice_13__str__(PyObject *__pyx_v_self); /*proto*/ -static PyObject *__pyx_pw_4cdec_5_cdec_7Lattice_13__str__(PyObject *__pyx_v_self) { - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__str__ (wrapper)", 0); - __pyx_r = __pyx_pf_4cdec_5_cdec_7Lattice_12__str__(((struct __pyx_obj_4cdec_5_cdec_Lattice *)__pyx_v_self)); + /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":47 + * del arc + * + * def __len__(self): # <<<<<<<<<<<<<< + * return self.lattice.size() + * + */ + + /* function exit code */ + __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi":50 +/* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":50 * return self.lattice.size() * * def __str__(self): # <<<<<<<<<<<<<< @@ -14113,6 +15426,19 @@ static PyObject *__pyx_pw_4cdec_5_cdec_7Lattice_13__str__(PyObject *__pyx_v_self * */ +/* Python wrapper */ +static PyObject *__pyx_pw_4cdec_5_cdec_7Lattice_13__str__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cdec_5_cdec_7Lattice_13__str__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__str__ (wrapper)", 0); + __pyx_r = __pyx_pf_4cdec_5_cdec_7Lattice_12__str__(((struct __pyx_obj_4cdec_5_cdec_Lattice *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_12__str__(struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -14123,7 +15449,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_12__str__(struct __pyx_obj_4cdec int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__str__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi":51 + /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":51 * * def __str__(self): * return str(hypergraph.AsPLF(self.lattice[0], True).c_str()) # <<<<<<<<<<<<<< @@ -14132,21 +15458,28 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_12__str__(struct __pyx_obj_4cdec */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBytes_FromString(HypergraphIO::AsPLF((__pyx_v_self->lattice[0]), 1).c_str()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_1)); - __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":50 + * return self.lattice.size() + * + * def __str__(self): # <<<<<<<<<<<<<< + * return str(hypergraph.AsPLF(self.lattice[0], True).c_str()) + * + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); @@ -14158,6 +15491,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_12__str__(struct __pyx_obj_4cdec return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":53 + * return str(hypergraph.AsPLF(self.lattice[0], True).c_str()) + * + * def __unicode__(self): # <<<<<<<<<<<<<< + * return unicode(str(self), 'utf8') + * + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_7Lattice_15__unicode__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_7Lattice_15__unicode__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { @@ -14165,18 +15506,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_7Lattice_15__unicode__(PyObject *__pyx_v_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__unicode__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_7Lattice_14__unicode__(((struct __pyx_obj_4cdec_5_cdec_Lattice *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi":53 - * return str(hypergraph.AsPLF(self.lattice[0], True).c_str()) - * - * def __unicode__(self): # <<<<<<<<<<<<<< - * return unicode(str(self), 'utf8') - * - */ - static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_14__unicode__(struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -14187,7 +15522,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_14__unicode__(struct __pyx_obj_4 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__unicode__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi":54 + /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":54 * * def __unicode__(self): * return unicode(str(self), 'utf8') # <<<<<<<<<<<<<< @@ -14200,26 +15535,33 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_14__unicode__(struct __pyx_obj_4 __Pyx_INCREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); - __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); - __Pyx_INCREF(((PyObject *)__pyx_n_s__utf8)); - PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_n_s__utf8)); - __Pyx_GIVEREF(((PyObject *)__pyx_n_s__utf8)); + __Pyx_INCREF(__pyx_n_s_utf8); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_utf8); + __Pyx_GIVEREF(__pyx_n_s_utf8); __pyx_t_2 = 0; - __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":53 + * return str(hypergraph.AsPLF(self.lattice[0], True).c_str()) + * + * def __unicode__(self): # <<<<<<<<<<<<<< + * return unicode(str(self), 'utf8') + * + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); @@ -14232,6 +15574,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_14__unicode__(struct __pyx_obj_4 } static PyObject *__pyx_gb_4cdec_5_cdec_7Lattice_18generator14(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ +/* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":56 + * return unicode(str(self), 'utf8') + * + * def __iter__(self): # <<<<<<<<<<<<<< + * cdef unsigned i + * for i in range(len(self)): + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_7Lattice_17__iter__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_7Lattice_17__iter__(PyObject *__pyx_v_self) { @@ -14239,18 +15589,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_7Lattice_17__iter__(PyObject *__pyx_v_sel __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_7Lattice_16__iter__(((struct __pyx_obj_4cdec_5_cdec_Lattice *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi":56 - * return unicode(str(self), 'utf8') - * - * def __iter__(self): # <<<<<<<<<<<<<< - * cdef unsigned i - * for i in range(len(self)): - */ - static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_16__iter__(struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self) { struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__ *__pyx_cur_scope; PyObject *__pyx_r = NULL; @@ -14275,6 +15619,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_16__iter__(struct __pyx_obj_4cde return (PyObject *) gen; } + /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; @@ -14309,7 +15654,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7Lattice_18generator14(__pyx_GeneratorObj __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi":58 + /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":58 * def __iter__(self): * cdef unsigned i * for i in range(len(self)): # <<<<<<<<<<<<<< @@ -14320,14 +15665,14 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7Lattice_18generator14(__pyx_GeneratorObj for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_cur_scope->__pyx_v_i = __pyx_t_2; - /* "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi":59 + /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":59 * cdef unsigned i * for i in range(len(self)): * yield self[i] # <<<<<<<<<<<<<< * * def todot(self): */ - __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_cur_scope->__pyx_v_i, sizeof(unsigned int)+1, PyLong_FromUnsignedLong, 0, 0, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_cur_scope->__pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; @@ -14343,6 +15688,16 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7Lattice_18generator14(__pyx_GeneratorObj __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + + /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":56 + * return unicode(str(self), 'utf8') + * + * def __iter__(self): # <<<<<<<<<<<<<< + * cdef unsigned i + * for i in range(len(self)): + */ + + /* function exit code */ PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; @@ -14356,6 +15711,14 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7Lattice_18generator14(__pyx_GeneratorObj return NULL; } +/* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":61 + * yield self[i] + * + * def todot(self): # <<<<<<<<<<<<<< + * """lattice.todot() -> Representation of the lattice in GraphViz dot format.""" + * def lines(): + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_7Lattice_20todot(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_4cdec_5_cdec_7Lattice_19todot[] = "lattice.todot() -> Representation of the lattice in GraphViz dot format."; @@ -14364,11 +15727,21 @@ static PyObject *__pyx_pw_4cdec_5_cdec_7Lattice_20todot(PyObject *__pyx_v_self, __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("todot (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_7Lattice_19todot(((struct __pyx_obj_4cdec_5_cdec_Lattice *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_4cdec_5_cdec_7Lattice_5todot_2generator20(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ +/* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":63 + * def todot(self): + * """lattice.todot() -> Representation of the lattice in GraphViz dot format.""" + * def lines(): # <<<<<<<<<<<<<< + * yield 'digraph lattice {' + * yield 'rankdir = LR;' + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_7Lattice_5todot_1lines(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyMethodDef __pyx_mdef_4cdec_5_cdec_7Lattice_5todot_1lines = {__Pyx_NAMESTR("lines"), (PyCFunction)__pyx_pw_4cdec_5_cdec_7Lattice_5todot_1lines, METH_NOARGS, __Pyx_DOCSTR(0)}; @@ -14377,18 +15750,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_7Lattice_5todot_1lines(PyObject *__pyx_se __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("lines (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_7Lattice_5todot_lines(__pyx_self); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi":63 - * def todot(self): - * """lattice.todot() -> Representation of the lattice in GraphViz dot format.""" - * def lines(): # <<<<<<<<<<<<<< - * yield 'digraph lattice {' - * yield 'rankdir = LR;' - */ - static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_5todot_lines(PyObject *__pyx_self) { struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines *__pyx_cur_scope; PyObject *__pyx_r = NULL; @@ -14413,6 +15780,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_5todot_lines(PyObject *__pyx_sel return (PyObject *) gen; } + /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; @@ -14461,15 +15829,15 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7Lattice_5todot_2generator20(__pyx_Genera __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi":64 + /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":64 * """lattice.todot() -> Representation of the lattice in GraphViz dot format.""" * def lines(): * yield 'digraph lattice {' # <<<<<<<<<<<<<< * yield 'rankdir = LR;' * yield 'node [shape=circle];' */ - __Pyx_INCREF(((PyObject *)__pyx_kp_s_26)); - __pyx_r = ((PyObject *)__pyx_kp_s_26); + __Pyx_INCREF(__pyx_kp_s_digraph_lattice); + __pyx_r = __pyx_kp_s_digraph_lattice; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); /* return from generator, yielding value */ @@ -14478,15 +15846,15 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7Lattice_5todot_2generator20(__pyx_Genera __pyx_L4_resume_from_yield:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi":65 + /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":65 * def lines(): * yield 'digraph lattice {' * yield 'rankdir = LR;' # <<<<<<<<<<<<<< * yield 'node [shape=circle];' * for i in range(len(self)): */ - __Pyx_INCREF(((PyObject *)__pyx_kp_s_27)); - __pyx_r = ((PyObject *)__pyx_kp_s_27); + __Pyx_INCREF(__pyx_kp_s_rankdir_LR); + __pyx_r = __pyx_kp_s_rankdir_LR; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); /* return from generator, yielding value */ @@ -14495,15 +15863,15 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7Lattice_5todot_2generator20(__pyx_Genera __pyx_L5_resume_from_yield:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi":66 + /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":66 * yield 'digraph lattice {' * yield 'rankdir = LR;' * yield 'node [shape=circle];' # <<<<<<<<<<<<<< * for i in range(len(self)): * for label, weight, delta in self[i]: */ - __Pyx_INCREF(((PyObject *)__pyx_kp_s_28)); - __pyx_r = ((PyObject *)__pyx_kp_s_28); + __Pyx_INCREF(__pyx_kp_s_node_shape_circle); + __pyx_r = __pyx_kp_s_node_shape_circle; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); /* return from generator, yielding value */ @@ -14512,7 +15880,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7Lattice_5todot_2generator20(__pyx_Genera __pyx_L6_resume_from_yield:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi":67 + /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":67 * yield 'rankdir = LR;' * yield 'node [shape=circle];' * for i in range(len(self)): # <<<<<<<<<<<<<< @@ -14531,9 +15899,9 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7Lattice_5todot_2generator20(__pyx_Genera PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_Call(__pyx_builtin_range, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyList_CheckExact(__pyx_t_1) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = 0; __pyx_t_4 = NULL; @@ -14561,8 +15929,9 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7Lattice_5todot_2generator20(__pyx_Genera } else { __pyx_t_1 = __pyx_t_4(__pyx_t_3); if (unlikely(!__pyx_t_1)) { - if (PyErr_Occurred()) { - if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); + 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[4]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; @@ -14570,19 +15939,19 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7Lattice_5todot_2generator20(__pyx_Genera __Pyx_GOTREF(__pyx_t_1); } __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_i); - __Pyx_XDECREF(__pyx_cur_scope->__pyx_v_i); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_i, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); - __pyx_cur_scope->__pyx_v_i = __pyx_t_1; __pyx_t_1 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi":68 + /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":68 * yield 'node [shape=circle];' * for i in range(len(self)): * for label, weight, delta in self[i]: # <<<<<<<<<<<<<< * yield '%d -> %d [label="%s"];' % (i, i+delta, label.replace('"', '\\"')) * yield '%d [shape=doublecircle]' % len(self) */ - __pyx_t_1 = PyObject_GetItem(((PyObject *)__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self), __pyx_cur_scope->__pyx_v_i); if (!__pyx_t_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[4]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + __pyx_t_1 = PyObject_GetItem(((PyObject *)__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self), __pyx_cur_scope->__pyx_v_i); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); if (PyList_CheckExact(__pyx_t_1) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_5 = __pyx_t_1; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0; @@ -14611,8 +15980,9 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7Lattice_5todot_2generator20(__pyx_Genera } else { __pyx_t_1 = __pyx_t_7(__pyx_t_5); if (unlikely(!__pyx_t_1)) { - if (PyErr_Occurred()) { - if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); + 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[4]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; @@ -14653,8 +16023,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7Lattice_5todot_2generator20(__pyx_Genera __Pyx_GOTREF(__pyx_t_10); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - } else - { + } else { Py_ssize_t index = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); @@ -14678,22 +16047,19 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7Lattice_5todot_2generator20(__pyx_Genera __pyx_L12_unpacking_done:; } __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_label); - __Pyx_XDECREF(__pyx_cur_scope->__pyx_v_label); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_label, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); - __pyx_cur_scope->__pyx_v_label = __pyx_t_8; __pyx_t_8 = 0; __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_weight); - __Pyx_XDECREF(__pyx_cur_scope->__pyx_v_weight); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_weight, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); - __pyx_cur_scope->__pyx_v_weight = __pyx_t_9; __pyx_t_9 = 0; __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_delta); - __Pyx_XDECREF(__pyx_cur_scope->__pyx_v_delta); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_delta, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); - __pyx_cur_scope->__pyx_v_delta = __pyx_t_10; __pyx_t_10 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi":69 + /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":69 * for i in range(len(self)): * for label, weight, delta in self[i]: * yield '%d -> %d [label="%s"];' % (i, i+delta, label.replace('"', '\\"')) # <<<<<<<<<<<<<< @@ -14702,9 +16068,9 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7Lattice_5todot_2generator20(__pyx_Genera */ __pyx_t_1 = PyNumber_Add(__pyx_cur_scope->__pyx_v_i, __pyx_cur_scope->__pyx_v_delta); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_label, __pyx_n_s__replace); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_label, __pyx_n_s_replace); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); - __pyx_t_9 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_k_tuple_32), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -14718,10 +16084,10 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7Lattice_5todot_2generator20(__pyx_Genera __Pyx_GIVEREF(__pyx_t_9); __pyx_t_1 = 0; __pyx_t_9 = 0; - __pyx_t_9 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_29), ((PyObject *)__pyx_t_10)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_9)); - __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0; - __pyx_r = ((PyObject *)__pyx_t_9); + __pyx_t_9 = __Pyx_PyString_Format(__pyx_kp_s_d_d_label_s, __pyx_t_10); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_r = __pyx_t_9; __pyx_t_9 = 0; __pyx_cur_scope->__pyx_t_0 = __pyx_t_2; __Pyx_XGIVEREF(__pyx_t_3); @@ -14753,23 +16119,24 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7Lattice_5todot_2generator20(__pyx_Genera } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi":70 + /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":70 * for label, weight, delta in self[i]: * yield '%d -> %d [label="%s"];' % (i, i+delta, label.replace('"', '\\"')) * yield '%d [shape=doublecircle]' % len(self) # <<<<<<<<<<<<<< * yield '}' * return '\n'.join(lines()).encode('utf8') */ + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[4]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = ((PyObject *)__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_33), __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_5)); + __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_d_shape_doublecircle, __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_r = ((PyObject *)__pyx_t_5); + __pyx_r = __pyx_t_5; __pyx_t_5 = 0; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); @@ -14779,15 +16146,15 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7Lattice_5todot_2generator20(__pyx_Genera __pyx_L14_resume_from_yield:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi":71 + /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":71 * yield '%d -> %d [label="%s"];' % (i, i+delta, label.replace('"', '\\"')) * yield '%d [shape=doublecircle]' % len(self) * yield '}' # <<<<<<<<<<<<<< * return '\n'.join(lines()).encode('utf8') * */ - __Pyx_INCREF(((PyObject *)__pyx_kp_s_34)); - __pyx_r = ((PyObject *)__pyx_kp_s_34); + __Pyx_INCREF(__pyx_kp_s__13); + __pyx_r = __pyx_kp_s__13; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); /* return from generator, yielding value */ @@ -14795,6 +16162,16 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7Lattice_5todot_2generator20(__pyx_Genera return __pyx_r; __pyx_L15_resume_from_yield:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":63 + * def todot(self): + * """lattice.todot() -> Representation of the lattice in GraphViz dot format.""" + * def lines(): # <<<<<<<<<<<<<< + * yield 'digraph lattice {' + * yield 'rankdir = LR;' + */ + + /* function exit code */ PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; @@ -14814,7 +16191,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7Lattice_5todot_2generator20(__pyx_Genera return NULL; } -/* "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi":61 +/* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":61 * yield self[i] * * def todot(self): # <<<<<<<<<<<<<< @@ -14829,7 +16206,6 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_19todot(struct __pyx_obj_4cdec_5 __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; @@ -14844,19 +16220,19 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_19todot(struct __pyx_obj_4cdec_5 __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); - /* "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi":63 + /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":63 * def todot(self): * """lattice.todot() -> Representation of the lattice in GraphViz dot format.""" * def lines(): # <<<<<<<<<<<<<< * yield 'digraph lattice {' * yield 'rankdir = LR;' */ - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cdec_5_cdec_7Lattice_5todot_1lines, 0, __pyx_n_s_38, ((PyObject*)__pyx_cur_scope), __pyx_n_s_39, ((PyObject *)__pyx_k_codeobj_36)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cdec_5_cdec_7Lattice_5todot_1lines, 0, __pyx_n_s_todot_locals_lines, ((PyObject*)__pyx_cur_scope), __pyx_n_s_cdec__cdec, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__15)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_lines = __pyx_t_1; __pyx_t_1 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi":72 + /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":72 * yield '%d [shape=doublecircle]' % len(self) * yield '}' * return '\n'.join(lines()).encode('utf8') # <<<<<<<<<<<<<< @@ -14864,35 +16240,33 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_19todot(struct __pyx_obj_4cdec_5 * def as_hypergraph(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_kp_s_40), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_pf_4cdec_5_cdec_7Lattice_5todot_lines(__pyx_v_lines); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __pyx_pf_4cdec_5_cdec_7Lattice_5todot_lines(__pyx_v_lines); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); - __Pyx_GIVEREF(__pyx_t_2); - __pyx_t_2 = 0; - __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyString_Join(__pyx_kp_s__16, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__encode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_encode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_41), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 72; __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_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":61 + * yield self[i] + * + * def todot(self): # <<<<<<<<<<<<<< + * """lattice.todot() -> Representation of the lattice in GraphViz dot format.""" + * def lines(): + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("cdec._cdec.Lattice.todot", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -14903,6 +16277,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_19todot(struct __pyx_obj_4cdec_5 return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":74 + * return '\n'.join(lines()).encode('utf8') + * + * def as_hypergraph(self): # <<<<<<<<<<<<<< + * """lattice.as_hypergraph() -> Hypergraph representation of the lattice.""" + * cdef Hypergraph result = Hypergraph.__new__(Hypergraph) + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_7Lattice_22as_hypergraph(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_4cdec_5_cdec_7Lattice_21as_hypergraph[] = "lattice.as_hypergraph() -> Hypergraph representation of the lattice."; @@ -14911,18 +16293,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_7Lattice_22as_hypergraph(PyObject *__pyx_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("as_hypergraph (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_7Lattice_21as_hypergraph(((struct __pyx_obj_4cdec_5_cdec_Lattice *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi":74 - * return '\n'.join(lines()).encode('utf8') - * - * def as_hypergraph(self): # <<<<<<<<<<<<<< - * """lattice.as_hypergraph() -> Hypergraph representation of the lattice.""" - * cdef Hypergraph result = Hypergraph.__new__(Hypergraph) - */ - static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_21as_hypergraph(struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self) { struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_result = 0; PyObject *__pyx_v_plf = 0; @@ -14936,20 +16312,20 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_21as_hypergraph(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("as_hypergraph", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi":76 + /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":76 * def as_hypergraph(self): * """lattice.as_hypergraph() -> Hypergraph representation of the lattice.""" * cdef Hypergraph result = Hypergraph.__new__(Hypergraph) # <<<<<<<<<<<<<< * result.hg = new hypergraph.Hypergraph() * cdef bytes plf = str(self) */ - __pyx_t_1 = __pyx_tp_new_4cdec_5_cdec_Hypergraph(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_Hypergraph)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_tp_new_4cdec_5_cdec_Hypergraph(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_Hypergraph)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4cdec_5_cdec_Hypergraph)))) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_result = ((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_t_1); __pyx_t_1 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi":77 + /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":77 * """lattice.as_hypergraph() -> Hypergraph representation of the lattice.""" * cdef Hypergraph result = Hypergraph.__new__(Hypergraph) * result.hg = new hypergraph.Hypergraph() # <<<<<<<<<<<<<< @@ -14958,7 +16334,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_21as_hypergraph(struct __pyx_obj */ __pyx_v_result->hg = new Hypergraph(); - /* "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi":78 + /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":78 * cdef Hypergraph result = Hypergraph.__new__(Hypergraph) * result.hg = new hypergraph.Hypergraph() * cdef bytes plf = str(self) # <<<<<<<<<<<<<< @@ -14970,23 +16346,23 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_21as_hypergraph(struct __pyx_obj __Pyx_INCREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); - __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_plf = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi":79 + /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":79 * result.hg = new hypergraph.Hypergraph() * cdef bytes plf = str(self) * hypergraph.ReadFromPLF(plf, result.hg) # <<<<<<<<<<<<<< * return result */ - __pyx_t_3 = __pyx_convert_string_from_py_(((PyObject *)__pyx_v_plf)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __pyx_convert_string_from_py_(__pyx_v_plf); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} HypergraphIO::ReadFromPLF(__pyx_t_3, __pyx_v_result->hg); - /* "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi":80 + /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":80 * cdef bytes plf = str(self) * hypergraph.ReadFromPLF(plf, result.hg) * return result # <<<<<<<<<<<<<< @@ -14996,8 +16372,15 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_21as_hypergraph(struct __pyx_obj __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":74 + * return '\n'.join(lines()).encode('utf8') + * + * def as_hypergraph(self): # <<<<<<<<<<<<<< + * """lattice.as_hypergraph() -> Hypergraph representation of the lattice.""" + * cdef Hypergraph result = Hypergraph.__new__(Hypergraph) + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); @@ -15011,7 +16394,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_21as_hypergraph(struct __pyx_obj return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":3 +/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":3 * cimport mteval * * cdef SufficientStats as_stats(x, y): # <<<<<<<<<<<<<< @@ -15033,7 +16416,7 @@ static struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_f_4cdec_5_cdec_as_st int __pyx_clineno = 0; __Pyx_RefNannySetupContext("as_stats", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":4 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":4 * * cdef SufficientStats as_stats(x, y): * if isinstance(x, SufficientStats): # <<<<<<<<<<<<<< @@ -15044,7 +16427,7 @@ static struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_f_4cdec_5_cdec_as_st __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":5 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":5 * cdef SufficientStats as_stats(x, y): * if isinstance(x, SufficientStats): * return x # <<<<<<<<<<<<<< @@ -15056,10 +16439,9 @@ static struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_f_4cdec_5_cdec_as_st __Pyx_INCREF(__pyx_v_x); __pyx_r = ((struct __pyx_obj_4cdec_5_cdec_SufficientStats *)__pyx_v_x); goto __pyx_L0; - goto __pyx_L3; } - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":6 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":6 * if isinstance(x, SufficientStats): * return x * elif x == 0 and isinstance(y, SufficientStats): # <<<<<<<<<<<<<< @@ -15077,19 +16459,19 @@ static struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_f_4cdec_5_cdec_as_st } if (__pyx_t_4) { - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":7 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":7 * return x * elif x == 0 and isinstance(y, SufficientStats): * stats = SufficientStats() # <<<<<<<<<<<<<< * stats.stats = new mteval.SufficientStats() * stats.metric = ( y).metric */ - __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SufficientStats)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SufficientStats)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_v_stats = ((struct __pyx_obj_4cdec_5_cdec_SufficientStats *)__pyx_t_3); __pyx_t_3 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":8 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":8 * elif x == 0 and isinstance(y, SufficientStats): * stats = SufficientStats() * stats.stats = new mteval.SufficientStats() # <<<<<<<<<<<<<< @@ -15098,7 +16480,7 @@ static struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_f_4cdec_5_cdec_as_st */ __pyx_v_stats->stats = new SufficientStats(); - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":9 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":9 * stats = SufficientStats() * stats.stats = new mteval.SufficientStats() * stats.metric = ( y).metric # <<<<<<<<<<<<<< @@ -15108,7 +16490,7 @@ static struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_f_4cdec_5_cdec_as_st __pyx_t_5 = ((struct __pyx_obj_4cdec_5_cdec_SufficientStats *)__pyx_v_y)->metric; __pyx_v_stats->metric = __pyx_t_5; - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":10 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":10 * stats.stats = new mteval.SufficientStats() * stats.metric = ( y).metric * return stats # <<<<<<<<<<<<<< @@ -15119,10 +16501,17 @@ static struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_f_4cdec_5_cdec_as_st __Pyx_INCREF(((PyObject *)__pyx_v_stats)); __pyx_r = __pyx_v_stats; goto __pyx_L0; - goto __pyx_L3; } - __pyx_L3:; + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":3 + * cimport mteval + * + * cdef SufficientStats as_stats(x, y): # <<<<<<<<<<<<<< + * if isinstance(x, SufficientStats): + * return x + */ + + /* function exit code */ __pyx_r = ((struct __pyx_obj_4cdec_5_cdec_SufficientStats *)Py_None); __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; @@ -15136,6 +16525,14 @@ static struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_f_4cdec_5_cdec_as_st return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":17 + * + * property words: + * def __get__(self): # <<<<<<<<<<<<<< + * return unicode(GetString(self.candidate.ewords).c_str(), encoding='utf8') + * + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_9Candidate_5words_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_9Candidate_5words_1__get__(PyObject *__pyx_v_self) { @@ -15143,18 +16540,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_9Candidate_5words_1__get__(PyObject *__py __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_9Candidate_5words___get__(((struct __pyx_obj_4cdec_5_cdec_Candidate *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":17 - * - * property words: - * def __get__(self): # <<<<<<<<<<<<<< - * return unicode(GetString(self.candidate.ewords).c_str(), encoding='utf8') - * - */ - static PyObject *__pyx_pf_4cdec_5_cdec_9Candidate_5words___get__(struct __pyx_obj_4cdec_5_cdec_Candidate *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -15166,7 +16557,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_9Candidate_5words___get__(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":18 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":18 * property words: * def __get__(self): * return unicode(GetString(self.candidate.ewords).c_str(), encoding='utf8') # <<<<<<<<<<<<<< @@ -15175,25 +16566,32 @@ static PyObject *__pyx_pf_4cdec_5_cdec_9Candidate_5words___get__(struct __pyx_ob */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBytes_FromString(TD::GetString(__pyx_v_self->candidate->ewords).c_str()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_1)); - __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); - if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__encoding), ((PyObject *)__pyx_n_s__utf8)) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_encoding, __pyx_n_s_utf8) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":17 + * + * property words: + * def __get__(self): # <<<<<<<<<<<<<< + * return unicode(GetString(self.candidate.ewords).c_str(), encoding='utf8') + * + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); @@ -15206,6 +16604,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_9Candidate_5words___get__(struct __pyx_ob return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":21 + * + * property fmap: + * def __get__(self): # <<<<<<<<<<<<<< + * cdef SparseVector fmap = SparseVector.__new__(SparseVector) + * fmap.vector = new FastSparseVector[weight_t](self.candidate.fmap) + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_9Candidate_4fmap_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_9Candidate_4fmap_1__get__(PyObject *__pyx_v_self) { @@ -15213,18 +16619,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_9Candidate_4fmap_1__get__(PyObject *__pyx __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_9Candidate_4fmap___get__(((struct __pyx_obj_4cdec_5_cdec_Candidate *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":21 - * - * property fmap: - * def __get__(self): # <<<<<<<<<<<<<< - * cdef SparseVector fmap = SparseVector.__new__(SparseVector) - * fmap.vector = new FastSparseVector[weight_t](self.candidate.fmap) - */ - static PyObject *__pyx_pf_4cdec_5_cdec_9Candidate_4fmap___get__(struct __pyx_obj_4cdec_5_cdec_Candidate *__pyx_v_self) { struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_fmap = 0; PyObject *__pyx_r = NULL; @@ -15235,20 +16635,20 @@ static PyObject *__pyx_pf_4cdec_5_cdec_9Candidate_4fmap___get__(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":22 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":22 * property fmap: * def __get__(self): * cdef SparseVector fmap = SparseVector.__new__(SparseVector) # <<<<<<<<<<<<<< * fmap.vector = new FastSparseVector[weight_t](self.candidate.fmap) * return fmap */ - __pyx_t_1 = __pyx_tp_new_4cdec_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SparseVector)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_tp_new_4cdec_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SparseVector)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4cdec_5_cdec_SparseVector)))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fmap = ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_t_1); __pyx_t_1 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":23 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":23 * def __get__(self): * cdef SparseVector fmap = SparseVector.__new__(SparseVector) * fmap.vector = new FastSparseVector[weight_t](self.candidate.fmap) # <<<<<<<<<<<<<< @@ -15257,7 +16657,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_9Candidate_4fmap___get__(struct __pyx_obj */ __pyx_v_fmap->vector = new FastSparseVector(__pyx_v_self->candidate->fmap); - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":24 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":24 * cdef SparseVector fmap = SparseVector.__new__(SparseVector) * fmap.vector = new FastSparseVector[weight_t](self.candidate.fmap) * return fmap # <<<<<<<<<<<<<< @@ -15269,8 +16669,15 @@ static PyObject *__pyx_pf_4cdec_5_cdec_9Candidate_4fmap___get__(struct __pyx_obj __pyx_r = ((PyObject *)__pyx_v_fmap); goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":21 + * + * property fmap: + * def __get__(self): # <<<<<<<<<<<<<< + * cdef SparseVector fmap = SparseVector.__new__(SparseVector) + * fmap.vector = new FastSparseVector[weight_t](self.candidate.fmap) + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cdec._cdec.Candidate.fmap.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -15282,6 +16689,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_9Candidate_4fmap___get__(struct __pyx_obj return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":14 + * cdef class Candidate: + * cdef mteval.const_Candidate* candidate + * cdef public float score # <<<<<<<<<<<<<< + * + * property words: + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_9Candidate_5score_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_9Candidate_5score_1__get__(PyObject *__pyx_v_self) { @@ -15289,18 +16704,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_9Candidate_5score_1__get__(PyObject *__py __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_9Candidate_5score___get__(((struct __pyx_obj_4cdec_5_cdec_Candidate *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":14 - * cdef class Candidate: - * cdef mteval.const_Candidate* candidate - * cdef public float score # <<<<<<<<<<<<<< - * - * property words: - */ - static PyObject *__pyx_pf_4cdec_5_cdec_9Candidate_5score___get__(struct __pyx_obj_4cdec_5_cdec_Candidate *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -15316,8 +16725,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_9Candidate_5score___get__(struct __pyx_ob __pyx_t_1 = 0; goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cdec._cdec.Candidate.score.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -15335,6 +16743,8 @@ static int __pyx_pw_4cdec_5_cdec_9Candidate_5score_3__set__(PyObject *__pyx_v_se __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_9Candidate_5score_2__set__(((struct __pyx_obj_4cdec_5_cdec_Candidate *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -15350,6 +16760,7 @@ static int __pyx_pf_4cdec_5_cdec_9Candidate_5score_2__set__(struct __pyx_obj_4cd __pyx_t_1 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_1 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->score = __pyx_t_1; + /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; @@ -15360,16 +16771,7 @@ static int __pyx_pf_4cdec_5_cdec_9Candidate_5score_2__set__(struct __pyx_obj_4cd return __pyx_r; } -/* Python wrapper */ -static void __pyx_pw_4cdec_5_cdec_15SufficientStats_1__dealloc__(PyObject *__pyx_v_self); /*proto*/ -static void __pyx_pw_4cdec_5_cdec_15SufficientStats_1__dealloc__(PyObject *__pyx_v_self) { - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); - __pyx_pf_4cdec_5_cdec_15SufficientStats___dealloc__(((struct __pyx_obj_4cdec_5_cdec_SufficientStats *)__pyx_v_self)); - __Pyx_RefNannyFinishContext(); -} - -/* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":30 +/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":30 * cdef mteval.EvaluationMetric* metric * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -15377,11 +16779,22 @@ static void __pyx_pw_4cdec_5_cdec_15SufficientStats_1__dealloc__(PyObject *__pyx * */ -static void __pyx_pf_4cdec_5_cdec_15SufficientStats___dealloc__(CYTHON_UNUSED struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_v_self) { +/* Python wrapper */ +static void __pyx_pw_4cdec_5_cdec_15SufficientStats_1__dealloc__(PyObject *__pyx_v_self); /*proto*/ +static void __pyx_pw_4cdec_5_cdec_15SufficientStats_1__dealloc__(PyObject *__pyx_v_self) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); + __pyx_pf_4cdec_5_cdec_15SufficientStats___dealloc__(((struct __pyx_obj_4cdec_5_cdec_SufficientStats *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +static void __pyx_pf_4cdec_5_cdec_15SufficientStats___dealloc__(struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":31 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":31 * * def __dealloc__(self): * del self.stats # <<<<<<<<<<<<<< @@ -15390,9 +16803,26 @@ static void __pyx_pf_4cdec_5_cdec_15SufficientStats___dealloc__(CYTHON_UNUSED st */ delete __pyx_v_self->stats; + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":30 + * cdef mteval.EvaluationMetric* metric + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * del self.stats + * + */ + + /* function exit code */ __Pyx_RefNannyFinishContext(); } +/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":34 + * + * property score: + * def __get__(self): # <<<<<<<<<<<<<< + * return self.metric.ComputeScore(self.stats[0]) + * + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_15SufficientStats_5score_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_15SufficientStats_5score_1__get__(PyObject *__pyx_v_self) { @@ -15400,18 +16830,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_15SufficientStats_5score_1__get__(PyObjec __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_15SufficientStats_5score___get__(((struct __pyx_obj_4cdec_5_cdec_SufficientStats *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":34 - * - * property score: - * def __get__(self): # <<<<<<<<<<<<<< - * return self.metric.ComputeScore(self.stats[0]) - * - */ - static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_5score___get__(struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -15421,7 +16845,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_5score___get__(struct _ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":35 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":35 * property score: * def __get__(self): * return self.metric.ComputeScore(self.stats[0]) # <<<<<<<<<<<<<< @@ -15435,8 +16859,15 @@ static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_5score___get__(struct _ __pyx_t_1 = 0; goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":34 + * + * property score: + * def __get__(self): # <<<<<<<<<<<<<< + * return self.metric.ComputeScore(self.stats[0]) + * + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cdec._cdec.SufficientStats.score.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -15447,6 +16878,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_5score___get__(struct _ return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":38 + * + * property detail: + * def __get__(self): # <<<<<<<<<<<<<< + * return str(self.metric.DetailedScore(self.stats[0]).c_str()) + * + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_15SufficientStats_6detail_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_15SufficientStats_6detail_1__get__(PyObject *__pyx_v_self) { @@ -15454,18 +16893,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_15SufficientStats_6detail_1__get__(PyObje __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_15SufficientStats_6detail___get__(((struct __pyx_obj_4cdec_5_cdec_SufficientStats *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":38 - * - * property detail: - * def __get__(self): # <<<<<<<<<<<<<< - * return str(self.metric.DetailedScore(self.stats[0]).c_str()) - * - */ - static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_6detail___get__(struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -15476,7 +16909,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_6detail___get__(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":39 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":39 * property detail: * def __get__(self): * return str(self.metric.DetailedScore(self.stats[0]).c_str()) # <<<<<<<<<<<<<< @@ -15485,21 +16918,28 @@ static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_6detail___get__(struct */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->metric->DetailedScore((__pyx_v_self->stats[0])).c_str()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_1)); - __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":38 + * + * property detail: + * def __get__(self): # <<<<<<<<<<<<<< + * return str(self.metric.DetailedScore(self.stats[0]).c_str()) + * + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); @@ -15511,6 +16951,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_6detail___get__(struct return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":41 + * return str(self.metric.DetailedScore(self.stats[0]).c_str()) + * + * def __len__(self): # <<<<<<<<<<<<<< + * return self.stats.size() + * + */ + /* Python wrapper */ static Py_ssize_t __pyx_pw_4cdec_5_cdec_15SufficientStats_3__len__(PyObject *__pyx_v_self); /*proto*/ static Py_ssize_t __pyx_pw_4cdec_5_cdec_15SufficientStats_3__len__(PyObject *__pyx_v_self) { @@ -15518,24 +16966,18 @@ static Py_ssize_t __pyx_pw_4cdec_5_cdec_15SufficientStats_3__len__(PyObject *__p __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_15SufficientStats_2__len__(((struct __pyx_obj_4cdec_5_cdec_SufficientStats *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":41 - * return str(self.metric.DetailedScore(self.stats[0]).c_str()) - * - * def __len__(self): # <<<<<<<<<<<<<< - * return self.stats.size() - * - */ - static Py_ssize_t __pyx_pf_4cdec_5_cdec_15SufficientStats_2__len__(struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_v_self) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":42 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":42 * * def __len__(self): * return self.stats.size() # <<<<<<<<<<<<<< @@ -15545,13 +16987,29 @@ static Py_ssize_t __pyx_pf_4cdec_5_cdec_15SufficientStats_2__len__(struct __pyx_ __pyx_r = __pyx_v_self->stats->size(); goto __pyx_L0; - __pyx_r = 0; + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":41 + * return str(self.metric.DetailedScore(self.stats[0]).c_str()) + * + * def __len__(self): # <<<<<<<<<<<<<< + * return self.stats.size() + * + */ + + /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_4cdec_5_cdec_15SufficientStats_6generator15(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ +/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":44 + * return self.stats.size() + * + * def __iter__(self): # <<<<<<<<<<<<<< + * for i in range(len(self)): + * yield self[i] + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_15SufficientStats_5__iter__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_15SufficientStats_5__iter__(PyObject *__pyx_v_self) { @@ -15559,18 +17017,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_15SufficientStats_5__iter__(PyObject *__p __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_15SufficientStats_4__iter__(((struct __pyx_obj_4cdec_5_cdec_SufficientStats *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":44 - * return self.stats.size() - * - * def __iter__(self): # <<<<<<<<<<<<<< - * for i in range(len(self)): - * yield self[i] - */ - static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_4__iter__(struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_v_self) { struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__ *__pyx_cur_scope; PyObject *__pyx_r = NULL; @@ -15595,6 +17047,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_4__iter__(struct __pyx_ return (PyObject *) gen; } + /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; @@ -15612,9 +17065,8 @@ static PyObject *__pyx_gb_4cdec_5_cdec_15SufficientStats_6generator15(__pyx_Gene struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__ *__pyx_cur_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__ *)__pyx_generator->closure); PyObject *__pyx_r = NULL; Py_ssize_t __pyx_t_1; - PyObject *__pyx_t_2 = NULL; + Py_ssize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; - PyObject *(*__pyx_t_4)(PyObject *); int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -15630,7 +17082,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_15SufficientStats_6generator15(__pyx_Gene __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":45 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":45 * * def __iter__(self): * for i in range(len(self)): # <<<<<<<<<<<<<< @@ -15638,72 +17090,22 @@ static PyObject *__pyx_gb_4cdec_5_cdec_15SufficientStats_6generator15(__pyx_Gene * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_cur_scope->__pyx_v_self)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); - __Pyx_GIVEREF(__pyx_t_2); - __pyx_t_2 = 0; - __pyx_t_2 = PyObject_Call(__pyx_builtin_range, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) { - __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = 0; - __pyx_t_4 = NULL; - } else { - __pyx_t_1 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = Py_TYPE(__pyx_t_3)->tp_iternext; - } - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - for (;;) { - if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_3)) { - if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_3)) break; - #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_2); __pyx_t_1++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - #endif - } else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_3)) { - if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_3)) break; - #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_2); __pyx_t_1++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - #endif - } else { - __pyx_t_2 = __pyx_t_4(__pyx_t_3); - if (unlikely(!__pyx_t_2)) { - if (PyErr_Occurred()) { - if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); - else {__pyx_filename = __pyx_f[5]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - } - break; - } - __Pyx_GOTREF(__pyx_t_2); - } - __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_i); - __Pyx_XDECREF(__pyx_cur_scope->__pyx_v_i); - __Pyx_GIVEREF(__pyx_t_2); + for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_cur_scope->__pyx_v_i = __pyx_t_2; - __pyx_t_2 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":46 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":46 * def __iter__(self): * for i in range(len(self)): * yield self[i] # <<<<<<<<<<<<<< * * def __getitem__(self, int index): */ - __pyx_t_2 = PyObject_GetItem(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_cur_scope->__pyx_v_i); if (!__pyx_t_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __pyx_r = __pyx_t_2; - __pyx_t_2 = 0; + __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_cur_scope->__pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; __pyx_cur_scope->__pyx_t_0 = __pyx_t_1; - __Pyx_XGIVEREF(__pyx_t_3); - __pyx_cur_scope->__pyx_t_1 = __pyx_t_3; - __pyx_cur_scope->__pyx_t_2 = __pyx_t_4; + __pyx_cur_scope->__pyx_t_1 = __pyx_t_2; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); /* return from generator, yielding value */ @@ -15711,17 +17113,22 @@ static PyObject *__pyx_gb_4cdec_5_cdec_15SufficientStats_6generator15(__pyx_Gene return __pyx_r; __pyx_L6_resume_from_yield:; __pyx_t_1 = __pyx_cur_scope->__pyx_t_0; - __pyx_t_3 = __pyx_cur_scope->__pyx_t_1; - __pyx_cur_scope->__pyx_t_1 = 0; - __Pyx_XGOTREF(__pyx_t_3); - __pyx_t_4 = __pyx_cur_scope->__pyx_t_2; + __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":44 + * return self.stats.size() + * + * def __iter__(self): # <<<<<<<<<<<<<< + * for i in range(len(self)): + * yield self[i] + */ + + /* function exit code */ PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; @@ -15732,6 +17139,14 @@ static PyObject *__pyx_gb_4cdec_5_cdec_15SufficientStats_6generator15(__pyx_Gene return NULL; } +/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":48 + * yield self[i] + * + * def __getitem__(self, int index): # <<<<<<<<<<<<<< + * if not 0 <= index < len(self): + * raise IndexError('sufficient stats vector index out of range') + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_15SufficientStats_8__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_index); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_15SufficientStats_8__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_index) { @@ -15743,7 +17158,7 @@ static PyObject *__pyx_pw_4cdec_5_cdec_15SufficientStats_8__getitem__(PyObject * __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0); assert(__pyx_arg_index); { - __pyx_v_index = __Pyx_PyInt_AsInt(__pyx_arg_index); if (unlikely((__pyx_v_index == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_index = __Pyx_PyInt_As_int(__pyx_arg_index); if (unlikely((__pyx_v_index == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -15752,18 +17167,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_15SufficientStats_8__getitem__(PyObject * return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4cdec_5_cdec_15SufficientStats_7__getitem__(((struct __pyx_obj_4cdec_5_cdec_SufficientStats *)__pyx_v_self), ((int)__pyx_v_index)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":48 - * yield self[i] - * - * def __getitem__(self, int index): # <<<<<<<<<<<<<< - * if not 0 <= index < len(self): - * raise IndexError('sufficient stats vector index out of range') - */ - static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_7__getitem__(struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_v_self, int __pyx_v_index) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -15776,7 +17185,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_7__getitem__(struct __p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getitem__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":49 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":49 * * def __getitem__(self, int index): * if not 0 <= index < len(self): # <<<<<<<<<<<<<< @@ -15791,23 +17200,21 @@ static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_7__getitem__(struct __p __pyx_t_3 = ((!(__pyx_t_1 != 0)) != 0); if (__pyx_t_3) { - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":50 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":50 * def __getitem__(self, int index): * if not 0 <= index < len(self): * raise IndexError('sufficient stats vector index out of range') # <<<<<<<<<<<<<< * return self.stats[0][index] * */ - __pyx_t_4 = PyObject_Call(__pyx_builtin_IndexError, ((PyObject *)__pyx_k_tuple_43), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 50; __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[5]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - goto __pyx_L3; } - __pyx_L3:; - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":51 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":51 * if not 0 <= index < len(self): * raise IndexError('sufficient stats vector index out of range') * return self.stats[0][index] # <<<<<<<<<<<<<< @@ -15821,8 +17228,15 @@ static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_7__getitem__(struct __p __pyx_t_4 = 0; goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":48 + * yield self[i] + * + * def __getitem__(self, int index): # <<<<<<<<<<<<<< + * if not 0 <= index < len(self): + * raise IndexError('sufficient stats vector index out of range') + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("cdec._cdec.SufficientStats.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -15833,6 +17247,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_7__getitem__(struct __p return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":53 + * return self.stats[0][index] + * + * def __iadd__(SufficientStats self, SufficientStats other): # <<<<<<<<<<<<<< + * self.stats[0] += other.stats[0] + * return self + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_15SufficientStats_10__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_15SufficientStats_10__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { @@ -15844,6 +17266,8 @@ static PyObject *__pyx_pw_4cdec_5_cdec_15SufficientStats_10__iadd__(PyObject *__ __Pyx_RefNannySetupContext("__iadd__ (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_4cdec_5_cdec_SufficientStats, 1, "other", 0))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_4cdec_5_cdec_15SufficientStats_9__iadd__(((struct __pyx_obj_4cdec_5_cdec_SufficientStats *)__pyx_v_self), ((struct __pyx_obj_4cdec_5_cdec_SufficientStats *)__pyx_v_other)); + + /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; @@ -15852,20 +17276,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_15SufficientStats_10__iadd__(PyObject *__ return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":53 - * return self.stats[0][index] - * - * def __iadd__(SufficientStats self, SufficientStats other): # <<<<<<<<<<<<<< - * self.stats[0] += other.stats[0] - * return self - */ - static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_9__iadd__(struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_v_self, struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_v_other) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__iadd__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":54 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":54 * * def __iadd__(SufficientStats self, SufficientStats other): * self.stats[0] += other.stats[0] # <<<<<<<<<<<<<< @@ -15874,7 +17290,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_9__iadd__(struct __pyx_ */ (__pyx_v_self->stats[0]) += (__pyx_v_other->stats[0]); - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":55 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":55 * def __iadd__(SufficientStats self, SufficientStats other): * self.stats[0] += other.stats[0] * return self # <<<<<<<<<<<<<< @@ -15886,13 +17302,29 @@ static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_9__iadd__(struct __pyx_ __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":53 + * return self.stats[0][index] + * + * def __iadd__(SufficientStats self, SufficientStats other): # <<<<<<<<<<<<<< + * self.stats[0] += other.stats[0] + * return self + */ + + /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":57 + * return self + * + * def __add__(x, y): # <<<<<<<<<<<<<< + * cdef SufficientStats sx = as_stats(x, y) + * cdef SufficientStats sy = as_stats(y, x) + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_15SufficientStats_12__add__(PyObject *__pyx_v_x, PyObject *__pyx_v_y); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_15SufficientStats_12__add__(PyObject *__pyx_v_x, PyObject *__pyx_v_y) { @@ -15900,18 +17332,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_15SufficientStats_12__add__(PyObject *__p __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__add__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_15SufficientStats_11__add__(((PyObject *)__pyx_v_x), ((PyObject *)__pyx_v_y)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":57 - * return self - * - * def __add__(x, y): # <<<<<<<<<<<<<< - * cdef SufficientStats sx = as_stats(x, y) - * cdef SufficientStats sy = as_stats(y, x) - */ - static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_11__add__(PyObject *__pyx_v_x, PyObject *__pyx_v_y) { struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_v_sx = 0; struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_v_sy = 0; @@ -15925,7 +17351,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_11__add__(PyObject *__p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__add__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":58 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":58 * * def __add__(x, y): * cdef SufficientStats sx = as_stats(x, y) # <<<<<<<<<<<<<< @@ -15937,7 +17363,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_11__add__(PyObject *__p __pyx_v_sx = ((struct __pyx_obj_4cdec_5_cdec_SufficientStats *)__pyx_t_1); __pyx_t_1 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":59 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":59 * def __add__(x, y): * cdef SufficientStats sx = as_stats(x, y) * cdef SufficientStats sy = as_stats(y, x) # <<<<<<<<<<<<<< @@ -15949,19 +17375,19 @@ static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_11__add__(PyObject *__p __pyx_v_sy = ((struct __pyx_obj_4cdec_5_cdec_SufficientStats *)__pyx_t_1); __pyx_t_1 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":60 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":60 * cdef SufficientStats sx = as_stats(x, y) * cdef SufficientStats sy = as_stats(y, x) * cdef SufficientStats result = SufficientStats() # <<<<<<<<<<<<<< * result.stats = new mteval.SufficientStats(mteval.add(sx.stats[0], sy.stats[0])) * result.metric = sx.metric */ - __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SufficientStats)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SufficientStats)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_result = ((struct __pyx_obj_4cdec_5_cdec_SufficientStats *)__pyx_t_1); __pyx_t_1 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":61 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":61 * cdef SufficientStats sy = as_stats(y, x) * cdef SufficientStats result = SufficientStats() * result.stats = new mteval.SufficientStats(mteval.add(sx.stats[0], sy.stats[0])) # <<<<<<<<<<<<<< @@ -15970,7 +17396,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_11__add__(PyObject *__p */ __pyx_v_result->stats = new SufficientStats(operator+((__pyx_v_sx->stats[0]), (__pyx_v_sy->stats[0]))); - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":62 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":62 * cdef SufficientStats result = SufficientStats() * result.stats = new mteval.SufficientStats(mteval.add(sx.stats[0], sy.stats[0])) * result.metric = sx.metric # <<<<<<<<<<<<<< @@ -15980,7 +17406,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_11__add__(PyObject *__p __pyx_t_2 = __pyx_v_sx->metric; __pyx_v_result->metric = __pyx_t_2; - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":63 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":63 * result.stats = new mteval.SufficientStats(mteval.add(sx.stats[0], sy.stats[0])) * result.metric = sx.metric * return result # <<<<<<<<<<<<<< @@ -15992,8 +17418,15 @@ static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_11__add__(PyObject *__p __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":57 + * return self + * + * def __add__(x, y): # <<<<<<<<<<<<<< + * cdef SufficientStats sx = as_stats(x, y) + * cdef SufficientStats sy = as_stats(y, x) + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cdec._cdec.SufficientStats.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -16007,6 +17440,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_11__add__(PyObject *__p return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":70 + * cdef mteval.CandidateSet* cs + * + * def __cinit__(self, SegmentEvaluator evaluator): # <<<<<<<<<<<<<< + * self.scorer = new shared_ptr[mteval.SegmentEvaluator](evaluator.scorer[0]) + * self.metric = evaluator.metric + */ + /* Python wrapper */ static int __pyx_pw_4cdec_5_cdec_12CandidateSet_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_4cdec_5_cdec_12CandidateSet_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { @@ -16018,7 +17459,7 @@ static int __pyx_pw_4cdec_5_cdec_12CandidateSet_1__cinit__(PyObject *__pyx_v_sel __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__evaluator,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_evaluator,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; @@ -16031,7 +17472,7 @@ static int __pyx_pw_4cdec_5_cdec_12CandidateSet_1__cinit__(PyObject *__pyx_v_sel kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__evaluator)) != 0)) kw_args--; + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_evaluator)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { @@ -16054,6 +17495,8 @@ static int __pyx_pw_4cdec_5_cdec_12CandidateSet_1__cinit__(PyObject *__pyx_v_sel __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_evaluator), __pyx_ptype_4cdec_5_cdec_SegmentEvaluator, 1, "evaluator", 0))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_4cdec_5_cdec_12CandidateSet___cinit__(((struct __pyx_obj_4cdec_5_cdec_CandidateSet *)__pyx_v_self), __pyx_v_evaluator); + + /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = -1; @@ -16062,21 +17505,13 @@ static int __pyx_pw_4cdec_5_cdec_12CandidateSet_1__cinit__(PyObject *__pyx_v_sel return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":70 - * cdef mteval.CandidateSet* cs - * - * def __cinit__(self, SegmentEvaluator evaluator): # <<<<<<<<<<<<<< - * self.scorer = new shared_ptr[mteval.SegmentEvaluator](evaluator.scorer[0]) - * self.metric = evaluator.metric - */ - static int __pyx_pf_4cdec_5_cdec_12CandidateSet___cinit__(struct __pyx_obj_4cdec_5_cdec_CandidateSet *__pyx_v_self, struct __pyx_obj_4cdec_5_cdec_SegmentEvaluator *__pyx_v_evaluator) { int __pyx_r; __Pyx_RefNannyDeclarations EvaluationMetric *__pyx_t_1; __Pyx_RefNannySetupContext("__cinit__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":71 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":71 * * def __cinit__(self, SegmentEvaluator evaluator): * self.scorer = new shared_ptr[mteval.SegmentEvaluator](evaluator.scorer[0]) # <<<<<<<<<<<<<< @@ -16085,7 +17520,7 @@ static int __pyx_pf_4cdec_5_cdec_12CandidateSet___cinit__(struct __pyx_obj_4cdec */ __pyx_v_self->scorer = new boost::shared_ptr((__pyx_v_evaluator->scorer[0])); - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":72 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":72 * def __cinit__(self, SegmentEvaluator evaluator): * self.scorer = new shared_ptr[mteval.SegmentEvaluator](evaluator.scorer[0]) * self.metric = evaluator.metric # <<<<<<<<<<<<<< @@ -16095,7 +17530,7 @@ static int __pyx_pf_4cdec_5_cdec_12CandidateSet___cinit__(struct __pyx_obj_4cdec __pyx_t_1 = __pyx_v_evaluator->metric; __pyx_v_self->metric = __pyx_t_1; - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":73 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":73 * self.scorer = new shared_ptr[mteval.SegmentEvaluator](evaluator.scorer[0]) * self.metric = evaluator.metric * self.cs = new mteval.CandidateSet() # <<<<<<<<<<<<<< @@ -16104,33 +17539,44 @@ static int __pyx_pf_4cdec_5_cdec_12CandidateSet___cinit__(struct __pyx_obj_4cdec */ __pyx_v_self->cs = new training::CandidateSet(); + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":70 + * cdef mteval.CandidateSet* cs + * + * def __cinit__(self, SegmentEvaluator evaluator): # <<<<<<<<<<<<<< + * self.scorer = new shared_ptr[mteval.SegmentEvaluator](evaluator.scorer[0]) + * self.metric = evaluator.metric + */ + + /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":75 + * self.cs = new mteval.CandidateSet() + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * del self.scorer + * del self.cs + */ + /* Python wrapper */ static void __pyx_pw_4cdec_5_cdec_12CandidateSet_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_4cdec_5_cdec_12CandidateSet_3__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_4cdec_5_cdec_12CandidateSet_2__dealloc__(((struct __pyx_obj_4cdec_5_cdec_CandidateSet *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); } -/* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":75 - * self.cs = new mteval.CandidateSet() - * - * def __dealloc__(self): # <<<<<<<<<<<<<< - * del self.scorer - * del self.cs - */ - -static void __pyx_pf_4cdec_5_cdec_12CandidateSet_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cdec_5_cdec_CandidateSet *__pyx_v_self) { +static void __pyx_pf_4cdec_5_cdec_12CandidateSet_2__dealloc__(struct __pyx_obj_4cdec_5_cdec_CandidateSet *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":76 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":76 * * def __dealloc__(self): * del self.scorer # <<<<<<<<<<<<<< @@ -16139,7 +17585,7 @@ static void __pyx_pf_4cdec_5_cdec_12CandidateSet_2__dealloc__(CYTHON_UNUSED stru */ delete __pyx_v_self->scorer; - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":77 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":77 * def __dealloc__(self): * del self.scorer * del self.cs # <<<<<<<<<<<<<< @@ -16148,9 +17594,26 @@ static void __pyx_pf_4cdec_5_cdec_12CandidateSet_2__dealloc__(CYTHON_UNUSED stru */ delete __pyx_v_self->cs; + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":75 + * self.cs = new mteval.CandidateSet() + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * del self.scorer + * del self.cs + */ + + /* function exit code */ __Pyx_RefNannyFinishContext(); } +/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":79 + * del self.cs + * + * def __len__(self): # <<<<<<<<<<<<<< + * return self.cs.size() + * + */ + /* Python wrapper */ static Py_ssize_t __pyx_pw_4cdec_5_cdec_12CandidateSet_5__len__(PyObject *__pyx_v_self); /*proto*/ static Py_ssize_t __pyx_pw_4cdec_5_cdec_12CandidateSet_5__len__(PyObject *__pyx_v_self) { @@ -16158,24 +17621,18 @@ static Py_ssize_t __pyx_pw_4cdec_5_cdec_12CandidateSet_5__len__(PyObject *__pyx_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_12CandidateSet_4__len__(((struct __pyx_obj_4cdec_5_cdec_CandidateSet *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":79 - * del self.cs - * - * def __len__(self): # <<<<<<<<<<<<<< - * return self.cs.size() - * - */ - static Py_ssize_t __pyx_pf_4cdec_5_cdec_12CandidateSet_4__len__(struct __pyx_obj_4cdec_5_cdec_CandidateSet *__pyx_v_self) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":80 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":80 * * def __len__(self): * return self.cs.size() # <<<<<<<<<<<<<< @@ -16185,12 +17642,28 @@ static Py_ssize_t __pyx_pf_4cdec_5_cdec_12CandidateSet_4__len__(struct __pyx_obj __pyx_r = __pyx_v_self->cs->size(); goto __pyx_L0; - __pyx_r = 0; + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":79 + * del self.cs + * + * def __len__(self): # <<<<<<<<<<<<<< + * return self.cs.size() + * + */ + + /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":82 + * return self.cs.size() + * + * def __getitem__(self,int k): # <<<<<<<<<<<<<< + * if not 0 <= k < self.cs.size(): + * raise IndexError('candidate set index out of range') + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_12CandidateSet_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_k); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_12CandidateSet_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_k) { @@ -16202,7 +17675,7 @@ static PyObject *__pyx_pw_4cdec_5_cdec_12CandidateSet_7__getitem__(PyObject *__p __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0); assert(__pyx_arg_k); { - __pyx_v_k = __Pyx_PyInt_AsInt(__pyx_arg_k); if (unlikely((__pyx_v_k == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_k = __Pyx_PyInt_As_int(__pyx_arg_k); if (unlikely((__pyx_v_k == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -16211,18 +17684,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_12CandidateSet_7__getitem__(PyObject *__p return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4cdec_5_cdec_12CandidateSet_6__getitem__(((struct __pyx_obj_4cdec_5_cdec_CandidateSet *)__pyx_v_self), ((int)__pyx_v_k)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":82 - * return self.cs.size() - * - * def __getitem__(self,int k): # <<<<<<<<<<<<<< - * if not 0 <= k < self.cs.size(): - * raise IndexError('candidate set index out of range') - */ - static PyObject *__pyx_pf_4cdec_5_cdec_12CandidateSet_6__getitem__(struct __pyx_obj_4cdec_5_cdec_CandidateSet *__pyx_v_self, int __pyx_v_k) { struct __pyx_obj_4cdec_5_cdec_Candidate *__pyx_v_candidate = 0; PyObject *__pyx_r = NULL; @@ -16235,7 +17702,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12CandidateSet_6__getitem__(struct __pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getitem__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":83 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":83 * * def __getitem__(self,int k): * if not 0 <= k < self.cs.size(): # <<<<<<<<<<<<<< @@ -16249,35 +17716,33 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12CandidateSet_6__getitem__(struct __pyx_ __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); if (__pyx_t_2) { - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":84 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":84 * def __getitem__(self,int k): * if not 0 <= k < self.cs.size(): * raise IndexError('candidate set index out of range') # <<<<<<<<<<<<<< * cdef Candidate candidate = Candidate() * candidate.candidate = &self.cs[0][k] */ - __pyx_t_3 = PyObject_Call(__pyx_builtin_IndexError, ((PyObject *)__pyx_k_tuple_45), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 84; __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[5]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - goto __pyx_L3; } - __pyx_L3:; - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":85 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":85 * if not 0 <= k < self.cs.size(): * raise IndexError('candidate set index out of range') * cdef Candidate candidate = Candidate() # <<<<<<<<<<<<<< * candidate.candidate = &self.cs[0][k] * candidate.score = self.metric.ComputeScore(self.cs[0][k].eval_feats) */ - __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_Candidate)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_Candidate)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_v_candidate = ((struct __pyx_obj_4cdec_5_cdec_Candidate *)__pyx_t_3); __pyx_t_3 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":86 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":86 * raise IndexError('candidate set index out of range') * cdef Candidate candidate = Candidate() * candidate.candidate = &self.cs[0][k] # <<<<<<<<<<<<<< @@ -16286,7 +17751,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12CandidateSet_6__getitem__(struct __pyx_ */ __pyx_v_candidate->candidate = (&((__pyx_v_self->cs[0])[__pyx_v_k])); - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":87 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":87 * cdef Candidate candidate = Candidate() * candidate.candidate = &self.cs[0][k] * candidate.score = self.metric.ComputeScore(self.cs[0][k].eval_feats) # <<<<<<<<<<<<<< @@ -16295,7 +17760,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12CandidateSet_6__getitem__(struct __pyx_ */ __pyx_v_candidate->score = __pyx_v_self->metric->ComputeScore(((__pyx_v_self->cs[0])[__pyx_v_k]).eval_feats); - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":88 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":88 * candidate.candidate = &self.cs[0][k] * candidate.score = self.metric.ComputeScore(self.cs[0][k].eval_feats) * return candidate # <<<<<<<<<<<<<< @@ -16307,8 +17772,15 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12CandidateSet_6__getitem__(struct __pyx_ __pyx_r = ((PyObject *)__pyx_v_candidate); goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":82 + * return self.cs.size() + * + * def __getitem__(self,int k): # <<<<<<<<<<<<<< + * if not 0 <= k < self.cs.size(): + * raise IndexError('candidate set index out of range') + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("cdec._cdec.CandidateSet.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -16321,6 +17793,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12CandidateSet_6__getitem__(struct __pyx_ } static PyObject *__pyx_gb_4cdec_5_cdec_12CandidateSet_10generator16(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ +/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":90 + * return candidate + * + * def __iter__(self): # <<<<<<<<<<<<<< + * cdef unsigned i + * for i in range(len(self)): + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_12CandidateSet_9__iter__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_12CandidateSet_9__iter__(PyObject *__pyx_v_self) { @@ -16328,18 +17808,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_12CandidateSet_9__iter__(PyObject *__pyx_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_12CandidateSet_8__iter__(((struct __pyx_obj_4cdec_5_cdec_CandidateSet *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":90 - * return candidate - * - * def __iter__(self): # <<<<<<<<<<<<<< - * cdef unsigned i - * for i in range(len(self)): - */ - static PyObject *__pyx_pf_4cdec_5_cdec_12CandidateSet_8__iter__(struct __pyx_obj_4cdec_5_cdec_CandidateSet *__pyx_v_self) { struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__ *__pyx_cur_scope; PyObject *__pyx_r = NULL; @@ -16364,6 +17838,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12CandidateSet_8__iter__(struct __pyx_obj return (PyObject *) gen; } + /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; @@ -16398,7 +17873,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_12CandidateSet_10generator16(__pyx_Genera __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":92 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":92 * def __iter__(self): * cdef unsigned i * for i in range(len(self)): # <<<<<<<<<<<<<< @@ -16409,14 +17884,14 @@ static PyObject *__pyx_gb_4cdec_5_cdec_12CandidateSet_10generator16(__pyx_Genera for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_cur_scope->__pyx_v_i = __pyx_t_2; - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":93 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":93 * cdef unsigned i * for i in range(len(self)): * yield self[i] # <<<<<<<<<<<<<< * * def add_kbest(self, Hypergraph hypergraph, unsigned k): */ - __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_cur_scope->__pyx_v_i, sizeof(unsigned int)+1, PyLong_FromUnsignedLong, 0, 0, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_cur_scope->__pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; @@ -16432,6 +17907,16 @@ static PyObject *__pyx_gb_4cdec_5_cdec_12CandidateSet_10generator16(__pyx_Genera __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":90 + * return candidate + * + * def __iter__(self): # <<<<<<<<<<<<<< + * cdef unsigned i + * for i in range(len(self)): + */ + + /* function exit code */ PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; @@ -16445,6 +17930,14 @@ static PyObject *__pyx_gb_4cdec_5_cdec_12CandidateSet_10generator16(__pyx_Genera return NULL; } +/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":95 + * yield self[i] + * + * def add_kbest(self, Hypergraph hypergraph, unsigned k): # <<<<<<<<<<<<<< + * """cs.add_kbest(Hypergraph hypergraph, int k) -> Extract K-best hypotheses + * from the hypergraph and add them to the candidate set.""" + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_12CandidateSet_12add_kbest(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4cdec_5_cdec_12CandidateSet_11add_kbest[] = "cs.add_kbest(Hypergraph hypergraph, int k) -> Extract K-best hypotheses \n from the hypergraph and add them to the candidate set."; @@ -16458,7 +17951,7 @@ static PyObject *__pyx_pw_4cdec_5_cdec_12CandidateSet_12add_kbest(PyObject *__py __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("add_kbest (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__hypergraph,&__pyx_n_s__k,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hypergraph,&__pyx_n_s_k,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; @@ -16472,10 +17965,10 @@ static PyObject *__pyx_pw_4cdec_5_cdec_12CandidateSet_12add_kbest(PyObject *__py kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__hypergraph)) != 0)) kw_args--; + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_hypergraph)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: - if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__k)) != 0)) kw_args--; + if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_k)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("add_kbest", 1, 2, 2, 1); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } @@ -16490,7 +17983,7 @@ static PyObject *__pyx_pw_4cdec_5_cdec_12CandidateSet_12add_kbest(PyObject *__py values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_hypergraph = ((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)values[0]); - __pyx_v_k = __Pyx_PyInt_AsUnsignedInt(values[1]); if (unlikely((__pyx_v_k == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_k = __Pyx_PyInt_As_unsigned_int(values[1]); if (unlikely((__pyx_v_k == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; @@ -16502,6 +17995,8 @@ static PyObject *__pyx_pw_4cdec_5_cdec_12CandidateSet_12add_kbest(PyObject *__py __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_hypergraph), __pyx_ptype_4cdec_5_cdec_Hypergraph, 1, "hypergraph", 0))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_4cdec_5_cdec_12CandidateSet_11add_kbest(((struct __pyx_obj_4cdec_5_cdec_CandidateSet *)__pyx_v_self), __pyx_v_hypergraph, __pyx_v_k); + + /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; @@ -16510,20 +18005,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_12CandidateSet_12add_kbest(PyObject *__py return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":95 - * yield self[i] - * - * def add_kbest(self, Hypergraph hypergraph, unsigned k): # <<<<<<<<<<<<<< - * """cs.add_kbest(Hypergraph hypergraph, int k) -> Extract K-best hypotheses - * from the hypergraph and add them to the candidate set.""" - */ - static PyObject *__pyx_pf_4cdec_5_cdec_12CandidateSet_11add_kbest(struct __pyx_obj_4cdec_5_cdec_CandidateSet *__pyx_v_self, struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_hypergraph, unsigned int __pyx_v_k) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("add_kbest", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":98 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":98 * """cs.add_kbest(Hypergraph hypergraph, int k) -> Extract K-best hypotheses * from the hypergraph and add them to the candidate set.""" * self.cs.AddKBestCandidates(hypergraph.hg[0], k, self.scorer.get()) # <<<<<<<<<<<<<< @@ -16532,34 +18019,45 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12CandidateSet_11add_kbest(struct __pyx_o */ __pyx_v_self->cs->AddKBestCandidates((__pyx_v_hypergraph->hg[0]), __pyx_v_k, __pyx_v_self->scorer->get()); + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":95 + * yield self[i] + * + * def add_kbest(self, Hypergraph hypergraph, unsigned k): # <<<<<<<<<<<<<< + * """cs.add_kbest(Hypergraph hypergraph, int k) -> Extract K-best hypotheses + * from the hypergraph and add them to the candidate set.""" + */ + + /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":104 + * cdef mteval.EvaluationMetric* metric + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * del self.scorer + * + */ + /* Python wrapper */ static void __pyx_pw_4cdec_5_cdec_16SegmentEvaluator_1__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_4cdec_5_cdec_16SegmentEvaluator_1__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_4cdec_5_cdec_16SegmentEvaluator___dealloc__(((struct __pyx_obj_4cdec_5_cdec_SegmentEvaluator *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); } -/* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":104 - * cdef mteval.EvaluationMetric* metric - * - * def __dealloc__(self): # <<<<<<<<<<<<<< - * del self.scorer - * - */ - -static void __pyx_pf_4cdec_5_cdec_16SegmentEvaluator___dealloc__(CYTHON_UNUSED struct __pyx_obj_4cdec_5_cdec_SegmentEvaluator *__pyx_v_self) { +static void __pyx_pf_4cdec_5_cdec_16SegmentEvaluator___dealloc__(struct __pyx_obj_4cdec_5_cdec_SegmentEvaluator *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":105 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":105 * * def __dealloc__(self): * del self.scorer # <<<<<<<<<<<<<< @@ -16568,9 +18066,26 @@ static void __pyx_pf_4cdec_5_cdec_16SegmentEvaluator___dealloc__(CYTHON_UNUSED s */ delete __pyx_v_self->scorer; + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":104 + * cdef mteval.EvaluationMetric* metric + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * del self.scorer + * + */ + + /* function exit code */ __Pyx_RefNannyFinishContext(); } +/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":107 + * del self.scorer + * + * def evaluate(self, sentence): # <<<<<<<<<<<<<< + * """se.evaluate(sentence) -> SufficientStats for the given hypothesis.""" + * cdef vector[WordID] hyp + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_16SegmentEvaluator_3evaluate(PyObject *__pyx_v_self, PyObject *__pyx_v_sentence); /*proto*/ static char __pyx_doc_4cdec_5_cdec_16SegmentEvaluator_2evaluate[] = "se.evaluate(sentence) -> SufficientStats for the given hypothesis."; @@ -16579,18 +18094,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_16SegmentEvaluator_3evaluate(PyObject *__ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("evaluate (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_16SegmentEvaluator_2evaluate(((struct __pyx_obj_4cdec_5_cdec_SegmentEvaluator *)__pyx_v_self), ((PyObject *)__pyx_v_sentence)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":107 - * del self.scorer - * - * def evaluate(self, sentence): # <<<<<<<<<<<<<< - * """se.evaluate(sentence) -> SufficientStats for the given hypothesis.""" - * cdef vector[WordID] hyp - */ - static PyObject *__pyx_pf_4cdec_5_cdec_16SegmentEvaluator_2evaluate(struct __pyx_obj_4cdec_5_cdec_SegmentEvaluator *__pyx_v_self, PyObject *__pyx_v_sentence) { std::vector __pyx_v_hyp; struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_v_sf = 0; @@ -16605,19 +18114,19 @@ static PyObject *__pyx_pf_4cdec_5_cdec_16SegmentEvaluator_2evaluate(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("evaluate", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":110 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":110 * """se.evaluate(sentence) -> SufficientStats for the given hypothesis.""" * cdef vector[WordID] hyp * cdef SufficientStats sf = SufficientStats() # <<<<<<<<<<<<<< * sf.metric = self.metric * sf.stats = new mteval.SufficientStats() */ - __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SufficientStats)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SufficientStats)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_sf = ((struct __pyx_obj_4cdec_5_cdec_SufficientStats *)__pyx_t_1); __pyx_t_1 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":111 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":111 * cdef vector[WordID] hyp * cdef SufficientStats sf = SufficientStats() * sf.metric = self.metric # <<<<<<<<<<<<<< @@ -16627,7 +18136,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_16SegmentEvaluator_2evaluate(struct __pyx __pyx_t_2 = __pyx_v_self->metric; __pyx_v_sf->metric = __pyx_t_2; - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":112 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":112 * cdef SufficientStats sf = SufficientStats() * sf.metric = self.metric * sf.stats = new mteval.SufficientStats() # <<<<<<<<<<<<<< @@ -16636,26 +18145,26 @@ static PyObject *__pyx_pf_4cdec_5_cdec_16SegmentEvaluator_2evaluate(struct __pyx */ __pyx_v_sf->stats = new SufficientStats(); - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":113 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":113 * sf.metric = self.metric * sf.stats = new mteval.SufficientStats() * ConvertSentence(as_str(sentence.strip()), &hyp) # <<<<<<<<<<<<<< * self.scorer.get().Evaluate(hyp, sf.stats) * return sf */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sentence, __pyx_n_s__strip); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sentence, __pyx_n_s_strip); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = ((PyObject *)__pyx_f_4cdec_5_cdec_as_str(__pyx_t_3, NULL)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_f_4cdec_5_cdec_as_str(__pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 113; __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_convert_string_from_py_(__pyx_t_1); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; TD::ConvertSentence(__pyx_t_4, (&__pyx_v_hyp)); - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":114 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":114 * sf.stats = new mteval.SufficientStats() * ConvertSentence(as_str(sentence.strip()), &hyp) * self.scorer.get().Evaluate(hyp, sf.stats) # <<<<<<<<<<<<<< @@ -16664,7 +18173,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_16SegmentEvaluator_2evaluate(struct __pyx */ __pyx_v_self->scorer->get()->Evaluate(__pyx_v_hyp, __pyx_v_sf->stats); - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":115 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":115 * ConvertSentence(as_str(sentence.strip()), &hyp) * self.scorer.get().Evaluate(hyp, sf.stats) * return sf # <<<<<<<<<<<<<< @@ -16676,8 +18185,15 @@ static PyObject *__pyx_pf_4cdec_5_cdec_16SegmentEvaluator_2evaluate(struct __pyx __pyx_r = ((PyObject *)__pyx_v_sf); goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":107 + * del self.scorer + * + * def evaluate(self, sentence): # <<<<<<<<<<<<<< + * """se.evaluate(sentence) -> SufficientStats for the given hypothesis.""" + * cdef vector[WordID] hyp + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); @@ -16690,6 +18206,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_16SegmentEvaluator_2evaluate(struct __pyx return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":117 + * return sf + * + * def candidate_set(self): # <<<<<<<<<<<<<< + * """se.candidate_set() -> Candidate set using this segment evaluator for scoring.""" + * return CandidateSet(self) + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_16SegmentEvaluator_5candidate_set(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_4cdec_5_cdec_16SegmentEvaluator_4candidate_set[] = "se.candidate_set() -> Candidate set using this segment evaluator for scoring."; @@ -16698,18 +18222,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_16SegmentEvaluator_5candidate_set(PyObjec __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("candidate_set (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_16SegmentEvaluator_4candidate_set(((struct __pyx_obj_4cdec_5_cdec_SegmentEvaluator *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":117 - * return sf - * - * def candidate_set(self): # <<<<<<<<<<<<<< - * """se.candidate_set() -> Candidate set using this segment evaluator for scoring.""" - * return CandidateSet(self) - */ - static PyObject *__pyx_pf_4cdec_5_cdec_16SegmentEvaluator_4candidate_set(struct __pyx_obj_4cdec_5_cdec_SegmentEvaluator *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -16720,7 +18238,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_16SegmentEvaluator_4candidate_set(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("candidate_set", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":119 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":119 * def candidate_set(self): * """se.candidate_set() -> Candidate set using this segment evaluator for scoring.""" * return CandidateSet(self) # <<<<<<<<<<<<<< @@ -16733,15 +18251,22 @@ static PyObject *__pyx_pf_4cdec_5_cdec_16SegmentEvaluator_4candidate_set(struct __Pyx_INCREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); - __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_CandidateSet)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_CandidateSet)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":117 + * return sf + * + * def candidate_set(self): # <<<<<<<<<<<<<< + * """se.candidate_set() -> Candidate set using this segment evaluator for scoring.""" + * return CandidateSet(self) + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); @@ -16753,6 +18278,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_16SegmentEvaluator_4candidate_set(struct return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":125 + * cdef mteval.EvaluationMetric* metric + * + * def __cinit__(self, bytes name=None): # <<<<<<<<<<<<<< + * if name: + * self.name = new string(name) + */ + /* Python wrapper */ static int __pyx_pw_4cdec_5_cdec_6Scorer_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_4cdec_5_cdec_6Scorer_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { @@ -16764,16 +18297,8 @@ static int __pyx_pw_4cdec_5_cdec_6Scorer_1__cinit__(PyObject *__pyx_v_self, PyOb __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__name,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,0}; PyObject* values[1] = {0}; - - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":125 - * cdef mteval.EvaluationMetric* metric - * - * def __cinit__(self, bytes name=None): # <<<<<<<<<<<<<< - * if name: - * self.name = new string(name) - */ values[0] = ((PyObject*)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; @@ -16787,7 +18312,7 @@ static int __pyx_pw_4cdec_5_cdec_6Scorer_1__cinit__(PyObject *__pyx_v_self, PyOb switch (pos_args) { case 0: if (kw_args > 0) { - PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__name); + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name); if (value) { values[0] = value; kw_args--; } } } @@ -16813,6 +18338,8 @@ static int __pyx_pw_4cdec_5_cdec_6Scorer_1__cinit__(PyObject *__pyx_v_self, PyOb __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyBytes_Type), 1, "name", 1))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_4cdec_5_cdec_6Scorer___cinit__(((struct __pyx_obj_4cdec_5_cdec_Scorer *)__pyx_v_self), __pyx_v_name); + + /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = -1; @@ -16832,24 +18359,24 @@ static int __pyx_pf_4cdec_5_cdec_6Scorer___cinit__(struct __pyx_obj_4cdec_5_cdec int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":126 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":126 * * def __cinit__(self, bytes name=None): * if name: # <<<<<<<<<<<<<< * self.name = new string(name) * self.metric = mteval.MetricInstance(self.name[0]) */ - __pyx_t_1 = (((PyObject *)__pyx_v_name) != Py_None) && (PyBytes_GET_SIZE(((PyObject *)__pyx_v_name)) != 0); + __pyx_t_1 = (__pyx_v_name != Py_None) && (PyBytes_GET_SIZE(__pyx_v_name) != 0); if (__pyx_t_1) { - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":127 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":127 * def __cinit__(self, bytes name=None): * if name: * self.name = new string(name) # <<<<<<<<<<<<<< * self.metric = mteval.MetricInstance(self.name[0]) * */ - __pyx_t_2 = __Pyx_PyObject_AsString(((PyObject *)__pyx_v_name)); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_name); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} try { __pyx_t_3 = new std::string(__pyx_t_2); } catch(...) { @@ -16858,7 +18385,7 @@ static int __pyx_pf_4cdec_5_cdec_6Scorer___cinit__(struct __pyx_obj_4cdec_5_cdec } __pyx_v_self->name = __pyx_t_3; - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":128 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":128 * if name: * self.name = new string(name) * self.metric = mteval.MetricInstance(self.name[0]) # <<<<<<<<<<<<<< @@ -16870,6 +18397,15 @@ static int __pyx_pf_4cdec_5_cdec_6Scorer___cinit__(struct __pyx_obj_4cdec_5_cdec } __pyx_L3:; + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":125 + * cdef mteval.EvaluationMetric* metric + * + * def __cinit__(self, bytes name=None): # <<<<<<<<<<<<<< + * if name: + * self.name = new string(name) + */ + + /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; @@ -16880,28 +18416,30 @@ static int __pyx_pf_4cdec_5_cdec_6Scorer___cinit__(struct __pyx_obj_4cdec_5_cdec return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":130 + * self.metric = mteval.MetricInstance(self.name[0]) + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * del self.name + * + */ + /* Python wrapper */ static void __pyx_pw_4cdec_5_cdec_6Scorer_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_4cdec_5_cdec_6Scorer_3__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_4cdec_5_cdec_6Scorer_2__dealloc__(((struct __pyx_obj_4cdec_5_cdec_Scorer *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); } -/* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":130 - * self.metric = mteval.MetricInstance(self.name[0]) - * - * def __dealloc__(self): # <<<<<<<<<<<<<< - * del self.name - * - */ - -static void __pyx_pf_4cdec_5_cdec_6Scorer_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cdec_5_cdec_Scorer *__pyx_v_self) { +static void __pyx_pf_4cdec_5_cdec_6Scorer_2__dealloc__(struct __pyx_obj_4cdec_5_cdec_Scorer *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":131 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":131 * * def __dealloc__(self): * del self.name # <<<<<<<<<<<<<< @@ -16910,9 +18448,26 @@ static void __pyx_pf_4cdec_5_cdec_6Scorer_2__dealloc__(CYTHON_UNUSED struct __py */ delete __pyx_v_self->name; + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":130 + * self.metric = mteval.MetricInstance(self.name[0]) + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * del self.name + * + */ + + /* function exit code */ __Pyx_RefNannyFinishContext(); } +/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":133 + * del self.name + * + * def __call__(self, refs): # <<<<<<<<<<<<<< + * if isinstance(refs, basestring): + * refs = [refs] + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_6Scorer_5__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_6Scorer_5__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { @@ -16924,7 +18479,7 @@ static PyObject *__pyx_pw_4cdec_5_cdec_6Scorer_5__call__(PyObject *__pyx_v_self, __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__call__ (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__refs,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_refs,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; @@ -16937,7 +18492,7 @@ static PyObject *__pyx_pw_4cdec_5_cdec_6Scorer_5__call__(PyObject *__pyx_v_self, kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__refs)) != 0)) kw_args--; + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_refs)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { @@ -16959,18 +18514,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_6Scorer_5__call__(PyObject *__pyx_v_self, return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4cdec_5_cdec_6Scorer_4__call__(((struct __pyx_obj_4cdec_5_cdec_Scorer *)__pyx_v_self), __pyx_v_refs); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":133 - * del self.name - * - * def __call__(self, refs): # <<<<<<<<<<<<<< - * if isinstance(refs, basestring): - * refs = [refs] - */ - static PyObject *__pyx_pf_4cdec_5_cdec_6Scorer_4__call__(struct __pyx_obj_4cdec_5_cdec_Scorer *__pyx_v_self, PyObject *__pyx_v_refs) { std::vector > *__pyx_v_refsv; std::vector *__pyx_v_refv; @@ -16995,7 +18544,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_6Scorer_4__call__(struct __pyx_obj_4cdec_ __Pyx_RefNannySetupContext("__call__", 0); __Pyx_INCREF(__pyx_v_refs); - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":134 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":134 * * def __call__(self, refs): * if isinstance(refs, basestring): # <<<<<<<<<<<<<< @@ -17006,7 +18555,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_6Scorer_4__call__(struct __pyx_obj_4cdec_ __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":135 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":135 * def __call__(self, refs): * if isinstance(refs, basestring): * refs = [refs] # <<<<<<<<<<<<<< @@ -17018,14 +18567,13 @@ static PyObject *__pyx_pf_4cdec_5_cdec_6Scorer_4__call__(struct __pyx_obj_4cdec_ __Pyx_INCREF(__pyx_v_refs); PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_refs); __Pyx_GIVEREF(__pyx_v_refs); - __Pyx_DECREF(__pyx_v_refs); - __pyx_v_refs = ((PyObject *)__pyx_t_3); + __Pyx_DECREF_SET(__pyx_v_refs, __pyx_t_3); __pyx_t_3 = 0; goto __pyx_L3; } __pyx_L3:; - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":136 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":136 * if isinstance(refs, basestring): * refs = [refs] * cdef vector[vector[WordID]]* refsv = new vector[vector[WordID]]() # <<<<<<<<<<<<<< @@ -17040,7 +18588,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_6Scorer_4__call__(struct __pyx_obj_4cdec_ } __pyx_v_refsv = __pyx_t_4; - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":138 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":138 * cdef vector[vector[WordID]]* refsv = new vector[vector[WordID]]() * cdef vector[WordID]* refv * for ref in refs: # <<<<<<<<<<<<<< @@ -17073,19 +18621,19 @@ static PyObject *__pyx_pf_4cdec_5_cdec_6Scorer_4__call__(struct __pyx_obj_4cdec_ } else { __pyx_t_7 = __pyx_t_6(__pyx_t_3); if (unlikely(!__pyx_t_7)) { - if (PyErr_Occurred()) { - if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); + 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[5]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_7); } - __Pyx_XDECREF(__pyx_v_ref); - __pyx_v_ref = __pyx_t_7; + __Pyx_XDECREF_SET(__pyx_v_ref, __pyx_t_7); __pyx_t_7 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":139 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":139 * cdef vector[WordID]* refv * for ref in refs: * refv = new vector[WordID]() # <<<<<<<<<<<<<< @@ -17100,26 +18648,26 @@ static PyObject *__pyx_pf_4cdec_5_cdec_6Scorer_4__call__(struct __pyx_obj_4cdec_ } __pyx_v_refv = __pyx_t_8; - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":140 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":140 * for ref in refs: * refv = new vector[WordID]() * ConvertSentence(as_str(ref.strip()), refv) # <<<<<<<<<<<<<< * refsv.push_back(refv[0]) * del refv */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_ref, __pyx_n_s__strip); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_ref, __pyx_n_s_strip); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); - __pyx_t_9 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = ((PyObject *)__pyx_f_4cdec_5_cdec_as_str(__pyx_t_9, NULL)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __pyx_f_4cdec_5_cdec_as_str(__pyx_t_9, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_10 = __pyx_convert_string_from_py_(__pyx_t_7); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; TD::ConvertSentence(__pyx_t_10, __pyx_v_refv); - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":141 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":141 * refv = new vector[WordID]() * ConvertSentence(as_str(ref.strip()), refv) * refsv.push_back(refv[0]) # <<<<<<<<<<<<<< @@ -17128,7 +18676,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_6Scorer_4__call__(struct __pyx_obj_4cdec_ */ __pyx_v_refsv->push_back((__pyx_v_refv[0])); - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":142 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":142 * ConvertSentence(as_str(ref.strip()), refv) * refsv.push_back(refv[0]) * del refv # <<<<<<<<<<<<<< @@ -17139,19 +18687,19 @@ static PyObject *__pyx_pf_4cdec_5_cdec_6Scorer_4__call__(struct __pyx_obj_4cdec_ } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":144 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":144 * del refv * cdef unsigned i * cdef SegmentEvaluator evaluator = SegmentEvaluator() # <<<<<<<<<<<<<< * evaluator.metric = self.metric * evaluator.scorer = new shared_ptr[mteval.SegmentEvaluator]( */ - __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SegmentEvaluator)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SegmentEvaluator)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_v_evaluator = ((struct __pyx_obj_4cdec_5_cdec_SegmentEvaluator *)__pyx_t_3); __pyx_t_3 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":145 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":145 * cdef unsigned i * cdef SegmentEvaluator evaluator = SegmentEvaluator() * evaluator.metric = self.metric # <<<<<<<<<<<<<< @@ -17161,7 +18709,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_6Scorer_4__call__(struct __pyx_obj_4cdec_ __pyx_t_11 = __pyx_v_self->metric; __pyx_v_evaluator->metric = __pyx_t_11; - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":146 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":146 * cdef SegmentEvaluator evaluator = SegmentEvaluator() * evaluator.metric = self.metric * evaluator.scorer = new shared_ptr[mteval.SegmentEvaluator]( # <<<<<<<<<<<<<< @@ -17170,7 +18718,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_6Scorer_4__call__(struct __pyx_obj_4cdec_ */ __pyx_v_evaluator->scorer = new boost::shared_ptr(__pyx_v_self->metric->CreateSegmentEvaluator((__pyx_v_refsv[0]))); - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":148 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":148 * evaluator.scorer = new shared_ptr[mteval.SegmentEvaluator]( * self.metric.CreateSegmentEvaluator(refsv[0])) * del refsv # in theory should not delete but store in SegmentEvaluator # <<<<<<<<<<<<<< @@ -17179,7 +18727,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_6Scorer_4__call__(struct __pyx_obj_4cdec_ */ delete __pyx_v_refsv; - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":149 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":149 * self.metric.CreateSegmentEvaluator(refsv[0])) * del refsv # in theory should not delete but store in SegmentEvaluator * return evaluator # <<<<<<<<<<<<<< @@ -17191,8 +18739,15 @@ static PyObject *__pyx_pf_4cdec_5_cdec_6Scorer_4__call__(struct __pyx_obj_4cdec_ __pyx_r = ((PyObject *)__pyx_v_evaluator); goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":133 + * del self.name + * + * def __call__(self, refs): # <<<<<<<<<<<<<< + * if isinstance(refs, basestring): + * refs = [refs] + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_7); @@ -17208,6 +18763,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_6Scorer_4__call__(struct __pyx_obj_4cdec_ return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":151 + * return evaluator + * + * def __str__(self): # <<<<<<<<<<<<<< + * return str(self.name.c_str()) + * + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_6Scorer_7__str__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_6Scorer_7__str__(PyObject *__pyx_v_self) { @@ -17215,18 +18778,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_6Scorer_7__str__(PyObject *__pyx_v_self) __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__str__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_6Scorer_6__str__(((struct __pyx_obj_4cdec_5_cdec_Scorer *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":151 - * return evaluator - * - * def __str__(self): # <<<<<<<<<<<<<< - * return str(self.name.c_str()) - * - */ - static PyObject *__pyx_pf_4cdec_5_cdec_6Scorer_6__str__(struct __pyx_obj_4cdec_5_cdec_Scorer *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -17237,7 +18794,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_6Scorer_6__str__(struct __pyx_obj_4cdec_5 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__str__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":152 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":152 * * def __str__(self): * return str(self.name.c_str()) # <<<<<<<<<<<<<< @@ -17246,21 +18803,28 @@ static PyObject *__pyx_pf_4cdec_5_cdec_6Scorer_6__str__(struct __pyx_obj_4cdec_5 */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->name->c_str()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_1)); - __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":151 + * return evaluator + * + * def __str__(self): # <<<<<<<<<<<<<< + * return str(self.name.c_str()) + * + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); @@ -17272,7 +18836,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_6Scorer_6__str__(struct __pyx_obj_4cdec_5 return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":154 +/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":154 * return str(self.name.c_str()) * * cdef float _compute_score(void* metric_, mteval.SufficientStats* stats): # <<<<<<<<<<<<<< @@ -17298,17 +18862,19 @@ static float __pyx_f_4cdec_5_cdec__compute_score(void *__pyx_v_metric_, Sufficie int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_compute_score", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":155 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":155 * * cdef float _compute_score(void* metric_, mteval.SufficientStats* stats): * cdef Metric metric = metric_ # <<<<<<<<<<<<<< * cdef list ss = [] * cdef unsigned i */ - __Pyx_INCREF(((PyObject *)((struct __pyx_obj_4cdec_5_cdec_Metric *)__pyx_v_metric_))); - __pyx_v_metric = ((struct __pyx_obj_4cdec_5_cdec_Metric *)__pyx_v_metric_); + __pyx_t_1 = ((PyObject *)__pyx_v_metric_); + __Pyx_INCREF(__pyx_t_1); + __pyx_v_metric = ((struct __pyx_obj_4cdec_5_cdec_Metric *)__pyx_t_1); + __pyx_t_1 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":156 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":156 * cdef float _compute_score(void* metric_, mteval.SufficientStats* stats): * cdef Metric metric = metric_ * cdef list ss = [] # <<<<<<<<<<<<<< @@ -17320,7 +18886,7 @@ static float __pyx_f_4cdec_5_cdec__compute_score(void *__pyx_v_metric_, Sufficie __pyx_v_ss = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":158 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":158 * cdef list ss = [] * cdef unsigned i * for i in range(stats.size()): # <<<<<<<<<<<<<< @@ -17331,7 +18897,7 @@ static float __pyx_f_4cdec_5_cdec__compute_score(void *__pyx_v_metric_, Sufficie for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { __pyx_v_i = __pyx_t_3; - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":159 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":159 * cdef unsigned i * for i in range(stats.size()): * ss.append(stats[0][i]) # <<<<<<<<<<<<<< @@ -17344,36 +18910,43 @@ static float __pyx_f_4cdec_5_cdec__compute_score(void *__pyx_v_metric_, Sufficie __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":160 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":160 * for i in range(stats.size()): * ss.append(stats[0][i]) * return metric.score(ss) # <<<<<<<<<<<<<< * * cdef void _compute_sufficient_stats(void* metric_, */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_metric), __pyx_n_s__score); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_metric), __pyx_n_s_score); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_INCREF(((PyObject *)__pyx_v_ss)); - PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_ss)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_ss)); - __pyx_t_6 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_INCREF(__pyx_v_ss); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_ss); + __Pyx_GIVEREF(__pyx_v_ss); + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = __pyx_PyFloat_AsFloat(__pyx_t_6); if (unlikely((__pyx_t_7 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_r = __pyx_t_7; goto __pyx_L0; - __pyx_r = 0; - goto __pyx_L0; + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":154 + * return str(self.name.c_str()) + * + * cdef float _compute_score(void* metric_, mteval.SufficientStats* stats): # <<<<<<<<<<<<<< + * cdef Metric metric = metric_ + * cdef list ss = [] + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); - __Pyx_WriteUnraisable("cdec._cdec._compute_score", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_WriteUnraisable("cdec._cdec._compute_score", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_metric); @@ -17382,7 +18955,7 @@ static float __pyx_f_4cdec_5_cdec__compute_score(void *__pyx_v_metric_, Sufficie return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":162 +/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":162 * return metric.score(ss) * * cdef void _compute_sufficient_stats(void* metric_, # <<<<<<<<<<<<<< @@ -17409,17 +18982,19 @@ static void __pyx_f_4cdec_5_cdec__compute_sufficient_stats(void *__pyx_v_metric_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_compute_sufficient_stats", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":166 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":166 * vector[string]* refs, * mteval.SufficientStats* out): * cdef Metric metric = metric_ # <<<<<<<<<<<<<< * cdef list refs_ = [] * cdef unsigned i */ - __Pyx_INCREF(((PyObject *)((struct __pyx_obj_4cdec_5_cdec_Metric *)__pyx_v_metric_))); - __pyx_v_metric = ((struct __pyx_obj_4cdec_5_cdec_Metric *)__pyx_v_metric_); + __pyx_t_1 = ((PyObject *)__pyx_v_metric_); + __Pyx_INCREF(__pyx_t_1); + __pyx_v_metric = ((struct __pyx_obj_4cdec_5_cdec_Metric *)__pyx_t_1); + __pyx_t_1 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":167 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":167 * mteval.SufficientStats* out): * cdef Metric metric = metric_ * cdef list refs_ = [] # <<<<<<<<<<<<<< @@ -17431,7 +19006,7 @@ static void __pyx_f_4cdec_5_cdec__compute_sufficient_stats(void *__pyx_v_metric_ __pyx_v_refs_ = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":169 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":169 * cdef list refs_ = [] * cdef unsigned i * for i in range(refs.size()): # <<<<<<<<<<<<<< @@ -17442,7 +19017,7 @@ static void __pyx_f_4cdec_5_cdec__compute_sufficient_stats(void *__pyx_v_metric_ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { __pyx_v_i = __pyx_t_3; - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":170 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":170 * cdef unsigned i * for i in range(refs.size()): * refs_.append(str(refs[0][i].c_str())) # <<<<<<<<<<<<<< @@ -17450,107 +19025,116 @@ static void __pyx_f_4cdec_5_cdec__compute_sufficient_stats(void *__pyx_v_metric_ * out.fields.resize(len(ss)) */ __pyx_t_1 = __Pyx_PyBytes_FromString(((__pyx_v_refs[0])[__pyx_v_i]).c_str()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_1)); - __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_refs_, __pyx_t_1); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":171 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":171 * for i in range(refs.size()): * refs_.append(str(refs[0][i].c_str())) * cdef list ss = metric.evaluate(str(hyp.c_str()), refs_) # <<<<<<<<<<<<<< * out.fields.resize(len(ss)) * for i in range(len(ss)): */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_metric), __pyx_n_s__evaluate); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_metric), __pyx_n_s_evaluate); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_hyp->c_str()); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_4)); + __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_4)); - __Pyx_GIVEREF(((PyObject *)__pyx_t_4)); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); - __Pyx_INCREF(((PyObject *)__pyx_v_refs_)); - PyTuple_SET_ITEM(__pyx_t_6, 1, ((PyObject *)__pyx_v_refs_)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_refs_)); + __Pyx_INCREF(__pyx_v_refs_); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_refs_); + __Pyx_GIVEREF(__pyx_v_refs_); __pyx_t_4 = 0; - __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; - if (!(likely(PyList_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_4)->tp_name), 0))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (!(likely(PyList_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_4)->tp_name), 0))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ss = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":172 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":172 * refs_.append(str(refs[0][i].c_str())) * cdef list ss = metric.evaluate(str(hyp.c_str()), refs_) * out.fields.resize(len(ss)) # <<<<<<<<<<<<<< * for i in range(len(ss)): * out.fields[i] = ss[i] */ - if (unlikely(((PyObject *)__pyx_v_ss) == Py_None)) { + if (unlikely(__pyx_v_ss == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_7 = PyList_GET_SIZE(((PyObject *)__pyx_v_ss)); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = PyList_GET_SIZE(__pyx_v_ss); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_out->fields.resize(__pyx_t_7); - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":173 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":173 * cdef list ss = metric.evaluate(str(hyp.c_str()), refs_) * out.fields.resize(len(ss)) * for i in range(len(ss)): # <<<<<<<<<<<<<< * out.fields[i] = ss[i] * */ - if (unlikely(((PyObject *)__pyx_v_ss) == Py_None)) { + if (unlikely(__pyx_v_ss == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_7 = PyList_GET_SIZE(((PyObject *)__pyx_v_ss)); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = PyList_GET_SIZE(__pyx_v_ss); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_7; __pyx_t_3+=1) { __pyx_v_i = __pyx_t_3; - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":174 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":174 * out.fields.resize(len(ss)) * for i in range(len(ss)): * out.fields[i] = ss[i] # <<<<<<<<<<<<<< * * cdef class Metric: */ - if (unlikely(((PyObject *)__pyx_v_ss) == Py_None)) { + if (unlikely(__pyx_v_ss == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_4 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_ss), __pyx_v_i, sizeof(unsigned int)+1, PyLong_FromUnsignedLong, 1, 0, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_ss, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 1, 0, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = __pyx_PyFloat_AsFloat(__pyx_t_4); if (unlikely((__pyx_t_8 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; (__pyx_v_out->fields[__pyx_v_i]) = __pyx_t_8; } + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":162 + * return metric.score(ss) + * + * cdef void _compute_sufficient_stats(void* metric_, # <<<<<<<<<<<<<< + * string* hyp, + * vector[string]* refs, + */ + + /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); - __Pyx_WriteUnraisable("cdec._cdec._compute_sufficient_stats", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_WriteUnraisable("cdec._cdec._compute_sufficient_stats", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_metric); __Pyx_XDECREF(__pyx_v_refs_); @@ -17558,6 +19142,14 @@ static void __pyx_f_4cdec_5_cdec__compute_sufficient_stats(void *__pyx_v_metric_ __Pyx_RefNannyFinishContext(); } +/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":178 + * cdef class Metric: + * cdef Scorer scorer + * def __cinit__(self): # <<<<<<<<<<<<<< + * self.scorer = Scorer() + * cdef bytes class_name = self.__class__.__name__ + */ + /* Python wrapper */ static int __pyx_pw_4cdec_5_cdec_6Metric_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_4cdec_5_cdec_6Metric_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { @@ -17568,18 +19160,12 @@ static int __pyx_pw_4cdec_5_cdec_6Metric_1__cinit__(PyObject *__pyx_v_self, PyOb __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; __pyx_r = __pyx_pf_4cdec_5_cdec_6Metric___cinit__(((struct __pyx_obj_4cdec_5_cdec_Metric *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":178 - * cdef class Metric: - * cdef Scorer scorer - * def __cinit__(self): # <<<<<<<<<<<<<< - * self.scorer = Scorer() - * cdef bytes class_name = self.__class__.__name__ - */ - static int __pyx_pf_4cdec_5_cdec_6Metric___cinit__(struct __pyx_obj_4cdec_5_cdec_Metric *__pyx_v_self) { PyObject *__pyx_v_class_name = 0; int __pyx_r; @@ -17593,14 +19179,14 @@ static int __pyx_pf_4cdec_5_cdec_6Metric___cinit__(struct __pyx_obj_4cdec_5_cdec int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":179 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":179 * cdef Scorer scorer * def __cinit__(self): * self.scorer = Scorer() # <<<<<<<<<<<<<< * cdef bytes class_name = self.__class__.__name__ * self.scorer.name = new string(class_name) */ - __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_Scorer)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_Scorer)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->scorer); @@ -17608,30 +19194,30 @@ static int __pyx_pf_4cdec_5_cdec_6Metric___cinit__(struct __pyx_obj_4cdec_5_cdec __pyx_v_self->scorer = ((struct __pyx_obj_4cdec_5_cdec_Scorer *)__pyx_t_1); __pyx_t_1 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":180 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":180 * def __cinit__(self): * self.scorer = Scorer() * cdef bytes class_name = self.__class__.__name__ # <<<<<<<<<<<<<< * self.scorer.name = new string(class_name) * self.scorer.metric = mteval.PyMetricInstance(self.scorer.name[0], */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s____class__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s____name__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_class_name = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":181 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":181 * self.scorer = Scorer() * cdef bytes class_name = self.__class__.__name__ * self.scorer.name = new string(class_name) # <<<<<<<<<<<<<< * self.scorer.metric = mteval.PyMetricInstance(self.scorer.name[0], * self, _compute_sufficient_stats, _compute_score) */ - __pyx_t_3 = __Pyx_PyObject_AsString(((PyObject *)__pyx_v_class_name)); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_AsString(__pyx_v_class_name); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} try { __pyx_t_4 = new std::string(__pyx_t_3); } catch(...) { @@ -17640,7 +19226,7 @@ static int __pyx_pf_4cdec_5_cdec_6Metric___cinit__(struct __pyx_obj_4cdec_5_cdec } __pyx_v_self->scorer->name = __pyx_t_4; - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":182 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":182 * cdef bytes class_name = self.__class__.__name__ * self.scorer.name = new string(class_name) * self.scorer.metric = mteval.PyMetricInstance(self.scorer.name[0], # <<<<<<<<<<<<<< @@ -17649,6 +19235,15 @@ static int __pyx_pf_4cdec_5_cdec_6Metric___cinit__(struct __pyx_obj_4cdec_5_cdec */ __pyx_v_self->scorer->metric = PythonEvaluationMetric::Instance((__pyx_v_self->scorer->name[0]), ((void *)__pyx_v_self), __pyx_f_4cdec_5_cdec__compute_sufficient_stats, __pyx_f_4cdec_5_cdec__compute_score); + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":178 + * cdef class Metric: + * cdef Scorer scorer + * def __cinit__(self): # <<<<<<<<<<<<<< + * self.scorer = Scorer() + * cdef bytes class_name = self.__class__.__name__ + */ + + /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; @@ -17662,6 +19257,14 @@ static int __pyx_pf_4cdec_5_cdec_6Metric___cinit__(struct __pyx_obj_4cdec_5_cdec return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":185 + * self, _compute_sufficient_stats, _compute_score) + * + * def __call__(self, refs): # <<<<<<<<<<<<<< + * return self.scorer(refs) + * + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_6Metric_3__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_6Metric_3__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { @@ -17673,7 +19276,7 @@ static PyObject *__pyx_pw_4cdec_5_cdec_6Metric_3__call__(PyObject *__pyx_v_self, __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__call__ (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__refs,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_refs,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; @@ -17686,7 +19289,7 @@ static PyObject *__pyx_pw_4cdec_5_cdec_6Metric_3__call__(PyObject *__pyx_v_self, kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__refs)) != 0)) kw_args--; + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_refs)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { @@ -17708,18 +19311,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_6Metric_3__call__(PyObject *__pyx_v_self, return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4cdec_5_cdec_6Metric_2__call__(((struct __pyx_obj_4cdec_5_cdec_Metric *)__pyx_v_self), __pyx_v_refs); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":185 - * self, _compute_sufficient_stats, _compute_score) - * - * def __call__(self, refs): # <<<<<<<<<<<<<< - * return self.scorer(refs) - * - */ - static PyObject *__pyx_pf_4cdec_5_cdec_6Metric_2__call__(struct __pyx_obj_4cdec_5_cdec_Metric *__pyx_v_self, PyObject *__pyx_v_refs) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -17730,7 +19327,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_6Metric_2__call__(struct __pyx_obj_4cdec_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__call__", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":186 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":186 * * def __call__(self, refs): * return self.scorer(refs) # <<<<<<<<<<<<<< @@ -17743,15 +19340,22 @@ static PyObject *__pyx_pf_4cdec_5_cdec_6Metric_2__call__(struct __pyx_obj_4cdec_ __Pyx_INCREF(__pyx_v_refs); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_refs); __Pyx_GIVEREF(__pyx_v_refs); - __pyx_t_2 = PyObject_Call(((PyObject *)__pyx_v_self->scorer), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_v_self->scorer), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":185 + * self, _compute_sufficient_stats, _compute_score) + * + * def __call__(self, refs): # <<<<<<<<<<<<<< + * return self.scorer(refs) + * + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); @@ -17763,6 +19367,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_6Metric_2__call__(struct __pyx_obj_4cdec_ return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":188 + * return self.scorer(refs) + * + * def score(SufficientStats stats): # <<<<<<<<<<<<<< + * return 0 + * + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_6Metric_5score(PyObject *__pyx_v_stats, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_6Metric_5score(PyObject *__pyx_v_stats, CYTHON_UNUSED PyObject *unused) { @@ -17770,24 +19382,18 @@ static PyObject *__pyx_pw_4cdec_5_cdec_6Metric_5score(PyObject *__pyx_v_stats, C __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("score (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_6Metric_4score(((struct __pyx_obj_4cdec_5_cdec_Metric *)__pyx_v_stats)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":188 - * return self.scorer(refs) - * - * def score(SufficientStats stats): # <<<<<<<<<<<<<< - * return 0 - * - */ - static PyObject *__pyx_pf_4cdec_5_cdec_6Metric_4score(CYTHON_UNUSED struct __pyx_obj_4cdec_5_cdec_Metric *__pyx_v_stats) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("score", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":189 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":189 * * def score(SufficientStats stats): * return 0 # <<<<<<<<<<<<<< @@ -17799,13 +19405,29 @@ static PyObject *__pyx_pf_4cdec_5_cdec_6Metric_4score(CYTHON_UNUSED struct __pyx __pyx_r = __pyx_int_0; goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":188 + * return self.scorer(refs) + * + * def score(SufficientStats stats): # <<<<<<<<<<<<<< + * return 0 + * + */ + + /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":191 + * return 0 + * + * def evaluate(self, hyp, refs): # <<<<<<<<<<<<<< + * return [] + * + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_6Metric_7evaluate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_6Metric_7evaluate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { @@ -17818,7 +19440,7 @@ static PyObject *__pyx_pw_4cdec_5_cdec_6Metric_7evaluate(PyObject *__pyx_v_self, __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("evaluate (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__hyp,&__pyx_n_s__refs,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hyp,&__pyx_n_s_refs,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; @@ -17832,10 +19454,10 @@ static PyObject *__pyx_pw_4cdec_5_cdec_6Metric_7evaluate(PyObject *__pyx_v_self, kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__hyp)) != 0)) kw_args--; + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_hyp)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: - if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__refs)) != 0)) kw_args--; + if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_refs)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("evaluate", 1, 2, 2, 1); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } @@ -17861,18 +19483,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_6Metric_7evaluate(PyObject *__pyx_v_self, return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4cdec_5_cdec_6Metric_6evaluate(((struct __pyx_obj_4cdec_5_cdec_Metric *)__pyx_v_self), __pyx_v_hyp, __pyx_v_refs); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":191 - * return 0 - * - * def evaluate(self, hyp, refs): # <<<<<<<<<<<<<< - * return [] - * - */ - static PyObject *__pyx_pf_4cdec_5_cdec_6Metric_6evaluate(CYTHON_UNUSED struct __pyx_obj_4cdec_5_cdec_Metric *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_hyp, CYTHON_UNUSED PyObject *__pyx_v_refs) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -17882,7 +19498,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_6Metric_6evaluate(CYTHON_UNUSED struct __ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("evaluate", 0); - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":192 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":192 * * def evaluate(self, hyp, refs): * return [] # <<<<<<<<<<<<<< @@ -17892,12 +19508,19 @@ static PyObject *__pyx_pf_4cdec_5_cdec_6Metric_6evaluate(CYTHON_UNUSED struct __ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_r = ((PyObject *)__pyx_t_1); + __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":191 + * return 0 + * + * def evaluate(self, hyp, refs): # <<<<<<<<<<<<<< + * return [] + * + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cdec._cdec.Metric.evaluate", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -17908,6 +19531,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_6Metric_6evaluate(CYTHON_UNUSED struct __ return __pyx_r; } +/* "cdec/_cdec.pyx":28 + * class ParseFailed(Exception): pass + * + * def set_silent(yn): # <<<<<<<<<<<<<< + * """set_silent(bool): Configure the verbosity of cdec.""" + * SetSilent(yn) + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_3set_silent(PyObject *__pyx_self, PyObject *__pyx_v_yn); /*proto*/ static char __pyx_doc_4cdec_5_cdec_2set_silent[] = "set_silent(bool): Configure the verbosity of cdec."; @@ -17917,18 +19548,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_3set_silent(PyObject *__pyx_self, PyObjec __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_silent (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_2set_silent(__pyx_self, ((PyObject *)__pyx_v_yn)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "cdec/_cdec.pyx":28 - * class ParseFailed(Exception): pass - * - * def set_silent(yn): # <<<<<<<<<<<<<< - * """set_silent(bool): Configure the verbosity of cdec.""" - * SetSilent(yn) - */ - static PyObject *__pyx_pf_4cdec_5_cdec_2set_silent(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_yn) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -17948,6 +19573,15 @@ static PyObject *__pyx_pf_4cdec_5_cdec_2set_silent(CYTHON_UNUSED PyObject *__pyx __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_yn); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;} SetSilent(__pyx_t_1); + /* "cdec/_cdec.pyx":28 + * class ParseFailed(Exception): pass + * + * def set_silent(yn): # <<<<<<<<<<<<<< + * """set_silent(bool): Configure the verbosity of cdec.""" + * SetSilent(yn) + */ + + /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; @@ -17960,6 +19594,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_2set_silent(CYTHON_UNUSED PyObject *__pyx } static PyObject *__pyx_gb_4cdec_5_cdec_6generator17(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ +/* "cdec/_cdec.pyx":32 + * SetSilent(yn) + * + * def _make_config(config): # <<<<<<<<<<<<<< + * for key, value in config.items(): + * if isinstance(value, dict): + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_5_make_config(PyObject *__pyx_self, PyObject *__pyx_v_config); /*proto*/ static PyMethodDef __pyx_mdef_4cdec_5_cdec_5_make_config = {__Pyx_NAMESTR("_make_config"), (PyCFunction)__pyx_pw_4cdec_5_cdec_5_make_config, METH_O, __Pyx_DOCSTR(0)}; @@ -17968,18 +19610,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_5_make_config(PyObject *__pyx_self, PyObj __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_make_config (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_4_make_config(__pyx_self, ((PyObject *)__pyx_v_config)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "cdec/_cdec.pyx":32 - * SetSilent(yn) - * - * def _make_config(config): # <<<<<<<<<<<<<< - * for key, value in config.items(): - * if isinstance(value, dict): - */ - static PyObject *__pyx_pf_4cdec_5_cdec_4_make_config(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_config) { struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config *__pyx_cur_scope; PyObject *__pyx_r = NULL; @@ -18004,6 +19640,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_4_make_config(CYTHON_UNUSED PyObject *__p return (PyObject *) gen; } + /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; @@ -18057,9 +19694,9 @@ static PyObject *__pyx_gb_4cdec_5_cdec_6generator17(__pyx_GeneratorObject *__pyx * if isinstance(value, dict): * for name, info in value.items(): */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_config, __pyx_n_s__items); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_config, __pyx_n_s_items); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) { @@ -18089,8 +19726,9 @@ static PyObject *__pyx_gb_4cdec_5_cdec_6generator17(__pyx_GeneratorObject *__pyx } else { __pyx_t_2 = __pyx_t_4(__pyx_t_1); if (unlikely(!__pyx_t_2)) { - if (PyErr_Occurred()) { - if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); + 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 = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; @@ -18126,8 +19764,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_6generator17(__pyx_GeneratorObject *__pyx __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - } else - { + } else { Py_ssize_t index = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); @@ -18149,14 +19786,12 @@ static PyObject *__pyx_gb_4cdec_5_cdec_6generator17(__pyx_GeneratorObject *__pyx __pyx_L7_unpacking_done:; } __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_key); - __Pyx_XDECREF(__pyx_cur_scope->__pyx_v_key); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_key, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); - __pyx_cur_scope->__pyx_v_key = __pyx_t_5; __pyx_t_5 = 0; __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_value); - __Pyx_XDECREF(__pyx_cur_scope->__pyx_v_value); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_value, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); - __pyx_cur_scope->__pyx_v_value = __pyx_t_6; __pyx_t_6 = 0; /* "cdec/_cdec.pyx":34 @@ -18177,9 +19812,9 @@ static PyObject *__pyx_gb_4cdec_5_cdec_6generator17(__pyx_GeneratorObject *__pyx * yield key, '%s %s' % (name, info) * elif isinstance(value, list): */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_value, __pyx_n_s__items); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_value, __pyx_n_s_items); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyList_CheckExact(__pyx_t_6) || PyTuple_CheckExact(__pyx_t_6)) { @@ -18209,8 +19844,9 @@ static PyObject *__pyx_gb_4cdec_5_cdec_6generator17(__pyx_GeneratorObject *__pyx } else { __pyx_t_6 = __pyx_t_12(__pyx_t_2); if (unlikely(!__pyx_t_6)) { - if (PyErr_Occurred()) { - if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); + 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 = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; @@ -18246,8 +19882,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_6generator17(__pyx_GeneratorObject *__pyx __Pyx_GOTREF(__pyx_t_7); #endif __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else - { + } else { Py_ssize_t index = -1; __pyx_t_13 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); @@ -18269,14 +19904,12 @@ static PyObject *__pyx_gb_4cdec_5_cdec_6generator17(__pyx_GeneratorObject *__pyx __pyx_L12_unpacking_done:; } __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_name); - __Pyx_XDECREF(__pyx_cur_scope->__pyx_v_name); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_name, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); - __pyx_cur_scope->__pyx_v_name = __pyx_t_5; __pyx_t_5 = 0; __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_info); - __Pyx_XDECREF(__pyx_cur_scope->__pyx_v_info); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_info, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); - __pyx_cur_scope->__pyx_v_info = __pyx_t_7; __pyx_t_7 = 0; /* "cdec/_cdec.pyx":36 @@ -18294,18 +19927,18 @@ static PyObject *__pyx_gb_4cdec_5_cdec_6generator17(__pyx_GeneratorObject *__pyx __Pyx_INCREF(__pyx_cur_scope->__pyx_v_info); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_cur_scope->__pyx_v_info); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_info); - __pyx_t_7 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_46), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_7)); - __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; + __pyx_t_7 = __Pyx_PyString_Format(__pyx_kp_s_s_s_2, __pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_key); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_cur_scope->__pyx_v_key); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_key); - PyTuple_SET_ITEM(__pyx_t_6, 1, ((PyObject *)__pyx_t_7)); - __Pyx_GIVEREF(((PyObject *)__pyx_t_7)); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_7); + __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_r = ((PyObject *)__pyx_t_6); + __pyx_r = __pyx_t_6; __pyx_t_6 = 0; __Pyx_XGIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_t_0 = __pyx_t_1; @@ -18381,8 +20014,9 @@ static PyObject *__pyx_gb_4cdec_5_cdec_6generator17(__pyx_GeneratorObject *__pyx } else { __pyx_t_6 = __pyx_t_12(__pyx_t_2); if (unlikely(!__pyx_t_6)) { - if (PyErr_Occurred()) { - if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); + 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 = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; @@ -18390,9 +20024,8 @@ static PyObject *__pyx_gb_4cdec_5_cdec_6generator17(__pyx_GeneratorObject *__pyx __Pyx_GOTREF(__pyx_t_6); } __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_name); - __Pyx_XDECREF(__pyx_cur_scope->__pyx_v_name); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_name, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); - __pyx_cur_scope->__pyx_v_name = __pyx_t_6; __pyx_t_6 = 0; /* "cdec/_cdec.pyx":39 @@ -18410,7 +20043,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_6generator17(__pyx_GeneratorObject *__pyx __Pyx_INCREF(__pyx_cur_scope->__pyx_v_name); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_cur_scope->__pyx_v_name); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_name); - __pyx_r = ((PyObject *)__pyx_t_6); + __pyx_r = __pyx_t_6; __pyx_t_6 = 0; __Pyx_XGIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_t_0 = __pyx_t_1; @@ -18455,9 +20088,9 @@ static PyObject *__pyx_gb_4cdec_5_cdec_6generator17(__pyx_GeneratorObject *__pyx __Pyx_INCREF(__pyx_cur_scope->__pyx_v_value); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_cur_scope->__pyx_v_value); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_value); - __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_key); @@ -18466,7 +20099,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_6generator17(__pyx_GeneratorObject *__pyx PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_r = ((PyObject *)__pyx_t_2); + __pyx_r = __pyx_t_2; __pyx_t_2 = 0; __Pyx_XGIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_t_0 = __pyx_t_1; @@ -18488,6 +20121,16 @@ static PyObject *__pyx_gb_4cdec_5_cdec_6generator17(__pyx_GeneratorObject *__pyx __pyx_L8:; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "cdec/_cdec.pyx":32 + * SetSilent(yn) + * + * def _make_config(config): # <<<<<<<<<<<<<< + * for key, value in config.items(): + * if isinstance(value, dict): + */ + + /* function exit code */ PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; @@ -18506,6 +20149,14 @@ static PyObject *__pyx_gb_4cdec_5_cdec_6generator17(__pyx_GeneratorObject *__pyx return NULL; } +/* "cdec/_cdec.pyx":47 + * cdef DenseVector weights + * + * def __init__(self, config_str=None, **config): # <<<<<<<<<<<<<< + * """Decoder('formalism = scfg') -> initialize from configuration string + * Decoder(formalism='scfg') -> initialize from named parameters + */ + /* Python wrapper */ static int __pyx_pw_4cdec_5_cdec_7Decoder_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4cdec_5_cdec_7Decoder___init__[] = "Decoder('formalism = scfg') -> initialize from configuration string\n Decoder(formalism='scfg') -> initialize from named parameters\n Create a decoder using a given configuration. Formalism is required."; @@ -18524,16 +20175,8 @@ static int __pyx_pw_4cdec_5_cdec_7Decoder_1__init__(PyObject *__pyx_v_self, PyOb __pyx_v_config = PyDict_New(); if (unlikely(!__pyx_v_config)) return -1; __Pyx_GOTREF(__pyx_v_config); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__config_str,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_config_str,0}; PyObject* values[1] = {0}; - - /* "cdec/_cdec.pyx":47 - * cdef DenseVector weights - * - * def __init__(self, config_str=None, **config): # <<<<<<<<<<<<<< - * """Decoder('formalism = scfg') -> initialize from configuration string - * Decoder(formalism='scfg') -> initialize from named parameters - */ values[0] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; @@ -18547,7 +20190,7 @@ static int __pyx_pw_4cdec_5_cdec_7Decoder_1__init__(PyObject *__pyx_v_self, PyOb switch (pos_args) { case 0: if (kw_args > 0) { - PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__config_str); + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_config_str); if (value) { values[0] = value; kw_args--; } } } @@ -18573,6 +20216,8 @@ static int __pyx_pw_4cdec_5_cdec_7Decoder_1__init__(PyObject *__pyx_v_self, PyOb return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4cdec_5_cdec_7Decoder___init__(((struct __pyx_obj_4cdec_5_cdec_Decoder *)__pyx_v_self), __pyx_v_config_str, __pyx_v_config); + + /* function exit code */ __Pyx_XDECREF(__pyx_v_config); __Pyx_RefNannyFinishContext(); return __pyx_r; @@ -18611,6 +20256,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_8__init___genexpr(PyObject *__py return (PyObject *) gen; } + /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; @@ -18646,18 +20292,18 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7Decoder_8__init___2generator21(__pyx_Gen } __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s___make_config); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_make_config); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_config)) { __Pyx_RaiseClosureNameError("config"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope->__pyx_v_config)); - PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_cur_scope->__pyx_outer_scope->__pyx_v_config)); - __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope->__pyx_v_config)); - __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_config); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_config); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_config); + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyList_CheckExact(__pyx_t_3) || PyTuple_CheckExact(__pyx_t_3)) { __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; __pyx_t_5 = NULL; @@ -18685,8 +20331,9 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7Decoder_8__init___2generator21(__pyx_Gen } else { __pyx_t_3 = __pyx_t_5(__pyx_t_2); if (unlikely(!__pyx_t_3)) { - if (PyErr_Occurred()) { - if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); + 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 = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; @@ -18694,13 +20341,12 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7Decoder_8__init___2generator21(__pyx_Gen __Pyx_GOTREF(__pyx_t_3); } __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_kv); - __Pyx_XDECREF(__pyx_cur_scope->__pyx_v_kv); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_kv, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); - __pyx_cur_scope->__pyx_v_kv = __pyx_t_3; __pyx_t_3 = 0; - __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_47), __pyx_cur_scope->__pyx_v_kv); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); - __pyx_r = ((PyObject *)__pyx_t_3); + __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_s_s_3, __pyx_cur_scope->__pyx_v_kv); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; __pyx_t_3 = 0; __Pyx_XGIVEREF(__pyx_t_2); __pyx_cur_scope->__pyx_t_0 = __pyx_t_2; @@ -18720,6 +20366,8 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7Decoder_8__init___2generator21(__pyx_Gen if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + + /* function exit code */ PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; @@ -18752,8 +20400,8 @@ static int __pyx_pf_4cdec_5_cdec_7Decoder___init__(struct __pyx_obj_4cdec_5_cdec int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; - int __pyx_t_5; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; char *__pyx_t_7; int __pyx_lineno = 0; @@ -18789,7 +20437,7 @@ static int __pyx_pf_4cdec_5_cdec_7Decoder___init__(struct __pyx_obj_4cdec_5_cdec * if formalism not in ('scfg', 'fst', 'lextrans', 'pb', * 'csplit', 'tagger', 'lexalign'): */ - __pyx_t_3 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_cur_scope->__pyx_v_config), ((PyObject *)__pyx_n_s__formalism), Py_None); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyDict_GetItemDefault(__pyx_cur_scope->__pyx_v_config, __pyx_n_s_formalism, Py_None); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_v_formalism = __pyx_t_3; __pyx_t_3 = 0; @@ -18803,54 +20451,40 @@ static int __pyx_pf_4cdec_5_cdec_7Decoder___init__(struct __pyx_obj_4cdec_5_cdec */ __Pyx_INCREF(__pyx_v_formalism); __pyx_t_3 = __pyx_v_formalism; - __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, ((PyObject *)__pyx_n_s__scfg), Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (((int)__pyx_t_2)) { - __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, ((PyObject *)__pyx_n_s__fst), Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_5 = ((int)__pyx_t_1); + __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_scfg, Py_NE)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__pyx_t_2) { + __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_fst, Py_NE)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __pyx_t_1; } else { - __pyx_t_5 = ((int)__pyx_t_2); + __pyx_t_4 = __pyx_t_2; } - if (__pyx_t_5) { - __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, ((PyObject *)__pyx_n_s__lextrans), Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_1 = ((int)__pyx_t_2); + if (__pyx_t_4) { + __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_lextrans, Py_NE)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_t_2; } else { - __pyx_t_1 = __pyx_t_5; + __pyx_t_1 = __pyx_t_4; } if (__pyx_t_1) { - __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, ((PyObject *)__pyx_n_s__pb), Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_2 = ((int)__pyx_t_5); + __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_pb, Py_NE)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_t_4; } else { __pyx_t_2 = __pyx_t_1; } if (__pyx_t_2) { - __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, ((PyObject *)__pyx_n_s__csplit), Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_5 = ((int)__pyx_t_1); + __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_csplit, Py_NE)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __pyx_t_1; } else { - __pyx_t_5 = __pyx_t_2; + __pyx_t_4 = __pyx_t_2; } - if (__pyx_t_5) { - __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, ((PyObject *)__pyx_n_s__tagger), Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_1 = ((int)__pyx_t_2); + if (__pyx_t_4) { + __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_tagger, Py_NE)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_t_2; } else { - __pyx_t_1 = __pyx_t_5; + __pyx_t_1 = __pyx_t_4; } if (__pyx_t_1) { - __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, ((PyObject *)__pyx_n_s__lexalign), Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_2 = ((int)__pyx_t_5); + __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_lexalign, Py_NE)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_t_4; } else { __pyx_t_2 = __pyx_t_1; } @@ -18865,25 +20499,23 @@ static int __pyx_pf_4cdec_5_cdec_7Decoder___init__(struct __pyx_obj_4cdec_5_cdec * config_str = '\n'.join('%s = %s' % kv for kv in _make_config(config)) * cdef istringstream* config_stream = new istringstream(config_str) */ - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__InvalidConfig); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_InvalidConfig); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_48), __pyx_v_formalism); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_4)); + __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_formalism_s_unknown, __pyx_v_formalism); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_4)); - __Pyx_GIVEREF(((PyObject *)__pyx_t_4)); - __pyx_t_4 = 0; - __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; - __Pyx_Raise(__pyx_t_4, 0, 0, 0); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_Raise(__pyx_t_5, 0, 0, 0); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - goto __pyx_L4; } - __pyx_L4:; /* "cdec/_cdec.pyx":56 * 'csplit', 'tagger', 'lexalign'): @@ -18892,21 +20524,12 @@ static int __pyx_pf_4cdec_5_cdec_7Decoder___init__(struct __pyx_obj_4cdec_5_cdec * cdef istringstream* config_stream = new istringstream(config_str) * self.dec = new decoder.Decoder(config_stream) */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_kp_s_40), __pyx_n_s__join); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __pyx_pf_4cdec_5_cdec_7Decoder_8__init___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6); - __Pyx_GIVEREF(__pyx_t_6); - __pyx_t_6 = 0; - __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __pyx_pf_4cdec_5_cdec_7Decoder_8__init___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyString_Join(__pyx_kp_s__16, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_v_config_str); - __pyx_v_config_str = __pyx_t_6; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF_SET(__pyx_v_config_str, __pyx_t_6); __pyx_t_6 = 0; goto __pyx_L3; } @@ -18947,7 +20570,7 @@ static int __pyx_pf_4cdec_5_cdec_7Decoder___init__(struct __pyx_obj_4cdec_5_cdec * self.weights.vector = &self.dec.CurrentWeightVector() * self.weights.owned = True */ - __pyx_t_6 = __pyx_tp_new_4cdec_5_cdec_DenseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_DenseVector)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __pyx_tp_new_4cdec_5_cdec_DenseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_DenseVector)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); if (!(likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_4cdec_5_cdec_DenseVector)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GIVEREF(__pyx_t_6); @@ -18974,11 +20597,20 @@ static int __pyx_pf_4cdec_5_cdec_7Decoder___init__(struct __pyx_obj_4cdec_5_cdec */ __pyx_v_self->weights->owned = 1; + /* "cdec/_cdec.pyx":47 + * cdef DenseVector weights + * + * def __init__(self, config_str=None, **config): # <<<<<<<<<<<<<< + * """Decoder('formalism = scfg') -> initialize from configuration string + * Decoder(formalism='scfg') -> initialize from named parameters + */ + + /* 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_6); __Pyx_AddTraceback("cdec._cdec.Decoder.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; @@ -18990,24 +20622,26 @@ static int __pyx_pf_4cdec_5_cdec_7Decoder___init__(struct __pyx_obj_4cdec_5_cdec return __pyx_r; } +/* "cdec/_cdec.pyx":64 + * self.weights.owned = True + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * del self.dec + * + */ + /* Python wrapper */ static void __pyx_pw_4cdec_5_cdec_7Decoder_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_4cdec_5_cdec_7Decoder_3__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_4cdec_5_cdec_7Decoder_2__dealloc__(((struct __pyx_obj_4cdec_5_cdec_Decoder *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); } -/* "cdec/_cdec.pyx":64 - * self.weights.owned = True - * - * def __dealloc__(self): # <<<<<<<<<<<<<< - * del self.dec - * - */ - -static void __pyx_pf_4cdec_5_cdec_7Decoder_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cdec_5_cdec_Decoder *__pyx_v_self) { +static void __pyx_pf_4cdec_5_cdec_7Decoder_2__dealloc__(struct __pyx_obj_4cdec_5_cdec_Decoder *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); @@ -19020,9 +20654,26 @@ static void __pyx_pf_4cdec_5_cdec_7Decoder_2__dealloc__(CYTHON_UNUSED struct __p */ delete __pyx_v_self->dec; + /* "cdec/_cdec.pyx":64 + * self.weights.owned = True + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * del self.dec + * + */ + + /* function exit code */ __Pyx_RefNannyFinishContext(); } +/* "cdec/_cdec.pyx":68 + * + * property weights: + * def __get__(self): # <<<<<<<<<<<<<< + * return self.weights + * + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_7Decoder_7weights_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_7Decoder_7weights_1__get__(PyObject *__pyx_v_self) { @@ -19030,18 +20681,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_7Decoder_7weights_1__get__(PyObject *__py __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_7Decoder_7weights___get__(((struct __pyx_obj_4cdec_5_cdec_Decoder *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "cdec/_cdec.pyx":68 - * - * property weights: - * def __get__(self): # <<<<<<<<<<<<<< - * return self.weights - * - */ - static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_7weights___get__(struct __pyx_obj_4cdec_5_cdec_Decoder *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -19059,13 +20704,29 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_7weights___get__(struct __pyx_ob __pyx_r = ((PyObject *)__pyx_v_self->weights); goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); + /* "cdec/_cdec.pyx":68 + * + * property weights: + * def __get__(self): # <<<<<<<<<<<<<< + * return self.weights + * + */ + + /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "cdec/_cdec.pyx":71 + * return self.weights + * + * def __set__(self, weights): # <<<<<<<<<<<<<< + * if isinstance(weights, DenseVector): + * self.weights.vector[0] = ( weights).vector[0] + */ + /* Python wrapper */ static int __pyx_pw_4cdec_5_cdec_7Decoder_7weights_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_weights); /*proto*/ static int __pyx_pw_4cdec_5_cdec_7Decoder_7weights_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_weights) { @@ -19073,18 +20734,12 @@ static int __pyx_pw_4cdec_5_cdec_7Decoder_7weights_3__set__(PyObject *__pyx_v_se __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_7Decoder_7weights_2__set__(((struct __pyx_obj_4cdec_5_cdec_Decoder *)__pyx_v_self), ((PyObject *)__pyx_v_weights)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "cdec/_cdec.pyx":71 - * return self.weights - * - * def __set__(self, weights): # <<<<<<<<<<<<<< - * if isinstance(weights, DenseVector): - * self.weights.vector[0] = ( weights).vector[0] - */ - static int __pyx_pf_4cdec_5_cdec_7Decoder_7weights_2__set__(struct __pyx_obj_4cdec_5_cdec_Decoder *__pyx_v_self, PyObject *__pyx_v_weights) { PyObject *__pyx_v_fname = NULL; PyObject *__pyx_v_fval = NULL; @@ -19176,9 +20831,9 @@ static int __pyx_pf_4cdec_5_cdec_7Decoder_7weights_2__set__(struct __pyx_obj_4cd * self.weights[fname] = fval * else: */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_weights, __pyx_n_s__items); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_weights, __pyx_n_s_items); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyList_CheckExact(__pyx_t_4) || PyTuple_CheckExact(__pyx_t_4)) { @@ -19208,8 +20863,9 @@ static int __pyx_pf_4cdec_5_cdec_7Decoder_7weights_2__set__(struct __pyx_obj_4cd } else { __pyx_t_4 = __pyx_t_6(__pyx_t_3); if (unlikely(!__pyx_t_4)) { - if (PyErr_Occurred()) { - if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); + 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 = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; @@ -19245,8 +20901,7 @@ static int __pyx_pf_4cdec_5_cdec_7Decoder_7weights_2__set__(struct __pyx_obj_4cd __Pyx_GOTREF(__pyx_t_8); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else - { + } else { Py_ssize_t index = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); @@ -19267,11 +20922,9 @@ static int __pyx_pf_4cdec_5_cdec_7Decoder_7weights_2__set__(struct __pyx_obj_4cd {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L7_unpacking_done:; } - __Pyx_XDECREF(__pyx_v_fname); - __pyx_v_fname = __pyx_t_7; + __Pyx_XDECREF_SET(__pyx_v_fname, __pyx_t_7); __pyx_t_7 = 0; - __Pyx_XDECREF(__pyx_v_fval); - __pyx_v_fval = __pyx_t_8; + __Pyx_XDECREF_SET(__pyx_v_fval, __pyx_t_8); __pyx_t_8 = 0; /* "cdec/_cdec.pyx":79 @@ -19281,7 +20934,7 @@ static int __pyx_pf_4cdec_5_cdec_7Decoder_7weights_2__set__(struct __pyx_obj_4cd * else: * raise TypeError('cannot initialize weights with %s' % type(weights)) */ - if (PyObject_SetItem(((PyObject *)__pyx_v_self->weights), __pyx_v_fname, __pyx_v_fval) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_self->weights), __pyx_v_fname, __pyx_v_fval) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L3; @@ -19295,22 +20948,31 @@ static int __pyx_pf_4cdec_5_cdec_7Decoder_7weights_2__set__(struct __pyx_obj_4cd * * property formalism: */ - __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_49), ((PyObject *)Py_TYPE(__pyx_v_weights))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_cannot_initialize_weights_with_s, ((PyObject *)Py_TYPE(__pyx_v_weights))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __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[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_3)); - __Pyx_GIVEREF(((PyObject *)__pyx_t_3)); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; + __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[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L3:; + /* "cdec/_cdec.pyx":71 + * return self.weights + * + * def __set__(self, weights): # <<<<<<<<<<<<<< + * if isinstance(weights, DenseVector): + * self.weights.vector[0] = ( weights).vector[0] + */ + + /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; @@ -19328,6 +20990,14 @@ static int __pyx_pf_4cdec_5_cdec_7Decoder_7weights_2__set__(struct __pyx_obj_4cd return __pyx_r; } +/* "cdec/_cdec.pyx":84 + * + * property formalism: + * def __get__(self): # <<<<<<<<<<<<<< + * cdef variables_map* conf = &self.dec.GetConf() + * return str(conf[0]['formalism'].as_str().c_str()) + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_7Decoder_9formalism_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_7Decoder_9formalism_1__get__(PyObject *__pyx_v_self) { @@ -19335,18 +21005,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_7Decoder_9formalism_1__get__(PyObject *__ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_7Decoder_9formalism___get__(((struct __pyx_obj_4cdec_5_cdec_Decoder *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "cdec/_cdec.pyx":84 - * - * property formalism: - * def __get__(self): # <<<<<<<<<<<<<< - * cdef variables_map* conf = &self.dec.GetConf() - * return str(conf[0]['formalism'].as_str().c_str()) - */ - static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_9formalism___get__(struct __pyx_obj_4cdec_5_cdec_Decoder *__pyx_v_self) { const boost::program_options::variables_map *__pyx_v_conf; PyObject *__pyx_r = NULL; @@ -19375,22 +21039,29 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_9formalism___get__(struct __pyx_ * def read_weights(self, weights): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBytes_FromString(((__pyx_v_conf[0])[__pyx_k__formalism]).as().c_str()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __pyx_t_1 = __Pyx_PyBytes_FromString(((__pyx_v_conf[0])[__pyx_k_formalism]).as().c_str()); 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_t_2 = PyTuple_New(1); 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); - PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_1)); - __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_2, NULL); 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_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "cdec/_cdec.pyx":84 + * + * property formalism: + * def __get__(self): # <<<<<<<<<<<<<< + * cdef variables_map* conf = &self.dec.GetConf() + * return str(conf[0]['formalism'].as_str().c_str()) + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); @@ -19402,6 +21073,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_9formalism___get__(struct __pyx_ return __pyx_r; } +/* "cdec/_cdec.pyx":88 + * return str(conf[0]['formalism'].as_str().c_str()) + * + * def read_weights(self, weights): # <<<<<<<<<<<<<< + * """decoder.read_weights(filename): Read decoder weights from a file.""" + * with open(weights) as fp: + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_7Decoder_5read_weights(PyObject *__pyx_v_self, PyObject *__pyx_v_weights); /*proto*/ static char __pyx_doc_4cdec_5_cdec_7Decoder_4read_weights[] = "decoder.read_weights(filename): Read decoder weights from a file."; @@ -19410,18 +21089,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_7Decoder_5read_weights(PyObject *__pyx_v_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("read_weights (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_7Decoder_4read_weights(((struct __pyx_obj_4cdec_5_cdec_Decoder *)__pyx_v_self), ((PyObject *)__pyx_v_weights)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "cdec/_cdec.pyx":88 - * return str(conf[0]['formalism'].as_str().c_str()) - * - * def read_weights(self, weights): # <<<<<<<<<<<<<< - * """decoder.read_weights(filename): Read decoder weights from a file.""" - * with open(weights) as fp: - */ - static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_4read_weights(struct __pyx_obj_4cdec_5_cdec_Decoder *__pyx_v_self, PyObject *__pyx_v_weights) { PyObject *__pyx_v_fp = NULL; PyObject *__pyx_v_line = NULL; @@ -19463,14 +21136,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_4read_weights(struct __pyx_obj_4 __Pyx_INCREF(__pyx_v_weights); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_weights); __Pyx_GIVEREF(__pyx_v_weights); - __pyx_t_2 = PyObject_Call(__pyx_builtin_open, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s____exit__); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_3 = __Pyx_PyObject_LookupSpecial(__pyx_t_2, __pyx_n_s_exit); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s____enter__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_1 = __Pyx_PyObject_LookupSpecial(__pyx_t_2, __pyx_n_s_enter); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -19518,16 +21191,16 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_4read_weights(struct __pyx_obj_4 } else { __pyx_t_2 = __pyx_t_9(__pyx_t_4); if (unlikely(!__pyx_t_2)) { - if (PyErr_Occurred()) { - if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); + 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 = 91; __pyx_clineno = __LINE__; goto __pyx_L7_error;} } break; } __Pyx_GOTREF(__pyx_t_2); } - __Pyx_XDECREF(__pyx_v_line); - __pyx_v_line = __pyx_t_2; + __Pyx_XDECREF_SET(__pyx_v_line, __pyx_t_2); __pyx_t_2 = 0; /* "cdec/_cdec.pyx":92 @@ -19537,24 +21210,22 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_4read_weights(struct __pyx_obj_4 * fname, value = line.split() * self.weights[fname.strip()] = float(value) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s__strip); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L7_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_strip); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L7_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__startswith); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L7_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_startswith); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_51), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L7_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_10) { goto __pyx_L16_continue; - goto __pyx_L18; } - __pyx_L18:; /* "cdec/_cdec.pyx":93 * for line in fp: @@ -19563,9 +21234,9 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_4read_weights(struct __pyx_obj_4 * self.weights[fname.strip()] = float(value) * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s__split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L7_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L7_error;} + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { @@ -19597,8 +21268,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_4read_weights(struct __pyx_obj_4 __Pyx_GOTREF(__pyx_t_11); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - } else - { + } else { Py_ssize_t index = -1; __pyx_t_12 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_12); @@ -19619,11 +21289,9 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_4read_weights(struct __pyx_obj_4 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __pyx_L20_unpacking_done:; } - __Pyx_XDECREF(__pyx_v_fname); - __pyx_v_fname = __pyx_t_1; + __Pyx_XDECREF_SET(__pyx_v_fname, __pyx_t_1); __pyx_t_1 = 0; - __Pyx_XDECREF(__pyx_v_value); - __pyx_v_value = __pyx_t_11; + __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_11); __pyx_t_11 = 0; /* "cdec/_cdec.pyx":94 @@ -19636,12 +21304,12 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_4read_weights(struct __pyx_obj_4 __pyx_t_14 = __Pyx_PyObject_AsDouble(__pyx_v_value); if (unlikely(__pyx_t_14 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __pyx_t_2 = PyFloat_FromDouble(__pyx_t_14); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_fname, __pyx_n_s__strip); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L7_error;} + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_fname, __pyx_n_s_strip); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_11); - __pyx_t_1 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L7_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - if (PyObject_SetItem(((PyObject *)__pyx_v_self->weights), __pyx_t_1, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L7_error;} + if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_self->weights), __pyx_t_1, __pyx_t_2) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_L16_continue:; @@ -19672,19 +21340,11 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_4read_weights(struct __pyx_obj_4 __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_1); - __pyx_t_11 = PyTuple_New(3); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;} + __pyx_t_11 = PyTuple_Pack(3, __pyx_t_4, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;} __Pyx_GOTREF(__pyx_t_11); - __Pyx_INCREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_4); - __Pyx_GIVEREF(__pyx_t_4); - __Pyx_INCREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_2); - __Pyx_GIVEREF(__pyx_t_2); - __Pyx_INCREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_t_1); - __Pyx_GIVEREF(__pyx_t_1); - __pyx_t_15 = PyObject_Call(__pyx_t_3, __pyx_t_11, NULL); + __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_11, NULL); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;} __Pyx_GOTREF(__pyx_t_15); __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_15); @@ -19694,14 +21354,11 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_4read_weights(struct __pyx_obj_4 if (__pyx_t_16) { __Pyx_GIVEREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); - __Pyx_GIVEREF(__pyx_t_1); + __Pyx_XGIVEREF(__pyx_t_1); __Pyx_ErrRestore(__pyx_t_4, __pyx_t_2, __pyx_t_1); __pyx_t_4 = 0; __pyx_t_2 = 0; __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;} - goto __pyx_L23; } - __pyx_L23:; - __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -19722,15 +21379,17 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_4read_weights(struct __pyx_obj_4 } } /*finally:*/ { - if (__pyx_t_3) { - __pyx_t_7 = PyObject_Call(__pyx_t_3, __pyx_k_tuple_52, NULL); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_7); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (__pyx_t_16 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + /*normal exit:*/{ + if (__pyx_t_3) { + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__22, NULL); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + goto __pyx_L6; } + __pyx_L6:; } goto __pyx_L24; __pyx_L3_error:; @@ -19739,6 +21398,15 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_4read_weights(struct __pyx_obj_4 __pyx_L24:; } + /* "cdec/_cdec.pyx":88 + * return str(conf[0]['formalism'].as_str().c_str()) + * + * def read_weights(self, weights): # <<<<<<<<<<<<<< + * """decoder.read_weights(filename): Read decoder weights from a file.""" + * with open(weights) as fp: + */ + + /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; @@ -19759,6 +21427,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_4read_weights(struct __pyx_obj_4 return __pyx_r; } +/* "cdec/_cdec.pyx":96 + * self.weights[fname.strip()] = float(value) + * + * def translate(self, sentence, grammar=None): # <<<<<<<<<<<<<< + * """decoder.translate(sentence, grammar=None) -> Hypergraph + * Translate a sentence (string/Lattice) with a grammar (string/list of rules).""" + */ + /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_7Decoder_7translate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4cdec_5_cdec_7Decoder_6translate[] = "decoder.translate(sentence, grammar=None) -> Hypergraph\n Translate a sentence (string/Lattice) with a grammar (string/list of rules)."; @@ -19772,16 +21448,8 @@ static PyObject *__pyx_pw_4cdec_5_cdec_7Decoder_7translate(PyObject *__pyx_v_sel __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("translate (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__sentence,&__pyx_n_s__grammar,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sentence,&__pyx_n_s_grammar,0}; PyObject* values[2] = {0,0}; - - /* "cdec/_cdec.pyx":96 - * self.weights[fname.strip()] = float(value) - * - * def translate(self, sentence, grammar=None): # <<<<<<<<<<<<<< - * """decoder.translate(sentence, grammar=None) -> Hypergraph - * Translate a sentence (string/Lattice) with a grammar (string/list of rules).""" - */ values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; @@ -19795,11 +21463,11 @@ static PyObject *__pyx_pw_4cdec_5_cdec_7Decoder_7translate(PyObject *__pyx_v_sel kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__sentence)) != 0)) kw_args--; + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_sentence)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { - PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__grammar); + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_grammar); if (value) { values[1] = value; kw_args--; } } } @@ -19826,6 +21494,8 @@ static PyObject *__pyx_pw_4cdec_5_cdec_7Decoder_7translate(PyObject *__pyx_v_sel return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4cdec_5_cdec_7Decoder_6translate(((struct __pyx_obj_4cdec_5_cdec_Decoder *)__pyx_v_self), __pyx_v_sentence, __pyx_v_grammar); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -19864,12 +21534,12 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_6translate(struct __pyx_obj_4cde * elif isinstance(sentence, Lattice): * input_str = str(sentence) # PLF format */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_sentence, __pyx_n_s__strip); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_sentence, __pyx_n_s_strip); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = ((PyObject *)__pyx_f_4cdec_5_cdec_as_str(__pyx_t_4, NULL)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __pyx_f_4cdec_5_cdec_as_str(__pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_input_str = ((PyObject*)__pyx_t_3); @@ -19900,10 +21570,10 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_6translate(struct __pyx_obj_4cde __Pyx_INCREF(__pyx_v_sentence); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_sentence); __Pyx_GIVEREF(__pyx_v_sentence); - __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__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_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __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(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_4)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_4)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_input_str = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L3; @@ -19917,16 +21587,16 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_6translate(struct __pyx_obj_4cde * if grammar: * if isinstance(grammar, basestring): */ - __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_53), ((PyObject *)Py_TYPE(__pyx_v_sentence))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_4)); + __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Cannot_translate_input_type_s, ((PyObject *)Py_TYPE(__pyx_v_sentence))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __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 = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_4)); - __Pyx_GIVEREF(((PyObject *)__pyx_t_4)); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -19961,7 +21631,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_6translate(struct __pyx_obj_4cde * else: * self.dec.AddSupplementalGrammar(TextGrammar(grammar).grammar[0]) */ - __pyx_t_4 = ((PyObject *)__pyx_f_4cdec_5_cdec_as_str(__pyx_v_grammar, NULL)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __pyx_f_4cdec_5_cdec_as_str(__pyx_v_grammar, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __pyx_convert_string_from_py_(__pyx_t_4); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -19982,9 +21652,9 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_6translate(struct __pyx_obj_4cde __Pyx_INCREF(__pyx_v_grammar); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_grammar); __Pyx_GIVEREF(__pyx_v_grammar); - __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_TextGrammar)), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_TextGrammar)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_self->dec->AddSupplementalGrammar((((struct __pyx_obj_4cdec_5_cdec_TextGrammar *)__pyx_t_3)->__pyx_base.grammar[0])); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } @@ -20009,7 +21679,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_6translate(struct __pyx_obj_4cde * if observer.hypergraph == NULL: * raise ParseFailed() */ - __pyx_t_5 = __pyx_convert_string_from_py_(((PyObject *)__pyx_v_input_str)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __pyx_convert_string_from_py_(__pyx_v_input_str); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->dec->Decode(__pyx_t_5, (&__pyx_v_observer)); /* "cdec/_cdec.pyx":113 @@ -20029,17 +21699,15 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_6translate(struct __pyx_obj_4cde * cdef Hypergraph hg = Hypergraph() * hg.hg = new hypergraph.Hypergraph(observer.hypergraph[0]) */ - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__ParseFailed); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_ParseFailed); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - goto __pyx_L6; } - __pyx_L6:; /* "cdec/_cdec.pyx":115 * if observer.hypergraph == NULL: @@ -20048,7 +21716,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_6translate(struct __pyx_obj_4cde * hg.hg = new hypergraph.Hypergraph(observer.hypergraph[0]) * return hg */ - __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_Hypergraph)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_Hypergraph)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_v_hg = ((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_t_4); __pyx_t_4 = 0; @@ -20071,8 +21739,15 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_6translate(struct __pyx_obj_4cde __pyx_r = ((PyObject *)__pyx_v_hg); goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "cdec/_cdec.pyx":96 + * self.weights[fname.strip()] = float(value) + * + * def translate(self, sentence, grammar=None): # <<<<<<<<<<<<<< + * """decoder.translate(sentence, grammar=None) -> Hypergraph + * Translate a sentence (string/Lattice) with a grammar (string/list of rules).""" + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); @@ -20099,6 +21774,10 @@ static std::string __pyx_convert_string_from_py_(PyObject *__pyx_v_o) { char *__pyx_v_data; std::string __pyx_r; __Pyx_RefNannyDeclarations + char *__pyx_t_1; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_convert_string_from_py_", 0); /* "string.from_py":15 @@ -20108,7 +21787,8 @@ static std::string __pyx_convert_string_from_py_(PyObject *__pyx_v_o) { * return string(data, length) * */ - __pyx_v_data = __Pyx_PyObject_AsStringAndSize(__pyx_v_o, (&__pyx_v_length)); + __pyx_t_1 = __Pyx_PyObject_AsStringAndSize(__pyx_v_o, (&__pyx_v_length)); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_data = __pyx_t_1; /* "string.from_py":16 * cdef Py_ssize_t length @@ -20120,125 +21800,99 @@ static std::string __pyx_convert_string_from_py_(PyObject *__pyx_v_o) { __pyx_r = std::string(__pyx_v_data, __pyx_v_length); goto __pyx_L0; + /* "string.from_py":13 + * + * @cname("__pyx_convert_string_from_py_") + * cdef string __pyx_convert_string_from_py_(object o) except *: # <<<<<<<<<<<<<< + * cdef Py_ssize_t length + * cdef char* data = __Pyx_PyObject_AsStringAndSize(o, &length) + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_AddTraceback("string.from_py.__pyx_convert_string_from_py_", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_tp_new_4cdec_5_cdec_TRule(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { +static PyObject *__pyx_tp_new_4cdec_5_cdec_DenseVector(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; - o = (*t->tp_alloc)(t, 0); + 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; return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec_TRule(PyObject *o) { +static void __pyx_tp_dealloc_4cdec_5_cdec_DenseVector(PyObject *o) { + #if PY_VERSION_HEX >= 0x030400a1 + if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + #endif { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); - __pyx_pw_4cdec_5_cdec_5TRule_3__dealloc__(o); - if (PyErr_Occurred()) PyErr_WriteUnraisable(o); + __pyx_pw_4cdec_5_cdec_11DenseVector_3__dealloc__(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); } (*Py_TYPE(o)->tp_free)(o); } - -static PyObject *__pyx_getprop_4cdec_5_cdec_5TRule_arity(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_4cdec_5_cdec_5TRule_5arity_1__get__(o); -} - -static PyObject *__pyx_getprop_4cdec_5_cdec_5TRule_f(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_4cdec_5_cdec_5TRule_1f_1__get__(o); +static PyObject *__pyx_sq_item_4cdec_5_cdec_DenseVector(PyObject *o, Py_ssize_t i) { + PyObject *r; + PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0; + r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x); + Py_DECREF(x); + return r; } -static int __pyx_setprop_4cdec_5_cdec_5TRule_f(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { +static int __pyx_mp_ass_subscript_4cdec_5_cdec_DenseVector(PyObject *o, PyObject *i, PyObject *v) { if (v) { - return __pyx_pw_4cdec_5_cdec_5TRule_1f_3__set__(o, v); + return __pyx_pw_4cdec_5_cdec_11DenseVector_9__setitem__(o, i, v); } else { - PyErr_SetString(PyExc_NotImplementedError, "__del__"); + PyErr_Format(PyExc_NotImplementedError, + "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name); return -1; } } -static PyObject *__pyx_getprop_4cdec_5_cdec_5TRule_e(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_4cdec_5_cdec_5TRule_1e_1__get__(o); -} +static PyMethodDef __pyx_methods_4cdec_5_cdec_DenseVector[] = { + {__Pyx_NAMESTR("dot"), (PyCFunction)__pyx_pw_4cdec_5_cdec_11DenseVector_14dot, METH_O, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_11DenseVector_13dot)}, + {__Pyx_NAMESTR("tosparse"), (PyCFunction)__pyx_pw_4cdec_5_cdec_11DenseVector_16tosparse, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_11DenseVector_15tosparse)}, + {0, 0, 0, 0} +}; -static int __pyx_setprop_4cdec_5_cdec_5TRule_e(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { - if (v) { - return __pyx_pw_4cdec_5_cdec_5TRule_1e_3__set__(o, v); - } - else { - PyErr_SetString(PyExc_NotImplementedError, "__del__"); - return -1; - } -} - -static PyObject *__pyx_getprop_4cdec_5_cdec_5TRule_a(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_4cdec_5_cdec_5TRule_1a_1__get__(o); -} - -static int __pyx_setprop_4cdec_5_cdec_5TRule_a(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { - if (v) { - return __pyx_pw_4cdec_5_cdec_5TRule_1a_4__set__(o, v); - } - else { - PyErr_SetString(PyExc_NotImplementedError, "__del__"); - return -1; - } -} - -static PyObject *__pyx_getprop_4cdec_5_cdec_5TRule_scores(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_4cdec_5_cdec_5TRule_6scores_1__get__(o); -} - -static int __pyx_setprop_4cdec_5_cdec_5TRule_scores(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { - if (v) { - return __pyx_pw_4cdec_5_cdec_5TRule_6scores_3__set__(o, v); - } - else { - PyErr_SetString(PyExc_NotImplementedError, "__del__"); - return -1; - } -} - -static PyObject *__pyx_getprop_4cdec_5_cdec_5TRule_lhs(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_4cdec_5_cdec_5TRule_3lhs_1__get__(o); -} - -static int __pyx_setprop_4cdec_5_cdec_5TRule_lhs(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { - if (v) { - return __pyx_pw_4cdec_5_cdec_5TRule_3lhs_3__set__(o, v); - } - else { - PyErr_SetString(PyExc_NotImplementedError, "__del__"); - return -1; - } -} - -static PyMethodDef __pyx_methods_4cdec_5_cdec_TRule[] = { - {0, 0, 0, 0} +static PySequenceMethods __pyx_tp_as_sequence_DenseVector = { + __pyx_pw_4cdec_5_cdec_11DenseVector_5__len__, /*sq_length*/ + 0, /*sq_concat*/ + 0, /*sq_repeat*/ + __pyx_sq_item_4cdec_5_cdec_DenseVector, /*sq_item*/ + 0, /*sq_slice*/ + 0, /*sq_ass_item*/ + 0, /*sq_ass_slice*/ + 0, /*sq_contains*/ + 0, /*sq_inplace_concat*/ + 0, /*sq_inplace_repeat*/ }; -static struct PyGetSetDef __pyx_getsets_4cdec_5_cdec_TRule[] = { - {(char *)"arity", __pyx_getprop_4cdec_5_cdec_5TRule_arity, 0, 0, 0}, - {(char *)"f", __pyx_getprop_4cdec_5_cdec_5TRule_f, __pyx_setprop_4cdec_5_cdec_5TRule_f, 0, 0}, - {(char *)"e", __pyx_getprop_4cdec_5_cdec_5TRule_e, __pyx_setprop_4cdec_5_cdec_5TRule_e, 0, 0}, - {(char *)"a", __pyx_getprop_4cdec_5_cdec_5TRule_a, __pyx_setprop_4cdec_5_cdec_5TRule_a, 0, 0}, - {(char *)"scores", __pyx_getprop_4cdec_5_cdec_5TRule_scores, __pyx_setprop_4cdec_5_cdec_5TRule_scores, 0, 0}, - {(char *)"lhs", __pyx_getprop_4cdec_5_cdec_5TRule_lhs, __pyx_setprop_4cdec_5_cdec_5TRule_lhs, 0, 0}, - {0, 0, 0, 0, 0} +static PyMappingMethods __pyx_tp_as_mapping_DenseVector = { + __pyx_pw_4cdec_5_cdec_11DenseVector_5__len__, /*mp_length*/ + __pyx_pw_4cdec_5_cdec_11DenseVector_7__getitem__, /*mp_subscript*/ + __pyx_mp_ass_subscript_4cdec_5_cdec_DenseVector, /*mp_ass_subscript*/ }; -static PyTypeObject __pyx_type_4cdec_5_cdec_TRule = { +static PyTypeObject __pyx_type_4cdec_5_cdec_DenseVector = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.TRule"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec_TRule), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.DenseVector"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec_DenseVector), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec_TRule, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec_DenseVector, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -20249,11 +21903,11 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_TRule = { #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ - 0, /*tp_as_sequence*/ - 0, /*tp_as_mapping*/ + &__pyx_tp_as_sequence_DenseVector, /*tp_as_sequence*/ + &__pyx_tp_as_mapping_DenseVector, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ - __pyx_pw_4cdec_5_cdec_5TRule_5__str__, /*tp_str*/ + 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ @@ -20263,19 +21917,19 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_TRule = { 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ - 0, /*tp_iter*/ + __pyx_pw_4cdec_5_cdec_11DenseVector_11__iter__, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_4cdec_5_cdec_TRule, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec_DenseVector, /*tp_methods*/ 0, /*tp_members*/ - __pyx_getsets_4cdec_5_cdec_TRule, /*tp_getset*/ + 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ - __pyx_pw_4cdec_5_cdec_5TRule_1__init__, /*tp_init*/ + __pyx_pw_4cdec_5_cdec_11DenseVector_1__init__, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec_TRule, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec_DenseVector, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -20287,24 +21941,146 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_TRule = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif }; -static PyObject *__pyx_tp_new_4cdec_5_cdec_MRule(PyTypeObject *t, PyObject *a, PyObject *k) { - PyObject *o = __pyx_tp_new_4cdec_5_cdec_TRule(t, a, k); +static PyObject *__pyx_tp_new_4cdec_5_cdec_SparseVector(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + 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; return o; } -static PyMethodDef __pyx_methods_4cdec_5_cdec_MRule[] = { +static void __pyx_tp_dealloc_4cdec_5_cdec_SparseVector(PyObject *o) { + #if PY_VERSION_HEX >= 0x030400a1 + if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + #endif + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + ++Py_REFCNT(o); + __pyx_pw_4cdec_5_cdec_12SparseVector_3__dealloc__(o); + --Py_REFCNT(o); + PyErr_Restore(etype, eval, etb); + } + (*Py_TYPE(o)->tp_free)(o); +} +static PyObject *__pyx_sq_item_4cdec_5_cdec_SparseVector(PyObject *o, Py_ssize_t i) { + PyObject *r; + PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0; + r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x); + Py_DECREF(x); + return r; +} + +static int __pyx_mp_ass_subscript_4cdec_5_cdec_SparseVector(PyObject *o, PyObject *i, PyObject *v) { + if (v) { + return __pyx_pw_4cdec_5_cdec_12SparseVector_9__setitem__(o, i, v); + } + else { + PyErr_Format(PyExc_NotImplementedError, + "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name); + return -1; + } +} + +static PyMethodDef __pyx_methods_4cdec_5_cdec_SparseVector[] = { + {__Pyx_NAMESTR("copy"), (PyCFunction)__pyx_pw_4cdec_5_cdec_12SparseVector_5copy, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_12SparseVector_4copy)}, + {__Pyx_NAMESTR("dot"), (PyCFunction)__pyx_pw_4cdec_5_cdec_12SparseVector_14dot, METH_O, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_12SparseVector_13dot)}, {0, 0, 0, 0} }; -static PyTypeObject __pyx_type_4cdec_5_cdec_MRule = { +static PyNumberMethods __pyx_tp_as_number_SparseVector = { + __pyx_pw_4cdec_5_cdec_12SparseVector_32__add__, /*nb_add*/ + __pyx_pw_4cdec_5_cdec_12SparseVector_34__sub__, /*nb_subtract*/ + __pyx_pw_4cdec_5_cdec_12SparseVector_36__mul__, /*nb_multiply*/ + #if PY_MAJOR_VERSION < 3 + __pyx_pw_4cdec_5_cdec_12SparseVector_38__div__, /*nb_divide*/ + #endif + 0, /*nb_remainder*/ + 0, /*nb_divmod*/ + 0, /*nb_power*/ + __pyx_pw_4cdec_5_cdec_12SparseVector_22__neg__, /*nb_negative*/ + 0, /*nb_positive*/ + 0, /*nb_absolute*/ + 0, /*nb_nonzero*/ + 0, /*nb_invert*/ + 0, /*nb_lshift*/ + 0, /*nb_rshift*/ + 0, /*nb_and*/ + 0, /*nb_xor*/ + 0, /*nb_or*/ + #if PY_MAJOR_VERSION < 3 + 0, /*nb_coerce*/ + #endif + 0, /*nb_int*/ + #if PY_MAJOR_VERSION < 3 + 0, /*nb_long*/ + #else + 0, /*reserved*/ + #endif + 0, /*nb_float*/ + #if PY_MAJOR_VERSION < 3 + 0, /*nb_oct*/ + #endif + #if PY_MAJOR_VERSION < 3 + 0, /*nb_hex*/ + #endif + __pyx_pw_4cdec_5_cdec_12SparseVector_24__iadd__, /*nb_inplace_add*/ + __pyx_pw_4cdec_5_cdec_12SparseVector_26__isub__, /*nb_inplace_subtract*/ + __pyx_pw_4cdec_5_cdec_12SparseVector_28__imul__, /*nb_inplace_multiply*/ + #if PY_MAJOR_VERSION < 3 + __pyx_pw_4cdec_5_cdec_12SparseVector_30__idiv__, /*nb_inplace_divide*/ + #endif + 0, /*nb_inplace_remainder*/ + 0, /*nb_inplace_power*/ + 0, /*nb_inplace_lshift*/ + 0, /*nb_inplace_rshift*/ + 0, /*nb_inplace_and*/ + 0, /*nb_inplace_xor*/ + 0, /*nb_inplace_or*/ + 0, /*nb_floor_divide*/ + 0, /*nb_true_divide*/ + 0, /*nb_inplace_floor_divide*/ + 0, /*nb_inplace_true_divide*/ + #if PY_VERSION_HEX >= 0x02050000 + 0, /*nb_index*/ + #endif +}; + +static PySequenceMethods __pyx_tp_as_sequence_SparseVector = { + __pyx_pw_4cdec_5_cdec_12SparseVector_18__len__, /*sq_length*/ + 0, /*sq_concat*/ + 0, /*sq_repeat*/ + __pyx_sq_item_4cdec_5_cdec_SparseVector, /*sq_item*/ + 0, /*sq_slice*/ + 0, /*sq_ass_item*/ + 0, /*sq_ass_slice*/ + __pyx_pw_4cdec_5_cdec_12SparseVector_20__contains__, /*sq_contains*/ + 0, /*sq_inplace_concat*/ + 0, /*sq_inplace_repeat*/ +}; + +static PyMappingMethods __pyx_tp_as_mapping_SparseVector = { + __pyx_pw_4cdec_5_cdec_12SparseVector_18__len__, /*mp_length*/ + __pyx_pw_4cdec_5_cdec_12SparseVector_7__getitem__, /*mp_subscript*/ + __pyx_mp_ass_subscript_4cdec_5_cdec_SparseVector, /*mp_ass_subscript*/ +}; + +static PyTypeObject __pyx_type_4cdec_5_cdec_SparseVector = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.MRule"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec_MRule), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.SparseVector"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec_SparseVector), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec_TRule, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec_SparseVector, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -20314,16 +22090,12 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_MRule = { 0, /*reserved*/ #endif 0, /*tp_repr*/ - 0, /*tp_as_number*/ - 0, /*tp_as_sequence*/ - 0, /*tp_as_mapping*/ + &__pyx_tp_as_number_SparseVector, /*tp_as_number*/ + &__pyx_tp_as_sequence_SparseVector, /*tp_as_sequence*/ + &__pyx_tp_as_mapping_SparseVector, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ - #if CYTHON_COMPILING_IN_PYPY - __pyx_pw_4cdec_5_cdec_5TRule_5__str__, /*tp_str*/ - #else 0, /*tp_str*/ - #endif 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ @@ -20331,11 +22103,11 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_MRule = { 0, /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ - 0, /*tp_richcompare*/ + __pyx_pw_4cdec_5_cdec_12SparseVector_16__richcmp__, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ - 0, /*tp_iter*/ + __pyx_pw_4cdec_5_cdec_12SparseVector_11__iter__, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_4cdec_5_cdec_MRule, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec_SparseVector, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -20343,9 +22115,9 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_MRule = { 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ - __pyx_pw_4cdec_5_cdec_5MRule_1__init__, /*tp_init*/ + __pyx_pw_4cdec_5_cdec_12SparseVector_1__init__, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec_MRule, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec_SparseVector, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -20357,67 +22129,79 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_MRule = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif }; -static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_22___iter__[8]; -static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_22___iter__ = 0; - -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_22___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__ *p; +static PyObject *__pyx_tp_new_4cdec_5_cdec_NT(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec_NT *p; PyObject *o; - if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_22___iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__)))) { - o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_22___iter__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_22___iter__]; - memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__)); - PyObject_INIT(o, t); - PyObject_GC_Track(o); - } else { + if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); - if (unlikely(!o)) return 0; + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } - p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__ *)o); - p->__pyx_v_self = 0; + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_4cdec_5_cdec_NT *)o); + p->cat = ((PyObject*)Py_None); Py_INCREF(Py_None); return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_22___iter__(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__ *)o; - PyObject_GC_UnTrack(o); - Py_CLEAR(p->__pyx_v_self); - if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_22___iter__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__))) { - __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_22___iter__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_22___iter__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__ *)o); - } else { - (*Py_TYPE(o)->tp_free)(o); +static void __pyx_tp_dealloc_4cdec_5_cdec_NT(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec_NT *p = (struct __pyx_obj_4cdec_5_cdec_NT *)o; + #if PY_VERSION_HEX >= 0x030400a1 + if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { + if (PyObject_CallFinalizerFromDealloc(o)) return; } + #endif + Py_CLEAR(p->cat); + (*Py_TYPE(o)->tp_free)(o); } -static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_22___iter__(PyObject *o, visitproc v, void *a) { - int e; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__ *)o; - if (p->__pyx_v_self) { - e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; +static PyObject *__pyx_getprop_4cdec_5_cdec_2NT_cat(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_2NT_3cat_1__get__(o); +} + +static int __pyx_setprop_4cdec_5_cdec_2NT_cat(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_4cdec_5_cdec_2NT_3cat_3__set__(o, v); + } + else { + return __pyx_pw_4cdec_5_cdec_2NT_3cat_5__del__(o); } - return 0; } -static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_22___iter__(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__ *)o; - PyObject* tmp; - tmp = ((PyObject*)p->__pyx_v_self); - p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_CandidateSet *)Py_None); Py_INCREF(Py_None); - Py_XDECREF(tmp); - return 0; +static PyObject *__pyx_getprop_4cdec_5_cdec_2NT_ref(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_2NT_3ref_1__get__(o); +} + +static int __pyx_setprop_4cdec_5_cdec_2NT_ref(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_4cdec_5_cdec_2NT_3ref_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } } -static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_22___iter__[] = { +static PyMethodDef __pyx_methods_4cdec_5_cdec_NT[] = { {0, 0, 0, 0} }; -static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_22___iter__ = { +static struct PyGetSetDef __pyx_getsets_4cdec_5_cdec_NT[] = { + {(char *)"cat", __pyx_getprop_4cdec_5_cdec_2NT_cat, __pyx_setprop_4cdec_5_cdec_2NT_cat, 0, 0}, + {(char *)"ref", __pyx_getprop_4cdec_5_cdec_2NT_ref, __pyx_setprop_4cdec_5_cdec_2NT_ref, 0, 0}, + {0, 0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_4cdec_5_cdec_NT = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_22___iter__"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.NT"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec_NT), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_22___iter__, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec_NT, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -20432,29 +22216,29 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_22___iter__ = { 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ - 0, /*tp_str*/ + __pyx_pw_4cdec_5_cdec_2NT_3__str__, /*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*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ - __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_22___iter__, /*tp_traverse*/ - __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_22___iter__, /*tp_clear*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_4cdec_5_cdec___pyx_scope_struct_22___iter__, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec_NT, /*tp_methods*/ 0, /*tp_members*/ - 0, /*tp_getset*/ + __pyx_getsets_4cdec_5_cdec_NT, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ - 0, /*tp_init*/ + __pyx_pw_4cdec_5_cdec_2NT_1__init__, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_22___iter__, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec_NT, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -20466,77 +22250,60 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_22___iter__ = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif }; -static PyObject *__pyx_tp_new_4cdec_5_cdec_DenseVector(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { +static PyObject *__pyx_tp_new_4cdec_5_cdec_NTRef(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; - o = (*t->tp_alloc)(t, 0); + 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; return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec_DenseVector(PyObject *o) { - { - PyObject *etype, *eval, *etb; - PyErr_Fetch(&etype, &eval, &etb); - ++Py_REFCNT(o); - __pyx_pw_4cdec_5_cdec_11DenseVector_3__dealloc__(o); - if (PyErr_Occurred()) PyErr_WriteUnraisable(o); - --Py_REFCNT(o); - PyErr_Restore(etype, eval, etb); +static void __pyx_tp_dealloc_4cdec_5_cdec_NTRef(PyObject *o) { + #if PY_VERSION_HEX >= 0x030400a1 + if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { + if (PyObject_CallFinalizerFromDealloc(o)) return; } + #endif (*Py_TYPE(o)->tp_free)(o); } -static PyObject *__pyx_sq_item_4cdec_5_cdec_DenseVector(PyObject *o, Py_ssize_t i) { - PyObject *r; - PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0; - r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x); - Py_DECREF(x); - return r; + +static PyObject *__pyx_getprop_4cdec_5_cdec_5NTRef_ref(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_5NTRef_3ref_1__get__(o); } -static int __pyx_mp_ass_subscript_4cdec_5_cdec_DenseVector(PyObject *o, PyObject *i, PyObject *v) { +static int __pyx_setprop_4cdec_5_cdec_5NTRef_ref(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { - return __pyx_pw_4cdec_5_cdec_11DenseVector_9__setitem__(o, i, v); + return __pyx_pw_4cdec_5_cdec_5NTRef_3ref_3__set__(o, v); } else { - PyErr_Format(PyExc_NotImplementedError, - "Subscript deletion not supported by %s", Py_TYPE(o)->tp_name); + PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } -static PyMethodDef __pyx_methods_4cdec_5_cdec_DenseVector[] = { - {__Pyx_NAMESTR("dot"), (PyCFunction)__pyx_pw_4cdec_5_cdec_11DenseVector_14dot, METH_O, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_11DenseVector_13dot)}, - {__Pyx_NAMESTR("tosparse"), (PyCFunction)__pyx_pw_4cdec_5_cdec_11DenseVector_16tosparse, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_11DenseVector_15tosparse)}, +static PyMethodDef __pyx_methods_4cdec_5_cdec_NTRef[] = { {0, 0, 0, 0} }; -static PySequenceMethods __pyx_tp_as_sequence_DenseVector = { - __pyx_pw_4cdec_5_cdec_11DenseVector_5__len__, /*sq_length*/ - 0, /*sq_concat*/ - 0, /*sq_repeat*/ - __pyx_sq_item_4cdec_5_cdec_DenseVector, /*sq_item*/ - 0, /*sq_slice*/ - 0, /*sq_ass_item*/ - 0, /*sq_ass_slice*/ - 0, /*sq_contains*/ - 0, /*sq_inplace_concat*/ - 0, /*sq_inplace_repeat*/ -}; - -static PyMappingMethods __pyx_tp_as_mapping_DenseVector = { - __pyx_pw_4cdec_5_cdec_11DenseVector_5__len__, /*mp_length*/ - __pyx_pw_4cdec_5_cdec_11DenseVector_7__getitem__, /*mp_subscript*/ - __pyx_mp_ass_subscript_4cdec_5_cdec_DenseVector, /*mp_ass_subscript*/ +static struct PyGetSetDef __pyx_getsets_4cdec_5_cdec_NTRef[] = { + {(char *)"ref", __pyx_getprop_4cdec_5_cdec_5NTRef_ref, __pyx_setprop_4cdec_5_cdec_5NTRef_ref, 0, 0}, + {0, 0, 0, 0, 0} }; -static PyTypeObject __pyx_type_4cdec_5_cdec_DenseVector = { +static PyTypeObject __pyx_type_4cdec_5_cdec_NTRef = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.DenseVector"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec_DenseVector), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.NTRef"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec_NTRef), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec_DenseVector, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec_NTRef, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -20547,11 +22314,11 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_DenseVector = { #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ - &__pyx_tp_as_sequence_DenseVector, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_DenseVector, /*tp_as_mapping*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ - 0, /*tp_str*/ + __pyx_pw_4cdec_5_cdec_5NTRef_3__str__, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ @@ -20561,19 +22328,19 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_DenseVector = { 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ - __pyx_pw_4cdec_5_cdec_11DenseVector_11__iter__, /*tp_iter*/ + 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_4cdec_5_cdec_DenseVector, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec_NTRef, /*tp_methods*/ 0, /*tp_members*/ - 0, /*tp_getset*/ + __pyx_getsets_4cdec_5_cdec_NTRef, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ - __pyx_pw_4cdec_5_cdec_11DenseVector_1__init__, /*tp_init*/ + __pyx_pw_4cdec_5_cdec_5NTRef_1__init__, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec_DenseVector, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec_NTRef, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -20585,136 +22352,133 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_DenseVector = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif }; -static PyObject *__pyx_tp_new_4cdec_5_cdec_SufficientStats(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { +static PyObject *__pyx_tp_new_4cdec_5_cdec_TRule(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; - o = (*t->tp_alloc)(t, 0); + 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; return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec_SufficientStats(PyObject *o) { +static void __pyx_tp_dealloc_4cdec_5_cdec_TRule(PyObject *o) { + #if PY_VERSION_HEX >= 0x030400a1 + if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + #endif { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); - __pyx_pw_4cdec_5_cdec_15SufficientStats_1__dealloc__(o); - if (PyErr_Occurred()) PyErr_WriteUnraisable(o); + __pyx_pw_4cdec_5_cdec_5TRule_3__dealloc__(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); } (*Py_TYPE(o)->tp_free)(o); } -static PyObject *__pyx_sq_item_4cdec_5_cdec_SufficientStats(PyObject *o, Py_ssize_t i) { - PyObject *r; - PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0; - r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x); - Py_DECREF(x); - return r; + +static PyObject *__pyx_getprop_4cdec_5_cdec_5TRule_arity(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_5TRule_5arity_1__get__(o); } -static PyObject *__pyx_getprop_4cdec_5_cdec_15SufficientStats_score(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_4cdec_5_cdec_15SufficientStats_5score_1__get__(o); +static PyObject *__pyx_getprop_4cdec_5_cdec_5TRule_f(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_5TRule_1f_1__get__(o); } -static PyObject *__pyx_getprop_4cdec_5_cdec_15SufficientStats_detail(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_4cdec_5_cdec_15SufficientStats_6detail_1__get__(o); +static int __pyx_setprop_4cdec_5_cdec_5TRule_f(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_4cdec_5_cdec_5TRule_1f_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } } -static PyMethodDef __pyx_methods_4cdec_5_cdec_SufficientStats[] = { +static PyObject *__pyx_getprop_4cdec_5_cdec_5TRule_e(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_5TRule_1e_1__get__(o); +} + +static int __pyx_setprop_4cdec_5_cdec_5TRule_e(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_4cdec_5_cdec_5TRule_1e_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_4cdec_5_cdec_5TRule_a(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_5TRule_1a_1__get__(o); +} + +static int __pyx_setprop_4cdec_5_cdec_5TRule_a(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_4cdec_5_cdec_5TRule_1a_4__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_4cdec_5_cdec_5TRule_scores(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_5TRule_6scores_1__get__(o); +} + +static int __pyx_setprop_4cdec_5_cdec_5TRule_scores(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_4cdec_5_cdec_5TRule_6scores_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_4cdec_5_cdec_5TRule_lhs(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_5TRule_3lhs_1__get__(o); +} + +static int __pyx_setprop_4cdec_5_cdec_5TRule_lhs(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_4cdec_5_cdec_5TRule_3lhs_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyMethodDef __pyx_methods_4cdec_5_cdec_TRule[] = { {0, 0, 0, 0} }; -static struct PyGetSetDef __pyx_getsets_4cdec_5_cdec_SufficientStats[] = { - {(char *)"score", __pyx_getprop_4cdec_5_cdec_15SufficientStats_score, 0, 0, 0}, - {(char *)"detail", __pyx_getprop_4cdec_5_cdec_15SufficientStats_detail, 0, 0, 0}, +static struct PyGetSetDef __pyx_getsets_4cdec_5_cdec_TRule[] = { + {(char *)"arity", __pyx_getprop_4cdec_5_cdec_5TRule_arity, 0, 0, 0}, + {(char *)"f", __pyx_getprop_4cdec_5_cdec_5TRule_f, __pyx_setprop_4cdec_5_cdec_5TRule_f, 0, 0}, + {(char *)"e", __pyx_getprop_4cdec_5_cdec_5TRule_e, __pyx_setprop_4cdec_5_cdec_5TRule_e, 0, 0}, + {(char *)"a", __pyx_getprop_4cdec_5_cdec_5TRule_a, __pyx_setprop_4cdec_5_cdec_5TRule_a, 0, 0}, + {(char *)"scores", __pyx_getprop_4cdec_5_cdec_5TRule_scores, __pyx_setprop_4cdec_5_cdec_5TRule_scores, 0, 0}, + {(char *)"lhs", __pyx_getprop_4cdec_5_cdec_5TRule_lhs, __pyx_setprop_4cdec_5_cdec_5TRule_lhs, 0, 0}, {0, 0, 0, 0, 0} }; -static PyNumberMethods __pyx_tp_as_number_SufficientStats = { - __pyx_pw_4cdec_5_cdec_15SufficientStats_12__add__, /*nb_add*/ - 0, /*nb_subtract*/ - 0, /*nb_multiply*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_divide*/ - #endif - 0, /*nb_remainder*/ - 0, /*nb_divmod*/ - 0, /*nb_power*/ - 0, /*nb_negative*/ - 0, /*nb_positive*/ - 0, /*nb_absolute*/ - 0, /*nb_nonzero*/ - 0, /*nb_invert*/ - 0, /*nb_lshift*/ - 0, /*nb_rshift*/ - 0, /*nb_and*/ - 0, /*nb_xor*/ - 0, /*nb_or*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_coerce*/ - #endif - 0, /*nb_int*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_long*/ - #else - 0, /*reserved*/ - #endif - 0, /*nb_float*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_oct*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*nb_hex*/ - #endif - __pyx_pw_4cdec_5_cdec_15SufficientStats_10__iadd__, /*nb_inplace_add*/ - 0, /*nb_inplace_subtract*/ - 0, /*nb_inplace_multiply*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_inplace_divide*/ - #endif - 0, /*nb_inplace_remainder*/ - 0, /*nb_inplace_power*/ - 0, /*nb_inplace_lshift*/ - 0, /*nb_inplace_rshift*/ - 0, /*nb_inplace_and*/ - 0, /*nb_inplace_xor*/ - 0, /*nb_inplace_or*/ - 0, /*nb_floor_divide*/ - 0, /*nb_true_divide*/ - 0, /*nb_inplace_floor_divide*/ - 0, /*nb_inplace_true_divide*/ - #if PY_VERSION_HEX >= 0x02050000 - 0, /*nb_index*/ - #endif -}; - -static PySequenceMethods __pyx_tp_as_sequence_SufficientStats = { - __pyx_pw_4cdec_5_cdec_15SufficientStats_3__len__, /*sq_length*/ - 0, /*sq_concat*/ - 0, /*sq_repeat*/ - __pyx_sq_item_4cdec_5_cdec_SufficientStats, /*sq_item*/ - 0, /*sq_slice*/ - 0, /*sq_ass_item*/ - 0, /*sq_ass_slice*/ - 0, /*sq_contains*/ - 0, /*sq_inplace_concat*/ - 0, /*sq_inplace_repeat*/ -}; - -static PyMappingMethods __pyx_tp_as_mapping_SufficientStats = { - __pyx_pw_4cdec_5_cdec_15SufficientStats_3__len__, /*mp_length*/ - __pyx_pw_4cdec_5_cdec_15SufficientStats_8__getitem__, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ -}; - -static PyTypeObject __pyx_type_4cdec_5_cdec_SufficientStats = { +static PyTypeObject __pyx_type_4cdec_5_cdec_TRule = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.SufficientStats"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec_SufficientStats), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.TRule"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec_TRule), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec_SufficientStats, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec_TRule, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -20724,12 +22488,12 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_SufficientStats = { 0, /*reserved*/ #endif 0, /*tp_repr*/ - &__pyx_tp_as_number_SufficientStats, /*tp_as_number*/ - &__pyx_tp_as_sequence_SufficientStats, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_SufficientStats, /*tp_as_mapping*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ - 0, /*tp_str*/ + __pyx_pw_4cdec_5_cdec_5TRule_5__str__, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ @@ -20739,19 +22503,19 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_SufficientStats = { 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ - __pyx_pw_4cdec_5_cdec_15SufficientStats_5__iter__, /*tp_iter*/ + 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_4cdec_5_cdec_SufficientStats, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec_TRule, /*tp_methods*/ 0, /*tp_members*/ - __pyx_getsets_4cdec_5_cdec_SufficientStats, /*tp_getset*/ + __pyx_getsets_4cdec_5_cdec_TRule, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ - 0, /*tp_init*/ + __pyx_pw_4cdec_5_cdec_5TRule_1__init__, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec_SufficientStats, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec_TRule, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -20763,83 +22527,27 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_SufficientStats = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif }; -static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_21___iter__[8]; -static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_21___iter__ = 0; - -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_21___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__ *p; - PyObject *o; - if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_21___iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__)))) { - o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_21___iter__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_21___iter__]; - memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__)); - PyObject_INIT(o, t); - PyObject_GC_Track(o); - } else { - o = (*t->tp_alloc)(t, 0); - if (unlikely(!o)) return 0; - } - p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__ *)o); - p->__pyx_v_i = 0; - p->__pyx_v_self = 0; - p->__pyx_t_1 = 0; +static PyObject *__pyx_tp_new_4cdec_5_cdec_MRule(PyTypeObject *t, PyObject *a, PyObject *k) { + PyObject *o = __pyx_tp_new_4cdec_5_cdec_TRule(t, a, k); + if (unlikely(!o)) return 0; return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_21___iter__(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__ *)o; - PyObject_GC_UnTrack(o); - Py_CLEAR(p->__pyx_v_i); - Py_CLEAR(p->__pyx_v_self); - Py_CLEAR(p->__pyx_t_1); - if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_21___iter__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__))) { - __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_21___iter__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_21___iter__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__ *)o); - } else { - (*Py_TYPE(o)->tp_free)(o); - } -} - -static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_21___iter__(PyObject *o, visitproc v, void *a) { - int e; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__ *)o; - if (p->__pyx_v_i) { - e = (*v)(p->__pyx_v_i, 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_t_1) { - e = (*v)(p->__pyx_t_1, a); if (e) return e; - } - return 0; -} - -static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_21___iter__(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__ *)o; - PyObject* tmp; - tmp = ((PyObject*)p->__pyx_v_i); - p->__pyx_v_i = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->__pyx_v_self); - p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_SufficientStats *)Py_None); Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->__pyx_t_1); - p->__pyx_t_1 = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - return 0; -} - -static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_21___iter__[] = { +static PyMethodDef __pyx_methods_4cdec_5_cdec_MRule[] = { {0, 0, 0, 0} }; -static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_21___iter__ = { +static PyTypeObject __pyx_type_4cdec_5_cdec_MRule = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_21___iter__"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.MRule"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec_MRule), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_21___iter__, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec_TRule, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -20854,19 +22562,23 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_21___iter__ = { 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ + #if CYTHON_COMPILING_IN_PYPY + __pyx_pw_4cdec_5_cdec_5TRule_5__str__, /*tp_str*/ + #else 0, /*tp_str*/ + #endif 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*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ - __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_21___iter__, /*tp_traverse*/ - __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_21___iter__, /*tp_clear*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_4cdec_5_cdec___pyx_scope_struct_21___iter__, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec_MRule, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -20874,9 +22586,9 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_21___iter__ = { 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ - 0, /*tp_init*/ + __pyx_pw_4cdec_5_cdec_5MRule_1__init__, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_21___iter__, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec_MRule, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -20888,58 +22600,68 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_21___iter__ = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif }; -static PyObject *__pyx_tp_new_4cdec_5_cdec_Metric(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_4cdec_5_cdec_Metric *p; +static PyObject *__pyx_tp_new_4cdec_5_cdec_Grammar(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; - o = (*t->tp_alloc)(t, 0); - if (unlikely(!o)) return 0; - p = ((struct __pyx_obj_4cdec_5_cdec_Metric *)o); - p->scorer = ((struct __pyx_obj_4cdec_5_cdec_Scorer *)Py_None); Py_INCREF(Py_None); - if (unlikely(__pyx_pw_4cdec_5_cdec_6Metric_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) { - Py_DECREF(o); o = 0; + 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; return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec_Metric(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec_Metric *p = (struct __pyx_obj_4cdec_5_cdec_Metric *)o; - PyObject_GC_UnTrack(o); - Py_CLEAR(p->scorer); +static void __pyx_tp_dealloc_4cdec_5_cdec_Grammar(PyObject *o) { + #if PY_VERSION_HEX >= 0x030400a1 + if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + #endif + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + ++Py_REFCNT(o); + __pyx_pw_4cdec_5_cdec_7Grammar_1__dealloc__(o); + --Py_REFCNT(o); + PyErr_Restore(etype, eval, etb); + } (*Py_TYPE(o)->tp_free)(o); } -static int __pyx_tp_traverse_4cdec_5_cdec_Metric(PyObject *o, visitproc v, void *a) { - int e; - struct __pyx_obj_4cdec_5_cdec_Metric *p = (struct __pyx_obj_4cdec_5_cdec_Metric *)o; - if (p->scorer) { - e = (*v)(((PyObject*)p->scorer), a); if (e) return e; - } - return 0; +static PyObject *__pyx_getprop_4cdec_5_cdec_7Grammar_name(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_7Grammar_4name_1__get__(o); } -static int __pyx_tp_clear_4cdec_5_cdec_Metric(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec_Metric *p = (struct __pyx_obj_4cdec_5_cdec_Metric *)o; - PyObject* tmp; - tmp = ((PyObject*)p->scorer); - p->scorer = ((struct __pyx_obj_4cdec_5_cdec_Scorer *)Py_None); Py_INCREF(Py_None); - Py_XDECREF(tmp); - return 0; +static int __pyx_setprop_4cdec_5_cdec_7Grammar_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_4cdec_5_cdec_7Grammar_4name_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } } -static PyMethodDef __pyx_methods_4cdec_5_cdec_Metric[] = { - {__Pyx_NAMESTR("score"), (PyCFunction)__pyx_pw_4cdec_5_cdec_6Metric_5score, METH_NOARGS, __Pyx_DOCSTR(0)}, - {__Pyx_NAMESTR("evaluate"), (PyCFunction)__pyx_pw_4cdec_5_cdec_6Metric_7evaluate, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, +static PyMethodDef __pyx_methods_4cdec_5_cdec_Grammar[] = { {0, 0, 0, 0} }; -static PyTypeObject __pyx_type_4cdec_5_cdec_Metric = { - PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.Metric"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec_Metric), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec_Metric, /*tp_dealloc*/ +static struct PyGetSetDef __pyx_getsets_4cdec_5_cdec_Grammar[] = { + {(char *)"name", __pyx_getprop_4cdec_5_cdec_7Grammar_name, __pyx_setprop_4cdec_5_cdec_7Grammar_name, 0, 0}, + {0, 0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_4cdec_5_cdec_Grammar = { + PyVarObject_HEAD_INIT(0, 0) + __Pyx_NAMESTR("cdec._cdec.Grammar"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec_Grammar), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_4cdec_5_cdec_Grammar, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -20953,22 +22675,22 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_Metric = { 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ - __pyx_pw_4cdec_5_cdec_6Metric_3__call__, /*tp_call*/ + 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*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ - __pyx_tp_traverse_4cdec_5_cdec_Metric, /*tp_traverse*/ - __pyx_tp_clear_4cdec_5_cdec_Metric, /*tp_clear*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ - 0, /*tp_iter*/ + __pyx_pw_4cdec_5_cdec_7Grammar_3__iter__, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_4cdec_5_cdec_Metric, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec_Grammar, /*tp_methods*/ 0, /*tp_members*/ - 0, /*tp_getset*/ + __pyx_getsets_4cdec_5_cdec_Grammar, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ @@ -20976,7 +22698,7 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_Metric = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec_Metric, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec_Grammar, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -20988,58 +22710,27 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_Metric = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif }; -static PyObject *__pyx_tp_new_4cdec_5_cdec_Candidate(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - PyObject *o; - o = (*t->tp_alloc)(t, 0); +static PyObject *__pyx_tp_new_4cdec_5_cdec_TextGrammar(PyTypeObject *t, PyObject *a, PyObject *k) { + PyObject *o = __pyx_tp_new_4cdec_5_cdec_Grammar(t, a, k); if (unlikely(!o)) return 0; return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec_Candidate(PyObject *o) { - (*Py_TYPE(o)->tp_free)(o); -} - -static PyObject *__pyx_getprop_4cdec_5_cdec_9Candidate_words(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_4cdec_5_cdec_9Candidate_5words_1__get__(o); -} - -static PyObject *__pyx_getprop_4cdec_5_cdec_9Candidate_fmap(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_4cdec_5_cdec_9Candidate_4fmap_1__get__(o); -} - -static PyObject *__pyx_getprop_4cdec_5_cdec_9Candidate_score(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_4cdec_5_cdec_9Candidate_5score_1__get__(o); -} - -static int __pyx_setprop_4cdec_5_cdec_9Candidate_score(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { - if (v) { - return __pyx_pw_4cdec_5_cdec_9Candidate_5score_3__set__(o, v); - } - else { - PyErr_SetString(PyExc_NotImplementedError, "__del__"); - return -1; - } -} - -static PyMethodDef __pyx_methods_4cdec_5_cdec_Candidate[] = { +static PyMethodDef __pyx_methods_4cdec_5_cdec_TextGrammar[] = { {0, 0, 0, 0} }; -static struct PyGetSetDef __pyx_getsets_4cdec_5_cdec_Candidate[] = { - {(char *)"words", __pyx_getprop_4cdec_5_cdec_9Candidate_words, 0, 0, 0}, - {(char *)"fmap", __pyx_getprop_4cdec_5_cdec_9Candidate_fmap, 0, 0, 0}, - {(char *)"score", __pyx_getprop_4cdec_5_cdec_9Candidate_score, __pyx_setprop_4cdec_5_cdec_9Candidate_score, 0, 0}, - {0, 0, 0, 0, 0} -}; - -static PyTypeObject __pyx_type_4cdec_5_cdec_Candidate = { +static PyTypeObject __pyx_type_4cdec_5_cdec_TextGrammar = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.Candidate"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec_Candidate), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.TextGrammar"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec_TextGrammar), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec_Candidate, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec_Grammar, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -21064,19 +22755,23 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_Candidate = { 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ + #if CYTHON_COMPILING_IN_PYPY + __pyx_pw_4cdec_5_cdec_7Grammar_3__iter__, /*tp_iter*/ + #else 0, /*tp_iter*/ + #endif 0, /*tp_iternext*/ - __pyx_methods_4cdec_5_cdec_Candidate, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec_TextGrammar, /*tp_methods*/ 0, /*tp_members*/ - __pyx_getsets_4cdec_5_cdec_Candidate, /*tp_getset*/ + 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ - 0, /*tp_init*/ + __pyx_pw_4cdec_5_cdec_11TextGrammar_1__init__, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec_Candidate, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec_TextGrammar, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -21088,135 +22783,93 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_Candidate = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif }; +static struct __pyx_vtabstruct_4cdec_5_cdec_Hypergraph __pyx_vtable_4cdec_5_cdec_Hypergraph; -static PyObject *__pyx_tp_new_4cdec_5_cdec_SparseVector(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { +static PyObject *__pyx_tp_new_4cdec_5_cdec_Hypergraph(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec_Hypergraph *p; PyObject *o; - o = (*t->tp_alloc)(t, 0); + 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_4cdec_5_cdec_Hypergraph *)o); + p->__pyx_vtab = __pyx_vtabptr_4cdec_5_cdec_Hypergraph; return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec_SparseVector(PyObject *o) { +static void __pyx_tp_dealloc_4cdec_5_cdec_Hypergraph(PyObject *o) { + #if PY_VERSION_HEX >= 0x030400a1 + if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + #endif { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); - __pyx_pw_4cdec_5_cdec_12SparseVector_3__dealloc__(o); - if (PyErr_Occurred()) PyErr_WriteUnraisable(o); + __pyx_pw_4cdec_5_cdec_10Hypergraph_1__dealloc__(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); } (*Py_TYPE(o)->tp_free)(o); } -static PyObject *__pyx_sq_item_4cdec_5_cdec_SparseVector(PyObject *o, Py_ssize_t i) { - PyObject *r; - PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0; - r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x); - Py_DECREF(x); - return r; + +static PyObject *__pyx_getprop_4cdec_5_cdec_10Hypergraph_edges(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_10Hypergraph_5edges_1__get__(o); } -static int __pyx_mp_ass_subscript_4cdec_5_cdec_SparseVector(PyObject *o, PyObject *i, PyObject *v) { - if (v) { - return __pyx_pw_4cdec_5_cdec_12SparseVector_9__setitem__(o, i, v); - } - else { - PyErr_Format(PyExc_NotImplementedError, - "Subscript deletion not supported by %s", Py_TYPE(o)->tp_name); - return -1; - } +static PyObject *__pyx_getprop_4cdec_5_cdec_10Hypergraph_nodes(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_10Hypergraph_5nodes_1__get__(o); } -static PyMethodDef __pyx_methods_4cdec_5_cdec_SparseVector[] = { - {__Pyx_NAMESTR("copy"), (PyCFunction)__pyx_pw_4cdec_5_cdec_12SparseVector_5copy, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_12SparseVector_4copy)}, - {__Pyx_NAMESTR("dot"), (PyCFunction)__pyx_pw_4cdec_5_cdec_12SparseVector_14dot, METH_O, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_12SparseVector_13dot)}, - {0, 0, 0, 0} -}; +static PyObject *__pyx_getprop_4cdec_5_cdec_10Hypergraph_goal(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_10Hypergraph_4goal_1__get__(o); +} -static PyNumberMethods __pyx_tp_as_number_SparseVector = { - __pyx_pw_4cdec_5_cdec_12SparseVector_32__add__, /*nb_add*/ - __pyx_pw_4cdec_5_cdec_12SparseVector_34__sub__, /*nb_subtract*/ - __pyx_pw_4cdec_5_cdec_12SparseVector_36__mul__, /*nb_multiply*/ - #if PY_MAJOR_VERSION < 3 - __pyx_pw_4cdec_5_cdec_12SparseVector_38__div__, /*nb_divide*/ - #endif - 0, /*nb_remainder*/ - 0, /*nb_divmod*/ - 0, /*nb_power*/ - __pyx_pw_4cdec_5_cdec_12SparseVector_22__neg__, /*nb_negative*/ - 0, /*nb_positive*/ - 0, /*nb_absolute*/ - 0, /*nb_nonzero*/ - 0, /*nb_invert*/ - 0, /*nb_lshift*/ - 0, /*nb_rshift*/ - 0, /*nb_and*/ - 0, /*nb_xor*/ - 0, /*nb_or*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_coerce*/ - #endif - 0, /*nb_int*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_long*/ - #else - 0, /*reserved*/ - #endif - 0, /*nb_float*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_oct*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*nb_hex*/ - #endif - __pyx_pw_4cdec_5_cdec_12SparseVector_24__iadd__, /*nb_inplace_add*/ - __pyx_pw_4cdec_5_cdec_12SparseVector_26__isub__, /*nb_inplace_subtract*/ - __pyx_pw_4cdec_5_cdec_12SparseVector_28__imul__, /*nb_inplace_multiply*/ - #if PY_MAJOR_VERSION < 3 - __pyx_pw_4cdec_5_cdec_12SparseVector_30__idiv__, /*nb_inplace_divide*/ - #endif - 0, /*nb_inplace_remainder*/ - 0, /*nb_inplace_power*/ - 0, /*nb_inplace_lshift*/ - 0, /*nb_inplace_rshift*/ - 0, /*nb_inplace_and*/ - 0, /*nb_inplace_xor*/ - 0, /*nb_inplace_or*/ - 0, /*nb_floor_divide*/ - 0, /*nb_true_divide*/ - 0, /*nb_inplace_floor_divide*/ - 0, /*nb_inplace_true_divide*/ - #if PY_VERSION_HEX >= 0x02050000 - 0, /*nb_index*/ - #endif -}; +static PyObject *__pyx_getprop_4cdec_5_cdec_10Hypergraph_npaths(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_10Hypergraph_6npaths_1__get__(o); +} -static PySequenceMethods __pyx_tp_as_sequence_SparseVector = { - __pyx_pw_4cdec_5_cdec_12SparseVector_18__len__, /*sq_length*/ - 0, /*sq_concat*/ - 0, /*sq_repeat*/ - __pyx_sq_item_4cdec_5_cdec_SparseVector, /*sq_item*/ - 0, /*sq_slice*/ - 0, /*sq_ass_item*/ - 0, /*sq_ass_slice*/ - __pyx_pw_4cdec_5_cdec_12SparseVector_20__contains__, /*sq_contains*/ - 0, /*sq_inplace_concat*/ - 0, /*sq_inplace_repeat*/ +static PyMethodDef __pyx_methods_4cdec_5_cdec_Hypergraph[] = { + {__Pyx_NAMESTR("viterbi"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_3viterbi, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_2viterbi)}, + {__Pyx_NAMESTR("viterbi_trees"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_5viterbi_trees, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_4viterbi_trees)}, + {__Pyx_NAMESTR("viterbi_features"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_7viterbi_features, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_6viterbi_features)}, + {__Pyx_NAMESTR("viterbi_forest"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_9viterbi_forest, METH_NOARGS, __Pyx_DOCSTR(0)}, + {__Pyx_NAMESTR("viterbi_joshua"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_11viterbi_joshua, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_10viterbi_joshua)}, + {__Pyx_NAMESTR("kbest"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_13kbest, METH_O, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_12kbest)}, + {__Pyx_NAMESTR("kbest_trees"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_16kbest_trees, METH_O, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_15kbest_trees)}, + {__Pyx_NAMESTR("kbest_features"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_19kbest_features, METH_O, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_18kbest_features)}, + {__Pyx_NAMESTR("sample"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_22sample, METH_O, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_21sample)}, + {__Pyx_NAMESTR("sample_trees"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_25sample_trees, METH_O, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_24sample_trees)}, + {__Pyx_NAMESTR("intersect"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_28intersect, METH_O, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_27intersect)}, + {__Pyx_NAMESTR("prune"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_30prune, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_29prune)}, + {__Pyx_NAMESTR("lattice"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_32lattice, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_31lattice)}, + {__Pyx_NAMESTR("plf"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_34plf, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_33plf)}, + {__Pyx_NAMESTR("reweight"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_36reweight, METH_O, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_35reweight)}, + {__Pyx_NAMESTR("inside_outside"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_38inside_outside, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_37inside_outside)}, + {0, 0, 0, 0} }; -static PyMappingMethods __pyx_tp_as_mapping_SparseVector = { - __pyx_pw_4cdec_5_cdec_12SparseVector_18__len__, /*mp_length*/ - __pyx_pw_4cdec_5_cdec_12SparseVector_7__getitem__, /*mp_subscript*/ - __pyx_mp_ass_subscript_4cdec_5_cdec_SparseVector, /*mp_ass_subscript*/ +static struct PyGetSetDef __pyx_getsets_4cdec_5_cdec_Hypergraph[] = { + {(char *)"edges", __pyx_getprop_4cdec_5_cdec_10Hypergraph_edges, 0, 0, 0}, + {(char *)"nodes", __pyx_getprop_4cdec_5_cdec_10Hypergraph_nodes, 0, 0, 0}, + {(char *)"goal", __pyx_getprop_4cdec_5_cdec_10Hypergraph_goal, 0, 0, 0}, + {(char *)"npaths", __pyx_getprop_4cdec_5_cdec_10Hypergraph_npaths, 0, 0, 0}, + {0, 0, 0, 0, 0} }; -static PyTypeObject __pyx_type_4cdec_5_cdec_SparseVector = { +static PyTypeObject __pyx_type_4cdec_5_cdec_Hypergraph = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.SparseVector"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec_SparseVector), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.Hypergraph"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec_Hypergraph), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec_SparseVector, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec_Hypergraph, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -21226,9 +22879,9 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_SparseVector = { 0, /*reserved*/ #endif 0, /*tp_repr*/ - &__pyx_tp_as_number_SparseVector, /*tp_as_number*/ - &__pyx_tp_as_sequence_SparseVector, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_SparseVector, /*tp_as_mapping*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ @@ -21239,21 +22892,21 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_SparseVector = { 0, /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ - __pyx_pw_4cdec_5_cdec_12SparseVector_16__richcmp__, /*tp_richcompare*/ + 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ - __pyx_pw_4cdec_5_cdec_12SparseVector_11__iter__, /*tp_iter*/ + 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_4cdec_5_cdec_SparseVector, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec_Hypergraph, /*tp_methods*/ 0, /*tp_members*/ - 0, /*tp_getset*/ + __pyx_getsets_4cdec_5_cdec_Hypergraph, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ - __pyx_pw_4cdec_5_cdec_12SparseVector_1__init__, /*tp_init*/ + 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec_SparseVector, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec_Hypergraph, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -21265,67 +22918,134 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_SparseVector = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif }; +static struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphEdge __pyx_vtable_4cdec_5_cdec_HypergraphEdge; -static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_15___get__[8]; -static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_15___get__ = 0; - -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_15___get__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__ *p; +static PyObject *__pyx_tp_new_4cdec_5_cdec_HypergraphEdge(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *p; PyObject *o; - if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_15___get__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__)))) { - o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_15___get__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_15___get__]; - memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__)); - PyObject_INIT(o, t); - PyObject_GC_Track(o); - } else { + if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); - if (unlikely(!o)) return 0; + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } - p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__ *)o); - p->__pyx_v_self = 0; + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)o); + p->__pyx_vtab = __pyx_vtabptr_4cdec_5_cdec_HypergraphEdge; + p->trule = ((struct __pyx_obj_4cdec_5_cdec_TRule *)Py_None); Py_INCREF(Py_None); return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_15___get__(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__ *)o; - PyObject_GC_UnTrack(o); - Py_CLEAR(p->__pyx_v_self); - if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_15___get__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__))) { - __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_15___get__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_15___get__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__ *)o); - } else { - (*Py_TYPE(o)->tp_free)(o); +static void __pyx_tp_dealloc_4cdec_5_cdec_HypergraphEdge(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *p = (struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)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->trule); + (*Py_TYPE(o)->tp_free)(o); } -static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_15___get__(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_4cdec_5_cdec_HypergraphEdge(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__ *)o; - if (p->__pyx_v_self) { - e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; + struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *p = (struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)o; + if (p->trule) { + e = (*v)(((PyObject*)p->trule), a); if (e) return e; } return 0; } -static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_15___get__(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__ *)o; +static int __pyx_tp_clear_4cdec_5_cdec_HypergraphEdge(PyObject *o) { PyObject* tmp; - tmp = ((PyObject*)p->__pyx_v_self); - p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)Py_None); Py_INCREF(Py_None); + struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *p = (struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)o; + tmp = ((PyObject*)p->trule); + p->trule = ((struct __pyx_obj_4cdec_5_cdec_TRule *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_15___get__[] = { +static PyObject *__pyx_getprop_4cdec_5_cdec_14HypergraphEdge_head_node(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_14HypergraphEdge_9head_node_1__get__(o); +} + +static PyObject *__pyx_getprop_4cdec_5_cdec_14HypergraphEdge_tail_nodes(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_14HypergraphEdge_10tail_nodes_1__get__(o); +} + +static PyObject *__pyx_getprop_4cdec_5_cdec_14HypergraphEdge_span(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_14HypergraphEdge_4span_1__get__(o); +} + +static PyObject *__pyx_getprop_4cdec_5_cdec_14HypergraphEdge_src_span(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_14HypergraphEdge_8src_span_1__get__(o); +} + +static PyObject *__pyx_getprop_4cdec_5_cdec_14HypergraphEdge_feature_values(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_14HypergraphEdge_14feature_values_1__get__(o); +} + +static PyObject *__pyx_getprop_4cdec_5_cdec_14HypergraphEdge_prob(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_14HypergraphEdge_4prob_1__get__(o); +} + +static PyObject *__pyx_getprop_4cdec_5_cdec_14HypergraphEdge_trule(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_14HypergraphEdge_5trule_1__get__(o); +} + +static int __pyx_setprop_4cdec_5_cdec_14HypergraphEdge_trule(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_4cdec_5_cdec_14HypergraphEdge_5trule_3__set__(o, v); + } + else { + return __pyx_pw_4cdec_5_cdec_14HypergraphEdge_5trule_5__del__(o); + } +} + +static PyMethodDef __pyx_methods_4cdec_5_cdec_HypergraphEdge[] = { {0, 0, 0, 0} }; -static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_15___get__ = { +static struct PyGetSetDef __pyx_getsets_4cdec_5_cdec_HypergraphEdge[] = { + {(char *)"head_node", __pyx_getprop_4cdec_5_cdec_14HypergraphEdge_head_node, 0, 0, 0}, + {(char *)"tail_nodes", __pyx_getprop_4cdec_5_cdec_14HypergraphEdge_tail_nodes, 0, 0, 0}, + {(char *)"span", __pyx_getprop_4cdec_5_cdec_14HypergraphEdge_span, 0, 0, 0}, + {(char *)"src_span", __pyx_getprop_4cdec_5_cdec_14HypergraphEdge_src_span, 0, 0, 0}, + {(char *)"feature_values", __pyx_getprop_4cdec_5_cdec_14HypergraphEdge_feature_values, 0, 0, 0}, + {(char *)"prob", __pyx_getprop_4cdec_5_cdec_14HypergraphEdge_prob, 0, 0, 0}, + {(char *)"trule", __pyx_getprop_4cdec_5_cdec_14HypergraphEdge_trule, __pyx_setprop_4cdec_5_cdec_14HypergraphEdge_trule, 0, 0}, + {0, 0, 0, 0, 0} +}; + +static PySequenceMethods __pyx_tp_as_sequence_HypergraphEdge = { + __pyx_pw_4cdec_5_cdec_14HypergraphEdge_1__len__, /*sq_length*/ + 0, /*sq_concat*/ + 0, /*sq_repeat*/ + 0, /*sq_item*/ + 0, /*sq_slice*/ + 0, /*sq_ass_item*/ + 0, /*sq_ass_slice*/ + 0, /*sq_contains*/ + 0, /*sq_inplace_concat*/ + 0, /*sq_inplace_repeat*/ +}; + +static PyMappingMethods __pyx_tp_as_mapping_HypergraphEdge = { + __pyx_pw_4cdec_5_cdec_14HypergraphEdge_1__len__, /*mp_length*/ + 0, /*mp_subscript*/ + 0, /*mp_ass_subscript*/ +}; + +static PyTypeObject __pyx_type_4cdec_5_cdec_HypergraphEdge = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_15___get__"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.HypergraphEdge"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec_HypergraphEdge), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_15___get__, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec_HypergraphEdge, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -21336,25 +23056,25 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_15___get__ = { #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ - 0, /*tp_as_sequence*/ - 0, /*tp_as_mapping*/ + &__pyx_tp_as_sequence_HypergraphEdge, /*tp_as_sequence*/ + &__pyx_tp_as_mapping_HypergraphEdge, /*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*/ + 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_4cdec_5_cdec___pyx_scope_struct_15___get__, /*tp_traverse*/ - __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_15___get__, /*tp_clear*/ - 0, /*tp_richcompare*/ + __pyx_tp_traverse_4cdec_5_cdec_HypergraphEdge, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec_HypergraphEdge, /*tp_clear*/ + __pyx_pw_4cdec_5_cdec_14HypergraphEdge_3__richcmp__, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_4cdec_5_cdec___pyx_scope_struct_15___get__, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec_HypergraphEdge, /*tp_methods*/ 0, /*tp_members*/ - 0, /*tp_getset*/ + __pyx_getsets_4cdec_5_cdec_HypergraphEdge, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ @@ -21362,7 +23082,7 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_15___get__ = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_15___get__, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec_HypergraphEdge, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -21374,86 +23094,74 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_15___get__ = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif }; +static struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphNode __pyx_vtable_4cdec_5_cdec_HypergraphNode; -static PyObject *__pyx_tp_new_4cdec_5_cdec_NT(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_4cdec_5_cdec_NT *p; +static PyObject *__pyx_tp_new_4cdec_5_cdec_HypergraphNode(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec_HypergraphNode *p; PyObject *o; - o = (*t->tp_alloc)(t, 0); + 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_4cdec_5_cdec_NT *)o); - p->cat = ((PyObject*)Py_None); Py_INCREF(Py_None); + p = ((struct __pyx_obj_4cdec_5_cdec_HypergraphNode *)o); + p->__pyx_vtab = __pyx_vtabptr_4cdec_5_cdec_HypergraphNode; return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec_NT(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec_NT *p = (struct __pyx_obj_4cdec_5_cdec_NT *)o; - PyObject_GC_UnTrack(o); - Py_CLEAR(p->cat); - (*Py_TYPE(o)->tp_free)(o); -} - -static int __pyx_tp_traverse_4cdec_5_cdec_NT(PyObject *o, visitproc v, void *a) { - int e; - struct __pyx_obj_4cdec_5_cdec_NT *p = (struct __pyx_obj_4cdec_5_cdec_NT *)o; - if (p->cat) { - e = (*v)(p->cat, a); if (e) return e; +static void __pyx_tp_dealloc_4cdec_5_cdec_HypergraphNode(PyObject *o) { + #if PY_VERSION_HEX >= 0x030400a1 + if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { + if (PyObject_CallFinalizerFromDealloc(o)) return; } - return 0; + #endif + (*Py_TYPE(o)->tp_free)(o); } -static int __pyx_tp_clear_4cdec_5_cdec_NT(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec_NT *p = (struct __pyx_obj_4cdec_5_cdec_NT *)o; - PyObject* tmp; - tmp = ((PyObject*)p->cat); - p->cat = ((PyObject*)Py_None); Py_INCREF(Py_None); - Py_XDECREF(tmp); - return 0; +static PyObject *__pyx_getprop_4cdec_5_cdec_14HypergraphNode_id(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_14HypergraphNode_2id_1__get__(o); } -static PyObject *__pyx_getprop_4cdec_5_cdec_2NT_cat(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_4cdec_5_cdec_2NT_3cat_1__get__(o); +static PyObject *__pyx_getprop_4cdec_5_cdec_14HypergraphNode_in_edges(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_14HypergraphNode_8in_edges_1__get__(o); } -static int __pyx_setprop_4cdec_5_cdec_2NT_cat(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { - if (v) { - return __pyx_pw_4cdec_5_cdec_2NT_3cat_3__set__(o, v); - } - else { - return __pyx_pw_4cdec_5_cdec_2NT_3cat_5__del__(o); - } +static PyObject *__pyx_getprop_4cdec_5_cdec_14HypergraphNode_out_edges(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_14HypergraphNode_9out_edges_1__get__(o); } -static PyObject *__pyx_getprop_4cdec_5_cdec_2NT_ref(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_4cdec_5_cdec_2NT_3ref_1__get__(o); +static PyObject *__pyx_getprop_4cdec_5_cdec_14HypergraphNode_span(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_14HypergraphNode_4span_1__get__(o); } -static int __pyx_setprop_4cdec_5_cdec_2NT_ref(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { - if (v) { - return __pyx_pw_4cdec_5_cdec_2NT_3ref_3__set__(o, v); - } - else { - PyErr_SetString(PyExc_NotImplementedError, "__del__"); - return -1; - } +static PyObject *__pyx_getprop_4cdec_5_cdec_14HypergraphNode_cat(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_14HypergraphNode_3cat_1__get__(o); } -static PyMethodDef __pyx_methods_4cdec_5_cdec_NT[] = { +static PyMethodDef __pyx_methods_4cdec_5_cdec_HypergraphNode[] = { {0, 0, 0, 0} }; -static struct PyGetSetDef __pyx_getsets_4cdec_5_cdec_NT[] = { - {(char *)"cat", __pyx_getprop_4cdec_5_cdec_2NT_cat, __pyx_setprop_4cdec_5_cdec_2NT_cat, 0, 0}, - {(char *)"ref", __pyx_getprop_4cdec_5_cdec_2NT_ref, __pyx_setprop_4cdec_5_cdec_2NT_ref, 0, 0}, +static struct PyGetSetDef __pyx_getsets_4cdec_5_cdec_HypergraphNode[] = { + {(char *)"id", __pyx_getprop_4cdec_5_cdec_14HypergraphNode_id, 0, 0, 0}, + {(char *)"in_edges", __pyx_getprop_4cdec_5_cdec_14HypergraphNode_in_edges, 0, 0, 0}, + {(char *)"out_edges", __pyx_getprop_4cdec_5_cdec_14HypergraphNode_out_edges, 0, 0, 0}, + {(char *)"span", __pyx_getprop_4cdec_5_cdec_14HypergraphNode_span, 0, 0, 0}, + {(char *)"cat", __pyx_getprop_4cdec_5_cdec_14HypergraphNode_cat, 0, 0, 0}, {0, 0, 0, 0, 0} }; -static PyTypeObject __pyx_type_4cdec_5_cdec_NT = { +static PyTypeObject __pyx_type_4cdec_5_cdec_HypergraphNode = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.NT"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec_NT), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.HypergraphNode"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec_HypergraphNode), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec_NT, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec_HypergraphNode, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -21468,29 +23176,29 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_NT = { 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ - __pyx_pw_4cdec_5_cdec_2NT_3__str__, /*tp_str*/ + 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*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ - __pyx_tp_traverse_4cdec_5_cdec_NT, /*tp_traverse*/ - __pyx_tp_clear_4cdec_5_cdec_NT, /*tp_clear*/ - 0, /*tp_richcompare*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + __pyx_pw_4cdec_5_cdec_14HypergraphNode_1__richcmp__, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_4cdec_5_cdec_NT, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec_HypergraphNode, /*tp_methods*/ 0, /*tp_members*/ - __pyx_getsets_4cdec_5_cdec_NT, /*tp_getset*/ + __pyx_getsets_4cdec_5_cdec_HypergraphNode, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ - __pyx_pw_4cdec_5_cdec_2NT_1__init__, /*tp_init*/ + 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec_NT, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec_HypergraphNode, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -21502,11 +23210,18 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_NT = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif }; static PyObject *__pyx_tp_new_4cdec_5_cdec_Lattice(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; - o = (*t->tp_alloc)(t, 0); + 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; if (unlikely(__pyx_pw_4cdec_5_cdec_7Lattice_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) { Py_DECREF(o); o = 0; @@ -21515,12 +23230,16 @@ static PyObject *__pyx_tp_new_4cdec_5_cdec_Lattice(PyTypeObject *t, CYTHON_UNUSE } static void __pyx_tp_dealloc_4cdec_5_cdec_Lattice(PyObject *o) { + #if PY_VERSION_HEX >= 0x030400a1 + if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + #endif { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); __pyx_pw_4cdec_5_cdec_7Lattice_5__dealloc__(o); - if (PyErr_Occurred()) PyErr_WriteUnraisable(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); } @@ -21540,7 +23259,7 @@ static int __pyx_mp_ass_subscript_4cdec_5_cdec_Lattice(PyObject *o, PyObject *i, } else { PyErr_Format(PyExc_NotImplementedError, - "Subscript deletion not supported by %s", Py_TYPE(o)->tp_name); + "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name); return -1; } } @@ -21625,115 +23344,66 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_Lattice = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif }; -static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_23__make_config[8]; -static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_23__make_config = 0; - -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_23__make_config(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config *p; +static PyObject *__pyx_tp_new_4cdec_5_cdec_Candidate(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; - if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_23__make_config > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config)))) { - o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_23__make_config[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_23__make_config]; - memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config)); - PyObject_INIT(o, t); - PyObject_GC_Track(o); - } else { + if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); - if (unlikely(!o)) return 0; + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } - p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config *)o); - p->__pyx_v_config = 0; - p->__pyx_v_info = 0; - p->__pyx_v_key = 0; - p->__pyx_v_name = 0; - p->__pyx_v_value = 0; - p->__pyx_t_0 = 0; - p->__pyx_t_1 = 0; + if (unlikely(!o)) return 0; return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_23__make_config(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config *)o; - PyObject_GC_UnTrack(o); - Py_CLEAR(p->__pyx_v_config); - Py_CLEAR(p->__pyx_v_info); - Py_CLEAR(p->__pyx_v_key); - Py_CLEAR(p->__pyx_v_name); - Py_CLEAR(p->__pyx_v_value); - Py_CLEAR(p->__pyx_t_0); - Py_CLEAR(p->__pyx_t_1); - if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_23__make_config < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config))) { - __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_23__make_config[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_23__make_config++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config *)o); - } else { - (*Py_TYPE(o)->tp_free)(o); +static void __pyx_tp_dealloc_4cdec_5_cdec_Candidate(PyObject *o) { + #if PY_VERSION_HEX >= 0x030400a1 + if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { + if (PyObject_CallFinalizerFromDealloc(o)) return; } + #endif + (*Py_TYPE(o)->tp_free)(o); } -static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_23__make_config(PyObject *o, visitproc v, void *a) { - int e; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config *)o; - if (p->__pyx_v_config) { - e = (*v)(p->__pyx_v_config, a); if (e) return e; - } - if (p->__pyx_v_info) { - e = (*v)(p->__pyx_v_info, a); if (e) return e; - } - if (p->__pyx_v_key) { - e = (*v)(p->__pyx_v_key, a); if (e) return e; - } - if (p->__pyx_v_name) { - e = (*v)(p->__pyx_v_name, a); if (e) return e; - } - if (p->__pyx_v_value) { - e = (*v)(p->__pyx_v_value, 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_1) { - e = (*v)(p->__pyx_t_1, a); if (e) return e; - } - return 0; +static PyObject *__pyx_getprop_4cdec_5_cdec_9Candidate_words(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_9Candidate_5words_1__get__(o); } -static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_23__make_config(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config *)o; - PyObject* tmp; - tmp = ((PyObject*)p->__pyx_v_config); - p->__pyx_v_config = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->__pyx_v_info); - p->__pyx_v_info = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->__pyx_v_key); - p->__pyx_v_key = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->__pyx_v_name); - p->__pyx_v_name = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->__pyx_v_value); - p->__pyx_v_value = 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_1); - p->__pyx_t_1 = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - return 0; +static PyObject *__pyx_getprop_4cdec_5_cdec_9Candidate_fmap(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_9Candidate_4fmap_1__get__(o); } -static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_23__make_config[] = { - {0, 0, 0, 0} +static PyObject *__pyx_getprop_4cdec_5_cdec_9Candidate_score(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_9Candidate_5score_1__get__(o); +} + +static int __pyx_setprop_4cdec_5_cdec_9Candidate_score(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_4cdec_5_cdec_9Candidate_5score_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static struct PyGetSetDef __pyx_getsets_4cdec_5_cdec_Candidate[] = { + {(char *)"words", __pyx_getprop_4cdec_5_cdec_9Candidate_words, 0, 0, 0}, + {(char *)"fmap", __pyx_getprop_4cdec_5_cdec_9Candidate_fmap, 0, 0, 0}, + {(char *)"score", __pyx_getprop_4cdec_5_cdec_9Candidate_score, __pyx_setprop_4cdec_5_cdec_9Candidate_score, 0, 0}, + {0, 0, 0, 0, 0} }; -static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_23__make_config = { +static PyTypeObject __pyx_type_4cdec_5_cdec_Candidate = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_23__make_config"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.Candidate"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec_Candidate), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_23__make_config, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec_Candidate, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -21752,17 +23422,17 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_23__make_config = 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*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ - __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_23__make_config, /*tp_traverse*/ - __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_23__make_config, /*tp_clear*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_4cdec_5_cdec___pyx_scope_struct_23__make_config, /*tp_methods*/ + 0, /*tp_methods*/ 0, /*tp_members*/ - 0, /*tp_getset*/ + __pyx_getsets_4cdec_5_cdec_Candidate, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ @@ -21770,7 +23440,7 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_23__make_config = 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_23__make_config, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec_Candidate, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -21782,151 +23452,176 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_23__make_config = #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif }; -static struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphEdge __pyx_vtable_4cdec_5_cdec_HypergraphEdge; -static PyObject *__pyx_tp_new_4cdec_5_cdec_HypergraphEdge(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *p; +static PyObject *__pyx_tp_new_4cdec_5_cdec_SufficientStats(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; - o = (*t->tp_alloc)(t, 0); + 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_4cdec_5_cdec_HypergraphEdge *)o); - p->__pyx_vtab = __pyx_vtabptr_4cdec_5_cdec_HypergraphEdge; - p->trule = ((struct __pyx_obj_4cdec_5_cdec_TRule *)Py_None); Py_INCREF(Py_None); return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec_HypergraphEdge(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *p = (struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)o; - PyObject_GC_UnTrack(o); - Py_CLEAR(p->trule); - (*Py_TYPE(o)->tp_free)(o); -} - -static int __pyx_tp_traverse_4cdec_5_cdec_HypergraphEdge(PyObject *o, visitproc v, void *a) { - int e; - struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *p = (struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)o; - if (p->trule) { - e = (*v)(((PyObject*)p->trule), a); if (e) return e; +static void __pyx_tp_dealloc_4cdec_5_cdec_SufficientStats(PyObject *o) { + #if PY_VERSION_HEX >= 0x030400a1 + if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { + if (PyObject_CallFinalizerFromDealloc(o)) return; } - return 0; -} - -static int __pyx_tp_clear_4cdec_5_cdec_HypergraphEdge(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *p = (struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)o; - PyObject* tmp; - tmp = ((PyObject*)p->trule); - p->trule = ((struct __pyx_obj_4cdec_5_cdec_TRule *)Py_None); Py_INCREF(Py_None); - Py_XDECREF(tmp); - return 0; -} - -static PyObject *__pyx_getprop_4cdec_5_cdec_14HypergraphEdge_head_node(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_4cdec_5_cdec_14HypergraphEdge_9head_node_1__get__(o); -} - -static PyObject *__pyx_getprop_4cdec_5_cdec_14HypergraphEdge_tail_nodes(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_4cdec_5_cdec_14HypergraphEdge_10tail_nodes_1__get__(o); -} - -static PyObject *__pyx_getprop_4cdec_5_cdec_14HypergraphEdge_span(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_4cdec_5_cdec_14HypergraphEdge_4span_1__get__(o); -} - -static PyObject *__pyx_getprop_4cdec_5_cdec_14HypergraphEdge_src_span(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_4cdec_5_cdec_14HypergraphEdge_8src_span_1__get__(o); -} - -static PyObject *__pyx_getprop_4cdec_5_cdec_14HypergraphEdge_feature_values(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_4cdec_5_cdec_14HypergraphEdge_14feature_values_1__get__(o); + #endif + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + ++Py_REFCNT(o); + __pyx_pw_4cdec_5_cdec_15SufficientStats_1__dealloc__(o); + --Py_REFCNT(o); + PyErr_Restore(etype, eval, etb); + } + (*Py_TYPE(o)->tp_free)(o); } - -static PyObject *__pyx_getprop_4cdec_5_cdec_14HypergraphEdge_prob(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_4cdec_5_cdec_14HypergraphEdge_4prob_1__get__(o); +static PyObject *__pyx_sq_item_4cdec_5_cdec_SufficientStats(PyObject *o, Py_ssize_t i) { + PyObject *r; + PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0; + r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x); + Py_DECREF(x); + return r; } -static PyObject *__pyx_getprop_4cdec_5_cdec_14HypergraphEdge_trule(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_4cdec_5_cdec_14HypergraphEdge_5trule_1__get__(o); +static PyObject *__pyx_getprop_4cdec_5_cdec_15SufficientStats_score(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_15SufficientStats_5score_1__get__(o); } -static int __pyx_setprop_4cdec_5_cdec_14HypergraphEdge_trule(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { - if (v) { - return __pyx_pw_4cdec_5_cdec_14HypergraphEdge_5trule_3__set__(o, v); - } - else { - return __pyx_pw_4cdec_5_cdec_14HypergraphEdge_5trule_5__del__(o); - } +static PyObject *__pyx_getprop_4cdec_5_cdec_15SufficientStats_detail(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_15SufficientStats_6detail_1__get__(o); } -static PyMethodDef __pyx_methods_4cdec_5_cdec_HypergraphEdge[] = { +static PyMethodDef __pyx_methods_4cdec_5_cdec_SufficientStats[] = { {0, 0, 0, 0} }; -static struct PyGetSetDef __pyx_getsets_4cdec_5_cdec_HypergraphEdge[] = { - {(char *)"head_node", __pyx_getprop_4cdec_5_cdec_14HypergraphEdge_head_node, 0, 0, 0}, - {(char *)"tail_nodes", __pyx_getprop_4cdec_5_cdec_14HypergraphEdge_tail_nodes, 0, 0, 0}, - {(char *)"span", __pyx_getprop_4cdec_5_cdec_14HypergraphEdge_span, 0, 0, 0}, - {(char *)"src_span", __pyx_getprop_4cdec_5_cdec_14HypergraphEdge_src_span, 0, 0, 0}, - {(char *)"feature_values", __pyx_getprop_4cdec_5_cdec_14HypergraphEdge_feature_values, 0, 0, 0}, - {(char *)"prob", __pyx_getprop_4cdec_5_cdec_14HypergraphEdge_prob, 0, 0, 0}, - {(char *)"trule", __pyx_getprop_4cdec_5_cdec_14HypergraphEdge_trule, __pyx_setprop_4cdec_5_cdec_14HypergraphEdge_trule, 0, 0}, +static struct PyGetSetDef __pyx_getsets_4cdec_5_cdec_SufficientStats[] = { + {(char *)"score", __pyx_getprop_4cdec_5_cdec_15SufficientStats_score, 0, 0, 0}, + {(char *)"detail", __pyx_getprop_4cdec_5_cdec_15SufficientStats_detail, 0, 0, 0}, {0, 0, 0, 0, 0} }; -static PySequenceMethods __pyx_tp_as_sequence_HypergraphEdge = { - __pyx_pw_4cdec_5_cdec_14HypergraphEdge_1__len__, /*sq_length*/ - 0, /*sq_concat*/ - 0, /*sq_repeat*/ - 0, /*sq_item*/ - 0, /*sq_slice*/ - 0, /*sq_ass_item*/ - 0, /*sq_ass_slice*/ - 0, /*sq_contains*/ - 0, /*sq_inplace_concat*/ - 0, /*sq_inplace_repeat*/ -}; - -static PyMappingMethods __pyx_tp_as_mapping_HypergraphEdge = { - __pyx_pw_4cdec_5_cdec_14HypergraphEdge_1__len__, /*mp_length*/ - 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ -}; - -static PyTypeObject __pyx_type_4cdec_5_cdec_HypergraphEdge = { - PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.HypergraphEdge"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec_HypergraphEdge), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec_HypergraphEdge, /*tp_dealloc*/ - 0, /*tp_print*/ - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ +static PyNumberMethods __pyx_tp_as_number_SufficientStats = { + __pyx_pw_4cdec_5_cdec_15SufficientStats_12__add__, /*nb_add*/ + 0, /*nb_subtract*/ + 0, /*nb_multiply*/ #if PY_MAJOR_VERSION < 3 - 0, /*tp_compare*/ - #else - 0, /*reserved*/ + 0, /*nb_divide*/ #endif - 0, /*tp_repr*/ - 0, /*tp_as_number*/ - &__pyx_tp_as_sequence_HypergraphEdge, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_HypergraphEdge, /*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_4cdec_5_cdec_HypergraphEdge, /*tp_traverse*/ - __pyx_tp_clear_4cdec_5_cdec_HypergraphEdge, /*tp_clear*/ - __pyx_pw_4cdec_5_cdec_14HypergraphEdge_3__richcmp__, /*tp_richcompare*/ + 0, /*nb_remainder*/ + 0, /*nb_divmod*/ + 0, /*nb_power*/ + 0, /*nb_negative*/ + 0, /*nb_positive*/ + 0, /*nb_absolute*/ + 0, /*nb_nonzero*/ + 0, /*nb_invert*/ + 0, /*nb_lshift*/ + 0, /*nb_rshift*/ + 0, /*nb_and*/ + 0, /*nb_xor*/ + 0, /*nb_or*/ + #if PY_MAJOR_VERSION < 3 + 0, /*nb_coerce*/ + #endif + 0, /*nb_int*/ + #if PY_MAJOR_VERSION < 3 + 0, /*nb_long*/ + #else + 0, /*reserved*/ + #endif + 0, /*nb_float*/ + #if PY_MAJOR_VERSION < 3 + 0, /*nb_oct*/ + #endif + #if PY_MAJOR_VERSION < 3 + 0, /*nb_hex*/ + #endif + __pyx_pw_4cdec_5_cdec_15SufficientStats_10__iadd__, /*nb_inplace_add*/ + 0, /*nb_inplace_subtract*/ + 0, /*nb_inplace_multiply*/ + #if PY_MAJOR_VERSION < 3 + 0, /*nb_inplace_divide*/ + #endif + 0, /*nb_inplace_remainder*/ + 0, /*nb_inplace_power*/ + 0, /*nb_inplace_lshift*/ + 0, /*nb_inplace_rshift*/ + 0, /*nb_inplace_and*/ + 0, /*nb_inplace_xor*/ + 0, /*nb_inplace_or*/ + 0, /*nb_floor_divide*/ + 0, /*nb_true_divide*/ + 0, /*nb_inplace_floor_divide*/ + 0, /*nb_inplace_true_divide*/ + #if PY_VERSION_HEX >= 0x02050000 + 0, /*nb_index*/ + #endif +}; + +static PySequenceMethods __pyx_tp_as_sequence_SufficientStats = { + __pyx_pw_4cdec_5_cdec_15SufficientStats_3__len__, /*sq_length*/ + 0, /*sq_concat*/ + 0, /*sq_repeat*/ + __pyx_sq_item_4cdec_5_cdec_SufficientStats, /*sq_item*/ + 0, /*sq_slice*/ + 0, /*sq_ass_item*/ + 0, /*sq_ass_slice*/ + 0, /*sq_contains*/ + 0, /*sq_inplace_concat*/ + 0, /*sq_inplace_repeat*/ +}; + +static PyMappingMethods __pyx_tp_as_mapping_SufficientStats = { + __pyx_pw_4cdec_5_cdec_15SufficientStats_3__len__, /*mp_length*/ + __pyx_pw_4cdec_5_cdec_15SufficientStats_8__getitem__, /*mp_subscript*/ + 0, /*mp_ass_subscript*/ +}; + +static PyTypeObject __pyx_type_4cdec_5_cdec_SufficientStats = { + PyVarObject_HEAD_INIT(0, 0) + __Pyx_NAMESTR("cdec._cdec.SufficientStats"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec_SufficientStats), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_4cdec_5_cdec_SufficientStats, /*tp_dealloc*/ + 0, /*tp_print*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #else + 0, /*reserved*/ + #endif + 0, /*tp_repr*/ + &__pyx_tp_as_number_SufficientStats, /*tp_as_number*/ + &__pyx_tp_as_sequence_SufficientStats, /*tp_as_sequence*/ + &__pyx_tp_as_mapping_SufficientStats, /*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, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ - 0, /*tp_iter*/ + __pyx_pw_4cdec_5_cdec_15SufficientStats_5__iter__, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_4cdec_5_cdec_HypergraphEdge, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec_SufficientStats, /*tp_methods*/ 0, /*tp_members*/ - __pyx_getsets_4cdec_5_cdec_HypergraphEdge, /*tp_getset*/ + __pyx_getsets_4cdec_5_cdec_SufficientStats, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ @@ -21934,7 +23629,7 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_HypergraphEdge = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec_HypergraphEdge, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec_SufficientStats, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -21946,67 +23641,79 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_HypergraphEdge = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif }; -static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_2__phrase[8]; -static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_2__phrase = 0; - -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_2__phrase(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase *p; +static PyObject *__pyx_tp_new_4cdec_5_cdec_CandidateSet(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o; - if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_2__phrase > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase)))) { - o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_2__phrase[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_2__phrase]; - memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase)); - PyObject_INIT(o, t); - PyObject_GC_Track(o); - } else { + if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); - if (unlikely(!o)) return 0; + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + if (unlikely(__pyx_pw_4cdec_5_cdec_12CandidateSet_1__cinit__(o, a, k) < 0)) { + Py_DECREF(o); o = 0; } - p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase *)o); - p->__pyx_v_phrase = 0; return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_2__phrase(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase *)o; - PyObject_GC_UnTrack(o); - Py_CLEAR(p->__pyx_v_phrase); - if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_2__phrase < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase))) { - __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_2__phrase[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_2__phrase++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase *)o); - } else { - (*Py_TYPE(o)->tp_free)(o); +static void __pyx_tp_dealloc_4cdec_5_cdec_CandidateSet(PyObject *o) { + #if PY_VERSION_HEX >= 0x030400a1 + if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { + if (PyObject_CallFinalizerFromDealloc(o)) return; } -} - -static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_2__phrase(PyObject *o, visitproc v, void *a) { - int e; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase *)o; - if (p->__pyx_v_phrase) { - e = (*v)(p->__pyx_v_phrase, a); if (e) return e; + #endif + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + ++Py_REFCNT(o); + __pyx_pw_4cdec_5_cdec_12CandidateSet_3__dealloc__(o); + --Py_REFCNT(o); + PyErr_Restore(etype, eval, etb); } - return 0; + (*Py_TYPE(o)->tp_free)(o); } - -static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_2__phrase(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase *)o; - PyObject* tmp; - tmp = ((PyObject*)p->__pyx_v_phrase); - p->__pyx_v_phrase = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - return 0; +static PyObject *__pyx_sq_item_4cdec_5_cdec_CandidateSet(PyObject *o, Py_ssize_t i) { + PyObject *r; + PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0; + r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x); + Py_DECREF(x); + return r; } -static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_2__phrase[] = { +static PyMethodDef __pyx_methods_4cdec_5_cdec_CandidateSet[] = { + {__Pyx_NAMESTR("add_kbest"), (PyCFunction)__pyx_pw_4cdec_5_cdec_12CandidateSet_12add_kbest, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_12CandidateSet_11add_kbest)}, {0, 0, 0, 0} }; -static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_2__phrase = { +static PySequenceMethods __pyx_tp_as_sequence_CandidateSet = { + __pyx_pw_4cdec_5_cdec_12CandidateSet_5__len__, /*sq_length*/ + 0, /*sq_concat*/ + 0, /*sq_repeat*/ + __pyx_sq_item_4cdec_5_cdec_CandidateSet, /*sq_item*/ + 0, /*sq_slice*/ + 0, /*sq_ass_item*/ + 0, /*sq_ass_slice*/ + 0, /*sq_contains*/ + 0, /*sq_inplace_concat*/ + 0, /*sq_inplace_repeat*/ +}; + +static PyMappingMethods __pyx_tp_as_mapping_CandidateSet = { + __pyx_pw_4cdec_5_cdec_12CandidateSet_5__len__, /*mp_length*/ + __pyx_pw_4cdec_5_cdec_12CandidateSet_7__getitem__, /*mp_subscript*/ + 0, /*mp_ass_subscript*/ +}; + +static PyTypeObject __pyx_type_4cdec_5_cdec_CandidateSet = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_2__phrase"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.CandidateSet"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec_CandidateSet), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_2__phrase, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec_CandidateSet, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -22017,23 +23724,23 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_2__phrase = { #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ - 0, /*tp_as_sequence*/ - 0, /*tp_as_mapping*/ + &__pyx_tp_as_sequence_CandidateSet, /*tp_as_sequence*/ + &__pyx_tp_as_mapping_CandidateSet, /*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*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ - __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_2__phrase, /*tp_traverse*/ - __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_2__phrase, /*tp_clear*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ - 0, /*tp_iter*/ + __pyx_pw_4cdec_5_cdec_12CandidateSet_9__iter__, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_4cdec_5_cdec___pyx_scope_struct_2__phrase, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec_CandidateSet, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -22043,7 +23750,7 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_2__phrase = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_2__phrase, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec_CandidateSet, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -22055,67 +23762,51 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_2__phrase = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif }; -static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_13___get__[8]; -static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_13___get__ = 0; - -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_13___get__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__ *p; +static PyObject *__pyx_tp_new_4cdec_5_cdec_SegmentEvaluator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; - if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_13___get__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__)))) { - o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_13___get__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_13___get__]; - memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__)); - PyObject_INIT(o, t); - PyObject_GC_Track(o); - } else { + if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); - if (unlikely(!o)) return 0; + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); } - p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__ *)o); - p->__pyx_v_self = 0; + if (unlikely(!o)) return 0; return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_13___get__(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__ *)o; - PyObject_GC_UnTrack(o); - Py_CLEAR(p->__pyx_v_self); - if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_13___get__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__))) { - __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_13___get__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_13___get__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__ *)o); - } else { - (*Py_TYPE(o)->tp_free)(o); +static void __pyx_tp_dealloc_4cdec_5_cdec_SegmentEvaluator(PyObject *o) { + #if PY_VERSION_HEX >= 0x030400a1 + if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { + if (PyObject_CallFinalizerFromDealloc(o)) return; } -} - -static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_13___get__(PyObject *o, visitproc v, void *a) { - int e; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__ *)o; - if (p->__pyx_v_self) { - e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; + #endif + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + ++Py_REFCNT(o); + __pyx_pw_4cdec_5_cdec_16SegmentEvaluator_1__dealloc__(o); + --Py_REFCNT(o); + PyErr_Restore(etype, eval, etb); } - return 0; + (*Py_TYPE(o)->tp_free)(o); } -static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_13___get__(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__ *)o; - PyObject* tmp; - tmp = ((PyObject*)p->__pyx_v_self); - p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)Py_None); Py_INCREF(Py_None); - Py_XDECREF(tmp); - return 0; -} - -static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_13___get__[] = { +static PyMethodDef __pyx_methods_4cdec_5_cdec_SegmentEvaluator[] = { + {__Pyx_NAMESTR("evaluate"), (PyCFunction)__pyx_pw_4cdec_5_cdec_16SegmentEvaluator_3evaluate, METH_O, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_16SegmentEvaluator_2evaluate)}, + {__Pyx_NAMESTR("candidate_set"), (PyCFunction)__pyx_pw_4cdec_5_cdec_16SegmentEvaluator_5candidate_set, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_16SegmentEvaluator_4candidate_set)}, {0, 0, 0, 0} }; -static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_13___get__ = { +static PyTypeObject __pyx_type_4cdec_5_cdec_SegmentEvaluator = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_13___get__"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.SegmentEvaluator"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec_SegmentEvaluator), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_13___get__, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec_SegmentEvaluator, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -22134,15 +23825,15 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_13___get__ = { 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*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ - __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_13___get__, /*tp_traverse*/ - __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_13___get__, /*tp_clear*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_4cdec_5_cdec___pyx_scope_struct_13___get__, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec_SegmentEvaluator, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -22152,7 +23843,7 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_13___get__ = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_13___get__, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec_SegmentEvaluator, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -22164,115 +23855,52 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_13___get__ = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif }; -static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_20_lines[8]; -static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_20_lines = 0; - -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_20_lines(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines *p; +static PyObject *__pyx_tp_new_4cdec_5_cdec_Scorer(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o; - if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_20_lines > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines)))) { - o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_20_lines[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_20_lines]; - memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines)); - PyObject_INIT(o, t); - PyObject_GC_Track(o); - } else { + if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { o = (*t->tp_alloc)(t, 0); - if (unlikely(!o)) return 0; - } - p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines *)o); - p->__pyx_outer_scope = 0; - p->__pyx_v_delta = 0; - p->__pyx_v_i = 0; - p->__pyx_v_label = 0; - p->__pyx_v_weight = 0; - p->__pyx_t_1 = 0; - p->__pyx_t_3 = 0; - return o; -} - -static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_20_lines(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines *)o; - PyObject_GC_UnTrack(o); - Py_CLEAR(p->__pyx_outer_scope); - Py_CLEAR(p->__pyx_v_delta); - Py_CLEAR(p->__pyx_v_i); - Py_CLEAR(p->__pyx_v_label); - Py_CLEAR(p->__pyx_v_weight); - Py_CLEAR(p->__pyx_t_1); - Py_CLEAR(p->__pyx_t_3); - if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_20_lines < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines))) { - __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_20_lines[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_20_lines++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines *)o); } else { - (*Py_TYPE(o)->tp_free)(o); + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; + if (unlikely(__pyx_pw_4cdec_5_cdec_6Scorer_1__cinit__(o, a, k) < 0)) { + Py_DECREF(o); o = 0; } + return o; } -static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_20_lines(PyObject *o, visitproc v, void *a) { - int e; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines *)o; - if (p->__pyx_outer_scope) { - e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e; - } - if (p->__pyx_v_delta) { - e = (*v)(p->__pyx_v_delta, a); if (e) return e; - } - if (p->__pyx_v_i) { - e = (*v)(p->__pyx_v_i, a); if (e) return e; - } - if (p->__pyx_v_label) { - e = (*v)(p->__pyx_v_label, a); if (e) return e; - } - if (p->__pyx_v_weight) { - e = (*v)(p->__pyx_v_weight, a); if (e) return e; - } - if (p->__pyx_t_1) { - e = (*v)(p->__pyx_t_1, a); if (e) return e; +static void __pyx_tp_dealloc_4cdec_5_cdec_Scorer(PyObject *o) { + #if PY_VERSION_HEX >= 0x030400a1 + if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { + if (PyObject_CallFinalizerFromDealloc(o)) return; } - if (p->__pyx_t_3) { - e = (*v)(p->__pyx_t_3, a); if (e) return e; + #endif + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + ++Py_REFCNT(o); + __pyx_pw_4cdec_5_cdec_6Scorer_3__dealloc__(o); + --Py_REFCNT(o); + PyErr_Restore(etype, eval, etb); } - return 0; -} - -static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_20_lines(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines *)o; - PyObject* tmp; - tmp = ((PyObject*)p->__pyx_outer_scope); - p->__pyx_outer_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot *)Py_None); Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->__pyx_v_delta); - p->__pyx_v_delta = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->__pyx_v_i); - p->__pyx_v_i = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->__pyx_v_label); - p->__pyx_v_label = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->__pyx_v_weight); - p->__pyx_v_weight = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->__pyx_t_1); - p->__pyx_t_1 = 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; + (*Py_TYPE(o)->tp_free)(o); } -static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_20_lines[] = { +static PyMethodDef __pyx_methods_4cdec_5_cdec_Scorer[] = { {0, 0, 0, 0} }; -static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_20_lines = { +static PyTypeObject __pyx_type_4cdec_5_cdec_Scorer = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_20_lines"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.Scorer"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec_Scorer), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_20_lines, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec_Scorer, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -22286,20 +23914,20 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_20_lines = { 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ - 0, /*tp_call*/ - 0, /*tp_str*/ + __pyx_pw_4cdec_5_cdec_6Scorer_5__call__, /*tp_call*/ + __pyx_pw_4cdec_5_cdec_6Scorer_7__str__, /*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*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ - __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_20_lines, /*tp_traverse*/ - __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_20_lines, /*tp_clear*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_4cdec_5_cdec___pyx_scope_struct_20_lines, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec_Scorer, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -22309,7 +23937,7 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_20_lines = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_20_lines, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec_Scorer, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -22321,41 +23949,70 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_20_lines = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif }; -static PyObject *__pyx_tp_new_4cdec_5_cdec_Scorer(PyTypeObject *t, PyObject *a, PyObject *k) { +static PyObject *__pyx_tp_new_4cdec_5_cdec_Metric(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec_Metric *p; PyObject *o; - o = (*t->tp_alloc)(t, 0); + 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; - if (unlikely(__pyx_pw_4cdec_5_cdec_6Scorer_1__cinit__(o, a, k) < 0)) { + p = ((struct __pyx_obj_4cdec_5_cdec_Metric *)o); + p->scorer = ((struct __pyx_obj_4cdec_5_cdec_Scorer *)Py_None); Py_INCREF(Py_None); + if (unlikely(__pyx_pw_4cdec_5_cdec_6Metric_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) { Py_DECREF(o); o = 0; } return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec_Scorer(PyObject *o) { - { - PyObject *etype, *eval, *etb; - PyErr_Fetch(&etype, &eval, &etb); - ++Py_REFCNT(o); - __pyx_pw_4cdec_5_cdec_6Scorer_3__dealloc__(o); - if (PyErr_Occurred()) PyErr_WriteUnraisable(o); - --Py_REFCNT(o); - PyErr_Restore(etype, eval, etb); +static void __pyx_tp_dealloc_4cdec_5_cdec_Metric(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec_Metric *p = (struct __pyx_obj_4cdec_5_cdec_Metric *)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->scorer); (*Py_TYPE(o)->tp_free)(o); } -static PyMethodDef __pyx_methods_4cdec_5_cdec_Scorer[] = { +static int __pyx_tp_traverse_4cdec_5_cdec_Metric(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_4cdec_5_cdec_Metric *p = (struct __pyx_obj_4cdec_5_cdec_Metric *)o; + if (p->scorer) { + e = (*v)(((PyObject*)p->scorer), a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_4cdec_5_cdec_Metric(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_4cdec_5_cdec_Metric *p = (struct __pyx_obj_4cdec_5_cdec_Metric *)o; + tmp = ((PyObject*)p->scorer); + p->scorer = ((struct __pyx_obj_4cdec_5_cdec_Scorer *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyMethodDef __pyx_methods_4cdec_5_cdec_Metric[] = { + {__Pyx_NAMESTR("score"), (PyCFunction)__pyx_pw_4cdec_5_cdec_6Metric_5score, METH_NOARGS, __Pyx_DOCSTR(0)}, + {__Pyx_NAMESTR("evaluate"), (PyCFunction)__pyx_pw_4cdec_5_cdec_6Metric_7evaluate, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; -static PyTypeObject __pyx_type_4cdec_5_cdec_Scorer = { +static PyTypeObject __pyx_type_4cdec_5_cdec_Metric = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.Scorer"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec_Scorer), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.Metric"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec_Metric), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec_Scorer, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec_Metric, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -22369,20 +24026,20 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_Scorer = { 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ - __pyx_pw_4cdec_5_cdec_6Scorer_5__call__, /*tp_call*/ - __pyx_pw_4cdec_5_cdec_6Scorer_7__str__, /*tp_str*/ + __pyx_pw_4cdec_5_cdec_6Metric_3__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, /*tp_flags*/ + 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*/ - 0, /*tp_traverse*/ - 0, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec_Metric, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec_Metric, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_4cdec_5_cdec_Scorer, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec_Metric, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -22392,7 +24049,7 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_Scorer = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec_Scorer, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec_Metric, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -22404,62 +24061,99 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_Scorer = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif }; -static struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphNode __pyx_vtable_4cdec_5_cdec_HypergraphNode; -static PyObject *__pyx_tp_new_4cdec_5_cdec_HypergraphNode(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_4cdec_5_cdec_HypergraphNode *p; +static PyObject *__pyx_tp_new_4cdec_5_cdec_Decoder(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec_Decoder *p; PyObject *o; - o = (*t->tp_alloc)(t, 0); + 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_4cdec_5_cdec_HypergraphNode *)o); - p->__pyx_vtab = __pyx_vtabptr_4cdec_5_cdec_HypergraphNode; + p = ((struct __pyx_obj_4cdec_5_cdec_Decoder *)o); + p->weights = ((struct __pyx_obj_4cdec_5_cdec_DenseVector *)Py_None); Py_INCREF(Py_None); return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec_HypergraphNode(PyObject *o) { +static void __pyx_tp_dealloc_4cdec_5_cdec_Decoder(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec_Decoder *p = (struct __pyx_obj_4cdec_5_cdec_Decoder *)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 *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + ++Py_REFCNT(o); + __pyx_pw_4cdec_5_cdec_7Decoder_3__dealloc__(o); + --Py_REFCNT(o); + PyErr_Restore(etype, eval, etb); + } + Py_CLEAR(p->weights); (*Py_TYPE(o)->tp_free)(o); } -static PyObject *__pyx_getprop_4cdec_5_cdec_14HypergraphNode_id(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_4cdec_5_cdec_14HypergraphNode_2id_1__get__(o); +static int __pyx_tp_traverse_4cdec_5_cdec_Decoder(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_4cdec_5_cdec_Decoder *p = (struct __pyx_obj_4cdec_5_cdec_Decoder *)o; + if (p->weights) { + e = (*v)(((PyObject*)p->weights), a); if (e) return e; + } + return 0; } -static PyObject *__pyx_getprop_4cdec_5_cdec_14HypergraphNode_in_edges(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_4cdec_5_cdec_14HypergraphNode_8in_edges_1__get__(o); +static int __pyx_tp_clear_4cdec_5_cdec_Decoder(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_4cdec_5_cdec_Decoder *p = (struct __pyx_obj_4cdec_5_cdec_Decoder *)o; + tmp = ((PyObject*)p->weights); + p->weights = ((struct __pyx_obj_4cdec_5_cdec_DenseVector *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; } -static PyObject *__pyx_getprop_4cdec_5_cdec_14HypergraphNode_out_edges(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_4cdec_5_cdec_14HypergraphNode_9out_edges_1__get__(o); -} +static PyObject *__pyx_getprop_4cdec_5_cdec_7Decoder_weights(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_7Decoder_7weights_1__get__(o); +} -static PyObject *__pyx_getprop_4cdec_5_cdec_14HypergraphNode_span(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_4cdec_5_cdec_14HypergraphNode_4span_1__get__(o); +static int __pyx_setprop_4cdec_5_cdec_7Decoder_weights(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_4cdec_5_cdec_7Decoder_7weights_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } } -static PyObject *__pyx_getprop_4cdec_5_cdec_14HypergraphNode_cat(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_4cdec_5_cdec_14HypergraphNode_3cat_1__get__(o); +static PyObject *__pyx_getprop_4cdec_5_cdec_7Decoder_formalism(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_7Decoder_9formalism_1__get__(o); } -static PyMethodDef __pyx_methods_4cdec_5_cdec_HypergraphNode[] = { +static PyMethodDef __pyx_methods_4cdec_5_cdec_Decoder[] = { + {__Pyx_NAMESTR("read_weights"), (PyCFunction)__pyx_pw_4cdec_5_cdec_7Decoder_5read_weights, METH_O, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_7Decoder_4read_weights)}, + {__Pyx_NAMESTR("translate"), (PyCFunction)__pyx_pw_4cdec_5_cdec_7Decoder_7translate, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_7Decoder_6translate)}, {0, 0, 0, 0} }; -static struct PyGetSetDef __pyx_getsets_4cdec_5_cdec_HypergraphNode[] = { - {(char *)"id", __pyx_getprop_4cdec_5_cdec_14HypergraphNode_id, 0, 0, 0}, - {(char *)"in_edges", __pyx_getprop_4cdec_5_cdec_14HypergraphNode_in_edges, 0, 0, 0}, - {(char *)"out_edges", __pyx_getprop_4cdec_5_cdec_14HypergraphNode_out_edges, 0, 0, 0}, - {(char *)"span", __pyx_getprop_4cdec_5_cdec_14HypergraphNode_span, 0, 0, 0}, - {(char *)"cat", __pyx_getprop_4cdec_5_cdec_14HypergraphNode_cat, 0, 0, 0}, +static struct PyGetSetDef __pyx_getsets_4cdec_5_cdec_Decoder[] = { + {(char *)"weights", __pyx_getprop_4cdec_5_cdec_7Decoder_weights, __pyx_setprop_4cdec_5_cdec_7Decoder_weights, 0, 0}, + {(char *)"formalism", __pyx_getprop_4cdec_5_cdec_7Decoder_formalism, 0, 0, 0}, {0, 0, 0, 0, 0} }; -static PyTypeObject __pyx_type_4cdec_5_cdec_HypergraphNode = { +static PyTypeObject __pyx_type_4cdec_5_cdec_Decoder = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.HypergraphNode"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec_HypergraphNode), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.Decoder"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec_Decoder), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec_HypergraphNode, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec_Decoder, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -22478,25 +24172,25 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_HypergraphNode = { 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, /*tp_flags*/ + 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*/ - 0, /*tp_traverse*/ - 0, /*tp_clear*/ - __pyx_pw_4cdec_5_cdec_14HypergraphNode_1__richcmp__, /*tp_richcompare*/ + __pyx_tp_traverse_4cdec_5_cdec_Decoder, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec_Decoder, /*tp_clear*/ + 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_4cdec_5_cdec_HypergraphNode, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec_Decoder, /*tp_methods*/ 0, /*tp_members*/ - __pyx_getsets_4cdec_5_cdec_HypergraphNode, /*tp_getset*/ + __pyx_getsets_4cdec_5_cdec_Decoder, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ - 0, /*tp_init*/ + __pyx_pw_4cdec_5_cdec_7Decoder_1__init__, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec_HypergraphNode, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec_Decoder, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -22508,83 +24202,63 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_HypergraphNode = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif }; -static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_10_kbest_features[8]; -static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_10_kbest_features = 0; +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct____iter__[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct____iter__ = 0; -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_10_kbest_features(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features *p; +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct____iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; - if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_10_kbest_features > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features)))) { - o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_10_kbest_features[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_10_kbest_features]; - memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features)); - PyObject_INIT(o, t); + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct____iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct____iter__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct____iter__]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__)); + (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } - p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features *)o); - p->__pyx_v_fmap = 0; - p->__pyx_v_self = 0; - p->__pyx_v_size = 0; return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_10_kbest_features(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features *)o; +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct____iter__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__ *)o; PyObject_GC_UnTrack(o); - Py_CLEAR(p->__pyx_v_fmap); Py_CLEAR(p->__pyx_v_self); - Py_CLEAR(p->__pyx_v_size); - if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_10_kbest_features < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features))) { - __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_10_kbest_features[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_10_kbest_features++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features *)o); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct____iter__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct____iter__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct____iter__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__ *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } -static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_10_kbest_features(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct____iter__(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features *)o; - if (p->__pyx_v_fmap) { - e = (*v)(((PyObject*)p->__pyx_v_fmap), a); if (e) return e; - } + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__ *)o; if (p->__pyx_v_self) { e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; } - if (p->__pyx_v_size) { - e = (*v)(p->__pyx_v_size, a); if (e) return e; - } return 0; } -static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_10_kbest_features(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features *)o; +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct____iter__(PyObject *o) { PyObject* tmp; - tmp = ((PyObject*)p->__pyx_v_fmap); - p->__pyx_v_fmap = ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)Py_None); Py_INCREF(Py_None); - Py_XDECREF(tmp); + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__ *)o; tmp = ((PyObject*)p->__pyx_v_self); - p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)Py_None); Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->__pyx_v_size); - p->__pyx_v_size = Py_None; Py_INCREF(Py_None); + p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_DenseVector *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_10_kbest_features[] = { - {0, 0, 0, 0} -}; - -static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_10_kbest_features = { +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct____iter__ = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_10_kbest_features"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct____iter__"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_10_kbest_features, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct____iter__, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -22605,13 +24279,13 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_10_kbest_features 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_4cdec_5_cdec___pyx_scope_struct_10_kbest_features, /*tp_traverse*/ - __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_10_kbest_features, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct____iter__, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct____iter__, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_4cdec_5_cdec___pyx_scope_struct_10_kbest_features, /*tp_methods*/ + 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -22621,7 +24295,7 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_10_kbest_features 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_10_kbest_features, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct____iter__, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -22633,48 +24307,63 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_10_kbest_features #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif }; -static PyObject *__pyx_tp_new_4cdec_5_cdec_NTRef(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_1___iter__[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_1___iter__ = 0; + +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_1___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; - o = (*t->tp_alloc)(t, 0); - if (unlikely(!o)) return 0; + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_1___iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_1___iter__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_1___iter__]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__)); + (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_4cdec_5_cdec_NTRef(PyObject *o) { - (*Py_TYPE(o)->tp_free)(o); -} - -static PyObject *__pyx_getprop_4cdec_5_cdec_5NTRef_ref(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_4cdec_5_cdec_5NTRef_3ref_1__get__(o); +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_1___iter__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__ *)o; + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_v_self); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_1___iter__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_1___iter__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_1___iter__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__ *)o); + } else { + (*Py_TYPE(o)->tp_free)(o); + } } -static int __pyx_setprop_4cdec_5_cdec_5NTRef_ref(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { - if (v) { - return __pyx_pw_4cdec_5_cdec_5NTRef_3ref_3__set__(o, v); - } - else { - PyErr_SetString(PyExc_NotImplementedError, "__del__"); - return -1; +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_1___iter__(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__ *)o; + if (p->__pyx_v_self) { + e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; } + return 0; } -static PyMethodDef __pyx_methods_4cdec_5_cdec_NTRef[] = { - {0, 0, 0, 0} -}; - -static struct PyGetSetDef __pyx_getsets_4cdec_5_cdec_NTRef[] = { - {(char *)"ref", __pyx_getprop_4cdec_5_cdec_5NTRef_ref, __pyx_setprop_4cdec_5_cdec_5NTRef_ref, 0, 0}, - {0, 0, 0, 0, 0} -}; +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_1___iter__(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__ *)o; + tmp = ((PyObject*)p->__pyx_v_self); + p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} -static PyTypeObject __pyx_type_4cdec_5_cdec_NTRef = { +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_1___iter__ = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.NTRef"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec_NTRef), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_1___iter__"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec_NTRef, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_1___iter__, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -22689,29 +24378,29 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_NTRef = { 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ - __pyx_pw_4cdec_5_cdec_5NTRef_3__str__, /*tp_str*/ + 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, /*tp_flags*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ - 0, /*tp_traverse*/ - 0, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_1___iter__, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_1___iter__, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_4cdec_5_cdec_NTRef, /*tp_methods*/ + 0, /*tp_methods*/ 0, /*tp_members*/ - __pyx_getsets_4cdec_5_cdec_NTRef, /*tp_getset*/ + 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ - __pyx_pw_4cdec_5_cdec_5NTRef_1__init__, /*tp_init*/ + 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec_NTRef, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_1___iter__, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -22723,57 +24412,63 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_NTRef = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif }; -static PyObject *__pyx_tp_new_4cdec_5_cdec_Grammar(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_2__phrase[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_2__phrase = 0; + +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_2__phrase(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; - o = (*t->tp_alloc)(t, 0); - if (unlikely(!o)) return 0; + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_2__phrase > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_2__phrase[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_2__phrase]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase)); + (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_4cdec_5_cdec_Grammar(PyObject *o) { - { - PyObject *etype, *eval, *etb; - PyErr_Fetch(&etype, &eval, &etb); - ++Py_REFCNT(o); - __pyx_pw_4cdec_5_cdec_7Grammar_1__dealloc__(o); - if (PyErr_Occurred()) PyErr_WriteUnraisable(o); - --Py_REFCNT(o); - PyErr_Restore(etype, eval, etb); +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_2__phrase(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase *)o; + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_v_phrase); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_2__phrase < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_2__phrase[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_2__phrase++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase *)o); + } else { + (*Py_TYPE(o)->tp_free)(o); } - (*Py_TYPE(o)->tp_free)(o); } -static PyObject *__pyx_getprop_4cdec_5_cdec_7Grammar_name(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_4cdec_5_cdec_7Grammar_4name_1__get__(o); +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_2__phrase(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase *)o; + if (p->__pyx_v_phrase) { + e = (*v)(p->__pyx_v_phrase, a); if (e) return e; + } + return 0; } -static int __pyx_setprop_4cdec_5_cdec_7Grammar_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { - if (v) { - return __pyx_pw_4cdec_5_cdec_7Grammar_4name_3__set__(o, v); - } - else { - PyErr_SetString(PyExc_NotImplementedError, "__del__"); - return -1; - } +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_2__phrase(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase *)o; + tmp = ((PyObject*)p->__pyx_v_phrase); + p->__pyx_v_phrase = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; } -static PyMethodDef __pyx_methods_4cdec_5_cdec_Grammar[] = { - {0, 0, 0, 0} -}; - -static struct PyGetSetDef __pyx_getsets_4cdec_5_cdec_Grammar[] = { - {(char *)"name", __pyx_getprop_4cdec_5_cdec_7Grammar_name, __pyx_setprop_4cdec_5_cdec_7Grammar_name, 0, 0}, - {0, 0, 0, 0, 0} -}; - -static PyTypeObject __pyx_type_4cdec_5_cdec_Grammar = { +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_2__phrase = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.Grammar"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec_Grammar), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_2__phrase"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec_Grammar, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_2__phrase, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -22792,17 +24487,17 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_Grammar = { 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, /*tp_flags*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ - 0, /*tp_traverse*/ - 0, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_2__phrase, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_2__phrase, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ - __pyx_pw_4cdec_5_cdec_7Grammar_3__iter__, /*tp_iter*/ + 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_4cdec_5_cdec_Grammar, /*tp_methods*/ + 0, /*tp_methods*/ 0, /*tp_members*/ - __pyx_getsets_4cdec_5_cdec_Grammar, /*tp_getset*/ + 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ @@ -22810,7 +24505,7 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_Grammar = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec_Grammar, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_2__phrase, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -22822,82 +24517,77 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_Grammar = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif }; -static struct __pyx_vtabstruct_4cdec_5_cdec_Hypergraph __pyx_vtable_4cdec_5_cdec_Hypergraph; -static PyObject *__pyx_tp_new_4cdec_5_cdec_Hypergraph(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_4cdec_5_cdec_Hypergraph *p; +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_3_genexpr[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_3_genexpr = 0; + +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_3_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; - o = (*t->tp_alloc)(t, 0); - if (unlikely(!o)) return 0; - p = ((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)o); - p->__pyx_vtab = __pyx_vtabptr_4cdec_5_cdec_Hypergraph; + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_3_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_3_genexpr[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_3_genexpr]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr)); + (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_4cdec_5_cdec_Hypergraph(PyObject *o) { - { - PyObject *etype, *eval, *etb; - PyErr_Fetch(&etype, &eval, &etb); - ++Py_REFCNT(o); - __pyx_pw_4cdec_5_cdec_10Hypergraph_1__dealloc__(o); - if (PyErr_Occurred()) PyErr_WriteUnraisable(o); - --Py_REFCNT(o); - PyErr_Restore(etype, eval, etb); +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_3_genexpr(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr *)o; + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_outer_scope); + Py_CLEAR(p->__pyx_v_w); + Py_CLEAR(p->__pyx_t_0); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_3_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_3_genexpr[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_3_genexpr++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr *)o); + } else { + (*Py_TYPE(o)->tp_free)(o); } - (*Py_TYPE(o)->tp_free)(o); -} - -static PyObject *__pyx_getprop_4cdec_5_cdec_10Hypergraph_edges(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_4cdec_5_cdec_10Hypergraph_5edges_1__get__(o); -} - -static PyObject *__pyx_getprop_4cdec_5_cdec_10Hypergraph_nodes(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_4cdec_5_cdec_10Hypergraph_5nodes_1__get__(o); } -static PyObject *__pyx_getprop_4cdec_5_cdec_10Hypergraph_goal(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_4cdec_5_cdec_10Hypergraph_4goal_1__get__(o); +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_3_genexpr(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr *)o; + if (p->__pyx_outer_scope) { + e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e; + } + if (p->__pyx_v_w) { + e = (*v)(p->__pyx_v_w, a); if (e) return e; + } + if (p->__pyx_t_0) { + e = (*v)(p->__pyx_t_0, a); if (e) return e; + } + return 0; } -static PyObject *__pyx_getprop_4cdec_5_cdec_10Hypergraph_npaths(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_4cdec_5_cdec_10Hypergraph_6npaths_1__get__(o); +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_3_genexpr(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr *)o; + tmp = ((PyObject*)p->__pyx_outer_scope); + p->__pyx_outer_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_v_w); + p->__pyx_v_w = 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); + return 0; } -static PyMethodDef __pyx_methods_4cdec_5_cdec_Hypergraph[] = { - {__Pyx_NAMESTR("viterbi"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_3viterbi, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_2viterbi)}, - {__Pyx_NAMESTR("viterbi_trees"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_5viterbi_trees, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_4viterbi_trees)}, - {__Pyx_NAMESTR("viterbi_features"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_7viterbi_features, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_6viterbi_features)}, - {__Pyx_NAMESTR("viterbi_forest"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_9viterbi_forest, METH_NOARGS, __Pyx_DOCSTR(0)}, - {__Pyx_NAMESTR("viterbi_joshua"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_11viterbi_joshua, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_10viterbi_joshua)}, - {__Pyx_NAMESTR("kbest"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_13kbest, METH_O, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_12kbest)}, - {__Pyx_NAMESTR("kbest_trees"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_16kbest_trees, METH_O, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_15kbest_trees)}, - {__Pyx_NAMESTR("kbest_features"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_19kbest_features, METH_O, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_18kbest_features)}, - {__Pyx_NAMESTR("sample"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_22sample, METH_O, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_21sample)}, - {__Pyx_NAMESTR("sample_trees"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_25sample_trees, METH_O, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_24sample_trees)}, - {__Pyx_NAMESTR("intersect"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_28intersect, METH_O, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_27intersect)}, - {__Pyx_NAMESTR("prune"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_30prune, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_29prune)}, - {__Pyx_NAMESTR("lattice"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_32lattice, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_31lattice)}, - {__Pyx_NAMESTR("plf"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_34plf, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_33plf)}, - {__Pyx_NAMESTR("reweight"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_36reweight, METH_O, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_35reweight)}, - {__Pyx_NAMESTR("inside_outside"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_38inside_outside, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_37inside_outside)}, - {0, 0, 0, 0} -}; - -static struct PyGetSetDef __pyx_getsets_4cdec_5_cdec_Hypergraph[] = { - {(char *)"edges", __pyx_getprop_4cdec_5_cdec_10Hypergraph_edges, 0, 0, 0}, - {(char *)"nodes", __pyx_getprop_4cdec_5_cdec_10Hypergraph_nodes, 0, 0, 0}, - {(char *)"goal", __pyx_getprop_4cdec_5_cdec_10Hypergraph_goal, 0, 0, 0}, - {(char *)"npaths", __pyx_getprop_4cdec_5_cdec_10Hypergraph_npaths, 0, 0, 0}, - {0, 0, 0, 0, 0} -}; - -static PyTypeObject __pyx_type_4cdec_5_cdec_Hypergraph = { +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_3_genexpr = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.Hypergraph"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec_Hypergraph), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_3_genexpr"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec_Hypergraph, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_3_genexpr, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -22916,17 +24606,17 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_Hypergraph = { 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, /*tp_flags*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ - 0, /*tp_traverse*/ - 0, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_3_genexpr, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_3_genexpr, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_4cdec_5_cdec_Hypergraph, /*tp_methods*/ + 0, /*tp_methods*/ 0, /*tp_members*/ - __pyx_getsets_4cdec_5_cdec_Hypergraph, /*tp_getset*/ + 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ @@ -22934,7 +24624,7 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_Hypergraph = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec_Hypergraph, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_3_genexpr, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -22946,67 +24636,63 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_Hypergraph = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif }; -static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_24___init__[8]; -static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_24___init__ = 0; +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_4___get__[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_4___get__ = 0; -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_24___init__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__ *p; +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_4___get__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; - if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_24___init__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__)))) { - o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_24___init__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_24___init__]; - memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__)); - PyObject_INIT(o, t); + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_4___get__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_4___get__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_4___get__]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__)); + (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } - p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__ *)o); - p->__pyx_v_config = 0; return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_24___init__(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__ *)o; +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_4___get__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__ *)o; PyObject_GC_UnTrack(o); - Py_CLEAR(p->__pyx_v_config); - if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_24___init__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__))) { - __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_24___init__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_24___init__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__ *)o); + Py_CLEAR(p->__pyx_v_self); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_4___get__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_4___get__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_4___get__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__ *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } -static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_24___init__(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_4___get__(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__ *)o; - if (p->__pyx_v_config) { - e = (*v)(p->__pyx_v_config, a); if (e) return e; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__ *)o; + if (p->__pyx_v_self) { + e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; } return 0; } -static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_24___init__(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__ *)o; +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_4___get__(PyObject *o) { PyObject* tmp; - tmp = ((PyObject*)p->__pyx_v_config); - p->__pyx_v_config = ((PyObject*)Py_None); Py_INCREF(Py_None); + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__ *)o; + tmp = ((PyObject*)p->__pyx_v_self); + p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_TRule *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_24___init__[] = { - {0, 0, 0, 0} -}; - -static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_24___init__ = { +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_4___get__ = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_24___init__"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_4___get__"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_24___init__, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_4___get__, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -23027,13 +24713,13 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_24___init__ = { 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_4cdec_5_cdec___pyx_scope_struct_24___init__, /*tp_traverse*/ - __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_24___init__, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_4___get__, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_4___get__, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_4cdec_5_cdec___pyx_scope_struct_24___init__, /*tp_methods*/ + 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -23043,7 +24729,7 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_24___init__ = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_24___init__, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_4___get__, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -23055,68 +24741,63 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_24___init__ = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif }; -static PyObject *__pyx_tp_new_4cdec_5_cdec_CandidateSet(PyTypeObject *t, PyObject *a, PyObject *k) { +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_5___str__[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_5___str__ = 0; + +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_5___str__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; - o = (*t->tp_alloc)(t, 0); - if (unlikely(!o)) return 0; - if (unlikely(__pyx_pw_4cdec_5_cdec_12CandidateSet_1__cinit__(o, a, k) < 0)) { - Py_DECREF(o); o = 0; + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_5___str__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_5___str__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_5___str__]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__)); + (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_4cdec_5_cdec_CandidateSet(PyObject *o) { - { - PyObject *etype, *eval, *etb; - PyErr_Fetch(&etype, &eval, &etb); - ++Py_REFCNT(o); - __pyx_pw_4cdec_5_cdec_12CandidateSet_3__dealloc__(o); - if (PyErr_Occurred()) PyErr_WriteUnraisable(o); - --Py_REFCNT(o); - PyErr_Restore(etype, eval, etb); +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_5___str__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__ *)o; + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_v_self); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_5___str__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_5___str__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_5___str__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__ *)o); + } else { + (*Py_TYPE(o)->tp_free)(o); } - (*Py_TYPE(o)->tp_free)(o); } -static PyObject *__pyx_sq_item_4cdec_5_cdec_CandidateSet(PyObject *o, Py_ssize_t i) { - PyObject *r; - PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0; - r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x); - Py_DECREF(x); - return r; + +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_5___str__(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__ *)o; + if (p->__pyx_v_self) { + e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; + } + return 0; } -static PyMethodDef __pyx_methods_4cdec_5_cdec_CandidateSet[] = { - {__Pyx_NAMESTR("add_kbest"), (PyCFunction)__pyx_pw_4cdec_5_cdec_12CandidateSet_12add_kbest, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_12CandidateSet_11add_kbest)}, - {0, 0, 0, 0} -}; - -static PySequenceMethods __pyx_tp_as_sequence_CandidateSet = { - __pyx_pw_4cdec_5_cdec_12CandidateSet_5__len__, /*sq_length*/ - 0, /*sq_concat*/ - 0, /*sq_repeat*/ - __pyx_sq_item_4cdec_5_cdec_CandidateSet, /*sq_item*/ - 0, /*sq_slice*/ - 0, /*sq_ass_item*/ - 0, /*sq_ass_slice*/ - 0, /*sq_contains*/ - 0, /*sq_inplace_concat*/ - 0, /*sq_inplace_repeat*/ -}; - -static PyMappingMethods __pyx_tp_as_mapping_CandidateSet = { - __pyx_pw_4cdec_5_cdec_12CandidateSet_5__len__, /*mp_length*/ - __pyx_pw_4cdec_5_cdec_12CandidateSet_7__getitem__, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ -}; +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_5___str__(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__ *)o; + tmp = ((PyObject*)p->__pyx_v_self); + p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_TRule *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} -static PyTypeObject __pyx_type_4cdec_5_cdec_CandidateSet = { +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_5___str__ = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.CandidateSet"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec_CandidateSet), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_5___str__"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec_CandidateSet, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_5___str__, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -23127,23 +24808,23 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_CandidateSet = { #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ - &__pyx_tp_as_sequence_CandidateSet, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_CandidateSet, /*tp_as_mapping*/ + 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, /*tp_flags*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ - 0, /*tp_traverse*/ - 0, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_5___str__, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_5___str__, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ - __pyx_pw_4cdec_5_cdec_12CandidateSet_9__iter__, /*tp_iter*/ + 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_4cdec_5_cdec_CandidateSet, /*tp_methods*/ + 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -23153,7 +24834,7 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_CandidateSet = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec_CandidateSet, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_5___str__, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -23165,91 +24846,77 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_CandidateSet = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif }; -static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees[8]; -static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees = 0; +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_6_genexpr[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_6_genexpr = 0; -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees *p; +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_6_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; - if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees)))) { - o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees]; - memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees)); - PyObject_INIT(o, t); + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_6_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_6_genexpr[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_6_genexpr]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr)); + (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } - p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees *)o); - p->__pyx_v_e_tree = 0; - p->__pyx_v_f_tree = 0; - p->__pyx_v_self = 0; - p->__pyx_v_size = 0; return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees *)o; +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_6_genexpr(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr *)o; PyObject_GC_UnTrack(o); - Py_CLEAR(p->__pyx_v_e_tree); - Py_CLEAR(p->__pyx_v_f_tree); - Py_CLEAR(p->__pyx_v_self); - Py_CLEAR(p->__pyx_v_size); - if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees))) { - __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees *)o); + Py_CLEAR(p->__pyx_outer_scope); + Py_CLEAR(p->__pyx_v_feat); + Py_CLEAR(p->__pyx_t_0); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_6_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_6_genexpr[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_6_genexpr++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } -static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_6_genexpr(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees *)o; - if (p->__pyx_v_e_tree) { - e = (*v)(p->__pyx_v_e_tree, a); if (e) return e; - } - if (p->__pyx_v_f_tree) { - e = (*v)(p->__pyx_v_f_tree, a); if (e) return e; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr *)o; + if (p->__pyx_outer_scope) { + e = (*v)(((PyObject*)p->__pyx_outer_scope), 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_feat) { + e = (*v)(p->__pyx_v_feat, a); if (e) return e; } - if (p->__pyx_v_size) { - e = (*v)(p->__pyx_v_size, a); if (e) return e; + if (p->__pyx_t_0) { + e = (*v)(p->__pyx_t_0, a); if (e) return e; } return 0; } -static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees *)o; +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_6_genexpr(PyObject *o) { PyObject* tmp; - tmp = ((PyObject*)p->__pyx_v_e_tree); - p->__pyx_v_e_tree = ((PyObject*)Py_None); Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->__pyx_v_f_tree); - p->__pyx_v_f_tree = ((PyObject*)Py_None); Py_INCREF(Py_None); + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr *)o; + tmp = ((PyObject*)p->__pyx_outer_scope); + p->__pyx_outer_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__ *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); - tmp = ((PyObject*)p->__pyx_v_self); - p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)Py_None); Py_INCREF(Py_None); + tmp = ((PyObject*)p->__pyx_v_feat); + p->__pyx_v_feat = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); - tmp = ((PyObject*)p->__pyx_v_size); - p->__pyx_v_size = Py_None; Py_INCREF(Py_None); + tmp = ((PyObject*)p->__pyx_t_0); + p->__pyx_t_0 = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees[] = { - {0, 0, 0, 0} -}; - -static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees = { +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_6_genexpr = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_9_kbest_trees"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_6_genexpr"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_6_genexpr, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -23270,13 +24937,13 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees = { 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_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees, /*tp_traverse*/ - __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_6_genexpr, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_6_genexpr, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees, /*tp_methods*/ + 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -23286,7 +24953,7 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_6_genexpr, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -23298,67 +24965,70 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif }; -static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_19_todot[8]; -static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_19_todot = 0; +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_7___iter__[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_7___iter__ = 0; -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_19_todot(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot *p; +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_7___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; - if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_19_todot > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot)))) { - o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_19_todot[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_19_todot]; - memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot)); - PyObject_INIT(o, t); + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_7___iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_7___iter__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_7___iter__]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__)); + (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } - p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot *)o); - p->__pyx_v_self = 0; return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_19_todot(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot *)o; +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_7___iter__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__ *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_self); - if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_19_todot < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot))) { - __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_19_todot[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_19_todot++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot *)o); + Py_CLEAR(p->__pyx_v_trule); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_7___iter__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_7___iter__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_7___iter__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__ *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } -static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_19_todot(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_7___iter__(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot *)o; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__ *)o; if (p->__pyx_v_self) { e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; } + if (p->__pyx_v_trule) { + e = (*v)(((PyObject*)p->__pyx_v_trule), a); if (e) return e; + } return 0; } -static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_19_todot(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot *)o; +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_7___iter__(PyObject *o) { PyObject* tmp; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__ *)o; tmp = ((PyObject*)p->__pyx_v_self); - p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_Lattice *)Py_None); Py_INCREF(Py_None); + p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_Grammar *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_v_trule); + p->__pyx_v_trule = ((struct __pyx_obj_4cdec_5_cdec_TRule *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_19_todot[] = { - {0, 0, 0, 0} -}; - -static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_19_todot = { +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_7___iter__ = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_19_todot"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_7___iter__"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_19_todot, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_7___iter__, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -23379,13 +25049,13 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_19_todot = { 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_4cdec_5_cdec___pyx_scope_struct_19_todot, /*tp_traverse*/ - __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_19_todot, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_7___iter__, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_7___iter__, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_4cdec_5_cdec___pyx_scope_struct_19_todot, /*tp_methods*/ + 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -23395,7 +25065,7 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_19_todot = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_19_todot, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_7___iter__, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -23407,67 +25077,70 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_19_todot = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif }; -static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_5___str__[8]; -static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_5___str__ = 0; +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_8_kbest[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_8_kbest = 0; -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_5___str__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__ *p; +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_8_kbest(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; - if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_5___str__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__)))) { - o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_5___str__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_5___str__]; - memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__)); - PyObject_INIT(o, t); + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_8_kbest > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_8_kbest[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_8_kbest]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest)); + (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } - p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__ *)o); - p->__pyx_v_self = 0; return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_5___str__(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__ *)o; +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_8_kbest(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_self); - if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_5___str__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__))) { - __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_5___str__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_5___str__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__ *)o); + Py_CLEAR(p->__pyx_v_size); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_8_kbest < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_8_kbest[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_8_kbest++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } -static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_5___str__(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_8_kbest(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__ *)o; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest *)o; if (p->__pyx_v_self) { e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; } + if (p->__pyx_v_size) { + e = (*v)(p->__pyx_v_size, a); if (e) return e; + } return 0; } -static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_5___str__(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__ *)o; +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_8_kbest(PyObject *o) { PyObject* tmp; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest *)o; tmp = ((PyObject*)p->__pyx_v_self); - p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_TRule *)Py_None); Py_INCREF(Py_None); + p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_v_size); + p->__pyx_v_size = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_5___str__[] = { - {0, 0, 0, 0} -}; - -static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_5___str__ = { +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_8_kbest = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_5___str__"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_8_kbest"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_5___str__, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_8_kbest, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -23488,13 +25161,13 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_5___str__ = { 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_4cdec_5_cdec___pyx_scope_struct_5___str__, /*tp_traverse*/ - __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_5___str__, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_8_kbest, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_8_kbest, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_4cdec_5_cdec___pyx_scope_struct_5___str__, /*tp_methods*/ + 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -23504,7 +25177,7 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_5___str__ = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_5___str__, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_8_kbest, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -23516,40 +25189,72 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_5___str__ = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif }; -static PyObject *__pyx_tp_new_4cdec_5_cdec_SegmentEvaluator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees = 0; + +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; - o = (*t->tp_alloc)(t, 0); - if (unlikely(!o)) return 0; + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees)); + (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_4cdec_5_cdec_SegmentEvaluator(PyObject *o) { - { - PyObject *etype, *eval, *etb; - PyErr_Fetch(&etype, &eval, &etb); - ++Py_REFCNT(o); - __pyx_pw_4cdec_5_cdec_16SegmentEvaluator_1__dealloc__(o); - if (PyErr_Occurred()) PyErr_WriteUnraisable(o); - --Py_REFCNT(o); - PyErr_Restore(etype, eval, etb); +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees *)o; + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_v_e_tree); + Py_CLEAR(p->__pyx_v_f_tree); + Py_CLEAR(p->__pyx_v_self); + Py_CLEAR(p->__pyx_v_size); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees *)o); + } else { + (*Py_TYPE(o)->tp_free)(o); } - (*Py_TYPE(o)->tp_free)(o); } -static PyMethodDef __pyx_methods_4cdec_5_cdec_SegmentEvaluator[] = { - {__Pyx_NAMESTR("evaluate"), (PyCFunction)__pyx_pw_4cdec_5_cdec_16SegmentEvaluator_3evaluate, METH_O, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_16SegmentEvaluator_2evaluate)}, - {__Pyx_NAMESTR("candidate_set"), (PyCFunction)__pyx_pw_4cdec_5_cdec_16SegmentEvaluator_5candidate_set, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_16SegmentEvaluator_4candidate_set)}, - {0, 0, 0, 0} -}; +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees *)o; + if (p->__pyx_v_self) { + e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; + } + if (p->__pyx_v_size) { + e = (*v)(p->__pyx_v_size, a); if (e) return e; + } + return 0; +} -static PyTypeObject __pyx_type_4cdec_5_cdec_SegmentEvaluator = { +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees *)o; + tmp = ((PyObject*)p->__pyx_v_self); + p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_v_size); + p->__pyx_v_size = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.SegmentEvaluator"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec_SegmentEvaluator), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_9_kbest_trees"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec_SegmentEvaluator, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -23568,15 +25273,15 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_SegmentEvaluator = { 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, /*tp_flags*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ - 0, /*tp_traverse*/ - 0, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_4cdec_5_cdec_SegmentEvaluator, /*tp_methods*/ + 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -23586,7 +25291,7 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_SegmentEvaluator = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec_SegmentEvaluator, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -23598,67 +25303,77 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_SegmentEvaluator = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif }; -static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_16___get__[8]; -static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_16___get__ = 0; +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_10_kbest_features[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_10_kbest_features = 0; -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_16___get__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__ *p; +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_10_kbest_features(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; - if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_16___get__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__)))) { - o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_16___get__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_16___get__]; - memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__)); - PyObject_INIT(o, t); + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_10_kbest_features > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_10_kbest_features[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_10_kbest_features]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features)); + (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } - p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__ *)o); - p->__pyx_v_self = 0; return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_16___get__(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__ *)o; +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_10_kbest_features(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features *)o; PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_v_fmap); Py_CLEAR(p->__pyx_v_self); - if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_16___get__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__))) { - __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_16___get__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_16___get__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__ *)o); + Py_CLEAR(p->__pyx_v_size); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_10_kbest_features < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_10_kbest_features[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_10_kbest_features++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } -static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_16___get__(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_10_kbest_features(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__ *)o; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features *)o; + if (p->__pyx_v_fmap) { + e = (*v)(((PyObject*)p->__pyx_v_fmap), 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_size) { + e = (*v)(p->__pyx_v_size, a); if (e) return e; + } return 0; } -static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_16___get__(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__ *)o; +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_10_kbest_features(PyObject *o) { PyObject* tmp; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features *)o; + tmp = ((PyObject*)p->__pyx_v_fmap); + p->__pyx_v_fmap = ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_self); - p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_HypergraphNode *)Py_None); Py_INCREF(Py_None); + p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_v_size); + p->__pyx_v_size = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_16___get__[] = { - {0, 0, 0, 0} -}; - -static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_16___get__ = { +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_10_kbest_features = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_16___get__"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_10_kbest_features"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_16___get__, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_10_kbest_features, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -23679,13 +25394,13 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_16___get__ = { 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_4cdec_5_cdec___pyx_scope_struct_16___get__, /*tp_traverse*/ - __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_16___get__, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_10_kbest_features, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_10_kbest_features, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_4cdec_5_cdec___pyx_scope_struct_16___get__, /*tp_methods*/ + 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -23695,7 +25410,7 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_16___get__ = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_16___get__, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_10_kbest_features, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -23707,83 +25422,63 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_16___get__ = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif }; -static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_25_genexpr[8]; -static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_25_genexpr = 0; +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_11_sample[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_11_sample = 0; -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_25_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr *p; +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_11_sample(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; - if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_25_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr)))) { - o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_25_genexpr[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_25_genexpr]; - memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr)); - PyObject_INIT(o, t); + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_11_sample > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_11_sample[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_11_sample]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample)); + (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } - p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr *)o); - p->__pyx_outer_scope = 0; - p->__pyx_v_kv = 0; - p->__pyx_t_0 = 0; return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_25_genexpr(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr *)o; +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_11_sample(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample *)o; PyObject_GC_UnTrack(o); - Py_CLEAR(p->__pyx_outer_scope); - Py_CLEAR(p->__pyx_v_kv); - Py_CLEAR(p->__pyx_t_0); - if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_25_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr))) { - __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_25_genexpr[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_25_genexpr++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr *)o); + Py_CLEAR(p->__pyx_v_self); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_11_sample < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_11_sample[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_11_sample++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } -static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_25_genexpr(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_11_sample(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr *)o; - if (p->__pyx_outer_scope) { - e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e; - } - if (p->__pyx_v_kv) { - e = (*v)(p->__pyx_v_kv, a); if (e) return e; - } - if (p->__pyx_t_0) { - e = (*v)(p->__pyx_t_0, a); if (e) return e; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample *)o; + if (p->__pyx_v_self) { + e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; } return 0; } -static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_25_genexpr(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr *)o; +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_11_sample(PyObject *o) { PyObject* tmp; - tmp = ((PyObject*)p->__pyx_outer_scope); - p->__pyx_outer_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__ *)Py_None); Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->__pyx_v_kv); - p->__pyx_v_kv = 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); + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample *)o; + tmp = ((PyObject*)p->__pyx_v_self); + p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_25_genexpr[] = { - {0, 0, 0, 0} -}; - -static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_25_genexpr = { +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_11_sample = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_25_genexpr"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_11_sample"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_25_genexpr, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_11_sample, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -23804,13 +25499,13 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_25_genexpr = { 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_4cdec_5_cdec___pyx_scope_struct_25_genexpr, /*tp_traverse*/ - __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_25_genexpr, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_11_sample, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_11_sample, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_4cdec_5_cdec___pyx_scope_struct_25_genexpr, /*tp_methods*/ + 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -23820,7 +25515,7 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_25_genexpr = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_25_genexpr, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_11_sample, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -23832,83 +25527,63 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_25_genexpr = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif }; -static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_3_genexpr[8]; -static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_3_genexpr = 0; +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_12_sample_trees[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_12_sample_trees = 0; -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_3_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr *p; +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_12_sample_trees(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; - if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_3_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr)))) { - o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_3_genexpr[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_3_genexpr]; - memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr)); - PyObject_INIT(o, t); + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_12_sample_trees > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_12_sample_trees[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_12_sample_trees]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees)); + (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } - p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr *)o); - p->__pyx_outer_scope = 0; - p->__pyx_v_w = 0; - p->__pyx_t_0 = 0; return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_3_genexpr(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr *)o; +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_12_sample_trees(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees *)o; PyObject_GC_UnTrack(o); - Py_CLEAR(p->__pyx_outer_scope); - Py_CLEAR(p->__pyx_v_w); - Py_CLEAR(p->__pyx_t_0); - if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_3_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr))) { - __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_3_genexpr[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_3_genexpr++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr *)o); + Py_CLEAR(p->__pyx_v_self); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_12_sample_trees < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_12_sample_trees[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_12_sample_trees++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } -static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_3_genexpr(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_12_sample_trees(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr *)o; - if (p->__pyx_outer_scope) { - e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e; - } - if (p->__pyx_v_w) { - e = (*v)(p->__pyx_v_w, a); if (e) return e; - } - if (p->__pyx_t_0) { - e = (*v)(p->__pyx_t_0, a); if (e) return e; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees *)o; + if (p->__pyx_v_self) { + e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; } return 0; } -static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_3_genexpr(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr *)o; +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_12_sample_trees(PyObject *o) { PyObject* tmp; - tmp = ((PyObject*)p->__pyx_outer_scope); - p->__pyx_outer_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase *)Py_None); Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->__pyx_v_w); - p->__pyx_v_w = 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); + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees *)o; + tmp = ((PyObject*)p->__pyx_v_self); + p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_3_genexpr[] = { - {0, 0, 0, 0} -}; - -static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_3_genexpr = { +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_12_sample_trees = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_3_genexpr"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_12_sample_trees"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_3_genexpr, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_12_sample_trees, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -23929,13 +25604,13 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_3_genexpr = { 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_4cdec_5_cdec___pyx_scope_struct_3_genexpr, /*tp_traverse*/ - __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_3_genexpr, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_12_sample_trees, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_12_sample_trees, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_4cdec_5_cdec___pyx_scope_struct_3_genexpr, /*tp_methods*/ + 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -23945,7 +25620,7 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_3_genexpr = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_3_genexpr, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_12_sample_trees, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -23957,67 +25632,63 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_3_genexpr = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif }; -static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_11_sample[8]; -static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_11_sample = 0; +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_13___get__[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_13___get__ = 0; -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_11_sample(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample *p; +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_13___get__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; - if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_11_sample > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample)))) { - o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_11_sample[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_11_sample]; - memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample)); - PyObject_INIT(o, t); + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_13___get__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_13___get__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_13___get__]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__)); + (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } - p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample *)o); - p->__pyx_v_self = 0; return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_11_sample(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample *)o; +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_13___get__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__ *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_self); - if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_11_sample < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample))) { - __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_11_sample[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_11_sample++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample *)o); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_13___get__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_13___get__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_13___get__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__ *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } -static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_11_sample(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_13___get__(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample *)o; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__ *)o; if (p->__pyx_v_self) { e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; } return 0; } -static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_11_sample(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample *)o; +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_13___get__(PyObject *o) { PyObject* tmp; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__ *)o; tmp = ((PyObject*)p->__pyx_v_self); p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_11_sample[] = { - {0, 0, 0, 0} -}; - -static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_11_sample = { +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_13___get__ = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_11_sample"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_13___get__"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_11_sample, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_13___get__, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -24038,13 +25709,13 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_11_sample = { 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_4cdec_5_cdec___pyx_scope_struct_11_sample, /*tp_traverse*/ - __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_11_sample, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_13___get__, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_13___get__, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_4cdec_5_cdec___pyx_scope_struct_11_sample, /*tp_methods*/ + 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -24054,7 +25725,7 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_11_sample = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_11_sample, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_13___get__, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -24066,75 +25737,63 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_11_sample = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif }; -static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_8_kbest[8]; -static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_8_kbest = 0; +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_14___get__[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_14___get__ = 0; -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_8_kbest(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest *p; +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_14___get__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; - if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_8_kbest > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest)))) { - o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_8_kbest[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_8_kbest]; - memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest)); - PyObject_INIT(o, t); + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_14___get__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_14___get__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_14___get__]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__)); + (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } - p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest *)o); - p->__pyx_v_self = 0; - p->__pyx_v_size = 0; return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_8_kbest(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest *)o; +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_14___get__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__ *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_self); - Py_CLEAR(p->__pyx_v_size); - if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_8_kbest < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest))) { - __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_8_kbest[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_8_kbest++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest *)o); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_14___get__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_14___get__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_14___get__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__ *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } -static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_8_kbest(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_14___get__(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest *)o; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__ *)o; if (p->__pyx_v_self) { e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; } - if (p->__pyx_v_size) { - e = (*v)(p->__pyx_v_size, a); if (e) return e; - } return 0; } -static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_8_kbest(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest *)o; +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_14___get__(PyObject *o) { PyObject* tmp; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__ *)o; tmp = ((PyObject*)p->__pyx_v_self); p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); - tmp = ((PyObject*)p->__pyx_v_size); - p->__pyx_v_size = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); return 0; } -static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_8_kbest[] = { - {0, 0, 0, 0} -}; - -static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_8_kbest = { +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_14___get__ = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_8_kbest"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_14___get__"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_8_kbest, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_14___get__, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -24155,13 +25814,13 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_8_kbest = { 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_4cdec_5_cdec___pyx_scope_struct_8_kbest, /*tp_traverse*/ - __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_8_kbest, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_14___get__, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_14___get__, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_4cdec_5_cdec___pyx_scope_struct_8_kbest, /*tp_methods*/ + 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -24171,7 +25830,7 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_8_kbest = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_8_kbest, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_14___get__, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -24183,67 +25842,63 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_8_kbest = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif }; -static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_14___get__[8]; -static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_14___get__ = 0; +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_15___get__[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_15___get__ = 0; -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_14___get__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__ *p; +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_15___get__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; - if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_14___get__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__)))) { - o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_14___get__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_14___get__]; - memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__)); - PyObject_INIT(o, t); + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_15___get__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_15___get__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_15___get__]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__)); + (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } - p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__ *)o); - p->__pyx_v_self = 0; return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_14___get__(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__ *)o; +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_15___get__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__ *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_self); - if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_14___get__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__))) { - __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_14___get__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_14___get__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__ *)o); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_15___get__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_15___get__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_15___get__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__ *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } -static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_14___get__(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_15___get__(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__ *)o; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__ *)o; if (p->__pyx_v_self) { e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; } return 0; } -static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_14___get__(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__ *)o; +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_15___get__(PyObject *o) { PyObject* tmp; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__ *)o; tmp = ((PyObject*)p->__pyx_v_self); - p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)Py_None); Py_INCREF(Py_None); + p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_14___get__[] = { - {0, 0, 0, 0} -}; - -static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_14___get__ = { +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_15___get__ = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_14___get__"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_15___get__"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_14___get__, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_15___get__, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -24264,13 +25919,13 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_14___get__ = { 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_4cdec_5_cdec___pyx_scope_struct_14___get__, /*tp_traverse*/ - __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_14___get__, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_15___get__, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_15___get__, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_4cdec_5_cdec___pyx_scope_struct_14___get__, /*tp_methods*/ + 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -24280,7 +25935,7 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_14___get__ = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_14___get__, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_15___get__, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -24292,75 +25947,63 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_14___get__ = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif }; -static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_7___iter__[8]; -static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_7___iter__ = 0; +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_16___get__[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_16___get__ = 0; -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_7___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__ *p; +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_16___get__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; - if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_7___iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__)))) { - o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_7___iter__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_7___iter__]; - memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__)); - PyObject_INIT(o, t); + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_16___get__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_16___get__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_16___get__]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__)); + (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } - p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__ *)o); - p->__pyx_v_self = 0; - p->__pyx_v_trule = 0; return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_7___iter__(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__ *)o; +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_16___get__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__ *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_self); - Py_CLEAR(p->__pyx_v_trule); - if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_7___iter__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__))) { - __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_7___iter__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_7___iter__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__ *)o); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_16___get__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_16___get__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_16___get__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__ *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } -static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_7___iter__(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_16___get__(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__ *)o; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__ *)o; if (p->__pyx_v_self) { e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; } - if (p->__pyx_v_trule) { - e = (*v)(((PyObject*)p->__pyx_v_trule), a); if (e) return e; - } return 0; } -static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_7___iter__(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__ *)o; +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_16___get__(PyObject *o) { PyObject* tmp; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__ *)o; tmp = ((PyObject*)p->__pyx_v_self); - p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_Grammar *)Py_None); Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->__pyx_v_trule); - p->__pyx_v_trule = ((struct __pyx_obj_4cdec_5_cdec_TRule *)Py_None); Py_INCREF(Py_None); + p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_HypergraphNode *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_7___iter__[] = { - {0, 0, 0, 0} -}; - -static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_7___iter__ = { +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_16___get__ = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_7___iter__"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_16___get__"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_7___iter__, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_16___get__, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -24381,13 +26024,13 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_7___iter__ = { 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_4cdec_5_cdec___pyx_scope_struct_7___iter__, /*tp_traverse*/ - __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_7___iter__, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_16___get__, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_16___get__, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_4cdec_5_cdec___pyx_scope_struct_7___iter__, /*tp_methods*/ + 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -24397,7 +26040,7 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_7___iter__ = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_7___iter__, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_16___get__, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -24409,158 +26052,63 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_7___iter__ = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif }; -static PyObject *__pyx_tp_new_4cdec_5_cdec_TextGrammar(PyTypeObject *t, PyObject *a, PyObject *k) { - PyObject *o = __pyx_tp_new_4cdec_5_cdec_Grammar(t, a, k); - if (unlikely(!o)) return 0; +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_17___get__[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_17___get__ = 0; + +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_17___get__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_17___get__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_17___get__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_17___get__]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__)); + (void) PyObject_INIT(o, t); + PyObject_GC_Track(o); + } else { + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + } return o; } -static PyMethodDef __pyx_methods_4cdec_5_cdec_TextGrammar[] = { - {0, 0, 0, 0} -}; +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_17___get__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__ *)o; + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_v_self); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_17___get__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_17___get__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_17___get__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__ *)o); + } else { + (*Py_TYPE(o)->tp_free)(o); + } +} -static PyTypeObject __pyx_type_4cdec_5_cdec_TextGrammar = { - PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.TextGrammar"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec_TextGrammar), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec_Grammar, /*tp_dealloc*/ - 0, /*tp_print*/ - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - #if PY_MAJOR_VERSION < 3 - 0, /*tp_compare*/ - #else - 0, /*reserved*/ - #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, /*tp_flags*/ - 0, /*tp_doc*/ - 0, /*tp_traverse*/ - 0, /*tp_clear*/ - 0, /*tp_richcompare*/ - 0, /*tp_weaklistoffset*/ - #if CYTHON_COMPILING_IN_PYPY - __pyx_pw_4cdec_5_cdec_7Grammar_3__iter__, /*tp_iter*/ - #else - 0, /*tp_iter*/ - #endif - 0, /*tp_iternext*/ - __pyx_methods_4cdec_5_cdec_TextGrammar, /*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*/ - __pyx_pw_4cdec_5_cdec_11TextGrammar_1__init__, /*tp_init*/ - 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec_TextGrammar, /*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*/ - #if PY_VERSION_HEX >= 0x02060000 - 0, /*tp_version_tag*/ - #endif -}; - -static PyObject *__pyx_tp_new_4cdec_5_cdec_Decoder(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_4cdec_5_cdec_Decoder *p; - PyObject *o; - o = (*t->tp_alloc)(t, 0); - if (unlikely(!o)) return 0; - p = ((struct __pyx_obj_4cdec_5_cdec_Decoder *)o); - p->weights = ((struct __pyx_obj_4cdec_5_cdec_DenseVector *)Py_None); Py_INCREF(Py_None); - return o; -} - -static void __pyx_tp_dealloc_4cdec_5_cdec_Decoder(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec_Decoder *p = (struct __pyx_obj_4cdec_5_cdec_Decoder *)o; - PyObject_GC_UnTrack(o); - { - PyObject *etype, *eval, *etb; - PyErr_Fetch(&etype, &eval, &etb); - ++Py_REFCNT(o); - __pyx_pw_4cdec_5_cdec_7Decoder_3__dealloc__(o); - if (PyErr_Occurred()) PyErr_WriteUnraisable(o); - --Py_REFCNT(o); - PyErr_Restore(etype, eval, etb); - } - Py_CLEAR(p->weights); - (*Py_TYPE(o)->tp_free)(o); -} - -static int __pyx_tp_traverse_4cdec_5_cdec_Decoder(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_17___get__(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_4cdec_5_cdec_Decoder *p = (struct __pyx_obj_4cdec_5_cdec_Decoder *)o; - if (p->weights) { - e = (*v)(((PyObject*)p->weights), a); if (e) return e; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__ *)o; + if (p->__pyx_v_self) { + e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; } return 0; } -static int __pyx_tp_clear_4cdec_5_cdec_Decoder(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec_Decoder *p = (struct __pyx_obj_4cdec_5_cdec_Decoder *)o; +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_17___get__(PyObject *o) { PyObject* tmp; - tmp = ((PyObject*)p->weights); - p->weights = ((struct __pyx_obj_4cdec_5_cdec_DenseVector *)Py_None); Py_INCREF(Py_None); + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__ *)o; + tmp = ((PyObject*)p->__pyx_v_self); + p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_HypergraphNode *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyObject *__pyx_getprop_4cdec_5_cdec_7Decoder_weights(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_4cdec_5_cdec_7Decoder_7weights_1__get__(o); -} - -static int __pyx_setprop_4cdec_5_cdec_7Decoder_weights(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { - if (v) { - return __pyx_pw_4cdec_5_cdec_7Decoder_7weights_3__set__(o, v); - } - else { - PyErr_SetString(PyExc_NotImplementedError, "__del__"); - return -1; - } -} - -static PyObject *__pyx_getprop_4cdec_5_cdec_7Decoder_formalism(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_4cdec_5_cdec_7Decoder_9formalism_1__get__(o); -} - -static PyMethodDef __pyx_methods_4cdec_5_cdec_Decoder[] = { - {__Pyx_NAMESTR("read_weights"), (PyCFunction)__pyx_pw_4cdec_5_cdec_7Decoder_5read_weights, METH_O, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_7Decoder_4read_weights)}, - {__Pyx_NAMESTR("translate"), (PyCFunction)__pyx_pw_4cdec_5_cdec_7Decoder_7translate, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_7Decoder_6translate)}, - {0, 0, 0, 0} -}; - -static struct PyGetSetDef __pyx_getsets_4cdec_5_cdec_Decoder[] = { - {(char *)"weights", __pyx_getprop_4cdec_5_cdec_7Decoder_weights, __pyx_setprop_4cdec_5_cdec_7Decoder_weights, 0, 0}, - {(char *)"formalism", __pyx_getprop_4cdec_5_cdec_7Decoder_formalism, 0, 0, 0}, - {0, 0, 0, 0, 0} -}; - -static PyTypeObject __pyx_type_4cdec_5_cdec_Decoder = { +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_17___get__ = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.Decoder"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec_Decoder), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_17___get__"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec_Decoder, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_17___get__, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -24579,25 +26127,25 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_Decoder = { 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*/ + 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_4cdec_5_cdec_Decoder, /*tp_traverse*/ - __pyx_tp_clear_4cdec_5_cdec_Decoder, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_17___get__, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_17___get__, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_4cdec_5_cdec_Decoder, /*tp_methods*/ + 0, /*tp_methods*/ 0, /*tp_members*/ - __pyx_getsets_4cdec_5_cdec_Decoder, /*tp_getset*/ + 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ - __pyx_pw_4cdec_5_cdec_7Decoder_1__init__, /*tp_init*/ + 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec_Decoder, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_17___get__, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -24609,67 +26157,63 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_Decoder = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif }; -static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct____iter__[8]; -static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct____iter__ = 0; +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_18___iter__[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_18___iter__ = 0; -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct____iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__ *p; +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_18___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; - if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct____iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__)))) { - o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct____iter__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct____iter__]; - memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__)); - PyObject_INIT(o, t); + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_18___iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_18___iter__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_18___iter__]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__)); + (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } - p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__ *)o); - p->__pyx_v_self = 0; return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct____iter__(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__ *)o; +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_18___iter__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__ *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_self); - if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct____iter__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__))) { - __pyx_freelist_4cdec_5_cdec___pyx_scope_struct____iter__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct____iter__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__ *)o); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_18___iter__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_18___iter__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_18___iter__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__ *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } -static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct____iter__(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_18___iter__(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__ *)o; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__ *)o; if (p->__pyx_v_self) { e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; } return 0; } -static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct____iter__(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__ *)o; +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_18___iter__(PyObject *o) { PyObject* tmp; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__ *)o; tmp = ((PyObject*)p->__pyx_v_self); - p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_DenseVector *)Py_None); Py_INCREF(Py_None); + p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_Lattice *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct____iter__[] = { - {0, 0, 0, 0} -}; - -static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct____iter__ = { +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_18___iter__ = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct____iter__"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_18___iter__"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct____iter__, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_18___iter__, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -24690,13 +26234,13 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct____iter__ = { 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_4cdec_5_cdec___pyx_scope_struct____iter__, /*tp_traverse*/ - __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct____iter__, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_18___iter__, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_18___iter__, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_4cdec_5_cdec___pyx_scope_struct____iter__, /*tp_methods*/ + 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -24706,7 +26250,7 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct____iter__ = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct____iter__, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_18___iter__, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -24718,67 +26262,63 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct____iter__ = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif }; -static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_17___get__[8]; -static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_17___get__ = 0; +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_19_todot[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_19_todot = 0; -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_17___get__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__ *p; +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_19_todot(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; - if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_17___get__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__)))) { - o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_17___get__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_17___get__]; - memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__)); - PyObject_INIT(o, t); + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_19_todot > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_19_todot[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_19_todot]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot)); + (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } - p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__ *)o); - p->__pyx_v_self = 0; return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_17___get__(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__ *)o; +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_19_todot(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_self); - if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_17___get__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__))) { - __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_17___get__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_17___get__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__ *)o); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_19_todot < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_19_todot[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_19_todot++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } -static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_17___get__(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_19_todot(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__ *)o; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot *)o; if (p->__pyx_v_self) { e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; } return 0; } -static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_17___get__(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__ *)o; +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_19_todot(PyObject *o) { PyObject* tmp; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot *)o; tmp = ((PyObject*)p->__pyx_v_self); - p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_HypergraphNode *)Py_None); Py_INCREF(Py_None); + p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_Lattice *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_17___get__[] = { - {0, 0, 0, 0} -}; - -static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_17___get__ = { +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_19_todot = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_17___get__"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_19_todot"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_17___get__, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_19_todot, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -24799,13 +26339,13 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_17___get__ = { 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_4cdec_5_cdec___pyx_scope_struct_17___get__, /*tp_traverse*/ - __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_17___get__, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_19_todot, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_19_todot, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_4cdec_5_cdec___pyx_scope_struct_17___get__, /*tp_methods*/ + 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -24815,7 +26355,7 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_17___get__ = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_17___get__, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_19_todot, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -24827,67 +26367,105 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_17___get__ = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif }; -static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_18___iter__[8]; -static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_18___iter__ = 0; +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_20_lines[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_20_lines = 0; -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_18___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__ *p; +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_20_lines(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; - if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_18___iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__)))) { - o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_18___iter__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_18___iter__]; - memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__)); - PyObject_INIT(o, t); + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_20_lines > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_20_lines[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_20_lines]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines)); + (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } - p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__ *)o); - p->__pyx_v_self = 0; return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_18___iter__(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__ *)o; +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_20_lines(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines *)o; PyObject_GC_UnTrack(o); - Py_CLEAR(p->__pyx_v_self); - if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_18___iter__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__))) { - __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_18___iter__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_18___iter__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__ *)o); - } else { - (*Py_TYPE(o)->tp_free)(o); - } -} - -static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_18___iter__(PyObject *o, visitproc v, void *a) { + Py_CLEAR(p->__pyx_outer_scope); + Py_CLEAR(p->__pyx_v_delta); + Py_CLEAR(p->__pyx_v_i); + Py_CLEAR(p->__pyx_v_label); + Py_CLEAR(p->__pyx_v_weight); + Py_CLEAR(p->__pyx_t_1); + Py_CLEAR(p->__pyx_t_3); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_20_lines < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_20_lines[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_20_lines++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines *)o); + } else { + (*Py_TYPE(o)->tp_free)(o); + } +} + +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_20_lines(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__ *)o; - if (p->__pyx_v_self) { - e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines *)o; + if (p->__pyx_outer_scope) { + e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e; + } + if (p->__pyx_v_delta) { + e = (*v)(p->__pyx_v_delta, a); if (e) return e; + } + if (p->__pyx_v_i) { + e = (*v)(p->__pyx_v_i, a); if (e) return e; + } + if (p->__pyx_v_label) { + e = (*v)(p->__pyx_v_label, a); if (e) return e; + } + if (p->__pyx_v_weight) { + e = (*v)(p->__pyx_v_weight, a); if (e) return e; + } + if (p->__pyx_t_1) { + e = (*v)(p->__pyx_t_1, 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_4cdec_5_cdec___pyx_scope_struct_18___iter__(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__ *)o; +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_20_lines(PyObject *o) { PyObject* tmp; - tmp = ((PyObject*)p->__pyx_v_self); - p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_Lattice *)Py_None); Py_INCREF(Py_None); + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines *)o; + tmp = ((PyObject*)p->__pyx_outer_scope); + p->__pyx_outer_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_v_delta); + p->__pyx_v_delta = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_v_i); + p->__pyx_v_i = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_v_label); + p->__pyx_v_label = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_v_weight); + p->__pyx_v_weight = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_t_1); + p->__pyx_t_1 = 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 PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_18___iter__[] = { - {0, 0, 0, 0} -}; - -static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_18___iter__ = { +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_20_lines = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_18___iter__"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_20_lines"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_18___iter__, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_20_lines, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -24908,13 +26486,13 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_18___iter__ = { 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_4cdec_5_cdec___pyx_scope_struct_18___iter__, /*tp_traverse*/ - __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_18___iter__, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_20_lines, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_20_lines, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_4cdec_5_cdec___pyx_scope_struct_18___iter__, /*tp_methods*/ + 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -24924,7 +26502,7 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_18___iter__ = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_18___iter__, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_20_lines, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -24936,83 +26514,63 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_18___iter__ = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif }; -static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_6_genexpr[8]; -static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_6_genexpr = 0; +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_21___iter__[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_21___iter__ = 0; -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_6_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr *p; +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_21___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; - if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_6_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr)))) { - o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_6_genexpr[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_6_genexpr]; - memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr)); - PyObject_INIT(o, t); + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_21___iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_21___iter__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_21___iter__]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__)); + (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } - p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr *)o); - p->__pyx_outer_scope = 0; - p->__pyx_v_feat = 0; - p->__pyx_t_0 = 0; return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_6_genexpr(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr *)o; +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_21___iter__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__ *)o; PyObject_GC_UnTrack(o); - Py_CLEAR(p->__pyx_outer_scope); - Py_CLEAR(p->__pyx_v_feat); - Py_CLEAR(p->__pyx_t_0); - if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_6_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr))) { - __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_6_genexpr[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_6_genexpr++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr *)o); + Py_CLEAR(p->__pyx_v_self); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_21___iter__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_21___iter__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_21___iter__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__ *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } -static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_6_genexpr(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_21___iter__(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr *)o; - if (p->__pyx_outer_scope) { - e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e; - } - if (p->__pyx_v_feat) { - e = (*v)(p->__pyx_v_feat, a); if (e) return e; - } - if (p->__pyx_t_0) { - e = (*v)(p->__pyx_t_0, a); if (e) return e; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__ *)o; + if (p->__pyx_v_self) { + e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; } return 0; } -static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_6_genexpr(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr *)o; +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_21___iter__(PyObject *o) { PyObject* tmp; - tmp = ((PyObject*)p->__pyx_outer_scope); - p->__pyx_outer_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__ *)Py_None); Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->__pyx_v_feat); - p->__pyx_v_feat = 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); + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__ *)o; + tmp = ((PyObject*)p->__pyx_v_self); + p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_SufficientStats *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_6_genexpr[] = { - {0, 0, 0, 0} -}; - -static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_6_genexpr = { +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_21___iter__ = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_6_genexpr"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_21___iter__"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_6_genexpr, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_21___iter__, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -25033,13 +26591,13 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_6_genexpr = { 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_4cdec_5_cdec___pyx_scope_struct_6_genexpr, /*tp_traverse*/ - __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_6_genexpr, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_21___iter__, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_21___iter__, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_4cdec_5_cdec___pyx_scope_struct_6_genexpr, /*tp_methods*/ + 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -25049,7 +26607,7 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_6_genexpr = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_6_genexpr, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_21___iter__, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -25061,67 +26619,63 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_6_genexpr = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif }; -static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_12_sample_trees[8]; -static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_12_sample_trees = 0; +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_22___iter__[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_22___iter__ = 0; -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_12_sample_trees(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees *p; +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_22___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; - if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_12_sample_trees > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees)))) { - o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_12_sample_trees[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_12_sample_trees]; - memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees)); - PyObject_INIT(o, t); + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_22___iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_22___iter__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_22___iter__]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__)); + (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } - p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees *)o); - p->__pyx_v_self = 0; return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_12_sample_trees(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees *)o; +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_22___iter__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__ *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_self); - if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_12_sample_trees < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees))) { - __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_12_sample_trees[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_12_sample_trees++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees *)o); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_22___iter__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_22___iter__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_22___iter__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__ *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } -static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_12_sample_trees(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_22___iter__(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees *)o; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__ *)o; if (p->__pyx_v_self) { e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; } return 0; } -static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_12_sample_trees(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees *)o; +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_22___iter__(PyObject *o) { PyObject* tmp; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__ *)o; tmp = ((PyObject*)p->__pyx_v_self); - p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)Py_None); Py_INCREF(Py_None); + p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_CandidateSet *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_12_sample_trees[] = { - {0, 0, 0, 0} -}; - -static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_12_sample_trees = { +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_22___iter__ = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_12_sample_trees"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_22___iter__"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_12_sample_trees, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_22___iter__, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -25142,13 +26696,13 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_12_sample_trees = 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_4cdec_5_cdec___pyx_scope_struct_12_sample_trees, /*tp_traverse*/ - __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_12_sample_trees, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_22___iter__, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_22___iter__, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_4cdec_5_cdec___pyx_scope_struct_12_sample_trees, /*tp_methods*/ + 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -25158,7 +26712,7 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_12_sample_trees = 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_12_sample_trees, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_22___iter__, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -25170,67 +26724,105 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_12_sample_trees = #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif }; -static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_4___get__[8]; -static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_4___get__ = 0; +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_23__make_config[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_23__make_config = 0; -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_4___get__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__ *p; +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_23__make_config(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; - if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_4___get__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__)))) { - o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_4___get__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_4___get__]; - memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__)); - PyObject_INIT(o, t); + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_23__make_config > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_23__make_config[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_23__make_config]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config)); + (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } - p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__ *)o); - p->__pyx_v_self = 0; return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_4___get__(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__ *)o; +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_23__make_config(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config *)o; PyObject_GC_UnTrack(o); - Py_CLEAR(p->__pyx_v_self); - if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_4___get__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__))) { - __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_4___get__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_4___get__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__ *)o); + Py_CLEAR(p->__pyx_v_config); + Py_CLEAR(p->__pyx_v_info); + Py_CLEAR(p->__pyx_v_key); + Py_CLEAR(p->__pyx_v_name); + Py_CLEAR(p->__pyx_v_value); + Py_CLEAR(p->__pyx_t_0); + Py_CLEAR(p->__pyx_t_1); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_23__make_config < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_23__make_config[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_23__make_config++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } -static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_4___get__(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_23__make_config(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__ *)o; - if (p->__pyx_v_self) { - e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config *)o; + if (p->__pyx_v_config) { + e = (*v)(p->__pyx_v_config, a); if (e) return e; + } + if (p->__pyx_v_info) { + e = (*v)(p->__pyx_v_info, a); if (e) return e; + } + if (p->__pyx_v_key) { + e = (*v)(p->__pyx_v_key, a); if (e) return e; + } + if (p->__pyx_v_name) { + e = (*v)(p->__pyx_v_name, a); if (e) return e; + } + if (p->__pyx_v_value) { + e = (*v)(p->__pyx_v_value, 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_1) { + e = (*v)(p->__pyx_t_1, a); if (e) return e; } return 0; } -static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_4___get__(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__ *)o; +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_23__make_config(PyObject *o) { PyObject* tmp; - tmp = ((PyObject*)p->__pyx_v_self); - p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_TRule *)Py_None); Py_INCREF(Py_None); + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config *)o; + tmp = ((PyObject*)p->__pyx_v_config); + p->__pyx_v_config = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_v_info); + p->__pyx_v_info = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_v_key); + p->__pyx_v_key = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_v_name); + p->__pyx_v_name = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_v_value); + p->__pyx_v_value = 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_1); + p->__pyx_t_1 = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_4___get__[] = { - {0, 0, 0, 0} -}; - -static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_4___get__ = { +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_23__make_config = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_4___get__"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_23__make_config"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_4___get__, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_23__make_config, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -25251,13 +26843,13 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_4___get__ = { 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_4cdec_5_cdec___pyx_scope_struct_4___get__, /*tp_traverse*/ - __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_4___get__, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_23__make_config, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_23__make_config, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_4cdec_5_cdec___pyx_scope_struct_4___get__, /*tp_methods*/ + 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -25267,7 +26859,7 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_4___get__ = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_4___get__, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_23__make_config, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -25279,67 +26871,182 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_4___get__ = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif }; -static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_1___iter__[8]; -static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_1___iter__ = 0; +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_24___init__[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_24___init__ = 0; -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_1___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__ *p; +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_24___init__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; - if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_1___iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__)))) { - o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_1___iter__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_1___iter__]; - memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__)); - PyObject_INIT(o, t); + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_24___init__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_24___init__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_24___init__]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__)); + (void) PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } - p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__ *)o); - p->__pyx_v_self = 0; return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_1___iter__(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__ *)o; +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_24___init__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__ *)o; PyObject_GC_UnTrack(o); - Py_CLEAR(p->__pyx_v_self); - if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_1___iter__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__))) { - __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_1___iter__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_1___iter__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__ *)o); + Py_CLEAR(p->__pyx_v_config); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_24___init__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_24___init__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_24___init__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__ *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } -static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_1___iter__(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_24___init__(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__ *)o; - if (p->__pyx_v_self) { - e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__ *)o; + if (p->__pyx_v_config) { + e = (*v)(p->__pyx_v_config, a); if (e) return e; } return 0; } -static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_1___iter__(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__ *)o; +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_24___init__(PyObject *o) { PyObject* tmp; - tmp = ((PyObject*)p->__pyx_v_self); - p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)Py_None); Py_INCREF(Py_None); + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__ *)o; + tmp = ((PyObject*)p->__pyx_v_config); + p->__pyx_v_config = ((PyObject*)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_1___iter__[] = { - {0, 0, 0, 0} +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_24___init__ = { + PyVarObject_HEAD_INIT(0, 0) + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_24___init__"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_24___init__, /*tp_dealloc*/ + 0, /*tp_print*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #else + 0, /*reserved*/ + #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_4cdec_5_cdec___pyx_scope_struct_24___init__, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_24___init__, /*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_4cdec_5_cdec___pyx_scope_struct_24___init__, /*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*/ + #if PY_VERSION_HEX >= 0x02060000 + 0, /*tp_version_tag*/ + #endif + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif }; -static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_1___iter__ = { +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_25_genexpr[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_25_genexpr = 0; + +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_25_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_25_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_25_genexpr[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_25_genexpr]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr)); + (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_4cdec_5_cdec___pyx_scope_struct_25_genexpr(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr *)o; + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_outer_scope); + Py_CLEAR(p->__pyx_v_kv); + Py_CLEAR(p->__pyx_t_0); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_25_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_25_genexpr[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_25_genexpr++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr *)o); + } else { + (*Py_TYPE(o)->tp_free)(o); + } +} + +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_25_genexpr(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr *)o; + if (p->__pyx_outer_scope) { + e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e; + } + if (p->__pyx_v_kv) { + e = (*v)(p->__pyx_v_kv, a); if (e) return e; + } + if (p->__pyx_t_0) { + e = (*v)(p->__pyx_t_0, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_25_genexpr(PyObject *o) { + PyObject* tmp; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr *)o; + tmp = ((PyObject*)p->__pyx_outer_scope); + p->__pyx_outer_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__ *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_v_kv); + p->__pyx_v_kv = 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); + return 0; +} + +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_25_genexpr = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_1___iter__"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_25_genexpr"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_1___iter__, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_25_genexpr, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -25360,13 +27067,13 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_1___iter__ = { 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_4cdec_5_cdec___pyx_scope_struct_1___iter__, /*tp_traverse*/ - __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_1___iter__, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_25_genexpr, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_25_genexpr, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_4cdec_5_cdec___pyx_scope_struct_1___iter__, /*tp_methods*/ + 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -25376,7 +27083,7 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_1___iter__ = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_1___iter__, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_25_genexpr, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -25388,6 +27095,9 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_1___iter__ = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif }; static PyMethodDef __pyx_methods[] = { @@ -25413,162 +27123,165 @@ static struct PyModuleDef __pyx_moduledef = { #endif static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_kp_s_10, __pyx_k_10, sizeof(__pyx_k_10), 0, 0, 1, 0}, - {&__pyx_kp_s_11, __pyx_k_11, sizeof(__pyx_k_11), 0, 0, 1, 0}, - {&__pyx_kp_s_12, __pyx_k_12, sizeof(__pyx_k_12), 0, 0, 1, 0}, - {&__pyx_kp_s_13, __pyx_k_13, sizeof(__pyx_k_13), 0, 0, 1, 0}, - {&__pyx_kp_s_15, __pyx_k_15, sizeof(__pyx_k_15), 0, 0, 1, 0}, - {&__pyx_n_s_16, __pyx_k_16, sizeof(__pyx_k_16), 0, 0, 1, 1}, - {&__pyx_kp_s_17, __pyx_k_17, sizeof(__pyx_k_17), 0, 0, 1, 0}, - {&__pyx_kp_s_18, __pyx_k_18, sizeof(__pyx_k_18), 0, 0, 1, 0}, - {&__pyx_kp_s_20, __pyx_k_20, sizeof(__pyx_k_20), 0, 0, 1, 0}, - {&__pyx_kp_s_22, __pyx_k_22, sizeof(__pyx_k_22), 0, 0, 1, 0}, - {&__pyx_kp_s_23, __pyx_k_23, sizeof(__pyx_k_23), 0, 0, 1, 0}, - {&__pyx_kp_s_26, __pyx_k_26, sizeof(__pyx_k_26), 0, 0, 1, 0}, - {&__pyx_kp_s_27, __pyx_k_27, sizeof(__pyx_k_27), 0, 0, 1, 0}, - {&__pyx_kp_s_28, __pyx_k_28, sizeof(__pyx_k_28), 0, 0, 1, 0}, - {&__pyx_kp_s_29, __pyx_k_29, sizeof(__pyx_k_29), 0, 0, 1, 0}, - {&__pyx_kp_s_3, __pyx_k_3, sizeof(__pyx_k_3), 0, 0, 1, 0}, - {&__pyx_kp_s_30, __pyx_k_30, sizeof(__pyx_k_30), 0, 0, 1, 0}, - {&__pyx_kp_s_31, __pyx_k_31, sizeof(__pyx_k_31), 0, 0, 1, 0}, - {&__pyx_kp_s_33, __pyx_k_33, sizeof(__pyx_k_33), 0, 0, 1, 0}, - {&__pyx_kp_s_34, __pyx_k_34, sizeof(__pyx_k_34), 0, 0, 1, 0}, - {&__pyx_kp_s_37, __pyx_k_37, sizeof(__pyx_k_37), 0, 0, 1, 0}, - {&__pyx_n_s_38, __pyx_k_38, sizeof(__pyx_k_38), 0, 0, 1, 1}, - {&__pyx_n_s_39, __pyx_k_39, sizeof(__pyx_k_39), 0, 0, 1, 1}, - {&__pyx_kp_s_4, __pyx_k_4, sizeof(__pyx_k_4), 0, 0, 1, 0}, - {&__pyx_kp_s_40, __pyx_k_40, sizeof(__pyx_k_40), 0, 0, 1, 0}, - {&__pyx_kp_s_42, __pyx_k_42, sizeof(__pyx_k_42), 0, 0, 1, 0}, - {&__pyx_kp_s_44, __pyx_k_44, sizeof(__pyx_k_44), 0, 0, 1, 0}, - {&__pyx_kp_s_46, __pyx_k_46, sizeof(__pyx_k_46), 0, 0, 1, 0}, - {&__pyx_kp_s_47, __pyx_k_47, sizeof(__pyx_k_47), 0, 0, 1, 0}, - {&__pyx_kp_s_48, __pyx_k_48, sizeof(__pyx_k_48), 0, 0, 1, 0}, - {&__pyx_kp_s_49, __pyx_k_49, sizeof(__pyx_k_49), 0, 0, 1, 0}, - {&__pyx_kp_s_50, __pyx_k_50, sizeof(__pyx_k_50), 0, 0, 1, 0}, - {&__pyx_kp_s_53, __pyx_k_53, sizeof(__pyx_k_53), 0, 0, 1, 0}, - {&__pyx_n_s_54, __pyx_k_54, sizeof(__pyx_k_54), 0, 0, 1, 1}, - {&__pyx_n_s_55, __pyx_k_55, sizeof(__pyx_k_55), 0, 0, 1, 1}, - {&__pyx_kp_s_58, __pyx_k_58, sizeof(__pyx_k_58), 0, 0, 1, 0}, - {&__pyx_kp_s_66, __pyx_k_66, sizeof(__pyx_k_66), 0, 0, 1, 0}, - {&__pyx_kp_s_7, __pyx_k_7, sizeof(__pyx_k_7), 0, 0, 1, 0}, - {&__pyx_kp_s_8, __pyx_k_8, sizeof(__pyx_k_8), 0, 0, 1, 0}, - {&__pyx_kp_s_9, __pyx_k_9, sizeof(__pyx_k_9), 0, 0, 1, 0}, - {&__pyx_n_s__BLEU, __pyx_k__BLEU, sizeof(__pyx_k__BLEU), 0, 0, 1, 1}, - {&__pyx_n_s__CER, __pyx_k__CER, sizeof(__pyx_k__CER), 0, 0, 1, 1}, - {&__pyx_n_s__Exception, __pyx_k__Exception, sizeof(__pyx_k__Exception), 0, 0, 1, 1}, - {&__pyx_n_s__IBM_BLEU, __pyx_k__IBM_BLEU, sizeof(__pyx_k__IBM_BLEU), 0, 0, 1, 1}, - {&__pyx_n_s__IndexError, __pyx_k__IndexError, sizeof(__pyx_k__IndexError), 0, 0, 1, 1}, - {&__pyx_n_s__InvalidConfig, __pyx_k__InvalidConfig, sizeof(__pyx_k__InvalidConfig), 0, 0, 1, 1}, - {&__pyx_n_s__KeyError, __pyx_k__KeyError, sizeof(__pyx_k__KeyError), 0, 0, 1, 1}, - {&__pyx_n_s__NotImplemented, __pyx_k__NotImplemented, sizeof(__pyx_k__NotImplemented), 0, 0, 1, 1}, - {&__pyx_n_s__ParseFailed, __pyx_k__ParseFailed, sizeof(__pyx_k__ParseFailed), 0, 0, 1, 1}, - {&__pyx_n_s__QCRI, __pyx_k__QCRI, sizeof(__pyx_k__QCRI), 0, 0, 1, 1}, - {&__pyx_n_s__QCRI_BLEU, __pyx_k__QCRI_BLEU, sizeof(__pyx_k__QCRI_BLEU), 0, 0, 1, 1}, - {&__pyx_n_s__SSK, __pyx_k__SSK, sizeof(__pyx_k__SSK), 0, 0, 1, 1}, - {&__pyx_n_s__TER, __pyx_k__TER, sizeof(__pyx_k__TER), 0, 0, 1, 1}, - {&__pyx_n_s__TypeError, __pyx_k__TypeError, sizeof(__pyx_k__TypeError), 0, 0, 1, 1}, - {&__pyx_n_s__ValueError, __pyx_k__ValueError, sizeof(__pyx_k__ValueError), 0, 0, 1, 1}, - {&__pyx_n_s____class__, __pyx_k____class__, sizeof(__pyx_k____class__), 0, 0, 1, 1}, - {&__pyx_n_s____dict__, __pyx_k____dict__, sizeof(__pyx_k____dict__), 0, 0, 1, 1}, - {&__pyx_n_s____enter__, __pyx_k____enter__, sizeof(__pyx_k____enter__), 0, 0, 1, 1}, - {&__pyx_n_s____exit__, __pyx_k____exit__, sizeof(__pyx_k____exit__), 0, 0, 1, 1}, - {&__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____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____module__, __pyx_k____module__, sizeof(__pyx_k____module__), 0, 0, 1, 1}, - {&__pyx_n_s____name__, __pyx_k____name__, sizeof(__pyx_k____name__), 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____test__, __pyx_k____test__, sizeof(__pyx_k____test__), 0, 0, 1, 1}, - {&__pyx_n_s___make_config, __pyx_k___make_config, sizeof(__pyx_k___make_config), 0, 0, 1, 1}, - {&__pyx_n_s___phrase, __pyx_k___phrase, sizeof(__pyx_k___phrase), 0, 0, 1, 1}, - {&__pyx_n_s___sa, __pyx_k___sa, sizeof(__pyx_k___sa), 0, 0, 1, 1}, - {&__pyx_n_s__a, __pyx_k__a, sizeof(__pyx_k__a), 0, 0, 1, 1}, - {&__pyx_n_s__alignments, __pyx_k__alignments, sizeof(__pyx_k__alignments), 0, 0, 1, 1}, - {&__pyx_n_s__append, __pyx_k__append, sizeof(__pyx_k__append), 0, 0, 1, 1}, - {&__pyx_n_s__args, __pyx_k__args, sizeof(__pyx_k__args), 0, 0, 1, 1}, - {&__pyx_n_s__beam_alpha, __pyx_k__beam_alpha, sizeof(__pyx_k__beam_alpha), 0, 0, 1, 1}, - {&__pyx_n_s__cat, __pyx_k__cat, sizeof(__pyx_k__cat), 0, 0, 1, 1}, - {&__pyx_n_s__close, __pyx_k__close, sizeof(__pyx_k__close), 0, 0, 1, 1}, - {&__pyx_n_s__config, __pyx_k__config, sizeof(__pyx_k__config), 0, 0, 1, 1}, - {&__pyx_n_s__config_str, __pyx_k__config_str, sizeof(__pyx_k__config_str), 0, 0, 1, 1}, - {&__pyx_n_s__csplit, __pyx_k__csplit, sizeof(__pyx_k__csplit), 0, 0, 1, 1}, - {&__pyx_n_s__delta, __pyx_k__delta, sizeof(__pyx_k__delta), 0, 0, 1, 1}, - {&__pyx_n_s__density, __pyx_k__density, sizeof(__pyx_k__density), 0, 0, 1, 1}, - {&__pyx_n_s__dot, __pyx_k__dot, sizeof(__pyx_k__dot), 0, 0, 1, 1}, - {&__pyx_n_s__e, __pyx_k__e, sizeof(__pyx_k__e), 0, 0, 1, 1}, - {&__pyx_n_s__encode, __pyx_k__encode, sizeof(__pyx_k__encode), 0, 0, 1, 1}, - {&__pyx_n_s__encoding, __pyx_k__encoding, sizeof(__pyx_k__encoding), 0, 0, 1, 1}, - {&__pyx_n_s__enumerate, __pyx_k__enumerate, sizeof(__pyx_k__enumerate), 0, 0, 1, 1}, - {&__pyx_n_s__eval, __pyx_k__eval, sizeof(__pyx_k__eval), 0, 0, 1, 1}, - {&__pyx_n_s__evaluate, __pyx_k__evaluate, sizeof(__pyx_k__evaluate), 0, 0, 1, 1}, - {&__pyx_n_s__evaluator, __pyx_k__evaluator, sizeof(__pyx_k__evaluator), 0, 0, 1, 1}, - {&__pyx_n_s__f, __pyx_k__f, sizeof(__pyx_k__f), 0, 0, 1, 1}, - {&__pyx_n_s__formalism, __pyx_k__formalism, sizeof(__pyx_k__formalism), 0, 0, 1, 1}, - {&__pyx_n_s__format, __pyx_k__format, sizeof(__pyx_k__format), 0, 0, 1, 1}, - {&__pyx_n_s__fst, __pyx_k__fst, sizeof(__pyx_k__fst), 0, 0, 1, 1}, - {&__pyx_n_s__genexpr, __pyx_k__genexpr, sizeof(__pyx_k__genexpr), 0, 0, 1, 1}, - {&__pyx_n_s__get, __pyx_k__get, sizeof(__pyx_k__get), 0, 0, 1, 1}, - {&__pyx_n_s__grammar, __pyx_k__grammar, sizeof(__pyx_k__grammar), 0, 0, 1, 1}, - {&__pyx_n_s__hyp, __pyx_k__hyp, sizeof(__pyx_k__hyp), 0, 0, 1, 1}, - {&__pyx_n_s__hypergraph, __pyx_k__hypergraph, sizeof(__pyx_k__hypergraph), 0, 0, 1, 1}, - {&__pyx_n_s__i, __pyx_k__i, sizeof(__pyx_k__i), 0, 0, 1, 1}, - {&__pyx_n_s__in_edges, __pyx_k__in_edges, sizeof(__pyx_k__in_edges), 0, 0, 1, 1}, - {&__pyx_n_s__info, __pyx_k__info, sizeof(__pyx_k__info), 0, 0, 1, 1}, - {&__pyx_n_s__inp, __pyx_k__inp, sizeof(__pyx_k__inp), 0, 0, 1, 1}, - {&__pyx_n_s__items, __pyx_k__items, sizeof(__pyx_k__items), 0, 0, 1, 1}, - {&__pyx_n_s__join, __pyx_k__join, sizeof(__pyx_k__join), 0, 0, 1, 1}, - {&__pyx_n_s__k, __pyx_k__k, sizeof(__pyx_k__k), 0, 0, 1, 1}, - {&__pyx_n_s__key, __pyx_k__key, sizeof(__pyx_k__key), 0, 0, 1, 1}, - {&__pyx_n_s__label, __pyx_k__label, sizeof(__pyx_k__label), 0, 0, 1, 1}, - {&__pyx_n_s__lexalign, __pyx_k__lexalign, sizeof(__pyx_k__lexalign), 0, 0, 1, 1}, - {&__pyx_n_s__lextrans, __pyx_k__lextrans, sizeof(__pyx_k__lextrans), 0, 0, 1, 1}, - {&__pyx_n_s__lhs, __pyx_k__lhs, sizeof(__pyx_k__lhs), 0, 0, 1, 1}, - {&__pyx_n_s__lines, __pyx_k__lines, sizeof(__pyx_k__lines), 0, 0, 1, 1}, - {&__pyx_n_s__name, __pyx_k__name, sizeof(__pyx_k__name), 0, 0, 1, 1}, - {&__pyx_n_s__open, __pyx_k__open, sizeof(__pyx_k__open), 0, 0, 1, 1}, - {&__pyx_n_s__pb, __pyx_k__pb, sizeof(__pyx_k__pb), 0, 0, 1, 1}, - {&__pyx_n_s__phrase, __pyx_k__phrase, sizeof(__pyx_k__phrase), 0, 0, 1, 1}, - {&__pyx_n_s__plf, __pyx_k__plf, sizeof(__pyx_k__plf), 0, 0, 1, 1}, - {&__pyx_n_s__range, __pyx_k__range, sizeof(__pyx_k__range), 0, 0, 1, 1}, - {&__pyx_n_s__ref, __pyx_k__ref, sizeof(__pyx_k__ref), 0, 0, 1, 1}, - {&__pyx_n_s__refs, __pyx_k__refs, sizeof(__pyx_k__refs), 0, 0, 1, 1}, - {&__pyx_n_s__replace, __pyx_k__replace, sizeof(__pyx_k__replace), 0, 0, 1, 1}, - {&__pyx_n_s__rhs, __pyx_k__rhs, sizeof(__pyx_k__rhs), 0, 0, 1, 1}, - {&__pyx_n_s__rules, __pyx_k__rules, sizeof(__pyx_k__rules), 0, 0, 1, 1}, - {&__pyx_n_s__scfg, __pyx_k__scfg, sizeof(__pyx_k__scfg), 0, 0, 1, 1}, - {&__pyx_n_s__score, __pyx_k__score, sizeof(__pyx_k__score), 0, 0, 1, 1}, - {&__pyx_n_s__scores, __pyx_k__scores, sizeof(__pyx_k__scores), 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__sentence, __pyx_k__sentence, sizeof(__pyx_k__sentence), 0, 0, 1, 1}, - {&__pyx_n_s__set_silent, __pyx_k__set_silent, sizeof(__pyx_k__set_silent), 0, 0, 1, 1}, - {&__pyx_n_s__span, __pyx_k__span, sizeof(__pyx_k__span), 0, 0, 1, 1}, - {&__pyx_n_s__split, __pyx_k__split, sizeof(__pyx_k__split), 0, 0, 1, 1}, - {&__pyx_n_s__startswith, __pyx_k__startswith, sizeof(__pyx_k__startswith), 0, 0, 1, 1}, - {&__pyx_n_s__strip, __pyx_k__strip, sizeof(__pyx_k__strip), 0, 0, 1, 1}, - {&__pyx_n_s__super, __pyx_k__super, sizeof(__pyx_k__super), 0, 0, 1, 1}, - {&__pyx_n_s__tagger, __pyx_k__tagger, sizeof(__pyx_k__tagger), 0, 0, 1, 1}, - {&__pyx_n_s__throw, __pyx_k__throw, sizeof(__pyx_k__throw), 0, 0, 1, 1}, - {&__pyx_n_s__utf8, __pyx_k__utf8, sizeof(__pyx_k__utf8), 0, 0, 1, 1}, - {&__pyx_n_s__value, __pyx_k__value, sizeof(__pyx_k__value), 0, 0, 1, 1}, - {&__pyx_n_s__weight, __pyx_k__weight, sizeof(__pyx_k__weight), 0, 0, 1, 1}, - {&__pyx_n_s__yn, __pyx_k__yn, sizeof(__pyx_k__yn), 0, 0, 1, 1}, + {&__pyx_n_s_BLEU, __pyx_k_BLEU, sizeof(__pyx_k_BLEU), 0, 0, 1, 1}, + {&__pyx_n_s_CER, __pyx_k_CER, sizeof(__pyx_k_CER), 0, 0, 1, 1}, + {&__pyx_kp_s_Cannot_translate_input_type_s, __pyx_k_Cannot_translate_input_type_s, sizeof(__pyx_k_Cannot_translate_input_type_s), 0, 0, 1, 0}, + {&__pyx_n_s_Exception, __pyx_k_Exception, sizeof(__pyx_k_Exception), 0, 0, 1, 1}, + {&__pyx_n_s_IBM_BLEU, __pyx_k_IBM_BLEU, sizeof(__pyx_k_IBM_BLEU), 0, 0, 1, 1}, + {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1}, + {&__pyx_n_s_InvalidConfig, __pyx_k_InvalidConfig, sizeof(__pyx_k_InvalidConfig), 0, 0, 1, 1}, + {&__pyx_n_s_KeyError, __pyx_k_KeyError, sizeof(__pyx_k_KeyError), 0, 0, 1, 1}, + {&__pyx_n_s_NotImplemented, __pyx_k_NotImplemented, sizeof(__pyx_k_NotImplemented), 0, 0, 1, 1}, + {&__pyx_n_s_ParseFailed, __pyx_k_ParseFailed, sizeof(__pyx_k_ParseFailed), 0, 0, 1, 1}, + {&__pyx_n_s_QCRI, __pyx_k_QCRI, sizeof(__pyx_k_QCRI), 0, 0, 1, 1}, + {&__pyx_n_s_QCRI_BLEU, __pyx_k_QCRI_BLEU, sizeof(__pyx_k_QCRI_BLEU), 0, 0, 1, 1}, + {&__pyx_n_s_SSK, __pyx_k_SSK, sizeof(__pyx_k_SSK), 0, 0, 1, 1}, + {&__pyx_n_s_TER, __pyx_k_TER, sizeof(__pyx_k_TER), 0, 0, 1, 1}, + {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1}, + {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1}, + {&__pyx_kp_s__10, __pyx_k__10, sizeof(__pyx_k__10), 0, 0, 1, 0}, + {&__pyx_kp_s__11, __pyx_k__11, sizeof(__pyx_k__11), 0, 0, 1, 0}, + {&__pyx_kp_s__13, __pyx_k__13, sizeof(__pyx_k__13), 0, 0, 1, 0}, + {&__pyx_kp_s__16, __pyx_k__16, sizeof(__pyx_k__16), 0, 0, 1, 0}, + {&__pyx_kp_s__20, __pyx_k__20, sizeof(__pyx_k__20), 0, 0, 1, 0}, + {&__pyx_n_s__23, __pyx_k__23, sizeof(__pyx_k__23), 0, 0, 1, 1}, + {&__pyx_kp_s__4, __pyx_k__4, sizeof(__pyx_k__4), 0, 0, 1, 0}, + {&__pyx_n_s_a, __pyx_k_a, sizeof(__pyx_k_a), 0, 0, 1, 1}, + {&__pyx_n_s_alignments, __pyx_k_alignments, sizeof(__pyx_k_alignments), 0, 0, 1, 1}, + {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1}, + {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1}, + {&__pyx_n_s_beam_alpha, __pyx_k_beam_alpha, sizeof(__pyx_k_beam_alpha), 0, 0, 1, 1}, + {&__pyx_kp_s_candidate_set_index_out_of_range, __pyx_k_candidate_set_index_out_of_range, sizeof(__pyx_k_candidate_set_index_out_of_range), 0, 0, 1, 0}, + {&__pyx_kp_s_cannot_create_lattice_from_s, __pyx_k_cannot_create_lattice_from_s, sizeof(__pyx_k_cannot_create_lattice_from_s), 0, 0, 1, 0}, + {&__pyx_kp_s_cannot_initialize_weights_with_s, __pyx_k_cannot_initialize_weights_with_s, sizeof(__pyx_k_cannot_initialize_weights_with_s), 0, 0, 1, 0}, + {&__pyx_kp_s_cannot_intersect_hypergraph_with, __pyx_k_cannot_intersect_hypergraph_with, sizeof(__pyx_k_cannot_intersect_hypergraph_with), 0, 0, 1, 0}, + {&__pyx_kp_s_cannot_reweight_hypergraph_with, __pyx_k_cannot_reweight_hypergraph_with, sizeof(__pyx_k_cannot_reweight_hypergraph_with), 0, 0, 1, 0}, + {&__pyx_kp_s_cannot_take_the_dot_product_of_s, __pyx_k_cannot_take_the_dot_product_of_s, sizeof(__pyx_k_cannot_take_the_dot_product_of_s), 0, 0, 1, 0}, + {&__pyx_n_s_cat, __pyx_k_cat, sizeof(__pyx_k_cat), 0, 0, 1, 1}, + {&__pyx_n_s_cdec__cdec, __pyx_k_cdec__cdec, sizeof(__pyx_k_cdec__cdec), 0, 0, 1, 1}, + {&__pyx_n_s_cdec_sa__sa, __pyx_k_cdec_sa__sa, sizeof(__pyx_k_cdec_sa__sa), 0, 0, 1, 1}, + {&__pyx_n_s_class, __pyx_k_class, sizeof(__pyx_k_class), 0, 0, 1, 1}, + {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1}, + {&__pyx_kp_s_comparison_not_implemented_for_H, __pyx_k_comparison_not_implemented_for_H, sizeof(__pyx_k_comparison_not_implemented_for_H), 0, 0, 1, 0}, + {&__pyx_kp_s_comparison_not_implemented_for_H_2, __pyx_k_comparison_not_implemented_for_H_2, sizeof(__pyx_k_comparison_not_implemented_for_H_2), 0, 0, 1, 0}, + {&__pyx_kp_s_comparison_not_implemented_for_S, __pyx_k_comparison_not_implemented_for_S, sizeof(__pyx_k_comparison_not_implemented_for_S), 0, 0, 1, 0}, + {&__pyx_n_s_config, __pyx_k_config, sizeof(__pyx_k_config), 0, 0, 1, 1}, + {&__pyx_n_s_config_str, __pyx_k_config_str, sizeof(__pyx_k_config_str), 0, 0, 1, 1}, + {&__pyx_n_s_csplit, __pyx_k_csplit, sizeof(__pyx_k_csplit), 0, 0, 1, 1}, + {&__pyx_n_s_csplit_preserve_full_word, __pyx_k_csplit_preserve_full_word, sizeof(__pyx_k_csplit_preserve_full_word), 0, 0, 1, 1}, + {&__pyx_kp_s_d, __pyx_k_d, sizeof(__pyx_k_d), 0, 0, 1, 0}, + {&__pyx_kp_s_d_d_label_s, __pyx_k_d_d_label_s, sizeof(__pyx_k_d_d_label_s), 0, 0, 1, 0}, + {&__pyx_kp_s_d_shape_doublecircle, __pyx_k_d_shape_doublecircle, sizeof(__pyx_k_d_shape_doublecircle), 0, 0, 1, 0}, + {&__pyx_n_s_delta, __pyx_k_delta, sizeof(__pyx_k_delta), 0, 0, 1, 1}, + {&__pyx_n_s_density, __pyx_k_density, sizeof(__pyx_k_density), 0, 0, 1, 1}, + {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1}, + {&__pyx_kp_s_digraph_lattice, __pyx_k_digraph_lattice, sizeof(__pyx_k_digraph_lattice), 0, 0, 1, 0}, + {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1}, + {&__pyx_n_s_dot, __pyx_k_dot, sizeof(__pyx_k_dot), 0, 0, 1, 1}, + {&__pyx_n_s_e, __pyx_k_e, sizeof(__pyx_k_e), 0, 0, 1, 1}, + {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1}, + {&__pyx_n_s_encoding, __pyx_k_encoding, sizeof(__pyx_k_encoding), 0, 0, 1, 1}, + {&__pyx_n_s_enter, __pyx_k_enter, sizeof(__pyx_k_enter), 0, 0, 1, 1}, + {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1}, + {&__pyx_n_s_eval, __pyx_k_eval, sizeof(__pyx_k_eval), 0, 0, 1, 1}, + {&__pyx_n_s_evaluate, __pyx_k_evaluate, sizeof(__pyx_k_evaluate), 0, 0, 1, 1}, + {&__pyx_n_s_evaluator, __pyx_k_evaluator, sizeof(__pyx_k_evaluator), 0, 0, 1, 1}, + {&__pyx_n_s_exit, __pyx_k_exit, sizeof(__pyx_k_exit), 0, 0, 1, 1}, + {&__pyx_n_s_f, __pyx_k_f, sizeof(__pyx_k_f), 0, 0, 1, 1}, + {&__pyx_n_s_formalism, __pyx_k_formalism, sizeof(__pyx_k_formalism), 0, 0, 1, 1}, + {&__pyx_kp_s_formalism_s_unknown, __pyx_k_formalism_s_unknown, sizeof(__pyx_k_formalism_s_unknown), 0, 0, 1, 0}, + {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1}, + {&__pyx_n_s_fst, __pyx_k_fst, sizeof(__pyx_k_fst), 0, 0, 1, 1}, + {&__pyx_n_s_genexpr, __pyx_k_genexpr, sizeof(__pyx_k_genexpr), 0, 0, 1, 1}, + {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1}, + {&__pyx_n_s_grammar, __pyx_k_grammar, sizeof(__pyx_k_grammar), 0, 0, 1, 1}, + {&__pyx_n_s_hyp, __pyx_k_hyp, sizeof(__pyx_k_hyp), 0, 0, 1, 1}, + {&__pyx_n_s_hypergraph, __pyx_k_hypergraph, sizeof(__pyx_k_hypergraph), 0, 0, 1, 1}, + {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1}, + {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1}, + {&__pyx_n_s_in_edges, __pyx_k_in_edges, sizeof(__pyx_k_in_edges), 0, 0, 1, 1}, + {&__pyx_n_s_info, __pyx_k_info, sizeof(__pyx_k_info), 0, 0, 1, 1}, + {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1}, + {&__pyx_n_s_inp, __pyx_k_inp, sizeof(__pyx_k_inp), 0, 0, 1, 1}, + {&__pyx_n_s_items, __pyx_k_items, sizeof(__pyx_k_items), 0, 0, 1, 1}, + {&__pyx_n_s_join, __pyx_k_join, sizeof(__pyx_k_join), 0, 0, 1, 1}, + {&__pyx_n_s_k, __pyx_k_k, sizeof(__pyx_k_k), 0, 0, 1, 1}, + {&__pyx_n_s_key, __pyx_k_key, sizeof(__pyx_k_key), 0, 0, 1, 1}, + {&__pyx_n_s_label, __pyx_k_label, sizeof(__pyx_k_label), 0, 0, 1, 1}, + {&__pyx_kp_s_lattice_index_out_of_range, __pyx_k_lattice_index_out_of_range, sizeof(__pyx_k_lattice_index_out_of_range), 0, 0, 1, 0}, + {&__pyx_n_s_lexalign, __pyx_k_lexalign, sizeof(__pyx_k_lexalign), 0, 0, 1, 1}, + {&__pyx_n_s_lextrans, __pyx_k_lextrans, sizeof(__pyx_k_lextrans), 0, 0, 1, 1}, + {&__pyx_n_s_lhs, __pyx_k_lhs, sizeof(__pyx_k_lhs), 0, 0, 1, 1}, + {&__pyx_n_s_lines, __pyx_k_lines, sizeof(__pyx_k_lines), 0, 0, 1, 1}, + {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, + {&__pyx_n_s_make_config, __pyx_k_make_config, sizeof(__pyx_k_make_config), 0, 0, 1, 1}, + {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1}, + {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1}, + {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1}, + {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1}, + {&__pyx_kp_s_node_shape_circle, __pyx_k_node_shape_circle, sizeof(__pyx_k_node_shape_circle), 0, 0, 1, 0}, + {&__pyx_n_s_open, __pyx_k_open, sizeof(__pyx_k_open), 0, 0, 1, 1}, + {&__pyx_n_s_pb, __pyx_k_pb, sizeof(__pyx_k_pb), 0, 0, 1, 1}, + {&__pyx_n_s_phrase, __pyx_k_phrase, sizeof(__pyx_k_phrase), 0, 0, 1, 1}, + {&__pyx_n_s_phrase_2, __pyx_k_phrase_2, sizeof(__pyx_k_phrase_2), 0, 0, 1, 1}, + {&__pyx_n_s_plf, __pyx_k_plf, sizeof(__pyx_k_plf), 0, 0, 1, 1}, + {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 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_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1}, + {&__pyx_kp_s_rankdir_LR, __pyx_k_rankdir_LR, sizeof(__pyx_k_rankdir_LR), 0, 0, 1, 0}, + {&__pyx_n_s_ref, __pyx_k_ref, sizeof(__pyx_k_ref), 0, 0, 1, 1}, + {&__pyx_n_s_refs, __pyx_k_refs, sizeof(__pyx_k_refs), 0, 0, 1, 1}, + {&__pyx_n_s_replace, __pyx_k_replace, sizeof(__pyx_k_replace), 0, 0, 1, 1}, + {&__pyx_n_s_rhs, __pyx_k_rhs, sizeof(__pyx_k_rhs), 0, 0, 1, 1}, + {&__pyx_n_s_rules, __pyx_k_rules, sizeof(__pyx_k_rules), 0, 0, 1, 1}, + {&__pyx_kp_s_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 0, 1, 0}, + {&__pyx_kp_s_s_d, __pyx_k_s_d, sizeof(__pyx_k_s_d), 0, 0, 1, 0}, + {&__pyx_kp_s_s_s, __pyx_k_s_s, sizeof(__pyx_k_s_s), 0, 0, 1, 0}, + {&__pyx_kp_s_s_s_2, __pyx_k_s_s_2, sizeof(__pyx_k_s_s_2), 0, 0, 1, 0}, + {&__pyx_kp_s_s_s_3, __pyx_k_s_s_3, sizeof(__pyx_k_s_s_3), 0, 0, 1, 0}, + {&__pyx_kp_s_s_s_s_s, __pyx_k_s_s_s_s, sizeof(__pyx_k_s_s_s_s), 0, 0, 1, 0}, + {&__pyx_n_s_sa, __pyx_k_sa, sizeof(__pyx_k_sa), 0, 0, 1, 1}, + {&__pyx_n_s_scfg, __pyx_k_scfg, sizeof(__pyx_k_scfg), 0, 0, 1, 1}, + {&__pyx_n_s_score, __pyx_k_score, sizeof(__pyx_k_score), 0, 0, 1, 1}, + {&__pyx_n_s_scores, __pyx_k_scores, sizeof(__pyx_k_scores), 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_sentence, __pyx_k_sentence, sizeof(__pyx_k_sentence), 0, 0, 1, 1}, + {&__pyx_n_s_set_silent, __pyx_k_set_silent, sizeof(__pyx_k_set_silent), 0, 0, 1, 1}, + {&__pyx_n_s_span, __pyx_k_span, sizeof(__pyx_k_span), 0, 0, 1, 1}, + {&__pyx_n_s_split, __pyx_k_split, sizeof(__pyx_k_split), 0, 0, 1, 1}, + {&__pyx_n_s_startswith, __pyx_k_startswith, sizeof(__pyx_k_startswith), 0, 0, 1, 1}, + {&__pyx_n_s_strip, __pyx_k_strip, sizeof(__pyx_k_strip), 0, 0, 1, 1}, + {&__pyx_kp_s_sufficient_stats_vector_index_ou, __pyx_k_sufficient_stats_vector_index_ou, sizeof(__pyx_k_sufficient_stats_vector_index_ou), 0, 0, 1, 0}, + {&__pyx_n_s_super, __pyx_k_super, sizeof(__pyx_k_super), 0, 0, 1, 1}, + {&__pyx_n_s_tagger, __pyx_k_tagger, sizeof(__pyx_k_tagger), 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_kp_s_the_grammar_should_contain_TRule, __pyx_k_the_grammar_should_contain_TRule, sizeof(__pyx_k_the_grammar_should_contain_TRule), 0, 0, 1, 0}, + {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1}, + {&__pyx_n_s_todot_locals_lines, __pyx_k_todot_locals_lines, sizeof(__pyx_k_todot_locals_lines), 0, 0, 1, 1}, + {&__pyx_kp_s_usr0_home_cdyer_cdec_python_cde, __pyx_k_usr0_home_cdyer_cdec_python_cde, sizeof(__pyx_k_usr0_home_cdyer_cdec_python_cde), 0, 0, 1, 0}, + {&__pyx_kp_s_usr0_home_cdyer_cdec_python_cde_2, __pyx_k_usr0_home_cdyer_cdec_python_cde_2, sizeof(__pyx_k_usr0_home_cdyer_cdec_python_cde_2), 0, 0, 1, 0}, + {&__pyx_kp_s_usr0_home_cdyer_cdec_python_cde_3, __pyx_k_usr0_home_cdyer_cdec_python_cde_3, sizeof(__pyx_k_usr0_home_cdyer_cdec_python_cde_3), 0, 0, 1, 0}, + {&__pyx_n_s_utf8, __pyx_k_utf8, sizeof(__pyx_k_utf8), 0, 0, 1, 1}, + {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1}, + {&__pyx_n_s_weight, __pyx_k_weight, sizeof(__pyx_k_weight), 0, 0, 1, 1}, + {&__pyx_n_s_yn, __pyx_k_yn, sizeof(__pyx_k_yn), 0, 0, 1, 1}, {0, 0, 0, 0, 0, 0, 0} }; static int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_Exception = __Pyx_GetBuiltinName(__pyx_n_s__Exception); if (!__pyx_builtin_Exception) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s__TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s__KeyError); if (!__pyx_builtin_KeyError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s__range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_NotImplemented = __Pyx_GetBuiltinName(__pyx_n_s__NotImplemented); if (!__pyx_builtin_NotImplemented) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_n_s__super); if (!__pyx_builtin_super) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s__ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_eval = __Pyx_GetBuiltinName(__pyx_n_s__eval); if (!__pyx_builtin_eval) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s__enumerate); if (!__pyx_builtin_enumerate) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s__IndexError); if (!__pyx_builtin_IndexError) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_open = __Pyx_GetBuiltinName(__pyx_n_s__open); if (!__pyx_builtin_open) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_Exception = __Pyx_GetBuiltinName(__pyx_n_s_Exception); if (!__pyx_builtin_Exception) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_NotImplemented = __Pyx_GetBuiltinName(__pyx_n_s_NotImplemented); if (!__pyx_builtin_NotImplemented) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_n_s_super); if (!__pyx_builtin_super) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_eval = __Pyx_GetBuiltinName(__pyx_n_s_eval); if (!__pyx_builtin_eval) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_open = __Pyx_GetBuiltinName(__pyx_n_s_open); if (!__pyx_builtin_open) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} return 0; __pyx_L1_error:; return -1; @@ -25585,139 +27298,139 @@ static int __Pyx_InitCachedConstants(void) { * elif isinstance(data, str): * ret = data */ - __pyx_k_tuple_2 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__utf8)); if (unlikely(!__pyx_k_tuple_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_k_tuple_2); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_2)); + __pyx_tuple_ = PyTuple_Pack(1, __pyx_n_s_utf8); if (unlikely(!__pyx_tuple_)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple_); + __Pyx_GIVEREF(__pyx_tuple_); - /* "/home/pks/src/cdec-dtrain/python/cdec/vectors.pxi":95 + /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":95 * elif op == 3: # != * return not (x == y) * raise NotImplemented('comparison not implemented for SparseVector') # <<<<<<<<<<<<<< * * def __len__(self): */ - __pyx_k_tuple_5 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_4)); if (unlikely(!__pyx_k_tuple_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_k_tuple_5); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_5)); + __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_comparison_not_implemented_for_S); if (unlikely(!__pyx_tuple__2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__2); + __Pyx_GIVEREF(__pyx_tuple__2); - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":6 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":6 * * def _phrase(phrase): * return ' '.join(w.encode('utf8') if isinstance(w, unicode) else str(w) for w in phrase) # <<<<<<<<<<<<<< * * cdef class NT: */ - __pyx_k_tuple_6 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__utf8)); if (unlikely(!__pyx_k_tuple_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_k_tuple_6); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_6)); + __pyx_tuple__3 = PyTuple_Pack(1, __pyx_n_s_utf8); if (unlikely(!__pyx_tuple__3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__3); + __Pyx_GIVEREF(__pyx_tuple__3); - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":226 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":232 * trule = convert_rule(trule) * elif not isinstance(trule, TRule): * raise ValueError('the grammar should contain TRule objects') # <<<<<<<<<<<<<< * _g.AddRule(( trule).rule[0]) */ - __pyx_k_tuple_14 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_13)); if (unlikely(!__pyx_k_tuple_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_k_tuple_14); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_14)); + __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_s_the_grammar_should_contain_TRule); if (unlikely(!__pyx_tuple__5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__5); + __Pyx_GIVEREF(__pyx_tuple__5); - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":244 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":244 * elif op == 3: # != * return not (x == y) * raise NotImplemented('comparison not implemented for HypergraphEdge') # <<<<<<<<<<<<<< * * cdef class HypergraphNode: */ - __pyx_k_tuple_19 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_18)); if (unlikely(!__pyx_k_tuple_19)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_k_tuple_19); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_19)); + __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_s_comparison_not_implemented_for_H); if (unlikely(!__pyx_tuple__6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__6); + __Pyx_GIVEREF(__pyx_tuple__6); - /* "/home/pks/src/cdec-dtrain/python/cdec/hypergraph.pxi":285 + /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":285 * elif op == 3: # != * return not (x == y) * raise NotImplemented('comparison not implemented for HypergraphNode') # <<<<<<<<<<<<<< */ - __pyx_k_tuple_21 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_20)); if (unlikely(!__pyx_k_tuple_21)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_k_tuple_21); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_21)); + __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_s_comparison_not_implemented_for_H_2); if (unlikely(!__pyx_tuple__7)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__7); + __Pyx_GIVEREF(__pyx_tuple__7); - /* "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi":26 + /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":26 * def __getitem__(self, int index): * if not 0 <= index < len(self): * raise IndexError('lattice index out of range') # <<<<<<<<<<<<<< * arcs = [] * cdef vector[lattice.LatticeArc] arc_vector = self.lattice[0][index] */ - __pyx_k_tuple_24 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_23)); if (unlikely(!__pyx_k_tuple_24)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_k_tuple_24); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_24)); + __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_lattice_index_out_of_range); if (unlikely(!__pyx_tuple__8)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__8); + __Pyx_GIVEREF(__pyx_tuple__8); - /* "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi":39 + /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":39 * def __setitem__(self, int index, tuple arcs): * if not 0 <= index < len(self): * raise IndexError('lattice index out of range') # <<<<<<<<<<<<<< * cdef lattice.LatticeArc* arc * for (label, cost, dist2next) in arcs: */ - __pyx_k_tuple_25 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_23)); if (unlikely(!__pyx_k_tuple_25)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_k_tuple_25); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_25)); + __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_lattice_index_out_of_range); if (unlikely(!__pyx_tuple__9)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__9); + __Pyx_GIVEREF(__pyx_tuple__9); - /* "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi":69 + /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":69 * for i in range(len(self)): * for label, weight, delta in self[i]: * yield '%d -> %d [label="%s"];' % (i, i+delta, label.replace('"', '\\"')) # <<<<<<<<<<<<<< * yield '%d [shape=doublecircle]' % len(self) * yield '}' */ - __pyx_k_tuple_32 = PyTuple_Pack(2, ((PyObject *)__pyx_kp_s_30), ((PyObject *)__pyx_kp_s_31)); if (unlikely(!__pyx_k_tuple_32)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_k_tuple_32); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_32)); + __pyx_tuple__12 = PyTuple_Pack(2, __pyx_kp_s__10, __pyx_kp_s__11); if (unlikely(!__pyx_tuple__12)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__12); + __Pyx_GIVEREF(__pyx_tuple__12); - /* "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi":63 + /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":63 * def todot(self): * """lattice.todot() -> Representation of the lattice in GraphViz dot format.""" * def lines(): # <<<<<<<<<<<<<< * yield 'digraph lattice {' * yield 'rankdir = LR;' */ - __pyx_k_tuple_35 = PyTuple_Pack(4, ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__label), ((PyObject *)__pyx_n_s__weight), ((PyObject *)__pyx_n_s__delta)); if (unlikely(!__pyx_k_tuple_35)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_k_tuple_35); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_35)); - __pyx_k_codeobj_36 = (PyObject*)__Pyx_PyCode_New(0, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_35, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_37, __pyx_n_s__lines, 63, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_36)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__14 = PyTuple_Pack(4, __pyx_n_s_i, __pyx_n_s_label, __pyx_n_s_weight, __pyx_n_s_delta); if (unlikely(!__pyx_tuple__14)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__14); + __Pyx_GIVEREF(__pyx_tuple__14); + __pyx_codeobj__15 = (PyObject*)__Pyx_PyCode_New(0, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__14, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr0_home_cdyer_cdec_python_cde, __pyx_n_s_lines, 63, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__15)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/pks/src/cdec-dtrain/python/cdec/lattice.pxi":72 + /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":72 * yield '%d [shape=doublecircle]' % len(self) * yield '}' * return '\n'.join(lines()).encode('utf8') # <<<<<<<<<<<<<< * * def as_hypergraph(self): */ - __pyx_k_tuple_41 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__utf8)); if (unlikely(!__pyx_k_tuple_41)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_k_tuple_41); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_41)); + __pyx_tuple__17 = PyTuple_Pack(1, __pyx_n_s_utf8); if (unlikely(!__pyx_tuple__17)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__17); + __Pyx_GIVEREF(__pyx_tuple__17); - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":50 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":50 * def __getitem__(self, int index): * if not 0 <= index < len(self): * raise IndexError('sufficient stats vector index out of range') # <<<<<<<<<<<<<< * return self.stats[0][index] * */ - __pyx_k_tuple_43 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_42)); if (unlikely(!__pyx_k_tuple_43)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_k_tuple_43); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_43)); + __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_s_sufficient_stats_vector_index_ou); if (unlikely(!__pyx_tuple__18)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__18); + __Pyx_GIVEREF(__pyx_tuple__18); - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":84 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":84 * def __getitem__(self,int k): * if not 0 <= k < self.cs.size(): * raise IndexError('candidate set index out of range') # <<<<<<<<<<<<<< * cdef Candidate candidate = Candidate() * candidate.candidate = &self.cs[0][k] */ - __pyx_k_tuple_45 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_44)); if (unlikely(!__pyx_k_tuple_45)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_k_tuple_45); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_45)); + __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_s_candidate_set_index_out_of_range); if (unlikely(!__pyx_tuple__19)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__19); + __Pyx_GIVEREF(__pyx_tuple__19); /* "cdec/_cdec.pyx":92 * with open(weights) as fp: @@ -25726,9 +27439,9 @@ static int __Pyx_InitCachedConstants(void) { * fname, value = line.split() * self.weights[fname.strip()] = float(value) */ - __pyx_k_tuple_51 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_50)); if (unlikely(!__pyx_k_tuple_51)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_k_tuple_51); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_51)); + __pyx_tuple__21 = PyTuple_Pack(1, __pyx_kp_s__20); if (unlikely(!__pyx_tuple__21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__21); + __Pyx_GIVEREF(__pyx_tuple__21); /* "cdec/_cdec.pyx":90 * def read_weights(self, weights): @@ -25737,73 +27450,73 @@ static int __Pyx_InitCachedConstants(void) { * for line in fp: * if line.strip().startswith('#'): continue */ - __pyx_k_tuple_52 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_k_tuple_52)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_k_tuple_52); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_52)); + __pyx_tuple__22 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__22); + __Pyx_GIVEREF(__pyx_tuple__22); - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":5 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":5 * import cdec.sa._sa as _sa * * def _phrase(phrase): # <<<<<<<<<<<<<< * return ' '.join(w.encode('utf8') if isinstance(w, unicode) else str(w) for w in phrase) * */ - __pyx_k_tuple_56 = PyTuple_Pack(3, ((PyObject *)__pyx_n_s__phrase), ((PyObject *)__pyx_n_s__genexpr), ((PyObject *)__pyx_n_s__genexpr)); if (unlikely(!__pyx_k_tuple_56)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_k_tuple_56); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_56)); - __pyx_k_codeobj_57 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_56, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_58, __pyx_n_s___phrase, 5, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_57)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__24 = PyTuple_Pack(3, __pyx_n_s_phrase_2, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__24)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__24); + __Pyx_GIVEREF(__pyx_tuple__24); + __pyx_codeobj__25 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__24, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr0_home_cdyer_cdec_python_cde_2, __pyx_n_s_phrase, 5, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__25)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":194 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":194 * return [] * * BLEU = Scorer('IBM_BLEU') # <<<<<<<<<<<<<< * QCRI = Scorer('QCRI_BLEU') * TER = Scorer('TER') */ - __pyx_k_tuple_59 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__IBM_BLEU)); if (unlikely(!__pyx_k_tuple_59)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_k_tuple_59); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_59)); + __pyx_tuple__26 = PyTuple_Pack(1, __pyx_n_s_IBM_BLEU); if (unlikely(!__pyx_tuple__26)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__26); + __Pyx_GIVEREF(__pyx_tuple__26); - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":195 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":195 * * BLEU = Scorer('IBM_BLEU') * QCRI = Scorer('QCRI_BLEU') # <<<<<<<<<<<<<< * TER = Scorer('TER') * CER = Scorer('CER') */ - __pyx_k_tuple_60 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__QCRI_BLEU)); if (unlikely(!__pyx_k_tuple_60)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_k_tuple_60); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_60)); + __pyx_tuple__27 = PyTuple_Pack(1, __pyx_n_s_QCRI_BLEU); if (unlikely(!__pyx_tuple__27)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__27); + __Pyx_GIVEREF(__pyx_tuple__27); - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":196 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":196 * BLEU = Scorer('IBM_BLEU') * QCRI = Scorer('QCRI_BLEU') * TER = Scorer('TER') # <<<<<<<<<<<<<< * CER = Scorer('CER') * SSK = Scorer('SSK') */ - __pyx_k_tuple_61 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__TER)); if (unlikely(!__pyx_k_tuple_61)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_k_tuple_61); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_61)); + __pyx_tuple__28 = PyTuple_Pack(1, __pyx_n_s_TER); if (unlikely(!__pyx_tuple__28)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__28); + __Pyx_GIVEREF(__pyx_tuple__28); - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":197 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":197 * QCRI = Scorer('QCRI_BLEU') * TER = Scorer('TER') * CER = Scorer('CER') # <<<<<<<<<<<<<< * SSK = Scorer('SSK') */ - __pyx_k_tuple_62 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__CER)); if (unlikely(!__pyx_k_tuple_62)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_k_tuple_62); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_62)); + __pyx_tuple__29 = PyTuple_Pack(1, __pyx_n_s_CER); if (unlikely(!__pyx_tuple__29)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__29); + __Pyx_GIVEREF(__pyx_tuple__29); - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":198 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":198 * TER = Scorer('TER') * CER = Scorer('CER') * SSK = Scorer('SSK') # <<<<<<<<<<<<<< */ - __pyx_k_tuple_63 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__SSK)); if (unlikely(!__pyx_k_tuple_63)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_k_tuple_63); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_63)); + __pyx_tuple__30 = PyTuple_Pack(1, __pyx_n_s_SSK); if (unlikely(!__pyx_tuple__30)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__30); + __Pyx_GIVEREF(__pyx_tuple__30); /* "cdec/_cdec.pyx":28 * class ParseFailed(Exception): pass @@ -25812,10 +27525,10 @@ static int __Pyx_InitCachedConstants(void) { * """set_silent(bool): Configure the verbosity of cdec.""" * SetSilent(yn) */ - __pyx_k_tuple_64 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__yn)); if (unlikely(!__pyx_k_tuple_64)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_k_tuple_64); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_64)); - __pyx_k_codeobj_65 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_64, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_66, __pyx_n_s__set_silent, 28, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_65)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__31 = PyTuple_Pack(1, __pyx_n_s_yn); if (unlikely(!__pyx_tuple__31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__31); + __Pyx_GIVEREF(__pyx_tuple__31); + __pyx_codeobj__32 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__31, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr0_home_cdyer_cdec_python_cde_3, __pyx_n_s_set_silent, 28, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "cdec/_cdec.pyx":32 * SetSilent(yn) @@ -25824,10 +27537,10 @@ static int __Pyx_InitCachedConstants(void) { * for key, value in config.items(): * if isinstance(value, dict): */ - __pyx_k_tuple_67 = PyTuple_Pack(5, ((PyObject *)__pyx_n_s__config), ((PyObject *)__pyx_n_s__key), ((PyObject *)__pyx_n_s__value), ((PyObject *)__pyx_n_s__name), ((PyObject *)__pyx_n_s__info)); if (unlikely(!__pyx_k_tuple_67)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_k_tuple_67); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_67)); - __pyx_k_codeobj_68 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_67, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_66, __pyx_n_s___make_config, 32, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__33 = PyTuple_Pack(5, __pyx_n_s_config, __pyx_n_s_key, __pyx_n_s_value, __pyx_n_s_name, __pyx_n_s_info); if (unlikely(!__pyx_tuple__33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__33); + __Pyx_GIVEREF(__pyx_tuple__33); + __pyx_codeobj__34 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__33, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr0_home_cdyer_cdec_python_cde_3, __pyx_n_s_make_config, 32, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__34)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; @@ -25837,8 +27550,8 @@ static int __Pyx_InitCachedConstants(void) { static int __Pyx_InitGlobals(void) { 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_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;} return 0; __pyx_L1_error:; return -1; @@ -25856,6 +27569,7 @@ PyMODINIT_FUNC PyInit__cdec(void) 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; @@ -25898,14 +27612,6 @@ PyMODINIT_FUNC PyInit__cdec(void) 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); - #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, "cdec._cdec")) { - if (unlikely(PyDict_SetItemString(modules, "cdec._cdec", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - } - } - #endif __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__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); @@ -25917,8 +27623,16 @@ PyMODINIT_FUNC PyInit__cdec(void) 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_cdec___cdec) { - if (__Pyx_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 (__Pyx_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, "cdec._cdec")) { + if (unlikely(PyDict_SetItemString(modules, "cdec._cdec", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } } + #endif /*--- Builtin init code ---*/ if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Constants init code ---*/ @@ -25927,36 +27641,8 @@ PyMODINIT_FUNC PyInit__cdec(void) /*--- Variable export code ---*/ /*--- Function export code ---*/ /*--- Type init code ---*/ - if (PyType_Ready(&__pyx_type_4cdec_5_cdec_TRule) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - #if CYTHON_COMPILING_IN_CPYTHON - { - PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_4cdec_5_cdec_TRule, "__init__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { - __pyx_wrapperbase_4cdec_5_cdec_5TRule___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; - __pyx_wrapperbase_4cdec_5_cdec_5TRule___init__.doc = __pyx_doc_4cdec_5_cdec_5TRule___init__; - ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4cdec_5_cdec_5TRule___init__; - } - } - #endif - if (__Pyx_SetAttrString(__pyx_m, "TRule", (PyObject *)&__pyx_type_4cdec_5_cdec_TRule) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_4cdec_5_cdec_TRule = &__pyx_type_4cdec_5_cdec_TRule; - __pyx_type_4cdec_5_cdec_MRule.tp_base = __pyx_ptype_4cdec_5_cdec_TRule; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec_MRule) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - #if CYTHON_COMPILING_IN_CPYTHON - { - PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_4cdec_5_cdec_MRule, "__init__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { - __pyx_wrapperbase_4cdec_5_cdec_5MRule___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; - __pyx_wrapperbase_4cdec_5_cdec_5MRule___init__.doc = __pyx_doc_4cdec_5_cdec_5MRule___init__; - ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4cdec_5_cdec_5MRule___init__; - } - } - #endif - if (__Pyx_SetAttrString(__pyx_m, "MRule", (PyObject *)&__pyx_type_4cdec_5_cdec_MRule) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_4cdec_5_cdec_MRule = &__pyx_type_4cdec_5_cdec_MRule; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_22___iter__) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_22___iter__ = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_22___iter__; if (PyType_Ready(&__pyx_type_4cdec_5_cdec_DenseVector) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_4cdec_5_cdec_DenseVector.tp_print = 0; #if CYTHON_COMPILING_IN_CPYTHON { PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_4cdec_5_cdec_DenseVector, "__init__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -25969,18 +27655,8 @@ PyMODINIT_FUNC PyInit__cdec(void) #endif if (__Pyx_SetAttrString(__pyx_m, "DenseVector", (PyObject *)&__pyx_type_4cdec_5_cdec_DenseVector) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_4cdec_5_cdec_DenseVector = &__pyx_type_4cdec_5_cdec_DenseVector; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec_SufficientStats) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "SufficientStats", (PyObject *)&__pyx_type_4cdec_5_cdec_SufficientStats) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_4cdec_5_cdec_SufficientStats = &__pyx_type_4cdec_5_cdec_SufficientStats; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_21___iter__) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_21___iter__ = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_21___iter__; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec_Metric) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "Metric", (PyObject *)&__pyx_type_4cdec_5_cdec_Metric) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_4cdec_5_cdec_Metric = &__pyx_type_4cdec_5_cdec_Metric; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec_Candidate) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "Candidate", (PyObject *)&__pyx_type_4cdec_5_cdec_Candidate) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_4cdec_5_cdec_Candidate = &__pyx_type_4cdec_5_cdec_Candidate; if (PyType_Ready(&__pyx_type_4cdec_5_cdec_SparseVector) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_4cdec_5_cdec_SparseVector.tp_print = 0; #if CYTHON_COMPILING_IN_CPYTHON { PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_4cdec_5_cdec_SparseVector, "__init__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -25993,9 +27669,8 @@ PyMODINIT_FUNC PyInit__cdec(void) #endif if (__Pyx_SetAttrString(__pyx_m, "SparseVector", (PyObject *)&__pyx_type_4cdec_5_cdec_SparseVector) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_4cdec_5_cdec_SparseVector = &__pyx_type_4cdec_5_cdec_SparseVector; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_15___get__) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_15___get__ = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_15___get__; if (PyType_Ready(&__pyx_type_4cdec_5_cdec_NT) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_4cdec_5_cdec_NT.tp_print = 0; #if CYTHON_COMPILING_IN_CPYTHON { PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_4cdec_5_cdec_NT, "__init__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -26008,109 +27683,129 @@ PyMODINIT_FUNC PyInit__cdec(void) #endif if (__Pyx_SetAttrString(__pyx_m, "NT", (PyObject *)&__pyx_type_4cdec_5_cdec_NT) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_4cdec_5_cdec_NT = &__pyx_type_4cdec_5_cdec_NT; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec_Lattice) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_4cdec_5_cdec_NTRef) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_4cdec_5_cdec_NTRef.tp_print = 0; #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_4cdec_5_cdec_Lattice, "__init__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_4cdec_5_cdec_NTRef, "__init__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { - __pyx_wrapperbase_4cdec_5_cdec_7Lattice_2__init__ = *((PyWrapperDescrObject *)wrapper)->d_base; - __pyx_wrapperbase_4cdec_5_cdec_7Lattice_2__init__.doc = __pyx_doc_4cdec_5_cdec_7Lattice_2__init__; - ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4cdec_5_cdec_7Lattice_2__init__; + __pyx_wrapperbase_4cdec_5_cdec_5NTRef___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; + __pyx_wrapperbase_4cdec_5_cdec_5NTRef___init__.doc = __pyx_doc_4cdec_5_cdec_5NTRef___init__; + ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4cdec_5_cdec_5NTRef___init__; } } #endif - if (__Pyx_SetAttrString(__pyx_m, "Lattice", (PyObject *)&__pyx_type_4cdec_5_cdec_Lattice) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_4cdec_5_cdec_Lattice = &__pyx_type_4cdec_5_cdec_Lattice; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_23__make_config) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_23__make_config = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_23__make_config; + if (__Pyx_SetAttrString(__pyx_m, "NTRef", (PyObject *)&__pyx_type_4cdec_5_cdec_NTRef) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec_NTRef = &__pyx_type_4cdec_5_cdec_NTRef; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec_TRule) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_4cdec_5_cdec_TRule.tp_print = 0; + #if CYTHON_COMPILING_IN_CPYTHON + { + PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_4cdec_5_cdec_TRule, "__init__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { + __pyx_wrapperbase_4cdec_5_cdec_5TRule___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; + __pyx_wrapperbase_4cdec_5_cdec_5TRule___init__.doc = __pyx_doc_4cdec_5_cdec_5TRule___init__; + ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4cdec_5_cdec_5TRule___init__; + } + } + #endif + if (__Pyx_SetAttrString(__pyx_m, "TRule", (PyObject *)&__pyx_type_4cdec_5_cdec_TRule) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec_TRule = &__pyx_type_4cdec_5_cdec_TRule; + __pyx_type_4cdec_5_cdec_MRule.tp_base = __pyx_ptype_4cdec_5_cdec_TRule; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec_MRule) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_4cdec_5_cdec_MRule.tp_print = 0; + #if CYTHON_COMPILING_IN_CPYTHON + { + PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_4cdec_5_cdec_MRule, "__init__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { + __pyx_wrapperbase_4cdec_5_cdec_5MRule___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; + __pyx_wrapperbase_4cdec_5_cdec_5MRule___init__.doc = __pyx_doc_4cdec_5_cdec_5MRule___init__; + ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4cdec_5_cdec_5MRule___init__; + } + } + #endif + if (__Pyx_SetAttrString(__pyx_m, "MRule", (PyObject *)&__pyx_type_4cdec_5_cdec_MRule) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec_MRule = &__pyx_type_4cdec_5_cdec_MRule; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec_Grammar) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_4cdec_5_cdec_Grammar.tp_print = 0; + if (__Pyx_SetAttrString(__pyx_m, "Grammar", (PyObject *)&__pyx_type_4cdec_5_cdec_Grammar) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec_Grammar = &__pyx_type_4cdec_5_cdec_Grammar; + __pyx_type_4cdec_5_cdec_TextGrammar.tp_base = __pyx_ptype_4cdec_5_cdec_Grammar; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec_TextGrammar) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_4cdec_5_cdec_TextGrammar.tp_print = 0; + #if CYTHON_COMPILING_IN_CPYTHON + { + PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_4cdec_5_cdec_TextGrammar, "__init__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { + __pyx_wrapperbase_4cdec_5_cdec_11TextGrammar___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; + __pyx_wrapperbase_4cdec_5_cdec_11TextGrammar___init__.doc = __pyx_doc_4cdec_5_cdec_11TextGrammar___init__; + ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4cdec_5_cdec_11TextGrammar___init__; + } + } + #endif + if (__Pyx_SetAttrString(__pyx_m, "TextGrammar", (PyObject *)&__pyx_type_4cdec_5_cdec_TextGrammar) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec_TextGrammar = &__pyx_type_4cdec_5_cdec_TextGrammar; + __pyx_vtabptr_4cdec_5_cdec_Hypergraph = &__pyx_vtable_4cdec_5_cdec_Hypergraph; + __pyx_vtable_4cdec_5_cdec_Hypergraph._rng = (MT19937 *(*)(struct __pyx_obj_4cdec_5_cdec_Hypergraph *))__pyx_f_4cdec_5_cdec_10Hypergraph__rng; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec_Hypergraph) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_4cdec_5_cdec_Hypergraph.tp_print = 0; + if (__Pyx_SetVtable(__pyx_type_4cdec_5_cdec_Hypergraph.tp_dict, __pyx_vtabptr_4cdec_5_cdec_Hypergraph) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "Hypergraph", (PyObject *)&__pyx_type_4cdec_5_cdec_Hypergraph) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec_Hypergraph = &__pyx_type_4cdec_5_cdec_Hypergraph; __pyx_vtabptr_4cdec_5_cdec_HypergraphEdge = &__pyx_vtable_4cdec_5_cdec_HypergraphEdge; __pyx_vtable_4cdec_5_cdec_HypergraphEdge.init = (PyObject *(*)(struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *, Hypergraph *, unsigned int))__pyx_f_4cdec_5_cdec_14HypergraphEdge_init; if (PyType_Ready(&__pyx_type_4cdec_5_cdec_HypergraphEdge) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_4cdec_5_cdec_HypergraphEdge.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_4cdec_5_cdec_HypergraphEdge.tp_dict, __pyx_vtabptr_4cdec_5_cdec_HypergraphEdge) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "HypergraphEdge", (PyObject *)&__pyx_type_4cdec_5_cdec_HypergraphEdge) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_4cdec_5_cdec_HypergraphEdge = &__pyx_type_4cdec_5_cdec_HypergraphEdge; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_2__phrase) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_2__phrase = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_2__phrase; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_13___get__) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_13___get__ = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_13___get__; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_20_lines) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_20_lines = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_20_lines; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec_Scorer) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "Scorer", (PyObject *)&__pyx_type_4cdec_5_cdec_Scorer) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_4cdec_5_cdec_Scorer = &__pyx_type_4cdec_5_cdec_Scorer; __pyx_vtabptr_4cdec_5_cdec_HypergraphNode = &__pyx_vtable_4cdec_5_cdec_HypergraphNode; __pyx_vtable_4cdec_5_cdec_HypergraphNode.init = (PyObject *(*)(struct __pyx_obj_4cdec_5_cdec_HypergraphNode *, Hypergraph *, unsigned int))__pyx_f_4cdec_5_cdec_14HypergraphNode_init; if (PyType_Ready(&__pyx_type_4cdec_5_cdec_HypergraphNode) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_4cdec_5_cdec_HypergraphNode.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_4cdec_5_cdec_HypergraphNode.tp_dict, __pyx_vtabptr_4cdec_5_cdec_HypergraphNode) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "HypergraphNode", (PyObject *)&__pyx_type_4cdec_5_cdec_HypergraphNode) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_4cdec_5_cdec_HypergraphNode = &__pyx_type_4cdec_5_cdec_HypergraphNode; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_10_kbest_features) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_10_kbest_features = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_10_kbest_features; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec_NTRef) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_4cdec_5_cdec_Lattice) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_4cdec_5_cdec_Lattice.tp_print = 0; #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_4cdec_5_cdec_NTRef, "__init__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_4cdec_5_cdec_Lattice, "__init__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { - __pyx_wrapperbase_4cdec_5_cdec_5NTRef___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; - __pyx_wrapperbase_4cdec_5_cdec_5NTRef___init__.doc = __pyx_doc_4cdec_5_cdec_5NTRef___init__; - ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4cdec_5_cdec_5NTRef___init__; + __pyx_wrapperbase_4cdec_5_cdec_7Lattice_2__init__ = *((PyWrapperDescrObject *)wrapper)->d_base; + __pyx_wrapperbase_4cdec_5_cdec_7Lattice_2__init__.doc = __pyx_doc_4cdec_5_cdec_7Lattice_2__init__; + ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4cdec_5_cdec_7Lattice_2__init__; } } #endif - if (__Pyx_SetAttrString(__pyx_m, "NTRef", (PyObject *)&__pyx_type_4cdec_5_cdec_NTRef) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_4cdec_5_cdec_NTRef = &__pyx_type_4cdec_5_cdec_NTRef; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec_Grammar) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "Grammar", (PyObject *)&__pyx_type_4cdec_5_cdec_Grammar) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_4cdec_5_cdec_Grammar = &__pyx_type_4cdec_5_cdec_Grammar; - __pyx_vtabptr_4cdec_5_cdec_Hypergraph = &__pyx_vtable_4cdec_5_cdec_Hypergraph; - __pyx_vtable_4cdec_5_cdec_Hypergraph._rng = (MT19937 *(*)(struct __pyx_obj_4cdec_5_cdec_Hypergraph *))__pyx_f_4cdec_5_cdec_10Hypergraph__rng; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec_Hypergraph) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetVtable(__pyx_type_4cdec_5_cdec_Hypergraph.tp_dict, __pyx_vtabptr_4cdec_5_cdec_Hypergraph) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "Hypergraph", (PyObject *)&__pyx_type_4cdec_5_cdec_Hypergraph) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_4cdec_5_cdec_Hypergraph = &__pyx_type_4cdec_5_cdec_Hypergraph; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_24___init__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_24___init__ = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_24___init__; + if (__Pyx_SetAttrString(__pyx_m, "Lattice", (PyObject *)&__pyx_type_4cdec_5_cdec_Lattice) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec_Lattice = &__pyx_type_4cdec_5_cdec_Lattice; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec_Candidate) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_4cdec_5_cdec_Candidate.tp_print = 0; + if (__Pyx_SetAttrString(__pyx_m, "Candidate", (PyObject *)&__pyx_type_4cdec_5_cdec_Candidate) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec_Candidate = &__pyx_type_4cdec_5_cdec_Candidate; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec_SufficientStats) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_4cdec_5_cdec_SufficientStats.tp_print = 0; + if (__Pyx_SetAttrString(__pyx_m, "SufficientStats", (PyObject *)&__pyx_type_4cdec_5_cdec_SufficientStats) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec_SufficientStats = &__pyx_type_4cdec_5_cdec_SufficientStats; if (PyType_Ready(&__pyx_type_4cdec_5_cdec_CandidateSet) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_4cdec_5_cdec_CandidateSet.tp_print = 0; if (__Pyx_SetAttrString(__pyx_m, "CandidateSet", (PyObject *)&__pyx_type_4cdec_5_cdec_CandidateSet) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_4cdec_5_cdec_CandidateSet = &__pyx_type_4cdec_5_cdec_CandidateSet; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_19_todot) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_19_todot = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_19_todot; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_5___str__) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_5___str__ = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_5___str__; if (PyType_Ready(&__pyx_type_4cdec_5_cdec_SegmentEvaluator) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_4cdec_5_cdec_SegmentEvaluator.tp_print = 0; if (__Pyx_SetAttrString(__pyx_m, "SegmentEvaluator", (PyObject *)&__pyx_type_4cdec_5_cdec_SegmentEvaluator) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_4cdec_5_cdec_SegmentEvaluator = &__pyx_type_4cdec_5_cdec_SegmentEvaluator; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_16___get__) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_16___get__ = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_16___get__; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_25_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_25_genexpr = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_25_genexpr; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_3_genexpr) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_3_genexpr = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_3_genexpr; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_11_sample) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_11_sample = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_11_sample; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_8_kbest) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_8_kbest = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_8_kbest; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_14___get__) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_14___get__ = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_14___get__; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_7___iter__) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_7___iter__ = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_7___iter__; - __pyx_type_4cdec_5_cdec_TextGrammar.tp_base = __pyx_ptype_4cdec_5_cdec_Grammar; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec_TextGrammar) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - #if CYTHON_COMPILING_IN_CPYTHON - { - PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_4cdec_5_cdec_TextGrammar, "__init__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { - __pyx_wrapperbase_4cdec_5_cdec_11TextGrammar___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; - __pyx_wrapperbase_4cdec_5_cdec_11TextGrammar___init__.doc = __pyx_doc_4cdec_5_cdec_11TextGrammar___init__; - ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4cdec_5_cdec_11TextGrammar___init__; - } - } - #endif - if (__Pyx_SetAttrString(__pyx_m, "TextGrammar", (PyObject *)&__pyx_type_4cdec_5_cdec_TextGrammar) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_4cdec_5_cdec_TextGrammar = &__pyx_type_4cdec_5_cdec_TextGrammar; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec_Scorer) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_4cdec_5_cdec_Scorer.tp_print = 0; + if (__Pyx_SetAttrString(__pyx_m, "Scorer", (PyObject *)&__pyx_type_4cdec_5_cdec_Scorer) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec_Scorer = &__pyx_type_4cdec_5_cdec_Scorer; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec_Metric) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_4cdec_5_cdec_Metric.tp_print = 0; + if (__Pyx_SetAttrString(__pyx_m, "Metric", (PyObject *)&__pyx_type_4cdec_5_cdec_Metric) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec_Metric = &__pyx_type_4cdec_5_cdec_Metric; if (PyType_Ready(&__pyx_type_4cdec_5_cdec_Decoder) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_4cdec_5_cdec_Decoder.tp_print = 0; #if CYTHON_COMPILING_IN_CPYTHON { PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_4cdec_5_cdec_Decoder, "__init__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -26124,28 +27819,92 @@ PyMODINIT_FUNC PyInit__cdec(void) if (__Pyx_SetAttrString(__pyx_m, "Decoder", (PyObject *)&__pyx_type_4cdec_5_cdec_Decoder) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_4cdec_5_cdec_Decoder = &__pyx_type_4cdec_5_cdec_Decoder; if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct____iter__) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_4cdec_5_cdec___pyx_scope_struct____iter__.tp_print = 0; __pyx_ptype_4cdec_5_cdec___pyx_scope_struct____iter__ = &__pyx_type_4cdec_5_cdec___pyx_scope_struct____iter__; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_1___iter__) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_4cdec_5_cdec___pyx_scope_struct_1___iter__.tp_print = 0; + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_1___iter__ = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_1___iter__; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_2__phrase) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_4cdec_5_cdec___pyx_scope_struct_2__phrase.tp_print = 0; + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_2__phrase = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_2__phrase; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_3_genexpr) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_4cdec_5_cdec___pyx_scope_struct_3_genexpr.tp_print = 0; + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_3_genexpr = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_3_genexpr; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_4___get__) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_4cdec_5_cdec___pyx_scope_struct_4___get__.tp_print = 0; + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_4___get__ = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_4___get__; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_5___str__) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_4cdec_5_cdec___pyx_scope_struct_5___str__.tp_print = 0; + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_5___str__ = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_5___str__; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_6_genexpr) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_4cdec_5_cdec___pyx_scope_struct_6_genexpr.tp_print = 0; + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_6_genexpr = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_6_genexpr; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_7___iter__) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_4cdec_5_cdec___pyx_scope_struct_7___iter__.tp_print = 0; + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_7___iter__ = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_7___iter__; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_8_kbest) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_4cdec_5_cdec___pyx_scope_struct_8_kbest.tp_print = 0; + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_8_kbest = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_8_kbest; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees.tp_print = 0; + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_10_kbest_features) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_4cdec_5_cdec___pyx_scope_struct_10_kbest_features.tp_print = 0; + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_10_kbest_features = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_10_kbest_features; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_11_sample) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_4cdec_5_cdec___pyx_scope_struct_11_sample.tp_print = 0; + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_11_sample = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_11_sample; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_12_sample_trees) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_4cdec_5_cdec___pyx_scope_struct_12_sample_trees.tp_print = 0; + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_12_sample_trees = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_12_sample_trees; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_13___get__) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_4cdec_5_cdec___pyx_scope_struct_13___get__.tp_print = 0; + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_13___get__ = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_13___get__; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_14___get__) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_4cdec_5_cdec___pyx_scope_struct_14___get__.tp_print = 0; + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_14___get__ = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_14___get__; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_15___get__) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_4cdec_5_cdec___pyx_scope_struct_15___get__.tp_print = 0; + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_15___get__ = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_15___get__; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_16___get__) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_4cdec_5_cdec___pyx_scope_struct_16___get__.tp_print = 0; + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_16___get__ = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_16___get__; if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_17___get__) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_4cdec_5_cdec___pyx_scope_struct_17___get__.tp_print = 0; __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_17___get__ = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_17___get__; if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_18___iter__) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_4cdec_5_cdec___pyx_scope_struct_18___iter__.tp_print = 0; __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_18___iter__ = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_18___iter__; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_6_genexpr) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_6_genexpr = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_6_genexpr; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_12_sample_trees) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_12_sample_trees = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_12_sample_trees; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_4___get__) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_4___get__ = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_4___get__; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_1___iter__) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_1___iter__ = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_1___iter__; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_19_todot) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_4cdec_5_cdec___pyx_scope_struct_19_todot.tp_print = 0; + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_19_todot = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_19_todot; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_20_lines) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_4cdec_5_cdec___pyx_scope_struct_20_lines.tp_print = 0; + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_20_lines = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_20_lines; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_21___iter__) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_4cdec_5_cdec___pyx_scope_struct_21___iter__.tp_print = 0; + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_21___iter__ = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_21___iter__; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_22___iter__) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_4cdec_5_cdec___pyx_scope_struct_22___iter__.tp_print = 0; + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_22___iter__ = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_22___iter__; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_23__make_config) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_4cdec_5_cdec___pyx_scope_struct_23__make_config.tp_print = 0; + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_23__make_config = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_23__make_config; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_24___init__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_4cdec_5_cdec___pyx_scope_struct_24___init__.tp_print = 0; + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_24___init__ = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_24___init__; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_25_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_4cdec_5_cdec___pyx_scope_struct_25_genexpr.tp_print = 0; + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_25_genexpr = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_25_genexpr; /*--- Type import code ---*/ - __pyx_ptype_4cdec_2sa_3_sa_FloatList = __Pyx_ImportType("cdec.sa._sa", "FloatList", sizeof(struct __pyx_obj_4cdec_2sa_3_sa_FloatList), 1); if (unlikely(!__pyx_ptype_4cdec_2sa_3_sa_FloatList)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_vtabptr_4cdec_2sa_3_sa_FloatList = (struct __pyx_vtabstruct_4cdec_2sa_3_sa_FloatList*)__Pyx_GetVtable(__pyx_ptype_4cdec_2sa_3_sa_FloatList->tp_dict); if (unlikely(!__pyx_vtabptr_4cdec_2sa_3_sa_FloatList)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_4cdec_2sa_3_sa_IntList = __Pyx_ImportType("cdec.sa._sa", "IntList", sizeof(struct __pyx_obj_4cdec_2sa_3_sa_IntList), 1); if (unlikely(!__pyx_ptype_4cdec_2sa_3_sa_IntList)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_vtabptr_4cdec_2sa_3_sa_IntList = (struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList*)__Pyx_GetVtable(__pyx_ptype_4cdec_2sa_3_sa_IntList->tp_dict); if (unlikely(!__pyx_vtabptr_4cdec_2sa_3_sa_IntList)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_4cdec_2sa_3_sa_FeatureVector = __Pyx_ImportType("cdec.sa._sa", "FeatureVector", sizeof(struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector), 1); if (unlikely(!__pyx_ptype_4cdec_2sa_3_sa_FeatureVector)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_4cdec_2sa_3_sa_Phrase = __Pyx_ImportType("cdec.sa._sa", "Phrase", sizeof(struct __pyx_obj_4cdec_2sa_3_sa_Phrase), 1); if (unlikely(!__pyx_ptype_4cdec_2sa_3_sa_Phrase)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_vtabptr_4cdec_2sa_3_sa_Phrase = (struct __pyx_vtabstruct_4cdec_2sa_3_sa_Phrase*)__Pyx_GetVtable(__pyx_ptype_4cdec_2sa_3_sa_Phrase->tp_dict); if (unlikely(!__pyx_vtabptr_4cdec_2sa_3_sa_Phrase)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_4cdec_2sa_3_sa_Rule = __Pyx_ImportType("cdec.sa._sa", "Rule", sizeof(struct __pyx_obj_4cdec_2sa_3_sa_Rule), 1); if (unlikely(!__pyx_ptype_4cdec_2sa_3_sa_Rule)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_2sa_3_sa_FloatList = __Pyx_ImportType("cdec.sa._sa", "FloatList", sizeof(struct __pyx_obj_4cdec_2sa_3_sa_FloatList), 1); if (unlikely(!__pyx_ptype_4cdec_2sa_3_sa_FloatList)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_vtabptr_4cdec_2sa_3_sa_FloatList = (struct __pyx_vtabstruct_4cdec_2sa_3_sa_FloatList*)__Pyx_GetVtable(__pyx_ptype_4cdec_2sa_3_sa_FloatList->tp_dict); if (unlikely(!__pyx_vtabptr_4cdec_2sa_3_sa_FloatList)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_2sa_3_sa_IntList = __Pyx_ImportType("cdec.sa._sa", "IntList", sizeof(struct __pyx_obj_4cdec_2sa_3_sa_IntList), 1); if (unlikely(!__pyx_ptype_4cdec_2sa_3_sa_IntList)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_vtabptr_4cdec_2sa_3_sa_IntList = (struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList*)__Pyx_GetVtable(__pyx_ptype_4cdec_2sa_3_sa_IntList->tp_dict); if (unlikely(!__pyx_vtabptr_4cdec_2sa_3_sa_IntList)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_2sa_3_sa_FeatureVector = __Pyx_ImportType("cdec.sa._sa", "FeatureVector", sizeof(struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector), 1); if (unlikely(!__pyx_ptype_4cdec_2sa_3_sa_FeatureVector)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_2sa_3_sa_Phrase = __Pyx_ImportType("cdec.sa._sa", "Phrase", sizeof(struct __pyx_obj_4cdec_2sa_3_sa_Phrase), 1); if (unlikely(!__pyx_ptype_4cdec_2sa_3_sa_Phrase)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_vtabptr_4cdec_2sa_3_sa_Phrase = (struct __pyx_vtabstruct_4cdec_2sa_3_sa_Phrase*)__Pyx_GetVtable(__pyx_ptype_4cdec_2sa_3_sa_Phrase->tp_dict); if (unlikely(!__pyx_vtabptr_4cdec_2sa_3_sa_Phrase)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_2sa_3_sa_Rule = __Pyx_ImportType("cdec.sa._sa", "Rule", sizeof(struct __pyx_obj_4cdec_2sa_3_sa_Rule), 1); if (unlikely(!__pyx_ptype_4cdec_2sa_3_sa_Rule)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Variable import code ---*/ /*--- Function import code ---*/ __pyx_t_1 = __Pyx_ImportModule("cdec.sa._sa"); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -26156,7 +27915,7 @@ PyMODINIT_FUNC PyInit__cdec(void) Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; /*--- Execution code ---*/ - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":3 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":3 * cimport grammar * cimport cdec.sa._sa as _sa * import cdec.sa._sa as _sa # <<<<<<<<<<<<<< @@ -26165,82 +27924,82 @@ PyMODINIT_FUNC PyInit__cdec(void) */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_INCREF(((PyObject *)__pyx_n_s_55)); - PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s_55)); - __Pyx_GIVEREF(((PyObject *)__pyx_n_s_55)); - __pyx_t_3 = __Pyx_Import(((PyObject *)__pyx_n_s_54), ((PyObject *)__pyx_t_2), -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_INCREF(__pyx_n_s__23); + PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s__23); + __Pyx_GIVEREF(__pyx_n_s__23); + __pyx_t_3 = __Pyx_Import(__pyx_n_s_cdec_sa__sa, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s___sa, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem(__pyx_d, __pyx_n_s_sa, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/grammar.pxi":5 + /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":5 * import cdec.sa._sa as _sa * * def _phrase(phrase): # <<<<<<<<<<<<<< * return ' '.join(w.encode('utf8') if isinstance(w, unicode) else str(w) for w in phrase) * */ - __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_4cdec_5_cdec_1_phrase, NULL, __pyx_n_s_39); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_4cdec_5_cdec_1_phrase, NULL, __pyx_n_s_cdec__cdec); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_d, __pyx_n_s___phrase, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_phrase, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":194 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":194 * return [] * * BLEU = Scorer('IBM_BLEU') # <<<<<<<<<<<<<< * QCRI = Scorer('QCRI_BLEU') * TER = Scorer('TER') */ - __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_Scorer)), ((PyObject *)__pyx_k_tuple_59), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_Scorer)), __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_d, __pyx_n_s__BLEU, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_BLEU, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":195 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":195 * * BLEU = Scorer('IBM_BLEU') * QCRI = Scorer('QCRI_BLEU') # <<<<<<<<<<<<<< * TER = Scorer('TER') * CER = Scorer('CER') */ - __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_Scorer)), ((PyObject *)__pyx_k_tuple_60), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_Scorer)), __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_d, __pyx_n_s__QCRI, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_QCRI, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":196 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":196 * BLEU = Scorer('IBM_BLEU') * QCRI = Scorer('QCRI_BLEU') * TER = Scorer('TER') # <<<<<<<<<<<<<< * CER = Scorer('CER') * SSK = Scorer('SSK') */ - __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_Scorer)), ((PyObject *)__pyx_k_tuple_61), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_Scorer)), __pyx_tuple__28, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_d, __pyx_n_s__TER, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_TER, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":197 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":197 * QCRI = Scorer('QCRI_BLEU') * TER = Scorer('TER') * CER = Scorer('CER') # <<<<<<<<<<<<<< * SSK = Scorer('SSK') */ - __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_Scorer)), ((PyObject *)__pyx_k_tuple_62), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_Scorer)), __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_d, __pyx_n_s__CER, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_CER, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/home/pks/src/cdec-dtrain/python/cdec/mteval.pxi":198 + /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":198 * TER = Scorer('TER') * CER = Scorer('CER') * SSK = Scorer('SSK') # <<<<<<<<<<<<<< */ - __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_Scorer)), ((PyObject *)__pyx_k_tuple_63), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_Scorer)), __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_d, __pyx_n_s__SSK, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_SSK, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cdec/_cdec.pyx":22 @@ -26268,19 +28027,22 @@ PyMODINIT_FUNC PyInit__cdec(void) * class ParseFailed(Exception): pass * */ - __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_builtin_Exception); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_Exception); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_builtin_Exception); __Pyx_GIVEREF(__pyx_builtin_Exception); - __pyx_t_4 = __Pyx_CreateClass(((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_3), __pyx_n_s__InvalidConfig, __pyx_n_s__InvalidConfig, __pyx_n_s_39); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_3, __pyx_n_s_InvalidConfig, __pyx_n_s_InvalidConfig, (PyObject *) NULL, __pyx_n_s_cdec__cdec, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s__InvalidConfig, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_InvalidConfig, __pyx_t_3, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_InvalidConfig, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cdec/_cdec.pyx":26 * @@ -26289,19 +28051,22 @@ PyMODINIT_FUNC PyInit__cdec(void) * * def set_silent(yn): */ - __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __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 = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_builtin_Exception); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_builtin_Exception); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_builtin_Exception); __Pyx_GIVEREF(__pyx_builtin_Exception); - __pyx_t_2 = __Pyx_CreateClass(((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_3), __pyx_n_s__ParseFailed, __pyx_n_s__ParseFailed, __pyx_n_s_39); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s__ParseFailed, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_3, __pyx_n_s_ParseFailed, __pyx_n_s_ParseFailed, (PyObject *) NULL, __pyx_n_s_cdec__cdec, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_ParseFailed, __pyx_t_3, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ParseFailed, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __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; - __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cdec/_cdec.pyx":28 * class ParseFailed(Exception): pass @@ -26310,9 +28075,9 @@ PyMODINIT_FUNC PyInit__cdec(void) * """set_silent(bool): Configure the verbosity of cdec.""" * SetSilent(yn) */ - __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_4cdec_5_cdec_3set_silent, NULL, __pyx_n_s_39); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_4cdec_5_cdec_3set_silent, NULL, __pyx_n_s_cdec__cdec); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_d, __pyx_n_s__set_silent, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_set_silent, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cdec/_cdec.pyx":32 @@ -26322,9 +28087,9 @@ PyMODINIT_FUNC PyInit__cdec(void) * for key, value in config.items(): * if isinstance(value, dict): */ - __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_4cdec_5_cdec_5_make_config, NULL, __pyx_n_s_39); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_4cdec_5_cdec_5_make_config, NULL, __pyx_n_s_cdec__cdec); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_d, __pyx_n_s___make_config, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_config, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cdec/_cdec.pyx":1 @@ -26333,9 +28098,9 @@ PyMODINIT_FUNC PyInit__cdec(void) * from utils cimport * */ __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); - if (PyDict_SetItem(__pyx_d, __pyx_n_s____test__, ((PyObject *)__pyx_t_3)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_3); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "string.from_py":13 * @@ -26350,6 +28115,7 @@ PyMODINIT_FUNC PyInit__cdec(void) __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); if (__pyx_m) { __Pyx_AddTraceback("init cdec._cdec", __pyx_clineno, __pyx_lineno, __pyx_filename); Py_DECREF(__pyx_m); __pyx_m = 0; @@ -26389,11 +28155,34 @@ static PyObject *__Pyx_GetBuiltinName(PyObject *name) { #if PY_MAJOR_VERSION >= 3 "name '%U' is not defined", name); #else - "name '%s' is not defined", PyString_AS_STRING(name)); + "name '%.200s' is not defined", PyString_AS_STRING(name)); +#endif + } + return result; +} + +#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 PY_VERSION_HEX >= 0x02060000 + if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) + return NULL; #endif + result = (*call)(func, arg, kw); +#if PY_VERSION_HEX >= 0x02060000 + Py_LeaveRecursiveCall(); +#endif + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); } return result; } +#endif static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) { #if CYTHON_COMPILING_IN_CPYTHON @@ -26512,27 +28301,40 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject value = type; type = (PyObject*) Py_TYPE(value); } else if (PyExceptionClass_Check(type)) { - 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 = PyEval_CallObject(type, args); - 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; + PyObject *instance_class = NULL; + if (value && PyExceptionInstance_Check(value)) { + instance_class = (PyObject*) Py_TYPE(value); + if (instance_class != type) { + if (PyObject_IsSubclass(instance_class, type)) { + type = instance_class; + } else { + instance_class = NULL; + } + } + } + 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, @@ -26598,7 +28400,7 @@ static void __Pyx_RaiseArgtupleInvalid( more_or_less = "exactly"; } PyErr_Format(PyExc_TypeError, - "%s() takes %s %" CYTHON_FORMAT_SSIZE_T "d positional argument%s (%" CYTHON_FORMAT_SSIZE_T "d given)", + "%.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); } @@ -26627,13 +28429,13 @@ static CYTHON_INLINE int __Pyx_CheckKeywordStrings( return 1; invalid_keyword_type: PyErr_Format(PyExc_TypeError, - "%s() keywords must be strings", function_name); + "%.200s() keywords must be strings", function_name); return 0; #endif invalid_keyword: PyErr_Format(PyExc_TypeError, #if PY_MAJOR_VERSION < 3 - "%s() got an unexpected keyword argument '%s'", + "%.200s() got an unexpected keyword argument '%.200s'", function_name, PyString_AsString(key)); #else "%s() got an unexpected keyword argument '%U'", @@ -26642,29 +28444,35 @@ invalid_keyword: return 0; } -static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, +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 (!type) { - PyErr_Format(PyExc_SystemError, "Missing type object"); + if (unlikely(!type)) { + PyErr_SetString(PyExc_SystemError, "Missing type object"); return 0; } if (none_allowed && obj == Py_None) return 1; else if (exact) { - if (Py_TYPE(obj) == type) return 1; + 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 (PyObject_TypeCheck(obj, type)) return 1; + if (likely(PyObject_TypeCheck(obj, type))) return 1; } - PyErr_Format(PyExc_TypeError, - "Argument '%s' has incorrect type (expected %s, got %s)", - name, type->tp_name, Py_TYPE(obj)->tp_name); + __Pyx_RaiseArgumentTypeInvalid(name, obj, type); return 0; } static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { if (unlikely(!type)) { - PyErr_Format(PyExc_SystemError, "Missing type object"); + PyErr_SetString(PyExc_SystemError, "Missing type object"); return 0; } if (likely(PyObject_TypeCheck(obj, type))) @@ -26674,20 +28482,133 @@ static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { return 0; } -static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) { - PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname); -} - -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)); +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_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 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 CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) { + PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname); +} + +#if !CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values) { + return PyObject_CallMethodObjArgs(sep, __pyx_n_s_join, values, NULL) +} +#endif + +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 } @@ -26777,12 +28698,12 @@ arg_passed_twice: goto bad; invalid_keyword_type: PyErr_Format(PyExc_TypeError, - "%s() keywords must be strings", function_name); + "%.200s() keywords must be strings", function_name); goto bad; invalid_keyword: PyErr_Format(PyExc_TypeError, #if PY_MAJOR_VERSION < 3 - "%s() got an unexpected keyword argument '%s'", + "%.200s() got an unexpected keyword argument '%.200s'", function_name, PyString_AsString(key)); #else "%s() got an unexpected keyword argument '%U'", @@ -26792,14 +28713,16 @@ bad: return -1; } -static CYTHON_INLINE PyObject* __Pyx_PyObject_Append(PyObject* L, PyObject* x) { +static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) { if (likely(PyList_CheckExact(L))) { - if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return NULL; - Py_INCREF(Py_None); - return Py_None; /* this is just to have an accurate signature */ + if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1; } else { - return __Pyx_PyObject_CallMethod1(L, __pyx_n_s__append, x); + PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_n_s_append, x); + if (unlikely(!retval)) + return -1; + Py_DECREF(retval); } + return 0; } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { @@ -26887,7 +28810,7 @@ static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { PyErr_Format(PyExc_ValueError, - "need more than %" CYTHON_FORMAT_SSIZE_T "d value%s to unpack", + "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", index, (index == 1) ? "" : "s"); } @@ -26954,10 +28877,18 @@ static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) { } static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno, - CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename) { + CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename, + int full_traceback) { PyObject *old_exc, *old_val, *old_tb; PyObject *ctx; __Pyx_ErrFetch(&old_exc, &old_val, &old_tb); + if (full_traceback) { + Py_XINCREF(old_exc); + Py_XINCREF(old_val); + Py_XINCREF(old_tb); + __Pyx_ErrRestore(old_exc, old_val, old_tb); + PyErr_PrintEx(1); + } #if PY_MAJOR_VERSION < 3 ctx = PyString_FromString(name); #else @@ -27009,6 +28940,44 @@ static CYTHON_INLINE PyObject *__Pyx_PyIter_Next2(PyObject* iterator, PyObject* return NULL; } +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) { @@ -27141,11 +29110,10 @@ __Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value) return 0; } static PyObject * -__Pyx_CyFunction_get_globals(CYTHON_UNUSED __pyx_CyFunctionObject *op) +__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op) { - PyObject* dict = PyModule_GetDict(__pyx_m); - Py_XINCREF(dict); - return dict; + Py_INCREF(op->func_globals); + return op->func_globals; } static PyObject * __Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op) @@ -27301,7 +29269,7 @@ static PyMethodDef __pyx_CyFunction_methods[] = { {0, 0, 0, 0} }; static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags, PyObject* qualname, - PyObject *closure, PyObject *module, PyObject* code) { + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type); if (op == NULL) return NULL; @@ -27319,6 +29287,8 @@ static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int f 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; @@ -27339,6 +29309,7 @@ __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) 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); @@ -27370,6 +29341,7 @@ static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, 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); @@ -27514,14 +29486,18 @@ static PyTypeObject __pyx_CyFunctionType_type = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif +#if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ +#endif }; static int __Pyx_CyFunction_init(void) { #if !CYTHON_COMPILING_IN_PYPY __pyx_CyFunctionType_type.tp_call = PyCFunction_Call; #endif - if (PyType_Ready(&__pyx_CyFunctionType_type) < 0) + __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type); + if (__pyx_CyFunctionType == NULL) { return -1; - __pyx_CyFunctionType = &__pyx_CyFunctionType_type; + } return 0; } static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) { @@ -27570,12 +29546,134 @@ static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObjec if (default_value == Py_None) default_value = NULL; value = PyObject_CallMethodObjArgs( - d, __pyx_n_s__get, key, default_value, NULL); + d, __pyx_n_s_get, key, default_value, NULL); } #endif return value; } +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 CYTHON_PEP393_ENABLED + if (unlikely(PyUnicode_READY(s1) < 0) || unlikely(PyUnicode_READY(s2) < 0)) + return -1; + #endif + 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, 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 +} + static double __Pyx__PyObject_AsDouble(PyObject* obj) { PyObject* float_value; #if CYTHON_COMPILING_IN_PYPY @@ -27615,63 +29713,6 @@ bad: return (double)-1; } -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 (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) - goto bad; - #endif - Py_INCREF(local_type); - Py_INCREF(local_value); - Py_INCREF(local_tb); - *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; - /* Make sure tstate is in a consistent state when we XDECREF - these objects (DECREF may run arbitrary code). */ - 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 int __Pyx_SetVtable(PyObject *dict, void *vtable) { #if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0) PyObject *ob = PyCapsule_New(vtable, 0, 0); @@ -27680,7 +29721,7 @@ static int __Pyx_SetVtable(PyObject *dict, void *vtable) { #endif if (!ob) goto bad; - if (PyDict_SetItem(dict, __pyx_n_s____pyx_vtable__, ob) < 0) + if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0) goto bad; Py_DECREF(ob); return 0; @@ -27691,7 +29732,7 @@ bad: static void* __Pyx_GetVtable(PyObject *dict) { void* ptr; - PyObject *ob = PyObject_GetItem(dict, __pyx_n_s____pyx_vtable__); + PyObject *ob = PyObject_GetItem(dict, __pyx_n_s_pyx_vtable); if (!ob) goto bad; #if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0) @@ -27708,843 +29749,772 @@ bad: return NULL; } -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); +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 - 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); + metaclass = &PyType_Type; #endif + } + Py_INCREF((PyObject*) metaclass); + return (PyObject*) metaclass; } -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_VERSION_HEX >= 0x02050000 - { - #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(); - } +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; } - level = 0; /* try absolute import on failure */ - } - #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 - } - } - #else - if (level>0) { - PyErr_SetString(PyExc_RuntimeError, "Relative import is not supported for Python <=2.4."); - goto bad; - } - module = PyObject_CallFunctionObjArgs(py_import, - name, global_dict, empty_dict, list, NULL); - #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_FindPy2Metaclass(PyObject *bases) { - PyObject *metaclass; -#if PY_MAJOR_VERSION < 3 - if (PyTuple_Check(bases) && PyTuple_GET_SIZE(bases) > 0) { - PyObject *base = PyTuple_GET_ITEM(bases, 0); - metaclass = __Pyx_PyObject_GetAttrStr(base, __pyx_n_s____class__); - if (!metaclass) { + ns = PyObject_Call(prep, pargs, mkw); + Py_DECREF(prep); + Py_DECREF(pargs); + } else { + if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError))) + return NULL; PyErr_Clear(); - metaclass = (PyObject*) Py_TYPE(base); + ns = PyDict_New(); } } else { - metaclass = (PyObject *) &PyClass_Type; + ns = PyDict_New(); } -#else - if (PyTuple_Check(bases) && PyTuple_GET_SIZE(bases) > 0) { - PyObject *base = PyTuple_GET_ITEM(bases, 0); - metaclass = (PyObject*) Py_TYPE(base); - } else { - metaclass = (PyObject *) &PyType_Type; - } -#endif - Py_INCREF(metaclass); - return metaclass; -} - -static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name, - PyObject *qualname, PyObject *modname) { - PyObject *result; - PyObject *metaclass; - if (PyDict_SetItem(dict, __pyx_n_s____module__, modname) < 0) + if (unlikely(!ns)) return NULL; - if (PyDict_SetItem(dict, __pyx_n_s____qualname__, qualname) < 0) - return NULL; - metaclass = PyDict_GetItem(dict, __pyx_n_s____metaclass__); - if (metaclass) { - Py_INCREF(metaclass); - } else { - metaclass = __Pyx_FindPy2Metaclass(bases); - } - result = PyObject_CallFunctionObjArgs(metaclass, name, bases, dict, NULL); - Py_DECREF(metaclass); - return result; -} - -static CYTHON_INLINE WordID __Pyx_PyInt_from_py_WordID(PyObject* x) { - const WordID neg_one = (WordID)-1, const_zero = (WordID)0; - const int is_unsigned = const_zero < neg_one; - if (sizeof(WordID) == sizeof(char)) { - if (is_unsigned) - return (WordID)__Pyx_PyInt_AsUnsignedChar(x); - else - return (WordID)__Pyx_PyInt_AsSignedChar(x); - } else if (sizeof(WordID) == sizeof(short)) { - if (is_unsigned) - return (WordID)__Pyx_PyInt_AsUnsignedShort(x); - else - return (WordID)__Pyx_PyInt_AsSignedShort(x); - } else if (sizeof(WordID) == sizeof(int)) { - if (is_unsigned) - return (WordID)__Pyx_PyInt_AsUnsignedInt(x); - else - return (WordID)__Pyx_PyInt_AsSignedInt(x); - } else if (sizeof(WordID) == sizeof(long)) { - if (is_unsigned) - return (WordID)__Pyx_PyInt_AsUnsignedLong(x); - else - return (WordID)__Pyx_PyInt_AsSignedLong(x); - } else if (sizeof(WordID) == sizeof(PY_LONG_LONG)) { - if (is_unsigned) - return (WordID)__Pyx_PyInt_AsUnsignedLongLong(x); - else - return (WordID)__Pyx_PyInt_AsSignedLongLong(x); - } else { - #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) - PyErr_SetString(PyExc_RuntimeError, - "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); - #else - WordID 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 (WordID)-1; - } -} - -static PyObject* __Pyx_Globals(void) { - Py_ssize_t i; - PyObject *names = NULL; - PyObject *globals = PyObject_GetAttr(__pyx_m, __pyx_n_s____dict__); - if (!globals) { - PyErr_SetString(PyExc_TypeError, - "current module must have __dict__ attribute"); - goto bad; - } - names = PyObject_Dir(__pyx_m); - if (!names) - goto bad; - for (i = PyList_GET_SIZE(names)-1; i >= 0; i--) { -#if CYTHON_COMPILING_IN_PYPY - PyObject* name = PySequence_GetItem(names, i); - if (!name) - goto bad; -#else - PyObject* name = PyList_GET_ITEM(names, i); -#endif - if (!PyDict_Contains(globals, name)) { - PyObject* value = PyObject_GetAttr(__pyx_m, name); - if (!value) { -#if CYTHON_COMPILING_IN_PYPY - Py_DECREF(name); -#endif - goto bad; - } - if (PyDict_SetItem(globals, name, value) < 0) { -#if CYTHON_COMPILING_IN_PYPY - Py_DECREF(name); -#endif - Py_DECREF(value); - goto bad; - } - } -#if CYTHON_COMPILING_IN_PYPY - Py_DECREF(name); -#endif - } - Py_DECREF(names); - return globals; + 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, doc) < 0)) goto bad; + return ns; bad: - Py_XDECREF(names); - Py_XDECREF(globals); + Py_DECREF(ns); return NULL; } - -static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) { - const unsigned char neg_one = (unsigned char)-1, const_zero = 0; - const int is_unsigned = neg_one > const_zero; - if (sizeof(unsigned char) < sizeof(long)) { - long val = __Pyx_PyInt_AsLong(x); - if (unlikely(val != (long)(unsigned char)val)) { - if (!unlikely(val == -1 && PyErr_Occurred())) { - PyErr_SetString(PyExc_OverflowError, - (is_unsigned && unlikely(val < 0)) ? - "can't convert negative value to unsigned char" : - "value too large to convert to unsigned char"); - } - return (unsigned char)-1; - } - return (unsigned char)val; - } - return (unsigned char)__Pyx_PyInt_AsUnsignedLong(x); -} - -static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) { - const unsigned short neg_one = (unsigned short)-1, const_zero = 0; - const int is_unsigned = neg_one > const_zero; - if (sizeof(unsigned short) < sizeof(long)) { - long val = __Pyx_PyInt_AsLong(x); - if (unlikely(val != (long)(unsigned short)val)) { - if (!unlikely(val == -1 && PyErr_Occurred())) { - PyErr_SetString(PyExc_OverflowError, - (is_unsigned && unlikely(val < 0)) ? - "can't convert negative value to unsigned short" : - "value too large to convert to unsigned short"); - } - return (unsigned short)-1; - } - return (unsigned short)val; - } - return (unsigned short)__Pyx_PyInt_AsUnsignedLong(x); -} - -static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) { - const unsigned int neg_one = (unsigned int)-1, const_zero = 0; - const int is_unsigned = neg_one > const_zero; - if (sizeof(unsigned int) < sizeof(long)) { - long val = __Pyx_PyInt_AsLong(x); - if (unlikely(val != (long)(unsigned int)val)) { - if (!unlikely(val == -1 && PyErr_Occurred())) { - PyErr_SetString(PyExc_OverflowError, - (is_unsigned && unlikely(val < 0)) ? - "can't convert negative value to unsigned int" : - "value too large to convert to unsigned int"); - } - return (unsigned int)-1; - } - return (unsigned int)val; - } - return (unsigned int)__Pyx_PyInt_AsUnsignedLong(x); -} - -static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject* x) { - const char neg_one = (char)-1, const_zero = 0; - const int is_unsigned = neg_one > const_zero; - if (sizeof(char) < sizeof(long)) { - long val = __Pyx_PyInt_AsLong(x); - if (unlikely(val != (long)(char)val)) { - if (!unlikely(val == -1 && PyErr_Occurred())) { - PyErr_SetString(PyExc_OverflowError, - (is_unsigned && unlikely(val < 0)) ? - "can't convert negative value to char" : - "value too large to convert to char"); - } - return (char)-1; +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; } - return (char)val; } - return (char)__Pyx_PyInt_AsLong(x); -} - -static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject* x) { - const short neg_one = (short)-1, const_zero = 0; - const int is_unsigned = neg_one > const_zero; - if (sizeof(short) < sizeof(long)) { - long val = __Pyx_PyInt_AsLong(x); - if (unlikely(val != (long)(short)val)) { - if (!unlikely(val == -1 && PyErr_Occurred())) { - PyErr_SetString(PyExc_OverflowError, - (is_unsigned && unlikely(val < 0)) ? - "can't convert negative value to short" : - "value too large to convert to short"); - } - return (short)-1; - } - return (short)val; + 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; } - return (short)__Pyx_PyInt_AsLong(x); -} - -static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject* x) { - const int neg_one = (int)-1, const_zero = 0; - const int is_unsigned = neg_one > const_zero; - if (sizeof(int) < sizeof(long)) { - long val = __Pyx_PyInt_AsLong(x); - if (unlikely(val != (long)(int)val)) { - if (!unlikely(val == -1 && PyErr_Occurred())) { - PyErr_SetString(PyExc_OverflowError, - (is_unsigned && unlikely(val < 0)) ? - "can't convert negative value to int" : - "value too large to convert to int"); - } - return (int)-1; - } - return (int)val; + margs = PyTuple_Pack(3, name, bases, dict); + if (unlikely(!margs)) { + result = NULL; + } else { + result = PyObject_Call(metaclass, margs, mkw); + Py_DECREF(margs); } - return (int)__Pyx_PyInt_AsLong(x); + Py_XDECREF(owned_metaclass); + return result; } -static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) { - const signed char neg_one = (signed char)-1, const_zero = 0; +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_int(unsigned int value) { + const unsigned int neg_one = (unsigned int) -1, const_zero = 0; const int is_unsigned = neg_one > const_zero; - if (sizeof(signed char) < sizeof(long)) { - long val = __Pyx_PyInt_AsLong(x); - if (unlikely(val != (long)(signed char)val)) { - if (!unlikely(val == -1 && PyErr_Occurred())) { - PyErr_SetString(PyExc_OverflowError, - (is_unsigned && unlikely(val < 0)) ? - "can't convert negative value to signed char" : - "value too large to convert to signed char"); - } - return (signed char)-1; + if (is_unsigned) { + if (sizeof(unsigned int) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(unsigned int) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); + } else if (sizeof(unsigned int) <= sizeof(unsigned long long)) { + return PyLong_FromUnsignedLongLong((unsigned long long) value); } - return (signed char)val; - } - return (signed char)__Pyx_PyInt_AsSignedLong(x); -} - -static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) { - const signed short neg_one = (signed short)-1, const_zero = 0; - const int is_unsigned = neg_one > const_zero; - if (sizeof(signed short) < sizeof(long)) { - long val = __Pyx_PyInt_AsLong(x); - if (unlikely(val != (long)(signed short)val)) { - if (!unlikely(val == -1 && PyErr_Occurred())) { - PyErr_SetString(PyExc_OverflowError, - (is_unsigned && unlikely(val < 0)) ? - "can't convert negative value to signed short" : - "value too large to convert to signed short"); - } - return (signed short)-1; + } else { + if (sizeof(unsigned int) <= sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(unsigned int) <= sizeof(long long)) { + return PyLong_FromLongLong((long long) value); } - return (signed short)val; } - return (signed short)__Pyx_PyInt_AsSignedLong(x); -} - -static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) { - const signed int neg_one = (signed int)-1, const_zero = 0; - const int is_unsigned = neg_one > const_zero; - if (sizeof(signed int) < sizeof(long)) { - long val = __Pyx_PyInt_AsLong(x); - if (unlikely(val != (long)(signed int)val)) { - if (!unlikely(val == -1 && PyErr_Occurred())) { - PyErr_SetString(PyExc_OverflowError, - (is_unsigned && unlikely(val < 0)) ? - "can't convert negative value to signed int" : - "value too large to convert to signed int"); - } - return (signed int)-1; - } - return (signed int)val; + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(unsigned int), + little, !is_unsigned); } - return (signed int)__Pyx_PyInt_AsSignedLong(x); } -static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject* x) { - const int neg_one = (int)-1, const_zero = 0; - const int is_unsigned = neg_one > const_zero; - if (sizeof(int) < sizeof(long)) { - long val = __Pyx_PyInt_AsLong(x); - if (unlikely(val != (long)(int)val)) { - if (!unlikely(val == -1 && PyErr_Occurred())) { - PyErr_SetString(PyExc_OverflowError, - (is_unsigned && unlikely(val < 0)) ? - "can't convert negative value to int" : - "value too large to convert to int"); - } - return (int)-1; - } - return (int)val; +#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func) \ + { \ + func_type value = func(x); \ + if (sizeof(target_type) < sizeof(func_type)) { \ + if (unlikely(value != (func_type) (target_type) value)) { \ + func_type zero = 0; \ + PyErr_SetString(PyExc_OverflowError, \ + (is_unsigned && unlikely(value < zero)) ? \ + "can't convert negative value to " #target_type : \ + "value too large to convert to " #target_type); \ + return (target_type) -1; \ + } \ + } \ + return (target_type) value; \ } - return (int)__Pyx_PyInt_AsLong(x); -} #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 -#if CYTHON_USE_PYLONG_INTERNALS -#include "longintrepr.h" -#endif + #if CYTHON_USE_PYLONG_INTERNALS + #include "longintrepr.h" + #endif #endif -static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) { - const unsigned long neg_one = (unsigned long)-1, const_zero = 0; +static CYTHON_INLINE unsigned int __Pyx_PyInt_As_unsigned_int(PyObject *x) { + const unsigned int neg_one = (unsigned int) -1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { - long val = PyInt_AS_LONG(x); - if (is_unsigned && unlikely(val < 0)) { - PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to unsigned long"); - return (unsigned long)-1; - } - return (unsigned long)val; - } else -#endif - if (likely(PyLong_Check(x))) { - if (is_unsigned) { -#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 -#if CYTHON_USE_PYLONG_INTERNALS - if (sizeof(digit) <= sizeof(unsigned long)) { - switch (Py_SIZE(x)) { - case 0: return 0; - case 1: return (unsigned long) ((PyLongObject*)x)->ob_digit[0]; - } - } -#endif -#endif - if (unlikely(Py_SIZE(x) < 0)) { - PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to unsigned long"); - return (unsigned long)-1; - } - return (unsigned long)PyLong_AsUnsignedLong(x); + if (sizeof(unsigned int) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(unsigned int, long, PyInt_AS_LONG) } else { -#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 -#if CYTHON_USE_PYLONG_INTERNALS - if (sizeof(digit) <= sizeof(unsigned long)) { - switch (Py_SIZE(x)) { - case 0: return 0; - case 1: return +(unsigned long) ((PyLongObject*)x)->ob_digit[0]; - case -1: return -(unsigned long) ((PyLongObject*)x)->ob_digit[0]; - } - } -#endif -#endif - return (unsigned long)PyLong_AsLong(x); - } - } else { - unsigned long val; - PyObject *tmp = __Pyx_PyNumber_Int(x); - if (!tmp) return (unsigned long)-1; - val = __Pyx_PyInt_AsUnsignedLong(tmp); - Py_DECREF(tmp); - return val; - } -} - -#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 -#if CYTHON_USE_PYLONG_INTERNALS -#include "longintrepr.h" -#endif -#endif -static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) { - const unsigned PY_LONG_LONG neg_one = (unsigned PY_LONG_LONG)-1, const_zero = 0; - const int is_unsigned = neg_one > const_zero; -#if PY_MAJOR_VERSION < 3 - if (likely(PyInt_Check(x))) { - long val = PyInt_AS_LONG(x); - if (is_unsigned && unlikely(val < 0)) { - PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to unsigned PY_LONG_LONG"); - return (unsigned PY_LONG_LONG)-1; - } - return (unsigned PY_LONG_LONG)val; - } else -#endif - if (likely(PyLong_Check(x))) { - if (is_unsigned) { -#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 -#if CYTHON_USE_PYLONG_INTERNALS - if (sizeof(digit) <= sizeof(unsigned PY_LONG_LONG)) { - switch (Py_SIZE(x)) { - case 0: return 0; - case 1: return (unsigned PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; - } - } -#endif -#endif - if (unlikely(Py_SIZE(x) < 0)) { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to unsigned PY_LONG_LONG"); - return (unsigned PY_LONG_LONG)-1; + "can't convert negative value to unsigned int"); + return (unsigned int) -1; } - return (unsigned PY_LONG_LONG)PyLong_AsUnsignedLongLong(x); - } else { -#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 -#if CYTHON_USE_PYLONG_INTERNALS - if (sizeof(digit) <= sizeof(unsigned PY_LONG_LONG)) { - switch (Py_SIZE(x)) { - case 0: return 0; - case 1: return +(unsigned PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; - case -1: return -(unsigned PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; - } - } -#endif -#endif - return (unsigned PY_LONG_LONG)PyLong_AsLongLong(x); - } - } else { - unsigned PY_LONG_LONG val; - PyObject *tmp = __Pyx_PyNumber_Int(x); - if (!tmp) return (unsigned PY_LONG_LONG)-1; - val = __Pyx_PyInt_AsUnsignedLongLong(tmp); - Py_DECREF(tmp); - return val; - } -} - -#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 -#if CYTHON_USE_PYLONG_INTERNALS -#include "longintrepr.h" -#endif -#endif -static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) { - const long neg_one = (long)-1, const_zero = 0; - const int is_unsigned = neg_one > const_zero; -#if PY_MAJOR_VERSION < 3 - if (likely(PyInt_Check(x))) { - long val = PyInt_AS_LONG(x); - if (is_unsigned && unlikely(val < 0)) { - PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to long"); - return (long)-1; + return (unsigned int) val; } - return (long)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 -#if CYTHON_USE_PYLONG_INTERNALS - if (sizeof(digit) <= sizeof(long)) { + #if CYTHON_USE_PYLONG_INTERNALS + if (sizeof(digit) <= sizeof(unsigned int)) { switch (Py_SIZE(x)) { case 0: return 0; - case 1: return (long) ((PyLongObject*)x)->ob_digit[0]; + case 1: return (unsigned int) ((PyLongObject*)x)->ob_digit[0]; } } -#endif + #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to long"); - return (long)-1; + "can't convert negative value to unsigned int"); + return (unsigned int) -1; + } + if (sizeof(unsigned int) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, PyLong_AsUnsignedLong) + } else if (sizeof(unsigned int) <= sizeof(unsigned long long)) { + __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long long, PyLong_AsUnsignedLongLong) } - return (long)PyLong_AsUnsignedLong(x); } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 -#if CYTHON_USE_PYLONG_INTERNALS - if (sizeof(digit) <= sizeof(long)) { + #if CYTHON_USE_PYLONG_INTERNALS + if (sizeof(digit) <= sizeof(unsigned int)) { switch (Py_SIZE(x)) { case 0: return 0; - case 1: return +(long) ((PyLongObject*)x)->ob_digit[0]; - case -1: return -(long) ((PyLongObject*)x)->ob_digit[0]; + case 1: return +(unsigned int) ((PyLongObject*)x)->ob_digit[0]; + case -1: return -(unsigned int) ((PyLongObject*)x)->ob_digit[0]; } } + #endif #endif + if (sizeof(unsigned int) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT(unsigned int, long, PyLong_AsLong) + } else if (sizeof(unsigned int) <= sizeof(long long)) { + __PYX_VERIFY_RETURN_INT(unsigned int, long long, PyLong_AsLongLong) + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + unsigned 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 (long)PyLong_AsLong(x); + return (unsigned int) -1; } } else { - long val; + unsigned int val; PyObject *tmp = __Pyx_PyNumber_Int(x); - if (!tmp) return (long)-1; - val = __Pyx_PyInt_AsLong(tmp); + if (!tmp) return (unsigned int) -1; + val = __Pyx_PyInt_As_unsigned_int(tmp); Py_DECREF(tmp); return val; } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 -#if CYTHON_USE_PYLONG_INTERNALS -#include "longintrepr.h" -#endif + #if CYTHON_USE_PYLONG_INTERNALS + #include "longintrepr.h" + #endif #endif -static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) { - const PY_LONG_LONG neg_one = (PY_LONG_LONG)-1, const_zero = 0; +static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { + const int neg_one = (int) -1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { - long val = PyInt_AS_LONG(x); - if (is_unsigned && unlikely(val < 0)) { - PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to PY_LONG_LONG"); - return (PY_LONG_LONG)-1; + if (sizeof(int) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int"); + return (int) -1; + } + return (int) val; } - return (PY_LONG_LONG)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 -#if CYTHON_USE_PYLONG_INTERNALS - if (sizeof(digit) <= sizeof(PY_LONG_LONG)) { + #if CYTHON_USE_PYLONG_INTERNALS + if (sizeof(digit) <= sizeof(int)) { switch (Py_SIZE(x)) { case 0: return 0; - case 1: return (PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; + case 1: return (int) ((PyLongObject*)x)->ob_digit[0]; } } -#endif + #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to PY_LONG_LONG"); - return (PY_LONG_LONG)-1; + "can't convert negative value to int"); + return (int) -1; + } + if (sizeof(int) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, PyLong_AsUnsignedLong) + } else if (sizeof(int) <= sizeof(unsigned long long)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long long, PyLong_AsUnsignedLongLong) } - return (PY_LONG_LONG)PyLong_AsUnsignedLongLong(x); } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 -#if CYTHON_USE_PYLONG_INTERNALS - if (sizeof(digit) <= sizeof(PY_LONG_LONG)) { + #if CYTHON_USE_PYLONG_INTERNALS + if (sizeof(digit) <= sizeof(int)) { switch (Py_SIZE(x)) { case 0: return 0; - case 1: return +(PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; - case -1: return -(PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; + case 1: return +(int) ((PyLongObject*)x)->ob_digit[0]; + case -1: return -(int) ((PyLongObject*)x)->ob_digit[0]; } } + #endif #endif + if (sizeof(int) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT(int, long, PyLong_AsLong) + } else if (sizeof(int) <= sizeof(long long)) { + __PYX_VERIFY_RETURN_INT(int, long long, PyLong_AsLongLong) + } + } + { +#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 (PY_LONG_LONG)PyLong_AsLongLong(x); + return (int) -1; } } else { - PY_LONG_LONG val; + int val; PyObject *tmp = __Pyx_PyNumber_Int(x); - if (!tmp) return (PY_LONG_LONG)-1; - val = __Pyx_PyInt_AsLongLong(tmp); + if (!tmp) return (int) -1; + val = __Pyx_PyInt_As_int(tmp); Py_DECREF(tmp); return val; } } +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_VERSION_HEX >= 0x02050000 + { + #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; /* try absolute import on failure */ + } + #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 + } + } + #else + if (level>0) { + PyErr_SetString(PyExc_RuntimeError, "Relative import is not supported for Python <=2.4."); + goto bad; + } + module = PyObject_CallFunctionObjArgs(py_import, + name, global_dict, empty_dict, list, NULL); + #endif +bad: + #if PY_VERSION_HEX < 0x03030000 + Py_XDECREF(py_import); + #endif + Py_XDECREF(empty_list); + Py_XDECREF(empty_dict); + return module; +} + +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { + const int neg_one = (int) -1, const_zero = 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 long long)) { + return PyLong_FromUnsignedLongLong((unsigned long long) value); + } + } else { + if (sizeof(int) <= sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(int) <= sizeof(long long)) { + return PyLong_FromLongLong((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 CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { + const long neg_one = (long) -1, const_zero = 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 long long)) { + return PyLong_FromUnsignedLongLong((unsigned long long) value); + } + } else { + if (sizeof(long) <= sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(long) <= sizeof(long long)) { + return PyLong_FromLongLong((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_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 -#if CYTHON_USE_PYLONG_INTERNALS -#include "longintrepr.h" + #if CYTHON_USE_PYLONG_INTERNALS + #include "longintrepr.h" + #endif #endif -#endif -static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) { - const signed long neg_one = (signed long)-1, const_zero = 0; +static CYTHON_INLINE WordID __Pyx_PyInt_As_WordID(PyObject *x) { + const WordID neg_one = (WordID) -1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { - long val = PyInt_AS_LONG(x); - if (is_unsigned && unlikely(val < 0)) { - PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to signed long"); - return (signed long)-1; + if (sizeof(WordID) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(WordID, long, PyInt_AS_LONG) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to WordID"); + return (WordID) -1; + } + return (WordID) val; } - return (signed long)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 -#if CYTHON_USE_PYLONG_INTERNALS - if (sizeof(digit) <= sizeof(signed long)) { + #if CYTHON_USE_PYLONG_INTERNALS + if (sizeof(digit) <= sizeof(WordID)) { switch (Py_SIZE(x)) { case 0: return 0; - case 1: return (signed long) ((PyLongObject*)x)->ob_digit[0]; + case 1: return (WordID) ((PyLongObject*)x)->ob_digit[0]; } } -#endif + #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to signed long"); - return (signed long)-1; + "can't convert negative value to WordID"); + return (WordID) -1; + } + if (sizeof(WordID) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT(WordID, unsigned long, PyLong_AsUnsignedLong) + } else if (sizeof(WordID) <= sizeof(unsigned long long)) { + __PYX_VERIFY_RETURN_INT(WordID, unsigned long long, PyLong_AsUnsignedLongLong) } - return (signed long)PyLong_AsUnsignedLong(x); } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 -#if CYTHON_USE_PYLONG_INTERNALS - if (sizeof(digit) <= sizeof(signed long)) { + #if CYTHON_USE_PYLONG_INTERNALS + if (sizeof(digit) <= sizeof(WordID)) { switch (Py_SIZE(x)) { case 0: return 0; - case 1: return +(signed long) ((PyLongObject*)x)->ob_digit[0]; - case -1: return -(signed long) ((PyLongObject*)x)->ob_digit[0]; + case 1: return +(WordID) ((PyLongObject*)x)->ob_digit[0]; + case -1: return -(WordID) ((PyLongObject*)x)->ob_digit[0]; } } + #endif #endif + if (sizeof(WordID) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT(WordID, long, PyLong_AsLong) + } else if (sizeof(WordID) <= sizeof(long long)) { + __PYX_VERIFY_RETURN_INT(WordID, long long, PyLong_AsLongLong) + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + WordID 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 (signed long)PyLong_AsLong(x); + return (WordID) -1; } } else { - signed long val; + WordID val; PyObject *tmp = __Pyx_PyNumber_Int(x); - if (!tmp) return (signed long)-1; - val = __Pyx_PyInt_AsSignedLong(tmp); + if (!tmp) return (WordID) -1; + val = __Pyx_PyInt_As_WordID(tmp); Py_DECREF(tmp); return val; } } -#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 -#if CYTHON_USE_PYLONG_INTERNALS -#include "longintrepr.h" +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_short(short value) { + const short neg_one = (short) -1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(short) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(short) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); + } else if (sizeof(short) <= sizeof(unsigned long long)) { + return PyLong_FromUnsignedLongLong((unsigned long long) value); + } + } else { + if (sizeof(short) <= sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(short) <= sizeof(long long)) { + return PyLong_FromLongLong((long long) value); + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(short), + little, !is_unsigned); + } +} + +static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) { +#if CYTHON_COMPILING_IN_CPYTHON +#if PY_MAJOR_VERSION >= 3 + if (likely(PyUnicode_Check(n))) +#else + if (likely(PyString_Check(n))) +#endif + return __Pyx_PyObject_GetAttrStr(o, n); +#endif + return PyObject_GetAttr(o, n); +} + +static PyObject* __Pyx_Globals(void) { + Py_ssize_t i; + PyObject *names = NULL; + PyObject *globals = PyObject_GetAttr(__pyx_m, __pyx_n_s_dict); + if (!globals) { + PyErr_SetString(PyExc_TypeError, + "current module must have __dict__ attribute"); + goto bad; + } + names = PyObject_Dir(__pyx_m); + if (!names) + goto bad; + for (i = PyList_GET_SIZE(names)-1; i >= 0; i--) { +#if CYTHON_COMPILING_IN_PYPY + PyObject* name = PySequence_GetItem(names, i); + if (!name) + goto bad; +#else + PyObject* name = PyList_GET_ITEM(names, i); +#endif + if (!PyDict_Contains(globals, name)) { + PyObject* value = __Pyx_GetAttr(__pyx_m, name); + if (!value) { +#if CYTHON_COMPILING_IN_PYPY + Py_DECREF(name); +#endif + goto bad; + } + if (PyDict_SetItem(globals, name, value) < 0) { +#if CYTHON_COMPILING_IN_PYPY + Py_DECREF(name); +#endif + Py_DECREF(value); + goto bad; + } + } +#if CYTHON_COMPILING_IN_PYPY + Py_DECREF(name); #endif + } + Py_DECREF(names); + return globals; +bad: + Py_XDECREF(names); + Py_XDECREF(globals); + return NULL; +} + +#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 + #if CYTHON_USE_PYLONG_INTERNALS + #include "longintrepr.h" + #endif #endif -static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) { - const signed PY_LONG_LONG neg_one = (signed PY_LONG_LONG)-1, const_zero = 0; +static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { + const long neg_one = (long) -1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { - long val = PyInt_AS_LONG(x); - if (is_unsigned && unlikely(val < 0)) { - PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to signed PY_LONG_LONG"); - return (signed PY_LONG_LONG)-1; + if (sizeof(long) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to long"); + return (long) -1; + } + return (long) val; } - return (signed PY_LONG_LONG)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 -#if CYTHON_USE_PYLONG_INTERNALS - if (sizeof(digit) <= sizeof(signed PY_LONG_LONG)) { + #if CYTHON_USE_PYLONG_INTERNALS + if (sizeof(digit) <= sizeof(long)) { switch (Py_SIZE(x)) { case 0: return 0; - case 1: return (signed PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; + case 1: return (long) ((PyLongObject*)x)->ob_digit[0]; } } -#endif + #endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to signed PY_LONG_LONG"); - return (signed PY_LONG_LONG)-1; + "can't convert negative value to long"); + return (long) -1; + } + if (sizeof(long) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, PyLong_AsUnsignedLong) + } else if (sizeof(long) <= sizeof(unsigned long long)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long long, PyLong_AsUnsignedLongLong) } - return (signed PY_LONG_LONG)PyLong_AsUnsignedLongLong(x); } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 -#if CYTHON_USE_PYLONG_INTERNALS - if (sizeof(digit) <= sizeof(signed PY_LONG_LONG)) { + #if CYTHON_USE_PYLONG_INTERNALS + if (sizeof(digit) <= sizeof(long)) { switch (Py_SIZE(x)) { case 0: return 0; - case 1: return +(signed PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; - case -1: return -(signed PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; + case 1: return +(long) ((PyLongObject*)x)->ob_digit[0]; + case -1: return -(long) ((PyLongObject*)x)->ob_digit[0]; } } + #endif #endif + if (sizeof(long) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT(long, long, PyLong_AsLong) + } else if (sizeof(long) <= sizeof(long long)) { + __PYX_VERIFY_RETURN_INT(long, long long, PyLong_AsLongLong) + } + } + { +#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 (signed PY_LONG_LONG)PyLong_AsLongLong(x); + return (long) -1; } } else { - signed PY_LONG_LONG val; + long val; PyObject *tmp = __Pyx_PyNumber_Int(x); - if (!tmp) return (signed PY_LONG_LONG)-1; - val = __Pyx_PyInt_AsSignedLongLong(tmp); + if (!tmp) return (long) -1; + val = __Pyx_PyInt_As_long(tmp); Py_DECREF(tmp); return val; } } -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_Generator_Next(PyObject *self); static PyObject *__Pyx_Generator_Send(PyObject *self, PyObject *value); static PyObject *__Pyx_Generator_Close(PyObject *self); @@ -28594,7 +30564,7 @@ static int __Pyx_PyGen_FetchStopIterationValue(PyObject **pvalue) { Py_DECREF(ev); #else { - PyObject* args = PyObject_GetAttr(ev, __pyx_n_s__args); + PyObject* args = PyObject_GetAttr(ev, __pyx_n_s_args); Py_DECREF(ev); if (likely(args)) { value = PyObject_GetItem(args, 0); @@ -28730,7 +30700,7 @@ static PyObject *__Pyx_Generator_Send(PyObject *self, PyObject *value) { if (value == Py_None) ret = PyIter_Next(yf); else - ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s__send, value); + ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value); } gen->is_running = 0; if (likely(ret)) { @@ -28750,7 +30720,7 @@ static int __Pyx_Generator_CloseIter(__pyx_GeneratorObject *gen, PyObject *yf) { } else { PyObject *meth; gen->is_running = 1; - meth = PyObject_GetAttr(yf, __pyx_n_s__close); + meth = PyObject_GetAttr(yf, __pyx_n_s_close); if (unlikely(!meth)) { if (!PyErr_ExceptionMatches(PyExc_AttributeError)) { PyErr_WriteUnraisable(yf); @@ -28835,7 +30805,7 @@ static PyObject *__Pyx_Generator_Throw(PyObject *self, PyObject *args) { if (__Pyx_Generator_CheckExact(yf)) { ret = __Pyx_Generator_Throw(yf, args); } else { - PyObject *meth = PyObject_GetAttr(yf, __pyx_n_s__throw); + PyObject *meth = PyObject_GetAttr(yf, __pyx_n_s_throw); if (unlikely(!meth)) { Py_DECREF(yf); if (!PyErr_ExceptionMatches(PyExc_AttributeError)) { @@ -28886,13 +30856,17 @@ static void __Pyx_Generator_dealloc(PyObject *self) { PyObject_GC_UnTrack(gen); if (gen->gi_weakreflist != NULL) PyObject_ClearWeakRefs(self); - PyObject_GC_Track(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; /* resurrected. :( */ + PyObject_GC_UnTrack(self); } - PyObject_GC_UnTrack(self); __Pyx_Generator_clear(self); PyObject_GC_Del(gen); } @@ -28902,8 +30876,10 @@ static void __Pyx_Generator_del(PyObject *self) { __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) 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_Generator_Close(self); if (res == NULL) @@ -28911,6 +30887,7 @@ static void __Pyx_Generator_del(PyObject *self) { else Py_DECREF(res); __Pyx_ErrRestore(error_type, error_value, error_traceback); +#if PY_VERSION_HEX < 0x030400a1 /* Undo the temporary resurrection; can't use DECREF here, it would * cause a recursive call. */ @@ -28942,6 +30919,7 @@ static void __Pyx_Generator_del(PyObject *self) { --Py_TYPE(self)->tp_frees; --Py_TYPE(self)->tp_allocs; #endif +#endif } static PyMemberDef __pyx_Generator_memberlist[] = { {(char *) "gi_running", @@ -28985,7 +30963,7 @@ static PyTypeObject __pyx_GeneratorType_type = { 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags*/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE, /* tp_flags*/ 0, /*tp_doc*/ (traverseproc) __Pyx_Generator_traverse, /*tp_traverse*/ 0, /*tp_clear*/ @@ -29011,10 +30989,17 @@ static PyTypeObject __pyx_GeneratorType_type = { 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ +#if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_del*/ +#else __Pyx_Generator_del, /*tp_del*/ +#endif #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif +#if PY_VERSION_HEX >= 0x030400a1 + __Pyx_Generator_del, /*tp_finalize*/ +#endif }; static __pyx_GeneratorObject *__Pyx_Generator_New(__pyx_generator_body_t body, PyObject *closure) { @@ -29039,10 +31024,10 @@ static __pyx_GeneratorObject *__Pyx_Generator_New(__pyx_generator_body_t body, static int __pyx_Generator_init(void) { __pyx_GeneratorType_type.tp_getattro = PyObject_GenericGetAttr; __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter; - if (PyType_Ready(&__pyx_GeneratorType_type)) { + __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type); + if (__pyx_GeneratorType == NULL) { return -1; } - __pyx_GeneratorType = &__pyx_GeneratorType_type; return 0; } @@ -29110,7 +31095,7 @@ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class goto bad; if (!PyType_Check(result)) { PyErr_Format(PyExc_TypeError, - "%s.%s is not a type object", + "%.200s.%.200s is not a type object", module_name, class_name); goto bad; } @@ -29138,7 +31123,7 @@ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class } else if ((size_t)basicsize != size) { PyErr_Format(PyExc_ValueError, - "%s.%s has the wrong size, try recompiling", + "%.200s.%.200s has the wrong size, try recompiling", module_name, class_name); goto bad; } @@ -29165,14 +31150,14 @@ static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (** cobj = PyDict_GetItemString(d, funcname); if (!cobj) { PyErr_Format(PyExc_ImportError, - "%s does not export expected C function %s", + "%.200s does not export expected C function %.200s", PyModule_GetName(module), funcname); goto bad; } #if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3 && PY_MINOR_VERSION==0) if (!PyCapsule_IsValid(cobj, sig)) { PyErr_Format(PyExc_TypeError, - "C function %s.%s has wrong signature (expected %s, got %s)", + "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)", PyModule_GetName(module), funcname, sig, PyCapsule_GetName(cobj)); goto bad; } @@ -29186,7 +31171,7 @@ static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (** while (*s1 != '\0' && *s1 == *s2) { s1++; s2++; } if (*s1 != *s2) { PyErr_Format(PyExc_TypeError, - "C function %s.%s has wrong signature (expected %s, got %s)", + "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)", PyModule_GetName(module), funcname, sig, desc); goto bad; } @@ -29444,10 +31429,18 @@ static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_ #endif /* PY_VERSION_HEX < 0x03030000 */ } else #endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT */ +#if !CYTHON_COMPILING_IN_PYPY +#if PY_VERSION_HEX >= 0x02060000 + if (PyByteArray_Check(o)) { + *length = PyByteArray_GET_SIZE(o); + return PyByteArray_AS_STRING(o); + } else +#endif +#endif { char* result; int r = PyBytes_AsStringAndSize(o, &result, length); - if (r < 0) { + if (unlikely(r < 0)) { return NULL; } else { return result; @@ -29492,7 +31485,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) { if (!PyLong_Check(res)) { #endif PyErr_Format(PyExc_TypeError, - "__%s__ returned non-%s (type %.200s)", + "__%.4s__ returned non-%.4s (type %.200s)", name, name, Py_TYPE(res)->tp_name); Py_DECREF(res); return NULL; @@ -29504,9 +31497,35 @@ static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) { } return res; } +#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 + #if CYTHON_USE_PYLONG_INTERNALS + #include "longintrepr.h" + #endif +#endif static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { Py_ssize_t ival; - PyObject* x = PyNumber_Index(b); + PyObject *x; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_CheckExact(b))) + return PyInt_AS_LONG(b); +#endif + if (likely(PyLong_CheckExact(b))) { + #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 + #if CYTHON_USE_PYLONG_INTERNALS + switch (Py_SIZE(b)) { + case -1: return -(sdigit)((PyLongObject*)b)->ob_digit[0]; + case 0: return 0; + case 1: return ((PyLongObject*)b)->ob_digit[0]; + } + #endif + #endif + #if PY_VERSION_HEX < 0x02060000 + return PyInt_AsSsize_t(b); + #else + return PyLong_AsSsize_t(b); + #endif + } + x = PyNumber_Index(b); if (!x) return -1; ival = PyInt_AsSsize_t(x); Py_DECREF(x); @@ -29525,16 +31544,6 @@ static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { return PyInt_FromSize_t(ival); #endif } -static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) { - unsigned PY_LONG_LONG val = __Pyx_PyInt_AsUnsignedLongLong(x); - if (unlikely(val != (unsigned PY_LONG_LONG)(size_t)val)) { - if ((val != (unsigned PY_LONG_LONG)-1) || !PyErr_Occurred()) - PyErr_SetString(PyExc_OverflowError, - "value too large to convert to size_t"); - return (size_t)-1; - } - return (size_t)val; -} #endif /* Py_PYTHON_H */ diff --git a/python/cdec/grammar.pxd b/python/cdec/grammar.pxd index 0ffe80fa..3607a544 100644 --- a/python/cdec/grammar.pxd +++ b/python/cdec/grammar.pxd @@ -16,6 +16,7 @@ cdef extern from "decoder/trule.h": FastSparseVector[weight_t] scores_ WordID lhs_ int arity_ + bint ReadFromString(string& line, bint monolingual) bint IsUnary() bint IsGoal() void ComputeArity() diff --git a/python/cdec/grammar.pxi b/python/cdec/grammar.pxi index d523e4d2..b78c86ff 100644 --- a/python/cdec/grammar.pxi +++ b/python/cdec/grammar.pxi @@ -49,7 +49,7 @@ cdef TRule convert_rule(_sa.Rule rule): cdef class TRule: cdef shared_ptr[grammar.TRule]* rule - def __init__(self, lhs, f, e, scores, a=None): + def __init__(self, lhs, f, e, scores, a=None, text=None): """TRule(lhs, f, e, scores, a=None) -> Translation rule. lhs: left hand side non-terminal f: source phrase (list of words/NT) @@ -57,12 +57,18 @@ cdef class TRule: scores: dictionary of feature scores a: optional list of alignment points""" self.rule = new shared_ptr[grammar.TRule](new grammar.TRule()) - self.lhs = lhs - self.e = e - self.f = f - self.scores = scores + if lhs: + self.lhs = lhs + if e: + self.e = e + if f: + self.f = f + if scores: + self.scores = scores if a: - self.a = a + self.a = a + if text: + self.rule.get().ReadFromString(text, 0) self.rule.get().ComputeArity() def __dealloc__(self): diff --git a/python/cdec/sa/_sa.cpp b/python/cdec/sa/_sa.cpp index 4c01ee79..d02eed3d 100644 --- a/python/cdec/sa/_sa.cpp +++ b/python/cdec/sa/_sa.cpp @@ -1,4 +1,4 @@ -/* Generated by Cython 0.20.1 on Tue Mar 11 15:39:27 2014 */ +/* Generated by Cython 0.20.1 on Mon Apr 7 01:29:27 2014 */ #define PY_SSIZE_T_CLEAN #ifndef CYTHON_USE_PYLONG_INTERNALS @@ -612,7 +612,7 @@ struct __pyx_t_4cdec_2sa_3_sa__Trie_Node; struct __pyx_t_4cdec_2sa_3_sa_match_node; struct __pyx_t_4cdec_2sa_3_sa_Matching; -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":9 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":9 * from libc.string cimport memset, strcpy * * cdef struct _node: # <<<<<<<<<<<<<< @@ -626,7 +626,7 @@ struct __pyx_t_4cdec_2sa_3_sa__node { int val; }; -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":30 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":30 * _init_lower_mask() * * cdef struct _BitSet: # <<<<<<<<<<<<<< @@ -640,7 +640,7 @@ struct __pyx_t_4cdec_2sa_3_sa__BitSet { int size; }; -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":168 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":168 * return result * * cdef struct _VEB: # <<<<<<<<<<<<<< @@ -657,7 +657,7 @@ struct __pyx_t_4cdec_2sa_3_sa__VEB { void **bottom; }; -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":10 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":10 * cdef struct _Trie_Node # forward decl * * cdef struct _Trie_Edge: # <<<<<<<<<<<<<< @@ -671,7 +671,7 @@ struct __pyx_t_4cdec_2sa_3_sa__Trie_Edge { struct __pyx_t_4cdec_2sa_3_sa__Trie_Edge *smaller; }; -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":8 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":8 * from libc.string cimport memset, memcpy * * cdef struct _Trie_Node # forward decl # <<<<<<<<<<<<<< @@ -684,7 +684,7 @@ struct __pyx_t_4cdec_2sa_3_sa__Trie_Node { int arr_len; }; -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":90 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":90 * * # linked list structure for storing matches in BaselineRuleFactory * cdef struct match_node: # <<<<<<<<<<<<<< @@ -696,7 +696,7 @@ struct __pyx_t_4cdec_2sa_3_sa_match_node { struct __pyx_t_4cdec_2sa_3_sa_match_node *next; }; -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":186 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":186 * * # struct used to encapsulate a single matching * cdef struct Matching: # <<<<<<<<<<<<<< @@ -794,7 +794,7 @@ struct __pyx_obj_4cdec_2sa_3_sa_Rule { }; -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/str_map.pxi":8 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/str_map.pxi":8 * char* stringmap_word(StrMap *vocab, int i) * * cdef class StringMap: # <<<<<<<<<<<<<< @@ -808,7 +808,7 @@ struct __pyx_obj_4cdec_2sa_3_sa_StringMap { }; -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":9 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":9 * from libc.string cimport memset, strcpy * * cdef class DataArray: # <<<<<<<<<<<<<< @@ -827,7 +827,7 @@ struct __pyx_obj_4cdec_2sa_3_sa_DataArray { }; -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":10 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":10 * cdef int ALIGNMENT_CODE = 1 << 16 * * cdef class Alignment: # <<<<<<<<<<<<<< @@ -842,7 +842,7 @@ struct __pyx_obj_4cdec_2sa_3_sa_Alignment { }; -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":47 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":47 * * * cdef class BiLex: # <<<<<<<<<<<<<< @@ -863,7 +863,7 @@ struct __pyx_obj_4cdec_2sa_3_sa_BiLex { }; -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":100 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":100 * * * cdef class BitSetIterator: # <<<<<<<<<<<<<< @@ -877,7 +877,7 @@ struct __pyx_obj_4cdec_2sa_3_sa_BitSetIterator { }; -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":118 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":118 * # (entirely C-implemented) _BitSet struct. * # Very slow; use only for debugging * cdef class BitSet: # <<<<<<<<<<<<<< @@ -890,7 +890,7 @@ struct __pyx_obj_4cdec_2sa_3_sa_BitSet { }; -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":340 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":340 * * * cdef class VEBIterator: # <<<<<<<<<<<<<< @@ -904,7 +904,7 @@ struct __pyx_obj_4cdec_2sa_3_sa_VEBIterator { }; -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":354 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":354 * * * cdef class VEB: # <<<<<<<<<<<<<< @@ -918,7 +918,7 @@ struct __pyx_obj_4cdec_2sa_3_sa_VEB { }; -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/lcp.pxi":5 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":5 * as k most frequent n-grams""" * * cdef class LCP: # <<<<<<<<<<<<<< @@ -932,7 +932,7 @@ struct __pyx_obj_4cdec_2sa_3_sa_LCP { }; -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":7 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":7 * cdef int INDEX_MASK = (1< size: # <<<<<<<<<<<<<< @@ -4212,7 +4212,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9FloatList___cinit__(struct __pyx_obj_4cdec_2 __pyx_t_1 = ((__pyx_v_initial_len > __pyx_v_size) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/float_list.pxi":13 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":13 * def __cinit__(self, int size=0, int increment=1, int initial_len=0): * if initial_len > size: * size = initial_len # <<<<<<<<<<<<<< @@ -4224,7 +4224,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9FloatList___cinit__(struct __pyx_obj_4cdec_2 } __pyx_L3:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/float_list.pxi":14 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":14 * if initial_len > size: * size = initial_len * self.size = size # <<<<<<<<<<<<<< @@ -4233,7 +4233,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9FloatList___cinit__(struct __pyx_obj_4cdec_2 */ __pyx_v_self->size = __pyx_v_size; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/float_list.pxi":15 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":15 * size = initial_len * self.size = size * self.increment = increment # <<<<<<<<<<<<<< @@ -4242,7 +4242,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9FloatList___cinit__(struct __pyx_obj_4cdec_2 */ __pyx_v_self->increment = __pyx_v_increment; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/float_list.pxi":16 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":16 * self.size = size * self.increment = increment * self.len = initial_len # <<<<<<<<<<<<<< @@ -4251,7 +4251,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9FloatList___cinit__(struct __pyx_obj_4cdec_2 */ __pyx_v_self->len = __pyx_v_initial_len; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/float_list.pxi":17 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":17 * self.increment = increment * self.len = initial_len * self.arr = malloc(size*sizeof(float)) # <<<<<<<<<<<<<< @@ -4260,7 +4260,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9FloatList___cinit__(struct __pyx_obj_4cdec_2 */ __pyx_v_self->arr = ((float *)malloc((__pyx_v_size * (sizeof(float))))); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/float_list.pxi":18 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":18 * self.len = initial_len * self.arr = malloc(size*sizeof(float)) * memset(self.arr, 0, initial_len*sizeof(float)) # <<<<<<<<<<<<<< @@ -4269,7 +4269,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9FloatList___cinit__(struct __pyx_obj_4cdec_2 */ memset(__pyx_v_self->arr, 0, (__pyx_v_initial_len * (sizeof(float)))); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/float_list.pxi":11 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":11 * cdef class FloatList: * * def __cinit__(self, int size=0, int increment=1, int initial_len=0): # <<<<<<<<<<<<<< @@ -4283,7 +4283,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9FloatList___cinit__(struct __pyx_obj_4cdec_2 return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/float_list.pxi":20 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":20 * memset(self.arr, 0, initial_len*sizeof(float)) * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -4306,7 +4306,7 @@ static void __pyx_pf_4cdec_2sa_3_sa_9FloatList_2__dealloc__(struct __pyx_obj_4cd __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/float_list.pxi":21 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":21 * * def __dealloc__(self): * free(self.arr) # <<<<<<<<<<<<<< @@ -4315,7 +4315,7 @@ static void __pyx_pf_4cdec_2sa_3_sa_9FloatList_2__dealloc__(struct __pyx_obj_4cd */ free(__pyx_v_self->arr); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/float_list.pxi":20 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":20 * memset(self.arr, 0, initial_len*sizeof(float)) * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -4327,7 +4327,7 @@ static void __pyx_pf_4cdec_2sa_3_sa_9FloatList_2__dealloc__(struct __pyx_obj_4cd __Pyx_RefNannyFinishContext(); } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/float_list.pxi":23 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":23 * free(self.arr) * * def __getitem__(self, i): # <<<<<<<<<<<<<< @@ -4363,7 +4363,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9FloatList_4__getitem__(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getitem__", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/float_list.pxi":24 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":24 * * def __getitem__(self, i): * j = i # <<<<<<<<<<<<<< @@ -4373,7 +4373,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9FloatList_4__getitem__(struct __pyx_ob __Pyx_INCREF(__pyx_v_i); __pyx_v_j = __pyx_v_i; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/float_list.pxi":25 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":25 * def __getitem__(self, i): * j = i * if i<0: # <<<<<<<<<<<<<< @@ -4385,7 +4385,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9FloatList_4__getitem__(struct __pyx_ob __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/float_list.pxi":26 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":26 * j = i * if i<0: * j = self.len + i # <<<<<<<<<<<<<< @@ -4403,7 +4403,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9FloatList_4__getitem__(struct __pyx_ob } __pyx_L3:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/float_list.pxi":27 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":27 * if i<0: * j = self.len + i * if j<0 or j>=self.len: # <<<<<<<<<<<<<< @@ -4426,7 +4426,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9FloatList_4__getitem__(struct __pyx_ob } if (__pyx_t_5) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/float_list.pxi":28 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":28 * j = self.len + i * if j<0 or j>=self.len: * raise IndexError("Requested index %d of %d-length FloatList" % (i, self.len)) # <<<<<<<<<<<<<< @@ -4459,7 +4459,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9FloatList_4__getitem__(struct __pyx_ob {__pyx_filename = __pyx_f[1]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/float_list.pxi":29 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":29 * if j<0 or j>=self.len: * raise IndexError("Requested index %d of %d-length FloatList" % (i, self.len)) * return self.arr[j] # <<<<<<<<<<<<<< @@ -4474,7 +4474,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9FloatList_4__getitem__(struct __pyx_ob __pyx_t_1 = 0; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/float_list.pxi":23 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":23 * free(self.arr) * * def __getitem__(self, i): # <<<<<<<<<<<<<< @@ -4495,7 +4495,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9FloatList_4__getitem__(struct __pyx_ob return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/float_list.pxi":31 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":31 * return self.arr[j] * * cdef void set(self, int i, float v): # <<<<<<<<<<<<<< @@ -4517,7 +4517,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9FloatList_set(struct __pyx_obj_4cdec_2sa_3_s int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/float_list.pxi":32 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":32 * * cdef void set(self, int i, float v): * j = i # <<<<<<<<<<<<<< @@ -4526,7 +4526,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9FloatList_set(struct __pyx_obj_4cdec_2sa_3_s */ __pyx_v_j = __pyx_v_i; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/float_list.pxi":33 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":33 * cdef void set(self, int i, float v): * j = i * if i<0: # <<<<<<<<<<<<<< @@ -4536,7 +4536,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9FloatList_set(struct __pyx_obj_4cdec_2sa_3_s __pyx_t_1 = ((__pyx_v_i < 0) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/float_list.pxi":34 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":34 * j = i * if i<0: * j = self.len + i # <<<<<<<<<<<<<< @@ -4548,7 +4548,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9FloatList_set(struct __pyx_obj_4cdec_2sa_3_s } __pyx_L3:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/float_list.pxi":35 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":35 * if i<0: * j = self.len + i * if j<0 or j>=self.len: # <<<<<<<<<<<<<< @@ -4564,7 +4564,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9FloatList_set(struct __pyx_obj_4cdec_2sa_3_s } if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/float_list.pxi":36 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":36 * j = self.len + i * if j<0 or j>=self.len: * raise IndexError("Requested index %d of %d-length FloatList" % (i, self.len)) # <<<<<<<<<<<<<< @@ -4599,7 +4599,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9FloatList_set(struct __pyx_obj_4cdec_2sa_3_s {__pyx_filename = __pyx_f[1]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/float_list.pxi":37 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":37 * if j<0 or j>=self.len: * raise IndexError("Requested index %d of %d-length FloatList" % (i, self.len)) * self.arr[j] = v # <<<<<<<<<<<<<< @@ -4608,7 +4608,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9FloatList_set(struct __pyx_obj_4cdec_2sa_3_s */ (__pyx_v_self->arr[__pyx_v_j]) = __pyx_v_v; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/float_list.pxi":31 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":31 * return self.arr[j] * * cdef void set(self, int i, float v): # <<<<<<<<<<<<<< @@ -4627,7 +4627,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9FloatList_set(struct __pyx_obj_4cdec_2sa_3_s __Pyx_RefNannyFinishContext(); } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/float_list.pxi":39 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":39 * self.arr[j] = v * * def __setitem__(self, i, val): # <<<<<<<<<<<<<< @@ -4658,7 +4658,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9FloatList_6__setitem__(struct __pyx_obj_4cde int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setitem__", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/float_list.pxi":40 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":40 * * def __setitem__(self, i, val): * self.set(i, val) # <<<<<<<<<<<<<< @@ -4669,7 +4669,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9FloatList_6__setitem__(struct __pyx_obj_4cde __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_v_val); if (unlikely((__pyx_t_2 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_FloatList *)__pyx_v_self->__pyx_vtab)->set(__pyx_v_self, __pyx_t_1, __pyx_t_2); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/float_list.pxi":39 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":39 * self.arr[j] = v * * def __setitem__(self, i, val): # <<<<<<<<<<<<<< @@ -4688,7 +4688,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9FloatList_6__setitem__(struct __pyx_obj_4cde return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/float_list.pxi":42 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":42 * self.set(i, val) * * def __len__(self): # <<<<<<<<<<<<<< @@ -4714,7 +4714,7 @@ static Py_ssize_t __pyx_pf_4cdec_2sa_3_sa_9FloatList_8__len__(struct __pyx_obj_4 __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/float_list.pxi":43 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":43 * * def __len__(self): * return self.len # <<<<<<<<<<<<<< @@ -4724,7 +4724,7 @@ static Py_ssize_t __pyx_pf_4cdec_2sa_3_sa_9FloatList_8__len__(struct __pyx_obj_4 __pyx_r = __pyx_v_self->len; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/float_list.pxi":42 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":42 * self.set(i, val) * * def __len__(self): # <<<<<<<<<<<<<< @@ -4738,7 +4738,7 @@ static Py_ssize_t __pyx_pf_4cdec_2sa_3_sa_9FloatList_8__len__(struct __pyx_obj_4 return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/float_list.pxi":45 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":45 * return self.len * * def append(self, float val): # <<<<<<<<<<<<<< @@ -4778,7 +4778,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9FloatList_10append(struct __pyx_obj_4c int __pyx_t_1; __Pyx_RefNannySetupContext("append", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/float_list.pxi":46 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":46 * * def append(self, float val): * if self.len == self.size: # <<<<<<<<<<<<<< @@ -4788,7 +4788,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9FloatList_10append(struct __pyx_obj_4c __pyx_t_1 = ((__pyx_v_self->len == __pyx_v_self->size) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/float_list.pxi":47 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":47 * def append(self, float val): * if self.len == self.size: * self.size = self.size + self.increment # <<<<<<<<<<<<<< @@ -4797,7 +4797,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9FloatList_10append(struct __pyx_obj_4c */ __pyx_v_self->size = (__pyx_v_self->size + __pyx_v_self->increment); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/float_list.pxi":48 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":48 * if self.len == self.size: * self.size = self.size + self.increment * self.arr = realloc(self.arr, self.size*sizeof(float)) # <<<<<<<<<<<<<< @@ -4809,7 +4809,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9FloatList_10append(struct __pyx_obj_4c } __pyx_L3:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/float_list.pxi":49 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":49 * self.size = self.size + self.increment * self.arr = realloc(self.arr, self.size*sizeof(float)) * self.arr[self.len] = val # <<<<<<<<<<<<<< @@ -4818,7 +4818,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9FloatList_10append(struct __pyx_obj_4c */ (__pyx_v_self->arr[__pyx_v_self->len]) = __pyx_v_val; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/float_list.pxi":50 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":50 * self.arr = realloc(self.arr, self.size*sizeof(float)) * self.arr[self.len] = val * self.len = self.len + 1 # <<<<<<<<<<<<<< @@ -4827,7 +4827,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9FloatList_10append(struct __pyx_obj_4c */ __pyx_v_self->len = (__pyx_v_self->len + 1); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/float_list.pxi":45 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":45 * return self.len * * def append(self, float val): # <<<<<<<<<<<<<< @@ -4842,7 +4842,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9FloatList_10append(struct __pyx_obj_4c return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/float_list.pxi":52 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":52 * self.len = self.len + 1 * * cdef void write_handle(self, FILE* f): # <<<<<<<<<<<<<< @@ -4854,7 +4854,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9FloatList_write_handle(struct __pyx_obj_4cde __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("write_handle", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/float_list.pxi":53 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":53 * * cdef void write_handle(self, FILE* f): * fwrite(&(self.len), sizeof(float), 1, f) # <<<<<<<<<<<<<< @@ -4863,7 +4863,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9FloatList_write_handle(struct __pyx_obj_4cde */ fwrite((&__pyx_v_self->len), (sizeof(float)), 1, __pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/float_list.pxi":54 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":54 * cdef void write_handle(self, FILE* f): * fwrite(&(self.len), sizeof(float), 1, f) * fwrite(self.arr, sizeof(float), self.len, f) # <<<<<<<<<<<<<< @@ -4872,7 +4872,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9FloatList_write_handle(struct __pyx_obj_4cde */ fwrite(__pyx_v_self->arr, (sizeof(float)), __pyx_v_self->len, __pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/float_list.pxi":52 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":52 * self.len = self.len + 1 * * cdef void write_handle(self, FILE* f): # <<<<<<<<<<<<<< @@ -4884,7 +4884,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9FloatList_write_handle(struct __pyx_obj_4cde __Pyx_RefNannyFinishContext(); } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/float_list.pxi":56 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":56 * fwrite(self.arr, sizeof(float), self.len, f) * * def write(self, char* filename): # <<<<<<<<<<<<<< @@ -4924,7 +4924,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9FloatList_12write(struct __pyx_obj_4cd __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("write", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/float_list.pxi":58 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":58 * def write(self, char* filename): * cdef FILE* f * f = fopen(filename, "w") # <<<<<<<<<<<<<< @@ -4933,7 +4933,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9FloatList_12write(struct __pyx_obj_4cd */ __pyx_v_f = fopen(__pyx_v_filename, __pyx_k_w); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/float_list.pxi":59 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":59 * cdef FILE* f * f = fopen(filename, "w") * self.write_handle(f) # <<<<<<<<<<<<<< @@ -4942,7 +4942,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9FloatList_12write(struct __pyx_obj_4cd */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_FloatList *)__pyx_v_self->__pyx_vtab)->write_handle(__pyx_v_self, __pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/float_list.pxi":60 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":60 * f = fopen(filename, "w") * self.write_handle(f) * fclose(f) # <<<<<<<<<<<<<< @@ -4951,7 +4951,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9FloatList_12write(struct __pyx_obj_4cd */ fclose(__pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/float_list.pxi":56 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":56 * fwrite(self.arr, sizeof(float), self.len, f) * * def write(self, char* filename): # <<<<<<<<<<<<<< @@ -4966,7 +4966,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9FloatList_12write(struct __pyx_obj_4cd return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/float_list.pxi":62 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":62 * fclose(f) * * cdef void read_handle(self, FILE* f): # <<<<<<<<<<<<<< @@ -4979,7 +4979,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9FloatList_read_handle(struct __pyx_obj_4cdec int __pyx_t_1; __Pyx_RefNannySetupContext("read_handle", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/float_list.pxi":63 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":63 * * cdef void read_handle(self, FILE* f): * free(self.arr) # <<<<<<<<<<<<<< @@ -4988,7 +4988,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9FloatList_read_handle(struct __pyx_obj_4cdec */ free(__pyx_v_self->arr); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/float_list.pxi":64 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":64 * cdef void read_handle(self, FILE* f): * free(self.arr) * fread(&(self.len), sizeof(float), 1, f) # <<<<<<<<<<<<<< @@ -4997,7 +4997,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9FloatList_read_handle(struct __pyx_obj_4cdec */ fread((&__pyx_v_self->len), (sizeof(float)), 1, __pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/float_list.pxi":65 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":65 * free(self.arr) * fread(&(self.len), sizeof(float), 1, f) * self.arr = malloc(self.len * sizeof(float)) # <<<<<<<<<<<<<< @@ -5006,7 +5006,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9FloatList_read_handle(struct __pyx_obj_4cdec */ __pyx_v_self->arr = ((float *)malloc((__pyx_v_self->len * (sizeof(float))))); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/float_list.pxi":66 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":66 * fread(&(self.len), sizeof(float), 1, f) * self.arr = malloc(self.len * sizeof(float)) * self.size = self.len # <<<<<<<<<<<<<< @@ -5016,7 +5016,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9FloatList_read_handle(struct __pyx_obj_4cdec __pyx_t_1 = __pyx_v_self->len; __pyx_v_self->size = __pyx_t_1; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/float_list.pxi":67 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":67 * self.arr = malloc(self.len * sizeof(float)) * self.size = self.len * fread(self.arr, sizeof(float), self.len, f) # <<<<<<<<<<<<<< @@ -5025,7 +5025,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9FloatList_read_handle(struct __pyx_obj_4cdec */ fread(__pyx_v_self->arr, (sizeof(float)), __pyx_v_self->len, __pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/float_list.pxi":62 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":62 * fclose(f) * * cdef void read_handle(self, FILE* f): # <<<<<<<<<<<<<< @@ -5037,7 +5037,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9FloatList_read_handle(struct __pyx_obj_4cdec __Pyx_RefNannyFinishContext(); } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/float_list.pxi":69 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":69 * fread(self.arr, sizeof(float), self.len, f) * * def read(self, char* filename): # <<<<<<<<<<<<<< @@ -5077,7 +5077,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9FloatList_14read(struct __pyx_obj_4cde __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("read", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/float_list.pxi":71 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":71 * def read(self, char* filename): * cdef FILE* f * f = fopen(filename, "r") # <<<<<<<<<<<<<< @@ -5086,7 +5086,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9FloatList_14read(struct __pyx_obj_4cde */ __pyx_v_f = fopen(__pyx_v_filename, __pyx_k_r); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/float_list.pxi":72 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":72 * cdef FILE* f * f = fopen(filename, "r") * self.read_handle(f) # <<<<<<<<<<<<<< @@ -5094,14 +5094,14 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9FloatList_14read(struct __pyx_obj_4cde */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_FloatList *)__pyx_v_self->__pyx_vtab)->read_handle(__pyx_v_self, __pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/float_list.pxi":73 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":73 * f = fopen(filename, "r") * self.read_handle(f) * fclose(f) # <<<<<<<<<<<<<< */ fclose(__pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/float_list.pxi":69 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":69 * fread(self.arr, sizeof(float), self.len, f) * * def read(self, char* filename): # <<<<<<<<<<<<<< @@ -5116,7 +5116,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9FloatList_14read(struct __pyx_obj_4cde return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":11 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":11 * cdef class IntList: * * def __cinit__(self, int size=0, int increment=1, int initial_len=0): # <<<<<<<<<<<<<< @@ -5216,7 +5216,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_7IntList___cinit__(struct __pyx_obj_4cdec_2sa int __pyx_t_1; __Pyx_RefNannySetupContext("__cinit__", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":12 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":12 * * def __cinit__(self, int size=0, int increment=1, int initial_len=0): * if initial_len > size: # <<<<<<<<<<<<<< @@ -5226,7 +5226,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_7IntList___cinit__(struct __pyx_obj_4cdec_2sa __pyx_t_1 = ((__pyx_v_initial_len > __pyx_v_size) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":13 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":13 * def __cinit__(self, int size=0, int increment=1, int initial_len=0): * if initial_len > size: * size = initial_len # <<<<<<<<<<<<<< @@ -5238,7 +5238,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_7IntList___cinit__(struct __pyx_obj_4cdec_2sa } __pyx_L3:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":14 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":14 * if initial_len > size: * size = initial_len * self.size = size # <<<<<<<<<<<<<< @@ -5247,7 +5247,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_7IntList___cinit__(struct __pyx_obj_4cdec_2sa */ __pyx_v_self->size = __pyx_v_size; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":15 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":15 * size = initial_len * self.size = size * self.increment = increment # <<<<<<<<<<<<<< @@ -5256,7 +5256,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_7IntList___cinit__(struct __pyx_obj_4cdec_2sa */ __pyx_v_self->increment = __pyx_v_increment; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":16 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":16 * self.size = size * self.increment = increment * self.len = initial_len # <<<<<<<<<<<<<< @@ -5265,7 +5265,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_7IntList___cinit__(struct __pyx_obj_4cdec_2sa */ __pyx_v_self->len = __pyx_v_initial_len; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":17 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":17 * self.increment = increment * self.len = initial_len * self.arr = malloc(size*sizeof(int)) # <<<<<<<<<<<<<< @@ -5274,7 +5274,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_7IntList___cinit__(struct __pyx_obj_4cdec_2sa */ __pyx_v_self->arr = ((int *)malloc((__pyx_v_size * (sizeof(int))))); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":18 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":18 * self.len = initial_len * self.arr = malloc(size*sizeof(int)) * memset(self.arr, 0, initial_len*sizeof(int)) # <<<<<<<<<<<<<< @@ -5283,7 +5283,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_7IntList___cinit__(struct __pyx_obj_4cdec_2sa */ memset(__pyx_v_self->arr, 0, (__pyx_v_initial_len * (sizeof(int)))); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":11 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":11 * cdef class IntList: * * def __cinit__(self, int size=0, int increment=1, int initial_len=0): # <<<<<<<<<<<<<< @@ -5297,7 +5297,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_7IntList___cinit__(struct __pyx_obj_4cdec_2sa return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":20 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":20 * memset(self.arr, 0, initial_len*sizeof(int)) * * def __str__(self): # <<<<<<<<<<<<<< @@ -5333,7 +5333,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_2__str__(struct __pyx_obj_4cde int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__str__", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":22 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":22 * def __str__(self): * cdef unsigned i * ret = "IntList[" # <<<<<<<<<<<<<< @@ -5343,7 +5343,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_2__str__(struct __pyx_obj_4cde __Pyx_INCREF(__pyx_kp_s_IntList); __pyx_v_ret = __pyx_kp_s_IntList; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":23 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":23 * cdef unsigned i * ret = "IntList[" * for idx in range(self.size): # <<<<<<<<<<<<<< @@ -5354,7 +5354,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_2__str__(struct __pyx_obj_4cde for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_idx = __pyx_t_2; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":24 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":24 * ret = "IntList[" * for idx in range(self.size): * if idx>0: # <<<<<<<<<<<<<< @@ -5364,7 +5364,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_2__str__(struct __pyx_obj_4cde __pyx_t_3 = ((__pyx_v_idx > 0) != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":25 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":25 * for idx in range(self.size): * if idx>0: * ret += "," # <<<<<<<<<<<<<< @@ -5379,7 +5379,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_2__str__(struct __pyx_obj_4cde } __pyx_L5:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":26 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":26 * if idx>0: * ret += "," * ret += str(self.arr[idx]) # <<<<<<<<<<<<<< @@ -5403,7 +5403,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_2__str__(struct __pyx_obj_4cde __pyx_t_5 = 0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":27 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":27 * ret += "," * ret += str(self.arr[idx]) * ret += "]" # <<<<<<<<<<<<<< @@ -5415,7 +5415,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_2__str__(struct __pyx_obj_4cde __Pyx_DECREF_SET(__pyx_v_ret, __pyx_t_5); __pyx_t_5 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":28 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":28 * ret += str(self.arr[idx]) * ret += "]" * ret += "len=" # <<<<<<<<<<<<<< @@ -5427,7 +5427,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_2__str__(struct __pyx_obj_4cde __Pyx_DECREF_SET(__pyx_v_ret, __pyx_t_5); __pyx_t_5 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":29 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":29 * ret += "]" * ret += "len=" * ret += str(self.len) # <<<<<<<<<<<<<< @@ -5450,7 +5450,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_2__str__(struct __pyx_obj_4cde __Pyx_DECREF_SET(__pyx_v_ret, __pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":30 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":30 * ret += "len=" * ret += str(self.len) * return ret # <<<<<<<<<<<<<< @@ -5462,7 +5462,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_2__str__(struct __pyx_obj_4cde __pyx_r = __pyx_v_ret; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":20 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":20 * memset(self.arr, 0, initial_len*sizeof(int)) * * def __str__(self): # <<<<<<<<<<<<<< @@ -5483,7 +5483,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_2__str__(struct __pyx_obj_4cde return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":32 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":32 * return ret * * def index(self, int val): # <<<<<<<<<<<<<< @@ -5531,7 +5531,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_4index(struct __pyx_obj_4cdec_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("index", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":34 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":34 * def index(self, int val): * cdef unsigned i * for i in range(self.len): # <<<<<<<<<<<<<< @@ -5542,7 +5542,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_4index(struct __pyx_obj_4cdec_ for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":35 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":35 * cdef unsigned i * for i in range(self.len): * if self.arr[i] == val: # <<<<<<<<<<<<<< @@ -5552,7 +5552,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_4index(struct __pyx_obj_4cdec_ __pyx_t_3 = (((__pyx_v_self->arr[__pyx_v_i]) == __pyx_v_val) != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":36 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":36 * for i in range(self.len): * if self.arr[i] == val: * return i # <<<<<<<<<<<<<< @@ -5568,7 +5568,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_4index(struct __pyx_obj_4cdec_ } } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":37 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":37 * if self.arr[i] == val: * return i * raise ValueError('%s not in IntList' % val) # <<<<<<<<<<<<<< @@ -5592,7 +5592,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_4index(struct __pyx_obj_4cdec_ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":32 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":32 * return ret * * def index(self, int val): # <<<<<<<<<<<<<< @@ -5612,7 +5612,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_4index(struct __pyx_obj_4cdec_ return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":39 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":39 * raise ValueError('%s not in IntList' % val) * * def partition(self,start,end): # <<<<<<<<<<<<<< @@ -5699,7 +5699,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_6partition(struct __pyx_obj_4c int __pyx_clineno = 0; __Pyx_RefNannySetupContext("partition", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":40 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":40 * * def partition(self,start,end): * pivot = self.arr[end] # <<<<<<<<<<<<<< @@ -5712,7 +5712,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_6partition(struct __pyx_obj_4c __pyx_v_pivot = __pyx_t_2; __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":41 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":41 * def partition(self,start,end): * pivot = self.arr[end] * bottom = start-1 # <<<<<<<<<<<<<< @@ -5724,7 +5724,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_6partition(struct __pyx_obj_4c __pyx_v_bottom = __pyx_t_2; __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":42 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":42 * pivot = self.arr[end] * bottom = start-1 * top = end # <<<<<<<<<<<<<< @@ -5734,7 +5734,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_6partition(struct __pyx_obj_4c __Pyx_INCREF(__pyx_v_end); __pyx_v_top = __pyx_v_end; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":43 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":43 * bottom = start-1 * top = end * done = 0 # <<<<<<<<<<<<<< @@ -5743,7 +5743,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_6partition(struct __pyx_obj_4c */ __pyx_v_done = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":44 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":44 * top = end * done = 0 * while not done: # <<<<<<<<<<<<<< @@ -5754,7 +5754,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_6partition(struct __pyx_obj_4c __pyx_t_3 = ((!(__pyx_v_done != 0)) != 0); if (!__pyx_t_3) break; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":45 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":45 * done = 0 * while not done: * while not done: # <<<<<<<<<<<<<< @@ -5765,7 +5765,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_6partition(struct __pyx_obj_4c __pyx_t_3 = ((!(__pyx_v_done != 0)) != 0); if (!__pyx_t_3) break; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":46 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":46 * while not done: * while not done: * bottom += 1 # <<<<<<<<<<<<<< @@ -5777,7 +5777,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_6partition(struct __pyx_obj_4c __Pyx_DECREF_SET(__pyx_v_bottom, __pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":47 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":47 * while not done: * bottom += 1 * if bottom == top: # <<<<<<<<<<<<<< @@ -5789,7 +5789,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_6partition(struct __pyx_obj_4c __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":48 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":48 * bottom += 1 * if bottom == top: * done = 1 # <<<<<<<<<<<<<< @@ -5798,7 +5798,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_6partition(struct __pyx_obj_4c */ __pyx_v_done = 1; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":49 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":49 * if bottom == top: * done = 1 * break # <<<<<<<<<<<<<< @@ -5808,7 +5808,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_6partition(struct __pyx_obj_4c goto __pyx_L6_break; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":50 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":50 * done = 1 * break * if self.arr[bottom] > pivot: # <<<<<<<<<<<<<< @@ -5824,7 +5824,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_6partition(struct __pyx_obj_4c __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":51 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":51 * break * if self.arr[bottom] > pivot: * self.arr[top] = self.arr[bottom] # <<<<<<<<<<<<<< @@ -5835,7 +5835,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_6partition(struct __pyx_obj_4c __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_v_top); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} (__pyx_v_self->arr[__pyx_t_5]) = (__pyx_v_self->arr[__pyx_t_1]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":52 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":52 * if self.arr[bottom] > pivot: * self.arr[top] = self.arr[bottom] * break # <<<<<<<<<<<<<< @@ -5847,7 +5847,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_6partition(struct __pyx_obj_4c } __pyx_L6_break:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":53 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":53 * self.arr[top] = self.arr[bottom] * break * while not done: # <<<<<<<<<<<<<< @@ -5858,7 +5858,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_6partition(struct __pyx_obj_4c __pyx_t_3 = ((!(__pyx_v_done != 0)) != 0); if (!__pyx_t_3) break; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":54 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":54 * break * while not done: * top -= 1 # <<<<<<<<<<<<<< @@ -5870,7 +5870,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_6partition(struct __pyx_obj_4c __Pyx_DECREF_SET(__pyx_v_top, __pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":55 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":55 * while not done: * top -= 1 * if top == bottom: # <<<<<<<<<<<<<< @@ -5882,7 +5882,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_6partition(struct __pyx_obj_4c __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":56 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":56 * top -= 1 * if top == bottom: * done = 1 # <<<<<<<<<<<<<< @@ -5891,7 +5891,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_6partition(struct __pyx_obj_4c */ __pyx_v_done = 1; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":57 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":57 * if top == bottom: * done = 1 * break # <<<<<<<<<<<<<< @@ -5901,7 +5901,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_6partition(struct __pyx_obj_4c goto __pyx_L10_break; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":58 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":58 * done = 1 * break * if self.arr[top] < pivot: # <<<<<<<<<<<<<< @@ -5917,7 +5917,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_6partition(struct __pyx_obj_4c __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":59 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":59 * break * if self.arr[top] < pivot: * self.arr[bottom] = self.arr[top] # <<<<<<<<<<<<<< @@ -5928,7 +5928,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_6partition(struct __pyx_obj_4c __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_v_bottom); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} (__pyx_v_self->arr[__pyx_t_5]) = (__pyx_v_self->arr[__pyx_t_1]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":60 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":60 * if self.arr[top] < pivot: * self.arr[bottom] = self.arr[top] * break # <<<<<<<<<<<<<< @@ -5941,7 +5941,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_6partition(struct __pyx_obj_4c __pyx_L10_break:; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":61 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":61 * self.arr[bottom] = self.arr[top] * break * self.arr[top] = pivot # <<<<<<<<<<<<<< @@ -5952,7 +5952,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_6partition(struct __pyx_obj_4c __pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_v_top); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} (__pyx_v_self->arr[__pyx_t_1]) = __pyx_t_6; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":62 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":62 * break * self.arr[top] = pivot * return top # <<<<<<<<<<<<<< @@ -5964,7 +5964,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_6partition(struct __pyx_obj_4c __pyx_r = __pyx_v_top; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":39 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":39 * raise ValueError('%s not in IntList' % val) * * def partition(self,start,end): # <<<<<<<<<<<<<< @@ -5987,7 +5987,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_6partition(struct __pyx_obj_4c return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":64 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":64 * return top * * def _doquicksort(self,start,end): # <<<<<<<<<<<<<< @@ -6069,7 +6069,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_8_doquicksort(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_doquicksort", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":65 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":65 * * def _doquicksort(self,start,end): * if start < end: # <<<<<<<<<<<<<< @@ -6081,7 +6081,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_8_doquicksort(struct __pyx_obj __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":66 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":66 * def _doquicksort(self,start,end): * if start < end: * split = self.partition(start,end) # <<<<<<<<<<<<<< @@ -6105,7 +6105,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_8_doquicksort(struct __pyx_obj __pyx_v_split = __pyx_t_4; __pyx_t_4 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":67 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":67 * if start < end: * split = self.partition(start,end) * self._doquicksort(start,split-1) # <<<<<<<<<<<<<< @@ -6130,7 +6130,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_8_doquicksort(struct __pyx_obj __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":68 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":68 * split = self.partition(start,end) * self._doquicksort(start,split-1) * self._doquicksort(split+1,end) # <<<<<<<<<<<<<< @@ -6158,7 +6158,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_8_doquicksort(struct __pyx_obj } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":70 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":70 * self._doquicksort(split+1,end) * else: * return # <<<<<<<<<<<<<< @@ -6171,7 +6171,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_8_doquicksort(struct __pyx_obj } __pyx_L3:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":64 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":64 * return top * * def _doquicksort(self,start,end): # <<<<<<<<<<<<<< @@ -6195,7 +6195,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_8_doquicksort(struct __pyx_obj return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":72 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":72 * return * * def sort(self): # <<<<<<<<<<<<<< @@ -6227,7 +6227,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_10sort(struct __pyx_obj_4cdec_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sort", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":73 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":73 * * def sort(self): * self._doquicksort(0,self.len-1) # <<<<<<<<<<<<<< @@ -6252,7 +6252,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_10sort(struct __pyx_obj_4cdec_ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":72 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":72 * return * * def sort(self): # <<<<<<<<<<<<<< @@ -6275,7 +6275,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_10sort(struct __pyx_obj_4cdec_ return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":75 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":75 * self._doquicksort(0,self.len-1) * * def reset(self): # <<<<<<<<<<<<<< @@ -6301,7 +6301,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_12reset(struct __pyx_obj_4cdec __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("reset", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":76 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":76 * * def reset(self): * self.len = 0 # <<<<<<<<<<<<<< @@ -6310,7 +6310,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_12reset(struct __pyx_obj_4cdec */ __pyx_v_self->len = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":75 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":75 * self._doquicksort(0,self.len-1) * * def reset(self): # <<<<<<<<<<<<<< @@ -6325,7 +6325,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_12reset(struct __pyx_obj_4cdec return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":78 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":78 * self.len = 0 * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -6348,7 +6348,7 @@ static void __pyx_pf_4cdec_2sa_3_sa_7IntList_14__dealloc__(struct __pyx_obj_4cde __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":79 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":79 * * def __dealloc__(self): * free(self.arr) # <<<<<<<<<<<<<< @@ -6357,7 +6357,7 @@ static void __pyx_pf_4cdec_2sa_3_sa_7IntList_14__dealloc__(struct __pyx_obj_4cde */ free(__pyx_v_self->arr); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":78 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":78 * self.len = 0 * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -6370,7 +6370,7 @@ static void __pyx_pf_4cdec_2sa_3_sa_7IntList_14__dealloc__(struct __pyx_obj_4cde } static PyObject *__pyx_gb_4cdec_2sa_3_sa_7IntList_18generator(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":81 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":81 * free(self.arr) * * def __iter__(self): # <<<<<<<<<<<<<< @@ -6450,7 +6450,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_7IntList_18generator(__pyx_GeneratorObj __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":83 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":83 * def __iter__(self): * cdef int i * for i in range(self.len): # <<<<<<<<<<<<<< @@ -6461,7 +6461,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_7IntList_18generator(__pyx_GeneratorObj for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_cur_scope->__pyx_v_i = __pyx_t_2; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":84 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":84 * cdef int i * for i in range(self.len): * yield self.arr[i] # <<<<<<<<<<<<<< @@ -6485,7 +6485,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_7IntList_18generator(__pyx_GeneratorObj if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":81 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":81 * free(self.arr) * * def __iter__(self): # <<<<<<<<<<<<<< @@ -6507,7 +6507,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_7IntList_18generator(__pyx_GeneratorObj return NULL; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":86 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":86 * yield self.arr[i] * * def __getitem__(self, index): # <<<<<<<<<<<<<< @@ -6550,7 +6550,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_19__getitem__(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getitem__", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":88 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":88 * def __getitem__(self, index): * cdef int i, j, k * if isinstance(index, int): # <<<<<<<<<<<<<< @@ -6561,7 +6561,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_19__getitem__(struct __pyx_obj __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":89 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":89 * cdef int i, j, k * if isinstance(index, int): * j = index # <<<<<<<<<<<<<< @@ -6571,7 +6571,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_19__getitem__(struct __pyx_obj __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_index); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_j = __pyx_t_3; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":90 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":90 * if isinstance(index, int): * j = index * if j < 0: # <<<<<<<<<<<<<< @@ -6581,7 +6581,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_19__getitem__(struct __pyx_obj __pyx_t_2 = ((__pyx_v_j < 0) != 0); if (__pyx_t_2) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":91 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":91 * j = index * if j < 0: * j = self.len + j # <<<<<<<<<<<<<< @@ -6593,7 +6593,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_19__getitem__(struct __pyx_obj } __pyx_L4:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":92 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":92 * if j < 0: * j = self.len + j * if j<0 or j>=self.len: # <<<<<<<<<<<<<< @@ -6609,7 +6609,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_19__getitem__(struct __pyx_obj } if (__pyx_t_4) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":93 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":93 * j = self.len + j * if j<0 or j>=self.len: * raise IndexError("Requested index %d of %d-length IntList" % (index, self.len)) # <<<<<<<<<<<<<< @@ -6642,7 +6642,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_19__getitem__(struct __pyx_obj {__pyx_filename = __pyx_f[2]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":94 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":94 * if j<0 or j>=self.len: * raise IndexError("Requested index %d of %d-length IntList" % (index, self.len)) * return self.arr[j] # <<<<<<<<<<<<<< @@ -6657,7 +6657,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_19__getitem__(struct __pyx_obj goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":95 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":95 * raise IndexError("Requested index %d of %d-length IntList" % (index, self.len)) * return self.arr[j] * elif isinstance(index, slice): # <<<<<<<<<<<<<< @@ -6668,7 +6668,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_19__getitem__(struct __pyx_obj __pyx_t_2 = (__pyx_t_4 != 0); if (__pyx_t_2) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":96 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":96 * return self.arr[j] * elif isinstance(index, slice): * i = index.start # <<<<<<<<<<<<<< @@ -6681,7 +6681,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_19__getitem__(struct __pyx_obj __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_i = __pyx_t_3; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":97 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":97 * elif isinstance(index, slice): * i = index.start * j = index.stop # <<<<<<<<<<<<<< @@ -6694,7 +6694,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_19__getitem__(struct __pyx_obj __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_j = __pyx_t_3; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":98 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":98 * i = index.start * j = index.stop * if i < 0: # <<<<<<<<<<<<<< @@ -6704,7 +6704,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_19__getitem__(struct __pyx_obj __pyx_t_2 = ((__pyx_v_i < 0) != 0); if (__pyx_t_2) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":99 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":99 * j = index.stop * if i < 0: * i = self.len + i # <<<<<<<<<<<<<< @@ -6716,7 +6716,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_19__getitem__(struct __pyx_obj } __pyx_L6:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":100 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":100 * if i < 0: * i = self.len + i * if j < 0: # <<<<<<<<<<<<<< @@ -6726,7 +6726,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_19__getitem__(struct __pyx_obj __pyx_t_2 = ((__pyx_v_j < 0) != 0); if (__pyx_t_2) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":101 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":101 * i = self.len + i * if j < 0: * j = self.len + j # <<<<<<<<<<<<<< @@ -6738,7 +6738,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_19__getitem__(struct __pyx_obj } __pyx_L7:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":102 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":102 * if j < 0: * j = self.len + j * if i < 0 or i >= self.len or j < 0 or j > self.len: # <<<<<<<<<<<<<< @@ -6766,7 +6766,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_19__getitem__(struct __pyx_obj } if (__pyx_t_4) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":103 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":103 * j = self.len + j * if i < 0 or i >= self.len or j < 0 or j > self.len: * raise IndexError("Requested index %d:%d of %d-length IntList" % (index.start, index.stop, self.len)) # <<<<<<<<<<<<<< @@ -6806,7 +6806,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_19__getitem__(struct __pyx_obj {__pyx_filename = __pyx_f[2]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":104 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":104 * if i < 0 or i >= self.len or j < 0 or j > self.len: * raise IndexError("Requested index %d:%d of %d-length IntList" % (index.start, index.stop, self.len)) * result = () # <<<<<<<<<<<<<< @@ -6816,7 +6816,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_19__getitem__(struct __pyx_obj __Pyx_INCREF(__pyx_empty_tuple); __pyx_v_result = __pyx_empty_tuple; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":105 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":105 * raise IndexError("Requested index %d:%d of %d-length IntList" % (index.start, index.stop, self.len)) * result = () * for k from i <= k < j: # <<<<<<<<<<<<<< @@ -6826,7 +6826,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_19__getitem__(struct __pyx_obj __pyx_t_3 = __pyx_v_j; for (__pyx_v_k = __pyx_v_i; __pyx_v_k < __pyx_t_3; __pyx_v_k++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":106 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":106 * result = () * for k from i <= k < j: * result = result + (self.arr[k],) # <<<<<<<<<<<<<< @@ -6847,7 +6847,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_19__getitem__(struct __pyx_obj __pyx_t_9 = 0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":107 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":107 * for k from i <= k < j: * result = result + (self.arr[k],) * return result # <<<<<<<<<<<<<< @@ -6861,7 +6861,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_19__getitem__(struct __pyx_obj } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":109 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":109 * return result * else: * raise TypeError("Illegal key type %s for IntList" % type(index)) # <<<<<<<<<<<<<< @@ -6883,7 +6883,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_19__getitem__(struct __pyx_obj {__pyx_filename = __pyx_f[2]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":86 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":86 * yield self.arr[i] * * def __getitem__(self, index): # <<<<<<<<<<<<<< @@ -6906,7 +6906,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_19__getitem__(struct __pyx_obj return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":111 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":111 * raise TypeError("Illegal key type %s for IntList" % type(index)) * * cdef void set(self, int i, int val): # <<<<<<<<<<<<<< @@ -6928,7 +6928,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList_set(struct __pyx_obj_4cdec_2sa_3_sa_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":112 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":112 * * cdef void set(self, int i, int val): * j = i # <<<<<<<<<<<<<< @@ -6937,7 +6937,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList_set(struct __pyx_obj_4cdec_2sa_3_sa_ */ __pyx_v_j = __pyx_v_i; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":113 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":113 * cdef void set(self, int i, int val): * j = i * if i<0: # <<<<<<<<<<<<<< @@ -6947,7 +6947,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList_set(struct __pyx_obj_4cdec_2sa_3_sa_ __pyx_t_1 = ((__pyx_v_i < 0) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":114 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":114 * j = i * if i<0: * j = self.len + i # <<<<<<<<<<<<<< @@ -6959,7 +6959,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList_set(struct __pyx_obj_4cdec_2sa_3_sa_ } __pyx_L3:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":115 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":115 * if i<0: * j = self.len + i * if j<0 or j>=self.len: # <<<<<<<<<<<<<< @@ -6975,7 +6975,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList_set(struct __pyx_obj_4cdec_2sa_3_sa_ } if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":116 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":116 * j = self.len + i * if j<0 or j>=self.len: * raise IndexError("Requested index %d of %d-length IntList" % (i, self.len)) # <<<<<<<<<<<<<< @@ -7010,7 +7010,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList_set(struct __pyx_obj_4cdec_2sa_3_sa_ {__pyx_filename = __pyx_f[2]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":117 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":117 * if j<0 or j>=self.len: * raise IndexError("Requested index %d of %d-length IntList" % (i, self.len)) * self.arr[j] = val # <<<<<<<<<<<<<< @@ -7019,7 +7019,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList_set(struct __pyx_obj_4cdec_2sa_3_sa_ */ (__pyx_v_self->arr[__pyx_v_j]) = __pyx_v_val; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":111 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":111 * raise TypeError("Illegal key type %s for IntList" % type(index)) * * cdef void set(self, int i, int val): # <<<<<<<<<<<<<< @@ -7038,7 +7038,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList_set(struct __pyx_obj_4cdec_2sa_3_sa_ __Pyx_RefNannyFinishContext(); } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":119 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":119 * self.arr[j] = val * * def __setitem__(self, i, val): # <<<<<<<<<<<<<< @@ -7069,7 +7069,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_7IntList_21__setitem__(struct __pyx_obj_4cdec int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setitem__", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":120 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":120 * * def __setitem__(self, i, val): * self.set(i, val) # <<<<<<<<<<<<<< @@ -7080,7 +7080,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_7IntList_21__setitem__(struct __pyx_obj_4cdec __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_v_val); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->__pyx_vtab)->set(__pyx_v_self, __pyx_t_1, __pyx_t_2); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":119 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":119 * self.arr[j] = val * * def __setitem__(self, i, val): # <<<<<<<<<<<<<< @@ -7099,7 +7099,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_7IntList_21__setitem__(struct __pyx_obj_4cdec return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":122 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":122 * self.set(i, val) * * def __len__(self): # <<<<<<<<<<<<<< @@ -7125,7 +7125,7 @@ static Py_ssize_t __pyx_pf_4cdec_2sa_3_sa_7IntList_23__len__(struct __pyx_obj_4c __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":123 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":123 * * def __len__(self): * return self.len # <<<<<<<<<<<<<< @@ -7135,7 +7135,7 @@ static Py_ssize_t __pyx_pf_4cdec_2sa_3_sa_7IntList_23__len__(struct __pyx_obj_4c __pyx_r = __pyx_v_self->len; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":122 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":122 * self.set(i, val) * * def __len__(self): # <<<<<<<<<<<<<< @@ -7149,7 +7149,7 @@ static Py_ssize_t __pyx_pf_4cdec_2sa_3_sa_7IntList_23__len__(struct __pyx_obj_4c return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":125 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":125 * return self.len * * def get_size(self): # <<<<<<<<<<<<<< @@ -7179,7 +7179,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_25get_size(struct __pyx_obj_4c int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_size", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":126 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":126 * * def get_size(self): * return self.size # <<<<<<<<<<<<<< @@ -7193,7 +7193,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_25get_size(struct __pyx_obj_4c __pyx_t_1 = 0; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":125 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":125 * return self.len * * def get_size(self): # <<<<<<<<<<<<<< @@ -7212,7 +7212,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_25get_size(struct __pyx_obj_4c return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":128 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":128 * return self.size * * def append(self, int val): # <<<<<<<<<<<<<< @@ -7251,7 +7251,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_27append(struct __pyx_obj_4cde __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("append", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":129 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":129 * * def append(self, int val): * self._append(val) # <<<<<<<<<<<<<< @@ -7260,7 +7260,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_27append(struct __pyx_obj_4cde */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->__pyx_vtab)->_append(__pyx_v_self, __pyx_v_val); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":128 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":128 * return self.size * * def append(self, int val): # <<<<<<<<<<<<<< @@ -7275,7 +7275,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_27append(struct __pyx_obj_4cde return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":131 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":131 * self._append(val) * * cdef void _append(self, int val): # <<<<<<<<<<<<<< @@ -7288,7 +7288,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList__append(struct __pyx_obj_4cdec_2sa_3 int __pyx_t_1; __Pyx_RefNannySetupContext("_append", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":132 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":132 * * cdef void _append(self, int val): * if self.len == self.size: # <<<<<<<<<<<<<< @@ -7298,7 +7298,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList__append(struct __pyx_obj_4cdec_2sa_3 __pyx_t_1 = ((__pyx_v_self->len == __pyx_v_self->size) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":133 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":133 * cdef void _append(self, int val): * if self.len == self.size: * self.size = self.size + self.increment # <<<<<<<<<<<<<< @@ -7307,7 +7307,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList__append(struct __pyx_obj_4cdec_2sa_3 */ __pyx_v_self->size = (__pyx_v_self->size + __pyx_v_self->increment); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":134 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":134 * if self.len == self.size: * self.size = self.size + self.increment * self.arr = realloc(self.arr, self.size*sizeof(int)) # <<<<<<<<<<<<<< @@ -7319,7 +7319,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList__append(struct __pyx_obj_4cdec_2sa_3 } __pyx_L3:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":135 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":135 * self.size = self.size + self.increment * self.arr = realloc(self.arr, self.size*sizeof(int)) * self.arr[self.len] = val # <<<<<<<<<<<<<< @@ -7328,7 +7328,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList__append(struct __pyx_obj_4cdec_2sa_3 */ (__pyx_v_self->arr[__pyx_v_self->len]) = __pyx_v_val; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":136 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":136 * self.arr = realloc(self.arr, self.size*sizeof(int)) * self.arr[self.len] = val * self.len = self.len + 1 # <<<<<<<<<<<<<< @@ -7337,7 +7337,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList__append(struct __pyx_obj_4cdec_2sa_3 */ __pyx_v_self->len = (__pyx_v_self->len + 1); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":131 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":131 * self._append(val) * * cdef void _append(self, int val): # <<<<<<<<<<<<<< @@ -7349,7 +7349,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList__append(struct __pyx_obj_4cdec_2sa_3 __Pyx_RefNannyFinishContext(); } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":138 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":138 * self.len = self.len + 1 * * def extend(self, other): # <<<<<<<<<<<<<< @@ -7378,7 +7378,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_29extend(struct __pyx_obj_4cde int __pyx_clineno = 0; __Pyx_RefNannySetupContext("extend", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":139 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":139 * * def extend(self, other): * self._extend(other) # <<<<<<<<<<<<<< @@ -7388,7 +7388,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_29extend(struct __pyx_obj_4cde if (!(likely(((__pyx_v_other) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_other, __pyx_ptype_4cdec_2sa_3_sa_IntList))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->__pyx_vtab)->_extend(__pyx_v_self, ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_v_other)); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":138 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":138 * self.len = self.len + 1 * * def extend(self, other): # <<<<<<<<<<<<<< @@ -7408,7 +7408,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_29extend(struct __pyx_obj_4cde return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":141 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":141 * self._extend(other) * * cdef void _extend(self, IntList other): # <<<<<<<<<<<<<< @@ -7420,7 +7420,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList__extend(struct __pyx_obj_4cdec_2sa_3 __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_extend", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":142 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":142 * * cdef void _extend(self, IntList other): * self._extend_arr(other.arr, other.len) # <<<<<<<<<<<<<< @@ -7429,7 +7429,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList__extend(struct __pyx_obj_4cdec_2sa_3 */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->__pyx_vtab)->_extend_arr(__pyx_v_self, __pyx_v_other->arr, __pyx_v_other->len); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":141 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":141 * self._extend(other) * * cdef void _extend(self, IntList other): # <<<<<<<<<<<<<< @@ -7441,7 +7441,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList__extend(struct __pyx_obj_4cdec_2sa_3 __Pyx_RefNannyFinishContext(); } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":144 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":144 * self._extend_arr(other.arr, other.len) * * cdef void _extend_arr(self, int* other, int other_len): # <<<<<<<<<<<<<< @@ -7454,7 +7454,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList__extend_arr(struct __pyx_obj_4cdec_2 int __pyx_t_1; __Pyx_RefNannySetupContext("_extend_arr", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":145 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":145 * * cdef void _extend_arr(self, int* other, int other_len): * if self.size < self.len + other_len: # <<<<<<<<<<<<<< @@ -7464,7 +7464,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList__extend_arr(struct __pyx_obj_4cdec_2 __pyx_t_1 = ((__pyx_v_self->size < (__pyx_v_self->len + __pyx_v_other_len)) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":146 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":146 * cdef void _extend_arr(self, int* other, int other_len): * if self.size < self.len + other_len: * self.size = self.len + other_len # <<<<<<<<<<<<<< @@ -7473,7 +7473,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList__extend_arr(struct __pyx_obj_4cdec_2 */ __pyx_v_self->size = (__pyx_v_self->len + __pyx_v_other_len); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":147 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":147 * if self.size < self.len + other_len: * self.size = self.len + other_len * self.arr = realloc(self.arr, self.size*sizeof(int)) # <<<<<<<<<<<<<< @@ -7485,7 +7485,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList__extend_arr(struct __pyx_obj_4cdec_2 } __pyx_L3:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":148 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":148 * self.size = self.len + other_len * self.arr = realloc(self.arr, self.size*sizeof(int)) * memcpy(self.arr+self.len, other, other_len*sizeof(int)) # <<<<<<<<<<<<<< @@ -7494,7 +7494,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList__extend_arr(struct __pyx_obj_4cdec_2 */ memcpy((__pyx_v_self->arr + __pyx_v_self->len), __pyx_v_other, (__pyx_v_other_len * (sizeof(int)))); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":149 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":149 * self.arr = realloc(self.arr, self.size*sizeof(int)) * memcpy(self.arr+self.len, other, other_len*sizeof(int)) * self.len = self.len + other_len # <<<<<<<<<<<<<< @@ -7503,7 +7503,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList__extend_arr(struct __pyx_obj_4cdec_2 */ __pyx_v_self->len = (__pyx_v_self->len + __pyx_v_other_len); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":144 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":144 * self._extend_arr(other.arr, other.len) * * cdef void _extend_arr(self, int* other, int other_len): # <<<<<<<<<<<<<< @@ -7515,7 +7515,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList__extend_arr(struct __pyx_obj_4cdec_2 __Pyx_RefNannyFinishContext(); } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":151 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":151 * self.len = self.len + other_len * * cdef void _clear(self): # <<<<<<<<<<<<<< @@ -7527,7 +7527,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList__clear(struct __pyx_obj_4cdec_2sa_3_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_clear", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":152 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":152 * * cdef void _clear(self): * free(self.arr) # <<<<<<<<<<<<<< @@ -7536,7 +7536,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList__clear(struct __pyx_obj_4cdec_2sa_3_ */ free(__pyx_v_self->arr); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":153 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":153 * cdef void _clear(self): * free(self.arr) * self.len = 0 # <<<<<<<<<<<<<< @@ -7545,7 +7545,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList__clear(struct __pyx_obj_4cdec_2sa_3_ */ __pyx_v_self->len = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":154 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":154 * free(self.arr) * self.len = 0 * self.size = 0 # <<<<<<<<<<<<<< @@ -7554,7 +7554,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList__clear(struct __pyx_obj_4cdec_2sa_3_ */ __pyx_v_self->size = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":155 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":155 * self.len = 0 * self.size = 0 * self.arr = malloc(0) # <<<<<<<<<<<<<< @@ -7563,7 +7563,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList__clear(struct __pyx_obj_4cdec_2sa_3_ */ __pyx_v_self->arr = ((int *)malloc(0)); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":151 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":151 * self.len = self.len + other_len * * cdef void _clear(self): # <<<<<<<<<<<<<< @@ -7575,7 +7575,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList__clear(struct __pyx_obj_4cdec_2sa_3_ __Pyx_RefNannyFinishContext(); } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":157 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":157 * self.arr = malloc(0) * * cdef void write_handle(self, FILE* f): # <<<<<<<<<<<<<< @@ -7587,7 +7587,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList_write_handle(struct __pyx_obj_4cdec_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("write_handle", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":158 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":158 * * cdef void write_handle(self, FILE* f): * fwrite(&(self.len), sizeof(int), 1, f) # <<<<<<<<<<<<<< @@ -7596,7 +7596,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList_write_handle(struct __pyx_obj_4cdec_ */ fwrite((&__pyx_v_self->len), (sizeof(int)), 1, __pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":159 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":159 * cdef void write_handle(self, FILE* f): * fwrite(&(self.len), sizeof(int), 1, f) * fwrite(self.arr, sizeof(int), self.len, f) # <<<<<<<<<<<<<< @@ -7605,7 +7605,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList_write_handle(struct __pyx_obj_4cdec_ */ fwrite(__pyx_v_self->arr, (sizeof(int)), __pyx_v_self->len, __pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":157 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":157 * self.arr = malloc(0) * * cdef void write_handle(self, FILE* f): # <<<<<<<<<<<<<< @@ -7617,7 +7617,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList_write_handle(struct __pyx_obj_4cdec_ __Pyx_RefNannyFinishContext(); } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":161 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":161 * fwrite(self.arr, sizeof(int), self.len, f) * * def write(self, char* filename): # <<<<<<<<<<<<<< @@ -7657,7 +7657,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_31write(struct __pyx_obj_4cdec __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("write", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":163 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":163 * def write(self, char* filename): * cdef FILE* f * f = fopen(filename, "w") # <<<<<<<<<<<<<< @@ -7666,7 +7666,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_31write(struct __pyx_obj_4cdec */ __pyx_v_f = fopen(__pyx_v_filename, __pyx_k_w); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":164 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":164 * cdef FILE* f * f = fopen(filename, "w") * self.write_handle(f) # <<<<<<<<<<<<<< @@ -7675,7 +7675,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_31write(struct __pyx_obj_4cdec */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->__pyx_vtab)->write_handle(__pyx_v_self, __pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":165 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":165 * f = fopen(filename, "w") * self.write_handle(f) * fclose(f) # <<<<<<<<<<<<<< @@ -7684,7 +7684,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_31write(struct __pyx_obj_4cdec */ fclose(__pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":161 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":161 * fwrite(self.arr, sizeof(int), self.len, f) * * def write(self, char* filename): # <<<<<<<<<<<<<< @@ -7699,7 +7699,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_31write(struct __pyx_obj_4cdec return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":167 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":167 * fclose(f) * * cdef void read_handle(self, FILE* f): # <<<<<<<<<<<<<< @@ -7712,7 +7712,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList_read_handle(struct __pyx_obj_4cdec_2 int __pyx_t_1; __Pyx_RefNannySetupContext("read_handle", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":168 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":168 * * cdef void read_handle(self, FILE* f): * (self.arr) # <<<<<<<<<<<<<< @@ -7721,7 +7721,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList_read_handle(struct __pyx_obj_4cdec_2 */ __pyx_v_self->arr; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":169 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":169 * cdef void read_handle(self, FILE* f): * (self.arr) * fread(&(self.len), sizeof(int), 1, f) # <<<<<<<<<<<<<< @@ -7730,7 +7730,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList_read_handle(struct __pyx_obj_4cdec_2 */ fread((&__pyx_v_self->len), (sizeof(int)), 1, __pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":170 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":170 * (self.arr) * fread(&(self.len), sizeof(int), 1, f) * self.arr = malloc(self.len * sizeof(int)) # <<<<<<<<<<<<<< @@ -7739,7 +7739,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList_read_handle(struct __pyx_obj_4cdec_2 */ __pyx_v_self->arr = ((int *)malloc((__pyx_v_self->len * (sizeof(int))))); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":171 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":171 * fread(&(self.len), sizeof(int), 1, f) * self.arr = malloc(self.len * sizeof(int)) * self.size = self.len # <<<<<<<<<<<<<< @@ -7749,7 +7749,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList_read_handle(struct __pyx_obj_4cdec_2 __pyx_t_1 = __pyx_v_self->len; __pyx_v_self->size = __pyx_t_1; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":172 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":172 * self.arr = malloc(self.len * sizeof(int)) * self.size = self.len * fread(self.arr, sizeof(int), self.len, f) # <<<<<<<<<<<<<< @@ -7758,7 +7758,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList_read_handle(struct __pyx_obj_4cdec_2 */ fread(__pyx_v_self->arr, (sizeof(int)), __pyx_v_self->len, __pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":167 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":167 * fclose(f) * * cdef void read_handle(self, FILE* f): # <<<<<<<<<<<<<< @@ -7770,7 +7770,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList_read_handle(struct __pyx_obj_4cdec_2 __Pyx_RefNannyFinishContext(); } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":174 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":174 * fread(self.arr, sizeof(int), self.len, f) * * def read(self, char* filename): # <<<<<<<<<<<<<< @@ -7810,7 +7810,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_33read(struct __pyx_obj_4cdec_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("read", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":176 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":176 * def read(self, char* filename): * cdef FILE* f * f = fopen(filename, "r") # <<<<<<<<<<<<<< @@ -7819,7 +7819,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_33read(struct __pyx_obj_4cdec_ */ __pyx_v_f = fopen(__pyx_v_filename, __pyx_k_r); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":177 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":177 * cdef FILE* f * f = fopen(filename, "r") * self.read_handle(f) # <<<<<<<<<<<<<< @@ -7827,14 +7827,14 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_33read(struct __pyx_obj_4cdec_ */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->__pyx_vtab)->read_handle(__pyx_v_self, __pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":178 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":178 * f = fopen(filename, "r") * self.read_handle(f) * fclose(f) # <<<<<<<<<<<<<< */ fclose(__pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/int_list.pxi":174 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":174 * fread(self.arr, sizeof(int), self.len, f) * * def read(self, char* filename): # <<<<<<<<<<<<<< @@ -7849,7 +7849,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_33read(struct __pyx_obj_4cdec_ return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/str_map.pxi":13 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/str_map.pxi":13 * cdef int index(self, char *s) * * def __cinit__(self): # <<<<<<<<<<<<<< @@ -7878,7 +7878,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9StringMap___cinit__(struct __pyx_obj_4cdec_2 __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/str_map.pxi":14 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/str_map.pxi":14 * * def __cinit__(self): * self.vocab = stringmap_new() # <<<<<<<<<<<<<< @@ -7887,7 +7887,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9StringMap___cinit__(struct __pyx_obj_4cdec_2 */ __pyx_v_self->vocab = stringmap_new(); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/str_map.pxi":13 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/str_map.pxi":13 * cdef int index(self, char *s) * * def __cinit__(self): # <<<<<<<<<<<<<< @@ -7901,7 +7901,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9StringMap___cinit__(struct __pyx_obj_4cdec_2 return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/str_map.pxi":16 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/str_map.pxi":16 * self.vocab = stringmap_new() * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -7924,7 +7924,7 @@ static void __pyx_pf_4cdec_2sa_3_sa_9StringMap_2__dealloc__(struct __pyx_obj_4cd __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/str_map.pxi":17 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/str_map.pxi":17 * * def __dealloc__(self): * stringmap_delete(self.vocab) # <<<<<<<<<<<<<< @@ -7933,7 +7933,7 @@ static void __pyx_pf_4cdec_2sa_3_sa_9StringMap_2__dealloc__(struct __pyx_obj_4cd */ stringmap_delete(__pyx_v_self->vocab); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/str_map.pxi":16 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/str_map.pxi":16 * self.vocab = stringmap_new() * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -7945,7 +7945,7 @@ static void __pyx_pf_4cdec_2sa_3_sa_9StringMap_2__dealloc__(struct __pyx_obj_4cd __Pyx_RefNannyFinishContext(); } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/str_map.pxi":19 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/str_map.pxi":19 * stringmap_delete(self.vocab) * * cdef char *word(self, int i): # <<<<<<<<<<<<<< @@ -7958,7 +7958,7 @@ static char *__pyx_f_4cdec_2sa_3_sa_9StringMap_word(struct __pyx_obj_4cdec_2sa_3 __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("word", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/str_map.pxi":20 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/str_map.pxi":20 * * cdef char *word(self, int i): * return stringmap_word(self.vocab, i) # <<<<<<<<<<<<<< @@ -7968,7 +7968,7 @@ static char *__pyx_f_4cdec_2sa_3_sa_9StringMap_word(struct __pyx_obj_4cdec_2sa_3 __pyx_r = stringmap_word(__pyx_v_self->vocab, __pyx_v_i); goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/str_map.pxi":19 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/str_map.pxi":19 * stringmap_delete(self.vocab) * * cdef char *word(self, int i): # <<<<<<<<<<<<<< @@ -7982,7 +7982,7 @@ static char *__pyx_f_4cdec_2sa_3_sa_9StringMap_word(struct __pyx_obj_4cdec_2sa_3 return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/str_map.pxi":22 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/str_map.pxi":22 * return stringmap_word(self.vocab, i) * * cdef int index(self, char *s): # <<<<<<<<<<<<<< @@ -7994,7 +7994,7 @@ static int __pyx_f_4cdec_2sa_3_sa_9StringMap_index(struct __pyx_obj_4cdec_2sa_3_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("index", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/str_map.pxi":23 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/str_map.pxi":23 * * cdef int index(self, char *s): * return stringmap_index(self.vocab, s) # <<<<<<<<<<<<<< @@ -8002,7 +8002,7 @@ static int __pyx_f_4cdec_2sa_3_sa_9StringMap_index(struct __pyx_obj_4cdec_2sa_3_ __pyx_r = stringmap_index(__pyx_v_self->vocab, __pyx_v_s); goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/str_map.pxi":22 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/str_map.pxi":22 * return stringmap_word(self.vocab, i) * * cdef int index(self, char *s): # <<<<<<<<<<<<<< @@ -8015,7 +8015,7 @@ static int __pyx_f_4cdec_2sa_3_sa_9StringMap_index(struct __pyx_obj_4cdec_2sa_3_ return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":17 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":17 * cdef bint use_sent_id * * def __cinit__(self, from_binary=None, from_text=None, side=None, bint use_sent_id=False): # <<<<<<<<<<<<<< @@ -8125,7 +8125,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9DataArray___cinit__(struct __pyx_obj_4cdec_2 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":18 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":18 * * def __cinit__(self, from_binary=None, from_text=None, side=None, bint use_sent_id=False): * self.word2id = {"END_OF_FILE":0, "END_OF_LINE":1} # <<<<<<<<<<<<<< @@ -8142,7 +8142,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9DataArray___cinit__(struct __pyx_obj_4cdec_2 __pyx_v_self->word2id = __pyx_t_1; __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":19 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":19 * def __cinit__(self, from_binary=None, from_text=None, side=None, bint use_sent_id=False): * self.word2id = {"END_OF_FILE":0, "END_OF_LINE":1} * self.id2word = ["END_OF_FILE", "END_OF_LINE"] # <<<<<<<<<<<<<< @@ -8163,7 +8163,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9DataArray___cinit__(struct __pyx_obj_4cdec_2 __pyx_v_self->id2word = __pyx_t_1; __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":20 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":20 * self.word2id = {"END_OF_FILE":0, "END_OF_LINE":1} * self.id2word = ["END_OF_FILE", "END_OF_LINE"] * self.data = IntList(1000,1000) # <<<<<<<<<<<<<< @@ -8178,7 +8178,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9DataArray___cinit__(struct __pyx_obj_4cdec_2 __pyx_v_self->data = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":21 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":21 * self.id2word = ["END_OF_FILE", "END_OF_LINE"] * self.data = IntList(1000,1000) * self.sent_id = IntList(1000,1000) # <<<<<<<<<<<<<< @@ -8193,7 +8193,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9DataArray___cinit__(struct __pyx_obj_4cdec_2 __pyx_v_self->sent_id = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":22 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":22 * self.data = IntList(1000,1000) * self.sent_id = IntList(1000,1000) * self.sent_index = IntList(1000,1000) # <<<<<<<<<<<<<< @@ -8208,7 +8208,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9DataArray___cinit__(struct __pyx_obj_4cdec_2 __pyx_v_self->sent_index = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":23 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":23 * self.sent_id = IntList(1000,1000) * self.sent_index = IntList(1000,1000) * self.use_sent_id = use_sent_id # <<<<<<<<<<<<<< @@ -8217,7 +8217,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9DataArray___cinit__(struct __pyx_obj_4cdec_2 */ __pyx_v_self->use_sent_id = __pyx_v_use_sent_id; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":24 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":24 * self.sent_index = IntList(1000,1000) * self.use_sent_id = use_sent_id * if from_binary: # <<<<<<<<<<<<<< @@ -8227,7 +8227,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9DataArray___cinit__(struct __pyx_obj_4cdec_2 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_from_binary); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_2) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":25 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":25 * self.use_sent_id = use_sent_id * if from_binary: * self.read_binary(from_binary) # <<<<<<<<<<<<<< @@ -8249,7 +8249,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9DataArray___cinit__(struct __pyx_obj_4cdec_2 goto __pyx_L3; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":26 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":26 * if from_binary: * self.read_binary(from_binary) * elif from_text: # <<<<<<<<<<<<<< @@ -8259,7 +8259,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9DataArray___cinit__(struct __pyx_obj_4cdec_2 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_from_text); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_2) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":27 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":27 * self.read_binary(from_binary) * elif from_text: * if side: # <<<<<<<<<<<<<< @@ -8269,7 +8269,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9DataArray___cinit__(struct __pyx_obj_4cdec_2 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_side); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_2) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":28 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":28 * elif from_text: * if side: * self.read_bitext(from_text, (0 if side == 'source' else 1)) # <<<<<<<<<<<<<< @@ -8303,7 +8303,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9DataArray___cinit__(struct __pyx_obj_4cdec_2 } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":30 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":30 * self.read_bitext(from_text, (0 if side == 'source' else 1)) * else: * self.read_text(from_text) # <<<<<<<<<<<<<< @@ -8328,7 +8328,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9DataArray___cinit__(struct __pyx_obj_4cdec_2 } __pyx_L3:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":17 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":17 * cdef bint use_sent_id * * def __cinit__(self, from_binary=None, from_text=None, side=None, bint use_sent_id=False): # <<<<<<<<<<<<<< @@ -8350,7 +8350,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9DataArray___cinit__(struct __pyx_obj_4cdec_2 return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":32 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":32 * self.read_text(from_text) * * def __len__(self): # <<<<<<<<<<<<<< @@ -8381,7 +8381,7 @@ static Py_ssize_t __pyx_pf_4cdec_2sa_3_sa_9DataArray_2__len__(struct __pyx_obj_4 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__len__", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":33 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":33 * * def __len__(self): * return len(self.data) # <<<<<<<<<<<<<< @@ -8395,7 +8395,7 @@ static Py_ssize_t __pyx_pf_4cdec_2sa_3_sa_9DataArray_2__len__(struct __pyx_obj_4 __pyx_r = __pyx_t_2; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":32 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":32 * self.read_text(from_text) * * def __len__(self): # <<<<<<<<<<<<<< @@ -8413,7 +8413,7 @@ static Py_ssize_t __pyx_pf_4cdec_2sa_3_sa_9DataArray_2__len__(struct __pyx_obj_4 return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":35 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":35 * return len(self.data) * * def get_sentence_id(self, i): # <<<<<<<<<<<<<< @@ -8444,7 +8444,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_4get_sentence_id(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_sentence_id", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":36 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":36 * * def get_sentence_id(self, i): * return self.sent_id.arr[i] # <<<<<<<<<<<<<< @@ -8459,7 +8459,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_4get_sentence_id(struct __py __pyx_t_2 = 0; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":35 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":35 * return len(self.data) * * def get_sentence_id(self, i): # <<<<<<<<<<<<<< @@ -8478,7 +8478,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_4get_sentence_id(struct __py return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":38 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":38 * return self.sent_id.arr[i] * * def get_sentence(self, i): # <<<<<<<<<<<<<< @@ -8516,7 +8516,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_6get_sentence(struct __pyx_o __Pyx_RefNannySetupContext("get_sentence", 0); __Pyx_INCREF(__pyx_v_i); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":40 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":40 * def get_sentence(self, i): * cdef int j, start, stop * sent = [] # <<<<<<<<<<<<<< @@ -8528,7 +8528,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_6get_sentence(struct __pyx_o __pyx_v_sent = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":41 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":41 * cdef int j, start, stop * sent = [] * start = self.sent_index.arr[i] # <<<<<<<<<<<<<< @@ -8538,7 +8538,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_6get_sentence(struct __pyx_o __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_start = (__pyx_v_self->sent_index->arr[__pyx_t_2]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":42 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":42 * sent = [] * start = self.sent_index.arr[i] * stop = self.sent_index.arr[i+1] # <<<<<<<<<<<<<< @@ -8551,7 +8551,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_6get_sentence(struct __pyx_o __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_stop = (__pyx_v_self->sent_index->arr[__pyx_t_2]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":43 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":43 * start = self.sent_index.arr[i] * stop = self.sent_index.arr[i+1] * for i from start <= i < stop: # <<<<<<<<<<<<<< @@ -8565,7 +8565,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_6get_sentence(struct __pyx_o __Pyx_DECREF_SET(__pyx_v_i, __pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":44 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":44 * stop = self.sent_index.arr[i+1] * for i from start <= i < stop: * sent.append(self.id2word[self.data.arr[i]]) # <<<<<<<<<<<<<< @@ -8580,7 +8580,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_6get_sentence(struct __pyx_o __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_i); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":43 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":43 * start = self.sent_index.arr[i] * stop = self.sent_index.arr[i+1] * for i from start <= i < stop: # <<<<<<<<<<<<<< @@ -8592,7 +8592,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_6get_sentence(struct __pyx_o __Pyx_DECREF_SET(__pyx_v_i, __pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":45 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":45 * for i from start <= i < stop: * sent.append(self.id2word[self.data.arr[i]]) * return sent # <<<<<<<<<<<<<< @@ -8604,7 +8604,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_6get_sentence(struct __pyx_o __pyx_r = __pyx_v_sent; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":38 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":38 * return self.sent_id.arr[i] * * def get_sentence(self, i): # <<<<<<<<<<<<<< @@ -8625,7 +8625,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_6get_sentence(struct __pyx_o return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":47 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":47 * return sent * * def get_id(self, word): # <<<<<<<<<<<<<< @@ -8659,7 +8659,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_8get_id(struct __pyx_obj_4cd int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_id", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":48 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":48 * * def get_id(self, word): * if not word in self.word2id: # <<<<<<<<<<<<<< @@ -8670,7 +8670,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_8get_id(struct __pyx_obj_4cd __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":49 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":49 * def get_id(self, word): * if not word in self.word2id: * self.word2id[word] = len(self.id2word) # <<<<<<<<<<<<<< @@ -8686,7 +8686,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_8get_id(struct __pyx_obj_4cd if (unlikely(PyObject_SetItem(__pyx_v_self->word2id, __pyx_v_word, __pyx_t_3) < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":50 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":50 * if not word in self.word2id: * self.word2id[word] = len(self.id2word) * self.id2word.append(word) # <<<<<<<<<<<<<< @@ -8698,7 +8698,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_8get_id(struct __pyx_obj_4cd } __pyx_L3:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":51 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":51 * self.word2id[word] = len(self.id2word) * self.id2word.append(word) * return self.word2id[word] # <<<<<<<<<<<<<< @@ -8712,7 +8712,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_8get_id(struct __pyx_obj_4cd __pyx_t_3 = 0; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":47 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":47 * return sent * * def get_id(self, word): # <<<<<<<<<<<<<< @@ -8731,7 +8731,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_8get_id(struct __pyx_obj_4cd return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":53 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":53 * return self.word2id[word] * * def __getitem__(self, loc): # <<<<<<<<<<<<<< @@ -8762,7 +8762,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_10__getitem__(struct __pyx_o int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getitem__", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":54 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":54 * * def __getitem__(self, loc): * return self.id2word[self.data.arr[loc]] # <<<<<<<<<<<<<< @@ -8777,7 +8777,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_10__getitem__(struct __pyx_o __pyx_t_2 = 0; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":53 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":53 * return self.word2id[word] * * def __getitem__(self, loc): # <<<<<<<<<<<<<< @@ -8796,7 +8796,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_10__getitem__(struct __pyx_o return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":56 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":56 * return self.id2word[self.data.arr[loc]] * * def get_sentence_bounds(self, loc): # <<<<<<<<<<<<<< @@ -8830,7 +8830,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_12get_sentence_bounds(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_sentence_bounds", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":57 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":57 * * def get_sentence_bounds(self, loc): * cdef int sid = self.sent_id.arr[loc] # <<<<<<<<<<<<<< @@ -8840,7 +8840,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_12get_sentence_bounds(struct __pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_v_loc); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_sid = (__pyx_v_self->sent_id->arr[__pyx_t_1]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":58 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":58 * def get_sentence_bounds(self, loc): * cdef int sid = self.sent_id.arr[loc] * return (self.sent_index.arr[sid], self.sent_index.arr[sid+1]) # <<<<<<<<<<<<<< @@ -8864,7 +8864,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_12get_sentence_bounds(struct __pyx_t_4 = 0; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":56 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":56 * return self.id2word[self.data.arr[loc]] * * def get_sentence_bounds(self, loc): # <<<<<<<<<<<<<< @@ -8885,7 +8885,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_12get_sentence_bounds(struct return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":60 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":60 * return (self.sent_index.arr[sid], self.sent_index.arr[sid+1]) * * def write_text(self, char* filename): # <<<<<<<<<<<<<< @@ -8943,7 +8943,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_14write_text(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("write_text", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":61 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":61 * * def write_text(self, char* filename): * with open(filename, "w") as f: # <<<<<<<<<<<<<< @@ -8983,7 +8983,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_14write_text(struct __pyx_ob __pyx_v_f = __pyx_t_4; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":62 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":62 * def write_text(self, char* filename): * with open(filename, "w") as f: * for w_id in self.data: # <<<<<<<<<<<<<< @@ -9028,7 +9028,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_14write_text(struct __pyx_ob __Pyx_XDECREF_SET(__pyx_v_w_id, __pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":63 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":63 * with open(filename, "w") as f: * for w_id in self.data: * if w_id > 1: # <<<<<<<<<<<<<< @@ -9040,7 +9040,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_14write_text(struct __pyx_ob __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_10) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":64 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":64 * for w_id in self.data: * if w_id > 1: * f.write("%s " % self.get_word(w_id)) # <<<<<<<<<<<<<< @@ -9077,7 +9077,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_14write_text(struct __pyx_ob } __pyx_L18:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":65 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":65 * if w_id > 1: * f.write("%s " % self.get_word(w_id)) * if w_id == 1: # <<<<<<<<<<<<<< @@ -9089,7 +9089,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_14write_text(struct __pyx_ob __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (__pyx_t_10) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":66 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":66 * f.write("%s " % self.get_word(w_id)) * if w_id == 1: * f.write("\n") # <<<<<<<<<<<<<< @@ -9119,7 +9119,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_14write_text(struct __pyx_ob __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":61 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":61 * * def write_text(self, char* filename): * with open(filename, "w") as f: # <<<<<<<<<<<<<< @@ -9190,7 +9190,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_14write_text(struct __pyx_ob __pyx_L23:; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":60 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":60 * return (self.sent_index.arr[sid], self.sent_index.arr[sid+1]) * * def write_text(self, char* filename): # <<<<<<<<<<<<<< @@ -9217,7 +9217,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_14write_text(struct __pyx_ob return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":68 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":68 * f.write("\n") * * def read_text(self, char* filename): # <<<<<<<<<<<<<< @@ -9271,7 +9271,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_16read_text(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("read_text", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":69 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":69 * * def read_text(self, char* filename): * with gzip_or_text(filename) as fp: # <<<<<<<<<<<<<< @@ -9311,7 +9311,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_16read_text(struct __pyx_obj __pyx_v_fp = __pyx_t_1; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":70 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":70 * def read_text(self, char* filename): * with gzip_or_text(filename) as fp: * self.read_text_data(fp) # <<<<<<<<<<<<<< @@ -9340,7 +9340,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_16read_text(struct __pyx_obj __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":69 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":69 * * def read_text(self, char* filename): * with gzip_or_text(filename) as fp: # <<<<<<<<<<<<<< @@ -9411,7 +9411,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_16read_text(struct __pyx_obj __pyx_L19:; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":68 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":68 * f.write("\n") * * def read_text(self, char* filename): # <<<<<<<<<<<<<< @@ -9436,7 +9436,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_16read_text(struct __pyx_obj return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":72 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":72 * self.read_text_data(fp) * * def read_bitext(self, char* filename, int side): # <<<<<<<<<<<<<< @@ -9506,7 +9506,7 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_9DataArray_19read_bitext(PyObject *__py } static PyObject *__pyx_gb_4cdec_2sa_3_sa_9DataArray_11read_bitext_2generator6(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":74 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":74 * def read_bitext(self, char* filename, int side): * with gzip_or_text(filename) as fp: * data = (line.split(' ||| ')[side] for line in fp) # <<<<<<<<<<<<<< @@ -9659,7 +9659,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_9DataArray_11read_bitext_2generator6(__ return NULL; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":72 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":72 * self.read_text_data(fp) * * def read_bitext(self, char* filename, int side): # <<<<<<<<<<<<<< @@ -9695,7 +9695,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_18read_bitext(struct __pyx_o __Pyx_GOTREF(__pyx_cur_scope); __pyx_cur_scope->__pyx_v_side = __pyx_v_side; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":73 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":73 * * def read_bitext(self, char* filename, int side): * with gzip_or_text(filename) as fp: # <<<<<<<<<<<<<< @@ -9736,7 +9736,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_18read_bitext(struct __pyx_o __pyx_cur_scope->__pyx_v_fp = __pyx_t_1; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":74 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":74 * def read_bitext(self, char* filename, int side): * with gzip_or_text(filename) as fp: * data = (line.split(' ||| ')[side] for line in fp) # <<<<<<<<<<<<<< @@ -9748,7 +9748,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_18read_bitext(struct __pyx_o __pyx_v_data = __pyx_t_1; __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":75 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":75 * with gzip_or_text(filename) as fp: * data = (line.split(' ||| ')[side] for line in fp) * self.read_text_data(data) # <<<<<<<<<<<<<< @@ -9777,7 +9777,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_18read_bitext(struct __pyx_o __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":73 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":73 * * def read_bitext(self, char* filename, int side): * with gzip_or_text(filename) as fp: # <<<<<<<<<<<<<< @@ -9848,7 +9848,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_18read_bitext(struct __pyx_o __pyx_L19:; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":72 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":72 * self.read_text_data(fp) * * def read_bitext(self, char* filename, int side): # <<<<<<<<<<<<<< @@ -9874,7 +9874,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_18read_bitext(struct __pyx_o return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":77 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":77 * self.read_text_data(data) * * def read_text_data(self, data): # <<<<<<<<<<<<<< @@ -9919,7 +9919,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_20read_text_data(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("read_text_data", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":78 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":78 * * def read_text_data(self, data): * cdef int word_count = 0 # <<<<<<<<<<<<<< @@ -9928,7 +9928,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_20read_text_data(struct __py */ __pyx_v_word_count = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":79 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":79 * def read_text_data(self, data): * cdef int word_count = 0 * for line_num, line in enumerate(data): # <<<<<<<<<<<<<< @@ -9982,7 +9982,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_20read_text_data(struct __py __pyx_t_1 = __pyx_t_5; __pyx_t_5 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":80 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":80 * cdef int word_count = 0 * for line_num, line in enumerate(data): * self.sent_index.append(word_count) # <<<<<<<<<<<<<< @@ -9994,7 +9994,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_20read_text_data(struct __py __pyx_t_6 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_self->sent_index), __pyx_t_5); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":81 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":81 * for line_num, line in enumerate(data): * self.sent_index.append(word_count) * for word in line.split(): # <<<<<<<<<<<<<< @@ -10045,7 +10045,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_20read_text_data(struct __py __Pyx_XDECREF_SET(__pyx_v_word, __pyx_t_7); __pyx_t_7 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":82 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":82 * self.sent_index.append(word_count) * for word in line.split(): * self.data.append(self.get_id(word)) # <<<<<<<<<<<<<< @@ -10066,7 +10066,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_20read_text_data(struct __py __pyx_t_6 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_self->data), __pyx_t_11); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":83 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":83 * for word in line.split(): * self.data.append(self.get_id(word)) * if self.use_sent_id: # <<<<<<<<<<<<<< @@ -10076,7 +10076,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_20read_text_data(struct __py __pyx_t_12 = (__pyx_v_self->use_sent_id != 0); if (__pyx_t_12) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":84 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":84 * self.data.append(self.get_id(word)) * if self.use_sent_id: * self.sent_id.append(line_num) # <<<<<<<<<<<<<< @@ -10088,7 +10088,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_20read_text_data(struct __py } __pyx_L7:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":85 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":85 * if self.use_sent_id: * self.sent_id.append(line_num) * word_count = word_count + 1 # <<<<<<<<<<<<<< @@ -10099,7 +10099,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_20read_text_data(struct __py } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":86 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":86 * self.sent_id.append(line_num) * word_count = word_count + 1 * self.data.append(1) # <<<<<<<<<<<<<< @@ -10108,7 +10108,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_20read_text_data(struct __py */ __pyx_t_6 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_self->data), __pyx_int_1); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":87 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":87 * word_count = word_count + 1 * self.data.append(1) * if self.use_sent_id: # <<<<<<<<<<<<<< @@ -10118,7 +10118,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_20read_text_data(struct __py __pyx_t_12 = (__pyx_v_self->use_sent_id != 0); if (__pyx_t_12) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":88 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":88 * self.data.append(1) * if self.use_sent_id: * self.sent_id.append(line_num) # <<<<<<<<<<<<<< @@ -10130,7 +10130,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_20read_text_data(struct __py } __pyx_L8:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":89 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":89 * if self.use_sent_id: * self.sent_id.append(line_num) * word_count = word_count + 1 # <<<<<<<<<<<<<< @@ -10142,7 +10142,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_20read_text_data(struct __py __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":90 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":90 * self.sent_id.append(line_num) * word_count = word_count + 1 * self.data.append(0) # <<<<<<<<<<<<<< @@ -10151,7 +10151,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_20read_text_data(struct __py */ __pyx_t_6 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_self->data), __pyx_int_0); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":91 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":91 * word_count = word_count + 1 * self.data.append(0) * self.sent_index.append(word_count) # <<<<<<<<<<<<<< @@ -10163,7 +10163,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_20read_text_data(struct __py __pyx_t_6 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_self->sent_index), __pyx_t_1); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":77 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":77 * self.read_text_data(data) * * def read_text_data(self, data): # <<<<<<<<<<<<<< @@ -10192,7 +10192,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_20read_text_data(struct __py return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":94 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":94 * * * def read_binary(self, char* filename): # <<<<<<<<<<<<<< @@ -10232,7 +10232,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_22read_binary(struct __pyx_o __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("read_binary", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":96 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":96 * def read_binary(self, char* filename): * cdef FILE* f * f = fopen(filename, "r") # <<<<<<<<<<<<<< @@ -10241,7 +10241,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_22read_binary(struct __pyx_o */ __pyx_v_f = fopen(__pyx_v_filename, __pyx_k_r); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":97 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":97 * cdef FILE* f * f = fopen(filename, "r") * self.read_handle(f) # <<<<<<<<<<<<<< @@ -10250,7 +10250,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_22read_binary(struct __pyx_o */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_DataArray *)__pyx_v_self->__pyx_vtab)->read_handle(__pyx_v_self, __pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":98 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":98 * f = fopen(filename, "r") * self.read_handle(f) * fclose(f) # <<<<<<<<<<<<<< @@ -10259,7 +10259,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_22read_binary(struct __pyx_o */ fclose(__pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":94 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":94 * * * def read_binary(self, char* filename): # <<<<<<<<<<<<<< @@ -10274,7 +10274,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_22read_binary(struct __pyx_o return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":100 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":100 * fclose(f) * * cdef void read_handle(self, FILE* f): # <<<<<<<<<<<<<< @@ -10300,7 +10300,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9DataArray_read_handle(struct __pyx_obj_4cdec int __pyx_clineno = 0; __Pyx_RefNannySetupContext("read_handle", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":105 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":105 * cdef char* word * * self.data.read_handle(f) # <<<<<<<<<<<<<< @@ -10309,7 +10309,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9DataArray_read_handle(struct __pyx_obj_4cdec */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->data->__pyx_vtab)->read_handle(__pyx_v_self->data, __pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":106 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":106 * * self.data.read_handle(f) * self.sent_index.read_handle(f) # <<<<<<<<<<<<<< @@ -10318,7 +10318,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9DataArray_read_handle(struct __pyx_obj_4cdec */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->sent_index->__pyx_vtab)->read_handle(__pyx_v_self->sent_index, __pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":107 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":107 * self.data.read_handle(f) * self.sent_index.read_handle(f) * self.sent_id.read_handle(f) # <<<<<<<<<<<<<< @@ -10327,7 +10327,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9DataArray_read_handle(struct __pyx_obj_4cdec */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->sent_id->__pyx_vtab)->read_handle(__pyx_v_self->sent_id, __pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":108 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":108 * self.sent_index.read_handle(f) * self.sent_id.read_handle(f) * fread(&(num_words), sizeof(int), 1, f) # <<<<<<<<<<<<<< @@ -10336,7 +10336,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9DataArray_read_handle(struct __pyx_obj_4cdec */ fread((&__pyx_v_num_words), (sizeof(int)), 1, __pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":109 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":109 * self.sent_id.read_handle(f) * fread(&(num_words), sizeof(int), 1, f) * for i in range(num_words): # <<<<<<<<<<<<<< @@ -10347,7 +10347,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9DataArray_read_handle(struct __pyx_obj_4cdec for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":110 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":110 * fread(&(num_words), sizeof(int), 1, f) * for i in range(num_words): * fread(&(word_len), sizeof(int), 1, f) # <<<<<<<<<<<<<< @@ -10356,7 +10356,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9DataArray_read_handle(struct __pyx_obj_4cdec */ fread((&__pyx_v_word_len), (sizeof(int)), 1, __pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":111 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":111 * for i in range(num_words): * fread(&(word_len), sizeof(int), 1, f) * word = malloc (word_len * sizeof(char)) # <<<<<<<<<<<<<< @@ -10365,7 +10365,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9DataArray_read_handle(struct __pyx_obj_4cdec */ __pyx_v_word = ((char *)malloc((__pyx_v_word_len * (sizeof(char))))); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":112 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":112 * fread(&(word_len), sizeof(int), 1, f) * word = malloc (word_len * sizeof(char)) * fread(word, sizeof(char), word_len, f) # <<<<<<<<<<<<<< @@ -10374,7 +10374,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9DataArray_read_handle(struct __pyx_obj_4cdec */ fread(__pyx_v_word, (sizeof(char)), __pyx_v_word_len, __pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":113 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":113 * word = malloc (word_len * sizeof(char)) * fread(word, sizeof(char), word_len, f) * self.word2id[word] = len(self.id2word) # <<<<<<<<<<<<<< @@ -10393,7 +10393,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9DataArray_read_handle(struct __pyx_obj_4cdec __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":114 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":114 * fread(word, sizeof(char), word_len, f) * self.word2id[word] = len(self.id2word) * self.id2word.append(word) # <<<<<<<<<<<<<< @@ -10405,7 +10405,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9DataArray_read_handle(struct __pyx_obj_4cdec __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_self->id2word, __pyx_t_3); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":115 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":115 * self.word2id[word] = len(self.id2word) * self.id2word.append(word) * free(word) # <<<<<<<<<<<<<< @@ -10415,7 +10415,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9DataArray_read_handle(struct __pyx_obj_4cdec free(__pyx_v_word); } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":116 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":116 * self.id2word.append(word) * free(word) * if len(self.sent_id) == 0: # <<<<<<<<<<<<<< @@ -10429,7 +10429,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9DataArray_read_handle(struct __pyx_obj_4cdec __pyx_t_7 = ((__pyx_t_4 == 0) != 0); if (__pyx_t_7) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":117 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":117 * free(word) * if len(self.sent_id) == 0: * self.use_sent_id = False # <<<<<<<<<<<<<< @@ -10441,7 +10441,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9DataArray_read_handle(struct __pyx_obj_4cdec } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":119 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":119 * self.use_sent_id = False * else: * self.use_sent_id = True # <<<<<<<<<<<<<< @@ -10452,7 +10452,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9DataArray_read_handle(struct __pyx_obj_4cdec } __pyx_L5:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":100 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":100 * fclose(f) * * cdef void read_handle(self, FILE* f): # <<<<<<<<<<<<<< @@ -10470,7 +10470,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9DataArray_read_handle(struct __pyx_obj_4cdec __Pyx_RefNannyFinishContext(); } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":121 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":121 * self.use_sent_id = True * * cdef void write_handle(self, FILE* f): # <<<<<<<<<<<<<< @@ -10494,7 +10494,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9DataArray_write_handle(struct __pyx_obj_4cde int __pyx_clineno = 0; __Pyx_RefNannySetupContext("write_handle", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":125 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":125 * cdef int num_words * * self.data.write_handle(f) # <<<<<<<<<<<<<< @@ -10503,7 +10503,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9DataArray_write_handle(struct __pyx_obj_4cde */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->data->__pyx_vtab)->write_handle(__pyx_v_self->data, __pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":126 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":126 * * self.data.write_handle(f) * self.sent_index.write_handle(f) # <<<<<<<<<<<<<< @@ -10512,7 +10512,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9DataArray_write_handle(struct __pyx_obj_4cde */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->sent_index->__pyx_vtab)->write_handle(__pyx_v_self->sent_index, __pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":127 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":127 * self.data.write_handle(f) * self.sent_index.write_handle(f) * self.sent_id.write_handle(f) # <<<<<<<<<<<<<< @@ -10521,7 +10521,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9DataArray_write_handle(struct __pyx_obj_4cde */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->sent_id->__pyx_vtab)->write_handle(__pyx_v_self->sent_id, __pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":128 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":128 * self.sent_index.write_handle(f) * self.sent_id.write_handle(f) * num_words = len(self.id2word) - 2 # <<<<<<<<<<<<<< @@ -10534,7 +10534,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9DataArray_write_handle(struct __pyx_obj_4cde __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_num_words = (__pyx_t_2 - 2); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":129 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":129 * self.sent_id.write_handle(f) * num_words = len(self.id2word) - 2 * fwrite(&(num_words), sizeof(int), 1, f) # <<<<<<<<<<<<<< @@ -10543,7 +10543,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9DataArray_write_handle(struct __pyx_obj_4cde */ fwrite((&__pyx_v_num_words), (sizeof(int)), 1, __pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":130 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":130 * num_words = len(self.id2word) - 2 * fwrite(&(num_words), sizeof(int), 1, f) * for word in self.id2word[2:]: # <<<<<<<<<<<<<< @@ -10591,7 +10591,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9DataArray_write_handle(struct __pyx_obj_4cde __Pyx_XDECREF_SET(__pyx_v_word, __pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":131 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":131 * fwrite(&(num_words), sizeof(int), 1, f) * for word in self.id2word[2:]: * word_len = len(word) + 1 # <<<<<<<<<<<<<< @@ -10601,7 +10601,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9DataArray_write_handle(struct __pyx_obj_4cde __pyx_t_5 = PyObject_Length(__pyx_v_word); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_word_len = (__pyx_t_5 + 1); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":132 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":132 * for word in self.id2word[2:]: * word_len = len(word) + 1 * fwrite(&(word_len), sizeof(int), 1, f) # <<<<<<<<<<<<<< @@ -10610,7 +10610,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9DataArray_write_handle(struct __pyx_obj_4cde */ fwrite((&__pyx_v_word_len), (sizeof(int)), 1, __pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":133 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":133 * word_len = len(word) + 1 * fwrite(&(word_len), sizeof(int), 1, f) * fwrite(word, sizeof(char), word_len, f) # <<<<<<<<<<<<<< @@ -10622,7 +10622,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9DataArray_write_handle(struct __pyx_obj_4cde } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":121 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":121 * self.use_sent_id = True * * cdef void write_handle(self, FILE* f): # <<<<<<<<<<<<<< @@ -10641,7 +10641,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9DataArray_write_handle(struct __pyx_obj_4cde __Pyx_RefNannyFinishContext(); } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":135 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":135 * fwrite(word, sizeof(char), word_len, f) * * def write_binary(self, char* filename): # <<<<<<<<<<<<<< @@ -10681,7 +10681,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_24write_binary(struct __pyx_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("write_binary", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":137 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":137 * def write_binary(self, char* filename): * cdef FILE* f * f = fopen(filename, "w") # <<<<<<<<<<<<<< @@ -10690,7 +10690,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_24write_binary(struct __pyx_ */ __pyx_v_f = fopen(__pyx_v_filename, __pyx_k_w); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":138 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":138 * cdef FILE* f * f = fopen(filename, "w") * self.write_handle(f) # <<<<<<<<<<<<<< @@ -10699,7 +10699,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_24write_binary(struct __pyx_ */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_DataArray *)__pyx_v_self->__pyx_vtab)->write_handle(__pyx_v_self, __pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":139 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":139 * f = fopen(filename, "w") * self.write_handle(f) * fclose(f) # <<<<<<<<<<<<<< @@ -10708,7 +10708,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_24write_binary(struct __pyx_ */ fclose(__pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":135 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":135 * fwrite(word, sizeof(char), word_len, f) * * def write_binary(self, char* filename): # <<<<<<<<<<<<<< @@ -10723,7 +10723,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_24write_binary(struct __pyx_ return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":141 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":141 * fclose(f) * * def write_enhanced_handle(self, f): # <<<<<<<<<<<<<< @@ -10760,7 +10760,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_26write_enhanced_handle(stru int __pyx_clineno = 0; __Pyx_RefNannySetupContext("write_enhanced_handle", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":142 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":142 * * def write_enhanced_handle(self, f): * for i in self.data: # <<<<<<<<<<<<<< @@ -10805,7 +10805,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_26write_enhanced_handle(stru __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":143 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":143 * def write_enhanced_handle(self, f): * for i in self.data: * f.write("%d " %i) # <<<<<<<<<<<<<< @@ -10829,7 +10829,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_26write_enhanced_handle(stru } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":144 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":144 * for i in self.data: * f.write("%d " %i) * f.write("\n") # <<<<<<<<<<<<<< @@ -10843,7 +10843,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_26write_enhanced_handle(stru __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":145 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":145 * f.write("%d " %i) * f.write("\n") * for i in self.sent_index: # <<<<<<<<<<<<<< @@ -10888,7 +10888,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_26write_enhanced_handle(stru __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":146 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":146 * f.write("\n") * for i in self.sent_index: * f.write("%d " %i) # <<<<<<<<<<<<<< @@ -10912,7 +10912,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_26write_enhanced_handle(stru } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":147 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":147 * for i in self.sent_index: * f.write("%d " %i) * f.write("\n") # <<<<<<<<<<<<<< @@ -10926,7 +10926,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_26write_enhanced_handle(stru __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":148 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":148 * f.write("%d " %i) * f.write("\n") * for i in self.sent_id: # <<<<<<<<<<<<<< @@ -10971,7 +10971,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_26write_enhanced_handle(stru __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_5); __pyx_t_5 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":149 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":149 * f.write("\n") * for i in self.sent_id: * f.write("%d " %i) # <<<<<<<<<<<<<< @@ -10995,7 +10995,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_26write_enhanced_handle(stru } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":150 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":150 * for i in self.sent_id: * f.write("%d " %i) * f.write("\n") # <<<<<<<<<<<<<< @@ -11009,7 +11009,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_26write_enhanced_handle(stru __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":151 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":151 * f.write("%d " %i) * f.write("\n") * for word in self.id2word: # <<<<<<<<<<<<<< @@ -11054,7 +11054,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_26write_enhanced_handle(stru __Pyx_XDECREF_SET(__pyx_v_word, __pyx_t_6); __pyx_t_6 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":152 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":152 * f.write("\n") * for word in self.id2word: * f.write("%s %d " % (word, self.word2id[word])) # <<<<<<<<<<<<<< @@ -11089,7 +11089,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_26write_enhanced_handle(stru } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":153 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":153 * for word in self.id2word: * f.write("%s %d " % (word, self.word2id[word])) * f.write("\n") # <<<<<<<<<<<<<< @@ -11103,7 +11103,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_26write_enhanced_handle(stru __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":141 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":141 * fclose(f) * * def write_enhanced_handle(self, f): # <<<<<<<<<<<<<< @@ -11129,7 +11129,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_26write_enhanced_handle(stru return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":155 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":155 * f.write("\n") * * def write_enhanced(self, char* filename): # <<<<<<<<<<<<<< @@ -11183,7 +11183,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_28write_enhanced(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("write_enhanced", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":156 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":156 * * def write_enhanced(self, char* filename): * with open(filename, "w") as f: # <<<<<<<<<<<<<< @@ -11222,7 +11222,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_28write_enhanced(struct __py __pyx_v_f = __pyx_t_4; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":157 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":157 * def write_enhanced(self, char* filename): * with open(filename, "w") as f: * self.write_enhanced_handle(self, f) # <<<<<<<<<<<<<< @@ -11252,7 +11252,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_28write_enhanced(struct __py __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":156 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":156 * * def write_enhanced(self, char* filename): * with open(filename, "w") as f: # <<<<<<<<<<<<<< @@ -11322,7 +11322,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_28write_enhanced(struct __py __pyx_L19:; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":155 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":155 * f.write("\n") * * def write_enhanced(self, char* filename): # <<<<<<<<<<<<<< @@ -11347,7 +11347,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_28write_enhanced(struct __py return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":10 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":10 * * cdef class DataArray: * cdef public word2id # <<<<<<<<<<<<<< @@ -11442,7 +11442,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9DataArray_7word2id_4__del__(struct __pyx_obj return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":11 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":11 * cdef class DataArray: * cdef public word2id * cdef public id2word # <<<<<<<<<<<<<< @@ -11537,7 +11537,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9DataArray_7id2word_4__del__(struct __pyx_obj return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":12 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":12 * cdef public word2id * cdef public id2word * cdef public IntList data # <<<<<<<<<<<<<< @@ -11645,7 +11645,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9DataArray_4data_4__del__(struct __pyx_obj_4c return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":13 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":13 * cdef public id2word * cdef public IntList data * cdef public IntList sent_id # <<<<<<<<<<<<<< @@ -11753,7 +11753,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9DataArray_7sent_id_4__del__(struct __pyx_obj return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":14 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":14 * cdef public IntList data * cdef public IntList sent_id * cdef public IntList sent_index # <<<<<<<<<<<<<< @@ -11866,7 +11866,7 @@ static int __pyx_f_4cdec_2sa_3_sa_9Alignment_link(CYTHON_UNUSED struct __pyx_obj __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("link", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":16 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":16 * cdef int link(self, int i, int j): * """Integerizes an alignment link pair""" * return i * ALIGNMENT_CODE + j # <<<<<<<<<<<<<< @@ -11876,7 +11876,7 @@ static int __pyx_f_4cdec_2sa_3_sa_9Alignment_link(CYTHON_UNUSED struct __pyx_obj __pyx_r = ((__pyx_v_i * __pyx_v_4cdec_2sa_3_sa_ALIGNMENT_CODE) + __pyx_v_j); goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":14 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":14 * cdef IntList sent_index * * cdef int link(self, int i, int j): # <<<<<<<<<<<<<< @@ -11890,7 +11890,7 @@ static int __pyx_f_4cdec_2sa_3_sa_9Alignment_link(CYTHON_UNUSED struct __pyx_obj return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":18 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":18 * return i * ALIGNMENT_CODE + j * * def unlink(self, link): # <<<<<<<<<<<<<< @@ -11923,7 +11923,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_unlink(CYTHON_UNUSED struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("unlink", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":20 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":20 * def unlink(self, link): * """De-integerizes an alignment link pair""" * return (link / ALIGNMENT_CODE, link % ALIGNMENT_CODE) # <<<<<<<<<<<<<< @@ -11953,7 +11953,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_unlink(CYTHON_UNUSED struct __pyx_t_1 = 0; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":18 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":18 * return i * ALIGNMENT_CODE + j * * def unlink(self, link): # <<<<<<<<<<<<<< @@ -11974,7 +11974,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_unlink(CYTHON_UNUSED struct return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":22 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":22 * return (link / ALIGNMENT_CODE, link % ALIGNMENT_CODE) * * cdef _unlink(self, int link, int* f, int* e): # <<<<<<<<<<<<<< @@ -11990,7 +11990,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_9Alignment__unlink(CYTHON_UNUSED struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_unlink", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":23 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":23 * * cdef _unlink(self, int link, int* f, int* e): * f[0] = link / ALIGNMENT_CODE # <<<<<<<<<<<<<< @@ -12019,7 +12019,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_9Alignment__unlink(CYTHON_UNUSED struct } (__pyx_v_f[0]) = __Pyx_div_int(__pyx_v_link, __pyx_v_4cdec_2sa_3_sa_ALIGNMENT_CODE); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":24 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":24 * cdef _unlink(self, int link, int* f, int* e): * f[0] = link / ALIGNMENT_CODE * e[0] = link % ALIGNMENT_CODE # <<<<<<<<<<<<<< @@ -12038,7 +12038,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_9Alignment__unlink(CYTHON_UNUSED struct } (__pyx_v_e[0]) = __Pyx_mod_int(__pyx_v_link, __pyx_v_4cdec_2sa_3_sa_ALIGNMENT_CODE); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":22 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":22 * return (link / ALIGNMENT_CODE, link % ALIGNMENT_CODE) * * cdef _unlink(self, int link, int* f, int* e): # <<<<<<<<<<<<<< @@ -12058,7 +12058,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_9Alignment__unlink(CYTHON_UNUSED struct return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":26 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":26 * e[0] = link % ALIGNMENT_CODE * * def get_sent_links(self, int sent_id): # <<<<<<<<<<<<<< @@ -12104,7 +12104,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_2get_sent_links(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_sent_links", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":30 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":30 * cdef int* arr * cdef int arr_len * sent_links = IntList() # <<<<<<<<<<<<<< @@ -12116,7 +12116,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_2get_sent_links(struct __pyx __pyx_v_sent_links = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":31 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":31 * cdef int arr_len * sent_links = IntList() * arr = self._get_sent_links(sent_id, &arr_len) # <<<<<<<<<<<<<< @@ -12125,7 +12125,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_2get_sent_links(struct __pyx */ __pyx_v_arr = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Alignment *)__pyx_v_self->__pyx_vtab)->_get_sent_links(__pyx_v_self, __pyx_v_sent_id, (&__pyx_v_arr_len)); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":32 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":32 * sent_links = IntList() * arr = self._get_sent_links(sent_id, &arr_len) * sent_links._extend_arr(arr, arr_len*2) # <<<<<<<<<<<<<< @@ -12134,7 +12134,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_2get_sent_links(struct __pyx */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_sent_links->__pyx_vtab)->_extend_arr(__pyx_v_sent_links, __pyx_v_arr, (__pyx_v_arr_len * 2)); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":33 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":33 * arr = self._get_sent_links(sent_id, &arr_len) * sent_links._extend_arr(arr, arr_len*2) * free(arr) # <<<<<<<<<<<<<< @@ -12143,7 +12143,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_2get_sent_links(struct __pyx */ free(__pyx_v_arr); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":34 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":34 * sent_links._extend_arr(arr, arr_len*2) * free(arr) * return sent_links # <<<<<<<<<<<<<< @@ -12155,7 +12155,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_2get_sent_links(struct __pyx __pyx_r = ((PyObject *)__pyx_v_sent_links); goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":26 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":26 * e[0] = link % ALIGNMENT_CODE * * def get_sent_links(self, int sent_id): # <<<<<<<<<<<<<< @@ -12175,7 +12175,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_2get_sent_links(struct __pyx return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":36 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":36 * return sent_links * * cdef int* _get_sent_links(self, int sent_id, int* num_links): # <<<<<<<<<<<<<< @@ -12197,7 +12197,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_9Alignment__get_sent_links(struct __pyx_obj_4 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_sent_links", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":39 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":39 * cdef int* sent_links * cdef int i, start, end * start = self.sent_index.arr[sent_id] # <<<<<<<<<<<<<< @@ -12206,7 +12206,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_9Alignment__get_sent_links(struct __pyx_obj_4 */ __pyx_v_start = (__pyx_v_self->sent_index->arr[__pyx_v_sent_id]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":40 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":40 * cdef int i, start, end * start = self.sent_index.arr[sent_id] * end = self.sent_index.arr[sent_id+1] # <<<<<<<<<<<<<< @@ -12215,7 +12215,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_9Alignment__get_sent_links(struct __pyx_obj_4 */ __pyx_v_end = (__pyx_v_self->sent_index->arr[(__pyx_v_sent_id + 1)]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":41 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":41 * start = self.sent_index.arr[sent_id] * end = self.sent_index.arr[sent_id+1] * num_links[0] = end - start # <<<<<<<<<<<<<< @@ -12224,7 +12224,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_9Alignment__get_sent_links(struct __pyx_obj_4 */ (__pyx_v_num_links[0]) = (__pyx_v_end - __pyx_v_start); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":42 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":42 * end = self.sent_index.arr[sent_id+1] * num_links[0] = end - start * sent_links = malloc(2*num_links[0]*sizeof(int)) # <<<<<<<<<<<<<< @@ -12233,7 +12233,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_9Alignment__get_sent_links(struct __pyx_obj_4 */ __pyx_v_sent_links = ((int *)malloc(((2 * (__pyx_v_num_links[0])) * (sizeof(int))))); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":43 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":43 * num_links[0] = end - start * sent_links = malloc(2*num_links[0]*sizeof(int)) * for i from 0 <= i < num_links[0]: # <<<<<<<<<<<<<< @@ -12243,7 +12243,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_9Alignment__get_sent_links(struct __pyx_obj_4 __pyx_t_1 = (__pyx_v_num_links[0]); for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":44 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":44 * sent_links = malloc(2*num_links[0]*sizeof(int)) * for i from 0 <= i < num_links[0]: * self._unlink(self.links.arr[start + i], sent_links + (2*i), sent_links + (2*i) + 1) # <<<<<<<<<<<<<< @@ -12255,7 +12255,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_9Alignment__get_sent_links(struct __pyx_obj_4 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":45 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":45 * for i from 0 <= i < num_links[0]: * self._unlink(self.links.arr[start + i], sent_links + (2*i), sent_links + (2*i) + 1) * return sent_links # <<<<<<<<<<<<<< @@ -12265,7 +12265,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_9Alignment__get_sent_links(struct __pyx_obj_4 __pyx_r = __pyx_v_sent_links; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":36 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":36 * return sent_links * * cdef int* _get_sent_links(self, int sent_id, int* num_links): # <<<<<<<<<<<<<< @@ -12283,7 +12283,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_9Alignment__get_sent_links(struct __pyx_obj_4 return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":47 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":47 * return sent_links * * def __cinit__(self, from_binary=None, from_text=None): # <<<<<<<<<<<<<< @@ -12370,7 +12370,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9Alignment_4__cinit__(struct __pyx_obj_4cdec_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":48 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":48 * * def __cinit__(self, from_binary=None, from_text=None): * self.links = IntList(1000,1000) # <<<<<<<<<<<<<< @@ -12385,7 +12385,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9Alignment_4__cinit__(struct __pyx_obj_4cdec_ __pyx_v_self->links = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":49 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":49 * def __cinit__(self, from_binary=None, from_text=None): * self.links = IntList(1000,1000) * self.sent_index = IntList(1000,1000) # <<<<<<<<<<<<<< @@ -12400,7 +12400,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9Alignment_4__cinit__(struct __pyx_obj_4cdec_ __pyx_v_self->sent_index = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":50 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":50 * self.links = IntList(1000,1000) * self.sent_index = IntList(1000,1000) * if from_binary: # <<<<<<<<<<<<<< @@ -12410,7 +12410,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9Alignment_4__cinit__(struct __pyx_obj_4cdec_ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_from_binary); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_2) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":51 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":51 * self.sent_index = IntList(1000,1000) * if from_binary: * self.read_binary(from_binary) # <<<<<<<<<<<<<< @@ -12432,7 +12432,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9Alignment_4__cinit__(struct __pyx_obj_4cdec_ goto __pyx_L3; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":52 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":52 * if from_binary: * self.read_binary(from_binary) * elif from_text: # <<<<<<<<<<<<<< @@ -12442,7 +12442,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9Alignment_4__cinit__(struct __pyx_obj_4cdec_ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_from_text); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_2) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":53 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":53 * self.read_binary(from_binary) * elif from_text: * self.read_text(from_text) # <<<<<<<<<<<<<< @@ -12465,7 +12465,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9Alignment_4__cinit__(struct __pyx_obj_4cdec_ } __pyx_L3:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":47 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":47 * return sent_links * * def __cinit__(self, from_binary=None, from_text=None): # <<<<<<<<<<<<<< @@ -12487,7 +12487,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9Alignment_4__cinit__(struct __pyx_obj_4cdec_ return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":55 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":55 * self.read_text(from_text) * * def read_text(self, char* filename): # <<<<<<<<<<<<<< @@ -12556,7 +12556,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_6read_text(struct __pyx_obj_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("read_text", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":56 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":56 * * def read_text(self, char* filename): * with gzip_or_text(filename) as f: # <<<<<<<<<<<<<< @@ -12596,7 +12596,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_6read_text(struct __pyx_obj_ __pyx_v_f = __pyx_t_1; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":57 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":57 * def read_text(self, char* filename): * with gzip_or_text(filename) as f: * for line in f: # <<<<<<<<<<<<<< @@ -12641,7 +12641,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_6read_text(struct __pyx_obj_ __Pyx_XDECREF_SET(__pyx_v_line, __pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":58 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":58 * with gzip_or_text(filename) as f: * for line in f: * self.sent_index.append(len(self.links)) # <<<<<<<<<<<<<< @@ -12657,7 +12657,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_6read_text(struct __pyx_obj_ __pyx_t_11 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_self->sent_index), __pyx_t_2); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":59 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":59 * for line in f: * self.sent_index.append(len(self.links)) * pairs = line.split() # <<<<<<<<<<<<<< @@ -12672,7 +12672,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_6read_text(struct __pyx_obj_ __Pyx_XDECREF_SET(__pyx_v_pairs, __pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":60 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":60 * self.sent_index.append(len(self.links)) * pairs = line.split() * for pair in pairs: # <<<<<<<<<<<<<< @@ -12717,7 +12717,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_6read_text(struct __pyx_obj_ __Pyx_XDECREF_SET(__pyx_v_pair, __pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":61 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":61 * pairs = line.split() * for pair in pairs: * (i, j) = map(int, pair.split('-')) # <<<<<<<<<<<<<< @@ -12795,7 +12795,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_6read_text(struct __pyx_obj_ __Pyx_XDECREF_SET(__pyx_v_j, __pyx_t_14); __pyx_t_14 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":62 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":62 * for pair in pairs: * (i, j) = map(int, pair.split('-')) * self.links.append(self.link(i, j)) # <<<<<<<<<<<<<< @@ -12813,7 +12813,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_6read_text(struct __pyx_obj_ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":63 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":63 * (i, j) = map(int, pair.split('-')) * self.links.append(self.link(i, j)) * self.sent_index.append(len(self.links)) # <<<<<<<<<<<<<< @@ -12841,7 +12841,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_6read_text(struct __pyx_obj_ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":56 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":56 * * def read_text(self, char* filename): * with gzip_or_text(filename) as f: # <<<<<<<<<<<<<< @@ -12912,7 +12912,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_6read_text(struct __pyx_obj_ __pyx_L25:; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":55 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":55 * self.read_text(from_text) * * def read_text(self, char* filename): # <<<<<<<<<<<<<< @@ -12944,7 +12944,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_6read_text(struct __pyx_obj_ return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":65 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":65 * self.sent_index.append(len(self.links)) * * def read_binary(self, char* filename): # <<<<<<<<<<<<<< @@ -12984,7 +12984,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_8read_binary(struct __pyx_ob __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("read_binary", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":67 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":67 * def read_binary(self, char* filename): * cdef FILE* f * f = fopen(filename, "r") # <<<<<<<<<<<<<< @@ -12993,7 +12993,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_8read_binary(struct __pyx_ob */ __pyx_v_f = fopen(__pyx_v_filename, __pyx_k_r); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":68 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":68 * cdef FILE* f * f = fopen(filename, "r") * self.links.read_handle(f) # <<<<<<<<<<<<<< @@ -13002,7 +13002,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_8read_binary(struct __pyx_ob */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->links->__pyx_vtab)->read_handle(__pyx_v_self->links, __pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":69 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":69 * f = fopen(filename, "r") * self.links.read_handle(f) * self.sent_index.read_handle(f) # <<<<<<<<<<<<<< @@ -13011,7 +13011,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_8read_binary(struct __pyx_ob */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->sent_index->__pyx_vtab)->read_handle(__pyx_v_self->sent_index, __pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":70 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":70 * self.links.read_handle(f) * self.sent_index.read_handle(f) * fclose(f) # <<<<<<<<<<<<<< @@ -13020,7 +13020,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_8read_binary(struct __pyx_ob */ fclose(__pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":65 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":65 * self.sent_index.append(len(self.links)) * * def read_binary(self, char* filename): # <<<<<<<<<<<<<< @@ -13035,7 +13035,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_8read_binary(struct __pyx_ob return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":72 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":72 * fclose(f) * * def write_text(self, char* filename): # <<<<<<<<<<<<<< @@ -13096,7 +13096,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_10write_text(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("write_text", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":73 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":73 * * def write_text(self, char* filename): * with open(filename, "w") as f: # <<<<<<<<<<<<<< @@ -13136,7 +13136,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_10write_text(struct __pyx_ob __pyx_v_f = __pyx_t_4; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":74 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":74 * def write_text(self, char* filename): * with open(filename, "w") as f: * sent_num = 0 # <<<<<<<<<<<<<< @@ -13146,7 +13146,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_10write_text(struct __pyx_ob __Pyx_INCREF(__pyx_int_0); __pyx_v_sent_num = __pyx_int_0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":75 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":75 * with open(filename, "w") as f: * sent_num = 0 * for i, link in enumerate(self.links): # <<<<<<<<<<<<<< @@ -13200,7 +13200,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_10write_text(struct __pyx_ob __pyx_t_4 = __pyx_t_2; __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":76 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":76 * sent_num = 0 * for i, link in enumerate(self.links): * while i >= self.sent_index[sent_num]: # <<<<<<<<<<<<<< @@ -13216,7 +13216,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_10write_text(struct __pyx_ob __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (!__pyx_t_11) break; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":77 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":77 * for i, link in enumerate(self.links): * while i >= self.sent_index[sent_num]: * f.write("\n") # <<<<<<<<<<<<<< @@ -13230,7 +13230,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_10write_text(struct __pyx_ob __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":78 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":78 * while i >= self.sent_index[sent_num]: * f.write("\n") * sent_num = sent_num + 1 # <<<<<<<<<<<<<< @@ -13243,7 +13243,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_10write_text(struct __pyx_ob __pyx_t_2 = 0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":79 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":79 * f.write("\n") * sent_num = sent_num + 1 * f.write("%d-%d " % self.unlink(link)) # <<<<<<<<<<<<<< @@ -13280,7 +13280,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_10write_text(struct __pyx_ob __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":80 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":80 * sent_num = sent_num + 1 * f.write("%d-%d " % self.unlink(link)) * f.write("\n") # <<<<<<<<<<<<<< @@ -13306,7 +13306,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_10write_text(struct __pyx_ob __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":73 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":73 * * def write_text(self, char* filename): * with open(filename, "w") as f: # <<<<<<<<<<<<<< @@ -13377,7 +13377,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_10write_text(struct __pyx_ob __pyx_L23:; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":72 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":72 * fclose(f) * * def write_text(self, char* filename): # <<<<<<<<<<<<<< @@ -13407,7 +13407,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_10write_text(struct __pyx_ob return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":82 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":82 * f.write("\n") * * def write_binary(self, char* filename): # <<<<<<<<<<<<<< @@ -13447,7 +13447,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_12write_binary(struct __pyx_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("write_binary", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":84 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":84 * def write_binary(self, char* filename): * cdef FILE* f * f = fopen(filename, "w") # <<<<<<<<<<<<<< @@ -13456,7 +13456,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_12write_binary(struct __pyx_ */ __pyx_v_f = fopen(__pyx_v_filename, __pyx_k_w); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":85 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":85 * cdef FILE* f * f = fopen(filename, "w") * self.links.write_handle(f) # <<<<<<<<<<<<<< @@ -13465,7 +13465,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_12write_binary(struct __pyx_ */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->links->__pyx_vtab)->write_handle(__pyx_v_self->links, __pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":86 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":86 * f = fopen(filename, "w") * self.links.write_handle(f) * self.sent_index.write_handle(f) # <<<<<<<<<<<<<< @@ -13474,7 +13474,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_12write_binary(struct __pyx_ */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->sent_index->__pyx_vtab)->write_handle(__pyx_v_self->sent_index, __pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":87 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":87 * self.links.write_handle(f) * self.sent_index.write_handle(f) * fclose(f) # <<<<<<<<<<<<<< @@ -13483,7 +13483,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_12write_binary(struct __pyx_ */ fclose(__pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":82 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":82 * f.write("\n") * * def write_binary(self, char* filename): # <<<<<<<<<<<<<< @@ -13498,7 +13498,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_12write_binary(struct __pyx_ return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":89 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":89 * fclose(f) * * def write_enhanced(self, char* filename): # <<<<<<<<<<<<<< @@ -13556,7 +13556,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_14write_enhanced(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("write_enhanced", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":90 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":90 * * def write_enhanced(self, char* filename): * with open(filename, "w") as f: # <<<<<<<<<<<<<< @@ -13596,7 +13596,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_14write_enhanced(struct __py __pyx_v_f = __pyx_t_4; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":91 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":91 * def write_enhanced(self, char* filename): * with open(filename, "w") as f: * for link in self.links: # <<<<<<<<<<<<<< @@ -13641,7 +13641,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_14write_enhanced(struct __py __Pyx_XDECREF_SET(__pyx_v_link, __pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":92 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":92 * with open(filename, "w") as f: * for link in self.links: * f.write("%d " % link) # <<<<<<<<<<<<<< @@ -13665,7 +13665,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_14write_enhanced(struct __py } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":93 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":93 * for link in self.links: * f.write("%d " % link) * f.write("\n") # <<<<<<<<<<<<<< @@ -13679,7 +13679,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_14write_enhanced(struct __py __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":94 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":94 * f.write("%d " % link) * f.write("\n") * for i in self.sent_index: # <<<<<<<<<<<<<< @@ -13724,7 +13724,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_14write_enhanced(struct __py __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":95 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":95 * f.write("\n") * for i in self.sent_index: * f.write("%d " % i) # <<<<<<<<<<<<<< @@ -13748,7 +13748,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_14write_enhanced(struct __py } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":96 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":96 * for i in self.sent_index: * f.write("%d " % i) * f.write("\n") # <<<<<<<<<<<<<< @@ -13772,7 +13772,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_14write_enhanced(struct __py __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":90 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":90 * * def write_enhanced(self, char* filename): * with open(filename, "w") as f: # <<<<<<<<<<<<<< @@ -13843,7 +13843,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_14write_enhanced(struct __py __pyx_L23:; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":89 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":89 * fclose(f) * * def write_enhanced(self, char* filename): # <<<<<<<<<<<<<< @@ -13870,7 +13870,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_14write_enhanced(struct __py return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":98 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":98 * f.write("\n") * * def alignment(self, i): # <<<<<<<<<<<<<< @@ -13910,7 +13910,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_16alignment(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("alignment", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":101 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":101 * """Return all (e,f) pairs for sentence i""" * cdef int j, start, end * result = [] # <<<<<<<<<<<<<< @@ -13922,7 +13922,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_16alignment(struct __pyx_obj __pyx_v_result = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":102 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":102 * cdef int j, start, end * result = [] * start = self.sent_index.arr[i] # <<<<<<<<<<<<<< @@ -13932,7 +13932,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_16alignment(struct __pyx_obj __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_start = (__pyx_v_self->sent_index->arr[__pyx_t_2]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":103 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":103 * result = [] * start = self.sent_index.arr[i] * end = self.sent_index.arr[i+1] # <<<<<<<<<<<<<< @@ -13945,7 +13945,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_16alignment(struct __pyx_obj __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_end = (__pyx_v_self->sent_index->arr[__pyx_t_2]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":104 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":104 * start = self.sent_index.arr[i] * end = self.sent_index.arr[i+1] * for j from start <= j < end: # <<<<<<<<<<<<<< @@ -13955,7 +13955,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_16alignment(struct __pyx_obj __pyx_t_3 = __pyx_v_end; for (__pyx_v_j = __pyx_v_start; __pyx_v_j < __pyx_t_3; __pyx_v_j++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":105 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":105 * end = self.sent_index.arr[i+1] * for j from start <= j < end: * result.append(self.unlink(self.links.arr[j])) # <<<<<<<<<<<<<< @@ -13978,7 +13978,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_16alignment(struct __pyx_obj __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":106 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":106 * for j from start <= j < end: * result.append(self.unlink(self.links.arr[j])) * return result # <<<<<<<<<<<<<< @@ -13988,7 +13988,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_16alignment(struct __pyx_obj __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":98 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":98 * f.write("\n") * * def alignment(self, i): # <<<<<<<<<<<<<< @@ -14010,7 +14010,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_16alignment(struct __pyx_obj return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":15 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":15 * int val * * cdef _node* new_node(int key): # <<<<<<<<<<<<<< @@ -14024,7 +14024,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__node *__pyx_f_4cdec_2sa_3_sa_new_node(int __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("new_node", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":17 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":17 * cdef _node* new_node(int key): * cdef _node* n * n = <_node*> malloc(sizeof(_node)) # <<<<<<<<<<<<<< @@ -14033,7 +14033,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__node *__pyx_f_4cdec_2sa_3_sa_new_node(int */ __pyx_v_n = ((struct __pyx_t_4cdec_2sa_3_sa__node *)malloc((sizeof(struct __pyx_t_4cdec_2sa_3_sa__node)))); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":18 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":18 * cdef _node* n * n = <_node*> malloc(sizeof(_node)) * n.smaller = NULL # <<<<<<<<<<<<<< @@ -14042,7 +14042,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__node *__pyx_f_4cdec_2sa_3_sa_new_node(int */ __pyx_v_n->smaller = NULL; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":19 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":19 * n = <_node*> malloc(sizeof(_node)) * n.smaller = NULL * n.bigger = NULL # <<<<<<<<<<<<<< @@ -14051,7 +14051,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__node *__pyx_f_4cdec_2sa_3_sa_new_node(int */ __pyx_v_n->bigger = NULL; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":20 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":20 * n.smaller = NULL * n.bigger = NULL * n.key = key # <<<<<<<<<<<<<< @@ -14060,7 +14060,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__node *__pyx_f_4cdec_2sa_3_sa_new_node(int */ __pyx_v_n->key = __pyx_v_key; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":21 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":21 * n.bigger = NULL * n.key = key * n.val = 0 # <<<<<<<<<<<<<< @@ -14069,7 +14069,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__node *__pyx_f_4cdec_2sa_3_sa_new_node(int */ __pyx_v_n->val = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":22 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":22 * n.key = key * n.val = 0 * return n # <<<<<<<<<<<<<< @@ -14079,7 +14079,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__node *__pyx_f_4cdec_2sa_3_sa_new_node(int __pyx_r = __pyx_v_n; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":15 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":15 * int val * * cdef _node* new_node(int key): # <<<<<<<<<<<<<< @@ -14093,7 +14093,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__node *__pyx_f_4cdec_2sa_3_sa_new_node(int return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":25 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":25 * * * cdef del_node(_node* n): # <<<<<<<<<<<<<< @@ -14111,7 +14111,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_del_node(struct __pyx_t_4cdec_2sa_3_sa__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("del_node", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":26 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":26 * * cdef del_node(_node* n): * if n.smaller != NULL: # <<<<<<<<<<<<<< @@ -14121,7 +14121,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_del_node(struct __pyx_t_4cdec_2sa_3_sa__ __pyx_t_1 = ((__pyx_v_n->smaller != NULL) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":27 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":27 * cdef del_node(_node* n): * if n.smaller != NULL: * del_node(n.smaller) # <<<<<<<<<<<<<< @@ -14135,7 +14135,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_del_node(struct __pyx_t_4cdec_2sa_3_sa__ } __pyx_L3:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":28 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":28 * if n.smaller != NULL: * del_node(n.smaller) * if n.bigger != NULL: # <<<<<<<<<<<<<< @@ -14145,7 +14145,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_del_node(struct __pyx_t_4cdec_2sa_3_sa__ __pyx_t_1 = ((__pyx_v_n->bigger != NULL) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":29 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":29 * del_node(n.smaller) * if n.bigger != NULL: * del_node(n.bigger) # <<<<<<<<<<<<<< @@ -14159,7 +14159,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_del_node(struct __pyx_t_4cdec_2sa_3_sa__ } __pyx_L4:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":30 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":30 * if n.bigger != NULL: * del_node(n.bigger) * free(n) # <<<<<<<<<<<<<< @@ -14168,7 +14168,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_del_node(struct __pyx_t_4cdec_2sa_3_sa__ */ free(__pyx_v_n); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":25 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":25 * * * cdef del_node(_node* n): # <<<<<<<<<<<<<< @@ -14189,7 +14189,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_del_node(struct __pyx_t_4cdec_2sa_3_sa__ return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":32 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":32 * free(n) * * cdef int* get_val(_node* n, int key): # <<<<<<<<<<<<<< @@ -14203,7 +14203,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_get_val(struct __pyx_t_4cdec_2sa_3_sa__node * int __pyx_t_1; __Pyx_RefNannySetupContext("get_val", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":33 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":33 * * cdef int* get_val(_node* n, int key): * if key == n.key: # <<<<<<<<<<<<<< @@ -14213,7 +14213,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_get_val(struct __pyx_t_4cdec_2sa_3_sa__node * __pyx_t_1 = ((__pyx_v_key == __pyx_v_n->key) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":34 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":34 * cdef int* get_val(_node* n, int key): * if key == n.key: * return &n.val # <<<<<<<<<<<<<< @@ -14224,7 +14224,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_get_val(struct __pyx_t_4cdec_2sa_3_sa__node * goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":35 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":35 * if key == n.key: * return &n.val * elif key < n.key: # <<<<<<<<<<<<<< @@ -14234,7 +14234,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_get_val(struct __pyx_t_4cdec_2sa_3_sa__node * __pyx_t_1 = ((__pyx_v_key < __pyx_v_n->key) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":36 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":36 * return &n.val * elif key < n.key: * if n.smaller == NULL: # <<<<<<<<<<<<<< @@ -14244,7 +14244,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_get_val(struct __pyx_t_4cdec_2sa_3_sa__node * __pyx_t_1 = ((__pyx_v_n->smaller == NULL) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":37 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":37 * elif key < n.key: * if n.smaller == NULL: * n.smaller = new_node(key) # <<<<<<<<<<<<<< @@ -14253,7 +14253,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_get_val(struct __pyx_t_4cdec_2sa_3_sa__node * */ __pyx_v_n->smaller = __pyx_f_4cdec_2sa_3_sa_new_node(__pyx_v_key); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":38 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":38 * if n.smaller == NULL: * n.smaller = new_node(key) * return &(n.smaller.val) # <<<<<<<<<<<<<< @@ -14264,7 +14264,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_get_val(struct __pyx_t_4cdec_2sa_3_sa__node * goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":39 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":39 * n.smaller = new_node(key) * return &(n.smaller.val) * return get_val(n.smaller, key) # <<<<<<<<<<<<<< @@ -14276,7 +14276,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_get_val(struct __pyx_t_4cdec_2sa_3_sa__node * } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":41 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":41 * return get_val(n.smaller, key) * else: * if n.bigger == NULL: # <<<<<<<<<<<<<< @@ -14286,7 +14286,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_get_val(struct __pyx_t_4cdec_2sa_3_sa__node * __pyx_t_1 = ((__pyx_v_n->bigger == NULL) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":42 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":42 * else: * if n.bigger == NULL: * n.bigger = new_node(key) # <<<<<<<<<<<<<< @@ -14295,7 +14295,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_get_val(struct __pyx_t_4cdec_2sa_3_sa__node * */ __pyx_v_n->bigger = __pyx_f_4cdec_2sa_3_sa_new_node(__pyx_v_key); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":43 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":43 * if n.bigger == NULL: * n.bigger = new_node(key) * return &(n.bigger.val) # <<<<<<<<<<<<<< @@ -14306,7 +14306,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_get_val(struct __pyx_t_4cdec_2sa_3_sa__node * goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":44 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":44 * n.bigger = new_node(key) * return &(n.bigger.val) * return get_val(n.bigger, key) # <<<<<<<<<<<<<< @@ -14317,7 +14317,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_get_val(struct __pyx_t_4cdec_2sa_3_sa__node * goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":32 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":32 * free(n) * * cdef int* get_val(_node* n, int key): # <<<<<<<<<<<<<< @@ -14331,7 +14331,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_get_val(struct __pyx_t_4cdec_2sa_3_sa__node * return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":54 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":54 * cdef id2eword, id2fword, eword2id, fword2id * * def __cinit__(self, from_text=None, from_data=False, from_binary=None, # <<<<<<<<<<<<<< @@ -14361,7 +14361,7 @@ static int __pyx_pw_4cdec_2sa_3_sa_5BiLex_1__cinit__(PyObject *__pyx_v_self, PyO values[1] = ((PyObject *)Py_False); values[2] = ((PyObject *)Py_None); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":55 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":55 * * def __cinit__(self, from_text=None, from_data=False, from_binary=None, * earray=None, fsarray=None, alignment=None): # <<<<<<<<<<<<<< @@ -14449,7 +14449,7 @@ static int __pyx_pw_4cdec_2sa_3_sa_5BiLex_1__cinit__(PyObject *__pyx_v_self, PyO __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4cdec_2sa_3_sa_5BiLex___cinit__(((struct __pyx_obj_4cdec_2sa_3_sa_BiLex *)__pyx_v_self), __pyx_v_from_text, __pyx_v_from_data, __pyx_v_from_binary, __pyx_v_earray, __pyx_v_fsarray, __pyx_v_alignment); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":54 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":54 * cdef id2eword, id2fword, eword2id, fword2id * * def __cinit__(self, from_text=None, from_data=False, from_binary=None, # <<<<<<<<<<<<<< @@ -14474,7 +14474,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_5BiLex___cinit__(struct __pyx_obj_4cdec_2sa_3 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":56 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":56 * def __cinit__(self, from_text=None, from_data=False, from_binary=None, * earray=None, fsarray=None, alignment=None): * self.id2eword = [] # <<<<<<<<<<<<<< @@ -14489,7 +14489,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_5BiLex___cinit__(struct __pyx_obj_4cdec_2sa_3 __pyx_v_self->id2eword = __pyx_t_1; __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":57 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":57 * earray=None, fsarray=None, alignment=None): * self.id2eword = [] * self.id2fword = [] # <<<<<<<<<<<<<< @@ -14504,7 +14504,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_5BiLex___cinit__(struct __pyx_obj_4cdec_2sa_3 __pyx_v_self->id2fword = __pyx_t_1; __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":58 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":58 * self.id2eword = [] * self.id2fword = [] * self.eword2id = {} # <<<<<<<<<<<<<< @@ -14519,7 +14519,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_5BiLex___cinit__(struct __pyx_obj_4cdec_2sa_3 __pyx_v_self->eword2id = __pyx_t_1; __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":59 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":59 * self.id2fword = [] * self.eword2id = {} * self.fword2id = {} # <<<<<<<<<<<<<< @@ -14534,7 +14534,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_5BiLex___cinit__(struct __pyx_obj_4cdec_2sa_3 __pyx_v_self->fword2id = __pyx_t_1; __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":60 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":60 * self.eword2id = {} * self.fword2id = {} * self.e_index = IntList() # <<<<<<<<<<<<<< @@ -14549,7 +14549,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_5BiLex___cinit__(struct __pyx_obj_4cdec_2sa_3 __pyx_v_self->e_index = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":61 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":61 * self.fword2id = {} * self.e_index = IntList() * self.f_index = IntList() # <<<<<<<<<<<<<< @@ -14564,7 +14564,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_5BiLex___cinit__(struct __pyx_obj_4cdec_2sa_3 __pyx_v_self->f_index = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":62 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":62 * self.e_index = IntList() * self.f_index = IntList() * self.col1 = FloatList() # <<<<<<<<<<<<<< @@ -14579,7 +14579,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_5BiLex___cinit__(struct __pyx_obj_4cdec_2sa_3 __pyx_v_self->col1 = ((struct __pyx_obj_4cdec_2sa_3_sa_FloatList *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":63 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":63 * self.f_index = IntList() * self.col1 = FloatList() * self.col2 = FloatList() # <<<<<<<<<<<<<< @@ -14594,7 +14594,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_5BiLex___cinit__(struct __pyx_obj_4cdec_2sa_3 __pyx_v_self->col2 = ((struct __pyx_obj_4cdec_2sa_3_sa_FloatList *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":64 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":64 * self.col1 = FloatList() * self.col2 = FloatList() * if from_binary: # <<<<<<<<<<<<<< @@ -14604,7 +14604,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_5BiLex___cinit__(struct __pyx_obj_4cdec_2sa_3 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_from_binary); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_2) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":65 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":65 * self.col2 = FloatList() * if from_binary: * self.read_binary(from_binary) # <<<<<<<<<<<<<< @@ -14626,7 +14626,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_5BiLex___cinit__(struct __pyx_obj_4cdec_2sa_3 goto __pyx_L3; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":66 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":66 * if from_binary: * self.read_binary(from_binary) * elif from_data: # <<<<<<<<<<<<<< @@ -14636,7 +14636,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_5BiLex___cinit__(struct __pyx_obj_4cdec_2sa_3 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_from_data); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_2) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":67 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":67 * self.read_binary(from_binary) * elif from_data: * self.compute_from_data(fsarray, earray, alignment) # <<<<<<<<<<<<<< @@ -14653,7 +14653,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_5BiLex___cinit__(struct __pyx_obj_4cdec_2sa_3 } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":69 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":69 * self.compute_from_data(fsarray, earray, alignment) * else: * self.read_text(from_text) # <<<<<<<<<<<<<< @@ -14675,7 +14675,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_5BiLex___cinit__(struct __pyx_obj_4cdec_2sa_3 } __pyx_L3:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":54 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":54 * cdef id2eword, id2fword, eword2id, fword2id * * def __cinit__(self, from_text=None, from_data=False, from_binary=None, # <<<<<<<<<<<<<< @@ -14697,7 +14697,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_5BiLex___cinit__(struct __pyx_obj_4cdec_2sa_3 return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":72 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":72 * * * cdef compute_from_data(self, SuffixArray fsa, DataArray eda, Alignment aa): # <<<<<<<<<<<<<< @@ -14752,7 +14752,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("compute_from_data", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":79 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":79 * cdef int null_word * * null_word = 0 # <<<<<<<<<<<<<< @@ -14761,7 +14761,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ __pyx_v_null_word = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":80 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":80 * * null_word = 0 * for word in fsa.darray.id2word: # I miss list comprehensions # <<<<<<<<<<<<<< @@ -14806,7 +14806,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob __Pyx_XDECREF_SET(__pyx_v_word, __pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":81 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":81 * null_word = 0 * for word in fsa.darray.id2word: # I miss list comprehensions * self.id2fword.append(word) # <<<<<<<<<<<<<< @@ -14817,7 +14817,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":82 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":82 * for word in fsa.darray.id2word: # I miss list comprehensions * self.id2fword.append(word) * self.id2fword[null_word] = "NULL" # <<<<<<<<<<<<<< @@ -14826,7 +14826,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ if (unlikely(__Pyx_SetItemInt(__pyx_v_self->id2fword, __pyx_v_null_word, __pyx_n_s_NULL, int, 1, __Pyx_PyInt_From_int, 0, 1, 1) < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":83 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":83 * self.id2fword.append(word) * self.id2fword[null_word] = "NULL" * for id, word in enumerate(self.id2fword): # <<<<<<<<<<<<<< @@ -14880,7 +14880,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob __pyx_t_1 = __pyx_t_6; __pyx_t_6 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":84 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":84 * self.id2fword[null_word] = "NULL" * for id, word in enumerate(self.id2fword): * self.fword2id[word] = id # <<<<<<<<<<<<<< @@ -14892,7 +14892,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":86 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":86 * self.fword2id[word] = id * * for word in eda.id2word: # <<<<<<<<<<<<<< @@ -14937,7 +14937,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob __Pyx_XDECREF_SET(__pyx_v_word, __pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":87 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":87 * * for word in eda.id2word: * self.id2eword.append(word) # <<<<<<<<<<<<<< @@ -14948,7 +14948,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":88 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":88 * for word in eda.id2word: * self.id2eword.append(word) * self.id2eword[null_word] = "NULL" # <<<<<<<<<<<<<< @@ -14957,7 +14957,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ if (unlikely(__Pyx_SetItemInt(__pyx_v_self->id2eword, __pyx_v_null_word, __pyx_n_s_NULL, int, 1, __Pyx_PyInt_From_int, 0, 1, 1) < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":89 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":89 * self.id2eword.append(word) * self.id2eword[null_word] = "NULL" * for id, word in enumerate(self.id2eword): # <<<<<<<<<<<<<< @@ -15011,7 +15011,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob __pyx_t_1 = __pyx_t_6; __pyx_t_6 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":90 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":90 * self.id2eword[null_word] = "NULL" * for id, word in enumerate(self.id2eword): * self.eword2id[word] = id # <<<<<<<<<<<<<< @@ -15023,7 +15023,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":92 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":92 * self.eword2id[word] = id * * num_pairs = 0 # <<<<<<<<<<<<<< @@ -15032,7 +15032,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ __pyx_v_num_pairs = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":94 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":94 * num_pairs = 0 * * V_E = len(eda.id2word) # <<<<<<<<<<<<<< @@ -15045,7 +15045,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_V_E = __pyx_t_2; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":95 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":95 * * V_E = len(eda.id2word) * V_F = len(fsa.darray.id2word) # <<<<<<<<<<<<<< @@ -15058,7 +15058,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_V_F = __pyx_t_2; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":96 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":96 * V_E = len(eda.id2word) * V_F = len(fsa.darray.id2word) * fmargin = malloc(V_F*sizeof(int)) # <<<<<<<<<<<<<< @@ -15067,7 +15067,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ __pyx_v_fmargin = ((int *)malloc((__pyx_v_V_F * (sizeof(int))))); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":97 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":97 * V_F = len(fsa.darray.id2word) * fmargin = malloc(V_F*sizeof(int)) * emargin = malloc(V_E*sizeof(int)) # <<<<<<<<<<<<<< @@ -15076,7 +15076,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ __pyx_v_emargin = ((int *)malloc((__pyx_v_V_E * (sizeof(int))))); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":98 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":98 * fmargin = malloc(V_F*sizeof(int)) * emargin = malloc(V_E*sizeof(int)) * memset(fmargin, 0, V_F*sizeof(int)) # <<<<<<<<<<<<<< @@ -15085,7 +15085,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ memset(__pyx_v_fmargin, 0, (__pyx_v_V_F * (sizeof(int)))); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":99 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":99 * emargin = malloc(V_E*sizeof(int)) * memset(fmargin, 0, V_F*sizeof(int)) * memset(emargin, 0, V_E*sizeof(int)) # <<<<<<<<<<<<<< @@ -15094,7 +15094,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ memset(__pyx_v_emargin, 0, (__pyx_v_V_E * (sizeof(int)))); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":101 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":101 * memset(emargin, 0, V_E*sizeof(int)) * * dict = <_node**> malloc(V_F*sizeof(_node*)) # <<<<<<<<<<<<<< @@ -15103,7 +15103,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ __pyx_v_dict = ((struct __pyx_t_4cdec_2sa_3_sa__node **)malloc((__pyx_v_V_F * (sizeof(struct __pyx_t_4cdec_2sa_3_sa__node *))))); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":102 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":102 * * dict = <_node**> malloc(V_F*sizeof(_node*)) * memset(dict, 0, V_F*sizeof(_node*)) # <<<<<<<<<<<<<< @@ -15112,7 +15112,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ memset(__pyx_v_dict, 0, (__pyx_v_V_F * (sizeof(struct __pyx_t_4cdec_2sa_3_sa__node *)))); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":104 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":104 * memset(dict, 0, V_F*sizeof(_node*)) * * num_sents = len(fsa.darray.sent_index) # <<<<<<<<<<<<<< @@ -15128,7 +15128,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob __pyx_v_num_sents = __pyx_t_1; __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":105 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":105 * * num_sents = len(fsa.darray.sent_index) * for sent_id from 0 <= sent_id < num_sents-1: # <<<<<<<<<<<<<< @@ -15141,7 +15141,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (__pyx_v_sent_id = 0; __pyx_v_sent_id < __pyx_t_7; __pyx_v_sent_id++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":107 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":107 * for sent_id from 0 <= sent_id < num_sents-1: * * fsent = fsa.darray.data.arr + fsa.darray.sent_index.arr[sent_id] # <<<<<<<<<<<<<< @@ -15150,7 +15150,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ __pyx_v_fsent = (__pyx_v_fsa->darray->data->arr + (__pyx_v_fsa->darray->sent_index->arr[__pyx_v_sent_id])); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":108 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":108 * * fsent = fsa.darray.data.arr + fsa.darray.sent_index.arr[sent_id] * I = fsa.darray.sent_index.arr[sent_id+1] - fsa.darray.sent_index.arr[sent_id] - 1 # <<<<<<<<<<<<<< @@ -15159,7 +15159,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ __pyx_v_I = (((__pyx_v_fsa->darray->sent_index->arr[(__pyx_v_sent_id + 1)]) - (__pyx_v_fsa->darray->sent_index->arr[__pyx_v_sent_id])) - 1); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":109 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":109 * fsent = fsa.darray.data.arr + fsa.darray.sent_index.arr[sent_id] * I = fsa.darray.sent_index.arr[sent_id+1] - fsa.darray.sent_index.arr[sent_id] - 1 * faligned = malloc(I*sizeof(int)) # <<<<<<<<<<<<<< @@ -15168,7 +15168,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ __pyx_v_faligned = ((int *)malloc((__pyx_v_I * (sizeof(int))))); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":110 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":110 * I = fsa.darray.sent_index.arr[sent_id+1] - fsa.darray.sent_index.arr[sent_id] - 1 * faligned = malloc(I*sizeof(int)) * memset(faligned, 0, I*sizeof(int)) # <<<<<<<<<<<<<< @@ -15177,7 +15177,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ memset(__pyx_v_faligned, 0, (__pyx_v_I * (sizeof(int)))); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":112 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":112 * memset(faligned, 0, I*sizeof(int)) * * esent = eda.data.arr + eda.sent_index.arr[sent_id] # <<<<<<<<<<<<<< @@ -15186,7 +15186,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ __pyx_v_esent = (__pyx_v_eda->data->arr + (__pyx_v_eda->sent_index->arr[__pyx_v_sent_id])); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":113 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":113 * * esent = eda.data.arr + eda.sent_index.arr[sent_id] * J = eda.sent_index.arr[sent_id+1] - eda.sent_index.arr[sent_id] - 1 # <<<<<<<<<<<<<< @@ -15195,7 +15195,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ __pyx_v_J = (((__pyx_v_eda->sent_index->arr[(__pyx_v_sent_id + 1)]) - (__pyx_v_eda->sent_index->arr[__pyx_v_sent_id])) - 1); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":114 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":114 * esent = eda.data.arr + eda.sent_index.arr[sent_id] * J = eda.sent_index.arr[sent_id+1] - eda.sent_index.arr[sent_id] - 1 * ealigned = malloc(J*sizeof(int)) # <<<<<<<<<<<<<< @@ -15204,7 +15204,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ __pyx_v_ealigned = ((int *)malloc((__pyx_v_J * (sizeof(int))))); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":115 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":115 * J = eda.sent_index.arr[sent_id+1] - eda.sent_index.arr[sent_id] - 1 * ealigned = malloc(J*sizeof(int)) * memset(ealigned, 0, J*sizeof(int)) # <<<<<<<<<<<<<< @@ -15213,7 +15213,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ memset(__pyx_v_ealigned, 0, (__pyx_v_J * (sizeof(int)))); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":117 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":117 * memset(ealigned, 0, J*sizeof(int)) * * links = aa._get_sent_links(sent_id, &num_links) # <<<<<<<<<<<<<< @@ -15222,7 +15222,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ __pyx_v_links = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Alignment *)__pyx_v_aa->__pyx_vtab)->_get_sent_links(__pyx_v_aa, __pyx_v_sent_id, (&__pyx_v_num_links)); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":119 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":119 * links = aa._get_sent_links(sent_id, &num_links) * * for l from 0 <= l < num_links: # <<<<<<<<<<<<<< @@ -15232,7 +15232,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob __pyx_t_8 = __pyx_v_num_links; for (__pyx_v_l = 0; __pyx_v_l < __pyx_t_8; __pyx_v_l++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":120 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":120 * * for l from 0 <= l < num_links: * i = links[l*2] # <<<<<<<<<<<<<< @@ -15241,7 +15241,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ __pyx_v_i = (__pyx_v_links[(__pyx_v_l * 2)]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":121 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":121 * for l from 0 <= l < num_links: * i = links[l*2] * j = links[l*2+1] # <<<<<<<<<<<<<< @@ -15250,7 +15250,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ __pyx_v_j = (__pyx_v_links[((__pyx_v_l * 2) + 1)]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":122 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":122 * i = links[l*2] * j = links[l*2+1] * if i >= I or j >= J: # <<<<<<<<<<<<<< @@ -15266,7 +15266,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob } if (__pyx_t_11) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":123 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":123 * j = links[l*2+1] * if i >= I or j >= J: * raise Exception("%d-%d out of bounds (I=%d,J=%d) in line %d\n" % (i,j,I,J,sent_id+1)) # <<<<<<<<<<<<<< @@ -15316,7 +15316,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob {__pyx_filename = __pyx_f[5]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":124 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":124 * if i >= I or j >= J: * raise Exception("%d-%d out of bounds (I=%d,J=%d) in line %d\n" % (i,j,I,J,sent_id+1)) * f_i = fsent[i] # <<<<<<<<<<<<<< @@ -15325,7 +15325,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ __pyx_v_f_i = (__pyx_v_fsent[__pyx_v_i]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":125 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":125 * raise Exception("%d-%d out of bounds (I=%d,J=%d) in line %d\n" % (i,j,I,J,sent_id+1)) * f_i = fsent[i] * e_j = esent[j] # <<<<<<<<<<<<<< @@ -15334,7 +15334,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ __pyx_v_e_j = (__pyx_v_esent[__pyx_v_j]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":126 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":126 * f_i = fsent[i] * e_j = esent[j] * fmargin[f_i] = fmargin[f_i]+1 # <<<<<<<<<<<<<< @@ -15343,7 +15343,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ (__pyx_v_fmargin[__pyx_v_f_i]) = ((__pyx_v_fmargin[__pyx_v_f_i]) + 1); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":127 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":127 * e_j = esent[j] * fmargin[f_i] = fmargin[f_i]+1 * emargin[e_j] = emargin[e_j]+1 # <<<<<<<<<<<<<< @@ -15352,7 +15352,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ (__pyx_v_emargin[__pyx_v_e_j]) = ((__pyx_v_emargin[__pyx_v_e_j]) + 1); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":128 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":128 * fmargin[f_i] = fmargin[f_i]+1 * emargin[e_j] = emargin[e_j]+1 * if dict[f_i] == NULL: # <<<<<<<<<<<<<< @@ -15362,7 +15362,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob __pyx_t_11 = (((__pyx_v_dict[__pyx_v_f_i]) == NULL) != 0); if (__pyx_t_11) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":129 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":129 * emargin[e_j] = emargin[e_j]+1 * if dict[f_i] == NULL: * dict[f_i] = new_node(e_j) # <<<<<<<<<<<<<< @@ -15371,7 +15371,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ (__pyx_v_dict[__pyx_v_f_i]) = __pyx_f_4cdec_2sa_3_sa_new_node(__pyx_v_e_j); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":130 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":130 * if dict[f_i] == NULL: * dict[f_i] = new_node(e_j) * dict[f_i].val = 1 # <<<<<<<<<<<<<< @@ -15380,7 +15380,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ (__pyx_v_dict[__pyx_v_f_i])->val = 1; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":131 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":131 * dict[f_i] = new_node(e_j) * dict[f_i].val = 1 * num_pairs = num_pairs + 1 # <<<<<<<<<<<<<< @@ -15392,7 +15392,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":133 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":133 * num_pairs = num_pairs + 1 * else: * count = get_val(dict[f_i], e_j) # <<<<<<<<<<<<<< @@ -15401,7 +15401,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ __pyx_v_count = __pyx_f_4cdec_2sa_3_sa_get_val((__pyx_v_dict[__pyx_v_f_i]), __pyx_v_e_j); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":134 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":134 * else: * count = get_val(dict[f_i], e_j) * if count[0] == 0: # <<<<<<<<<<<<<< @@ -15411,7 +15411,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob __pyx_t_11 = (((__pyx_v_count[0]) == 0) != 0); if (__pyx_t_11) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":135 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":135 * count = get_val(dict[f_i], e_j) * if count[0] == 0: * num_pairs = num_pairs + 1 # <<<<<<<<<<<<<< @@ -15423,7 +15423,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob } __pyx_L17:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":136 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":136 * if count[0] == 0: * num_pairs = num_pairs + 1 * count[0] = count[0] + 1 # <<<<<<<<<<<<<< @@ -15434,7 +15434,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob } __pyx_L16:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":138 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":138 * count[0] = count[0] + 1 * # add count * faligned[i] = 1 # <<<<<<<<<<<<<< @@ -15443,7 +15443,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ (__pyx_v_faligned[__pyx_v_i]) = 1; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":139 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":139 * # add count * faligned[i] = 1 * ealigned[j] = 1 # <<<<<<<<<<<<<< @@ -15453,7 +15453,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob (__pyx_v_ealigned[__pyx_v_j]) = 1; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":140 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":140 * faligned[i] = 1 * ealigned[j] = 1 * for i from 0 <= i < I: # <<<<<<<<<<<<<< @@ -15463,7 +15463,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob __pyx_t_8 = __pyx_v_I; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_8; __pyx_v_i++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":141 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":141 * ealigned[j] = 1 * for i from 0 <= i < I: * if faligned[i] == 0: # <<<<<<<<<<<<<< @@ -15473,7 +15473,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob __pyx_t_11 = (((__pyx_v_faligned[__pyx_v_i]) == 0) != 0); if (__pyx_t_11) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":142 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":142 * for i from 0 <= i < I: * if faligned[i] == 0: * f_i = fsent[i] # <<<<<<<<<<<<<< @@ -15482,7 +15482,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ __pyx_v_f_i = (__pyx_v_fsent[__pyx_v_i]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":143 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":143 * if faligned[i] == 0: * f_i = fsent[i] * fmargin[f_i] = fmargin[f_i] + 1 # <<<<<<<<<<<<<< @@ -15491,7 +15491,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ (__pyx_v_fmargin[__pyx_v_f_i]) = ((__pyx_v_fmargin[__pyx_v_f_i]) + 1); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":144 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":144 * f_i = fsent[i] * fmargin[f_i] = fmargin[f_i] + 1 * emargin[null_word] = emargin[null_word] + 1 # <<<<<<<<<<<<<< @@ -15500,7 +15500,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ (__pyx_v_emargin[__pyx_v_null_word]) = ((__pyx_v_emargin[__pyx_v_null_word]) + 1); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":145 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":145 * fmargin[f_i] = fmargin[f_i] + 1 * emargin[null_word] = emargin[null_word] + 1 * if dict[f_i] == NULL: # <<<<<<<<<<<<<< @@ -15510,7 +15510,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob __pyx_t_11 = (((__pyx_v_dict[__pyx_v_f_i]) == NULL) != 0); if (__pyx_t_11) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":146 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":146 * emargin[null_word] = emargin[null_word] + 1 * if dict[f_i] == NULL: * dict[f_i] = new_node(null_word) # <<<<<<<<<<<<<< @@ -15519,7 +15519,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ (__pyx_v_dict[__pyx_v_f_i]) = __pyx_f_4cdec_2sa_3_sa_new_node(__pyx_v_null_word); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":147 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":147 * if dict[f_i] == NULL: * dict[f_i] = new_node(null_word) * dict[f_i].val = 1 # <<<<<<<<<<<<<< @@ -15528,7 +15528,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ (__pyx_v_dict[__pyx_v_f_i])->val = 1; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":148 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":148 * dict[f_i] = new_node(null_word) * dict[f_i].val = 1 * num_pairs = num_pairs + 1 # <<<<<<<<<<<<<< @@ -15540,7 +15540,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":150 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":150 * num_pairs = num_pairs + 1 * else: * count = get_val(dict[f_i], null_word) # <<<<<<<<<<<<<< @@ -15549,7 +15549,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ __pyx_v_count = __pyx_f_4cdec_2sa_3_sa_get_val((__pyx_v_dict[__pyx_v_f_i]), __pyx_v_null_word); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":151 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":151 * else: * count = get_val(dict[f_i], null_word) * if count[0] == 0: # <<<<<<<<<<<<<< @@ -15559,7 +15559,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob __pyx_t_11 = (((__pyx_v_count[0]) == 0) != 0); if (__pyx_t_11) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":152 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":152 * count = get_val(dict[f_i], null_word) * if count[0] == 0: * num_pairs = num_pairs + 1 # <<<<<<<<<<<<<< @@ -15571,7 +15571,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob } __pyx_L22:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":153 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":153 * if count[0] == 0: * num_pairs = num_pairs + 1 * count[0] = count[0] + 1 # <<<<<<<<<<<<<< @@ -15586,7 +15586,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob __pyx_L20:; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":154 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":154 * num_pairs = num_pairs + 1 * count[0] = count[0] + 1 * for j from 0 <= j < J: # <<<<<<<<<<<<<< @@ -15596,7 +15596,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob __pyx_t_8 = __pyx_v_J; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":155 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":155 * count[0] = count[0] + 1 * for j from 0 <= j < J: * if ealigned[j] == 0: # <<<<<<<<<<<<<< @@ -15606,7 +15606,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob __pyx_t_11 = (((__pyx_v_ealigned[__pyx_v_j]) == 0) != 0); if (__pyx_t_11) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":156 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":156 * for j from 0 <= j < J: * if ealigned[j] == 0: * e_j = esent[j] # <<<<<<<<<<<<<< @@ -15615,7 +15615,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ __pyx_v_e_j = (__pyx_v_esent[__pyx_v_j]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":157 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":157 * if ealigned[j] == 0: * e_j = esent[j] * fmargin[null_word] = fmargin[null_word] + 1 # <<<<<<<<<<<<<< @@ -15624,7 +15624,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ (__pyx_v_fmargin[__pyx_v_null_word]) = ((__pyx_v_fmargin[__pyx_v_null_word]) + 1); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":158 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":158 * e_j = esent[j] * fmargin[null_word] = fmargin[null_word] + 1 * emargin[e_j] = emargin[e_j] + 1 # <<<<<<<<<<<<<< @@ -15633,7 +15633,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ (__pyx_v_emargin[__pyx_v_e_j]) = ((__pyx_v_emargin[__pyx_v_e_j]) + 1); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":159 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":159 * fmargin[null_word] = fmargin[null_word] + 1 * emargin[e_j] = emargin[e_j] + 1 * if dict[null_word] == NULL: # <<<<<<<<<<<<<< @@ -15643,7 +15643,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob __pyx_t_11 = (((__pyx_v_dict[__pyx_v_null_word]) == NULL) != 0); if (__pyx_t_11) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":160 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":160 * emargin[e_j] = emargin[e_j] + 1 * if dict[null_word] == NULL: * dict[null_word] = new_node(e_j) # <<<<<<<<<<<<<< @@ -15652,7 +15652,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ (__pyx_v_dict[__pyx_v_null_word]) = __pyx_f_4cdec_2sa_3_sa_new_node(__pyx_v_e_j); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":161 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":161 * if dict[null_word] == NULL: * dict[null_word] = new_node(e_j) * dict[null_word].val = 1 # <<<<<<<<<<<<<< @@ -15661,7 +15661,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ (__pyx_v_dict[__pyx_v_null_word])->val = 1; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":162 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":162 * dict[null_word] = new_node(e_j) * dict[null_word].val = 1 * num_pairs = num_pairs + 1 # <<<<<<<<<<<<<< @@ -15673,7 +15673,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":164 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":164 * num_pairs = num_pairs + 1 * else: * count = get_val(dict[null_word], e_j) # <<<<<<<<<<<<<< @@ -15682,7 +15682,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ __pyx_v_count = __pyx_f_4cdec_2sa_3_sa_get_val((__pyx_v_dict[__pyx_v_null_word]), __pyx_v_e_j); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":165 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":165 * else: * count = get_val(dict[null_word], e_j) * if count[0] == 0: # <<<<<<<<<<<<<< @@ -15692,7 +15692,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob __pyx_t_11 = (((__pyx_v_count[0]) == 0) != 0); if (__pyx_t_11) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":166 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":166 * count = get_val(dict[null_word], e_j) * if count[0] == 0: * num_pairs = num_pairs + 1 # <<<<<<<<<<<<<< @@ -15704,7 +15704,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob } __pyx_L27:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":167 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":167 * if count[0] == 0: * num_pairs = num_pairs + 1 * count[0] = count[0] + 1 # <<<<<<<<<<<<<< @@ -15719,7 +15719,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob __pyx_L25:; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":168 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":168 * num_pairs = num_pairs + 1 * count[0] = count[0] + 1 * free(links) # <<<<<<<<<<<<<< @@ -15728,7 +15728,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ free(__pyx_v_links); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":169 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":169 * count[0] = count[0] + 1 * free(links) * free(faligned) # <<<<<<<<<<<<<< @@ -15737,7 +15737,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ free(__pyx_v_faligned); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":170 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":170 * free(links) * free(faligned) * free(ealigned) # <<<<<<<<<<<<<< @@ -15747,7 +15747,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob free(__pyx_v_ealigned); } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":171 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":171 * free(faligned) * free(ealigned) * self.f_index = IntList(initial_len=V_F) # <<<<<<<<<<<<<< @@ -15769,7 +15769,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob __pyx_v_self->f_index = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_14); __pyx_t_14 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":172 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":172 * free(ealigned) * self.f_index = IntList(initial_len=V_F) * self.e_index = IntList(initial_len=num_pairs) # <<<<<<<<<<<<<< @@ -15791,7 +15791,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob __pyx_v_self->e_index = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_13); __pyx_t_13 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":173 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":173 * self.f_index = IntList(initial_len=V_F) * self.e_index = IntList(initial_len=num_pairs) * self.col1 = FloatList(initial_len=num_pairs) # <<<<<<<<<<<<<< @@ -15813,7 +15813,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob __pyx_v_self->col1 = ((struct __pyx_obj_4cdec_2sa_3_sa_FloatList *)__pyx_t_14); __pyx_t_14 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":174 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":174 * self.e_index = IntList(initial_len=num_pairs) * self.col1 = FloatList(initial_len=num_pairs) * self.col2 = FloatList(initial_len=num_pairs) # <<<<<<<<<<<<<< @@ -15835,7 +15835,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob __pyx_v_self->col2 = ((struct __pyx_obj_4cdec_2sa_3_sa_FloatList *)__pyx_t_13); __pyx_t_13 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":176 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":176 * self.col2 = FloatList(initial_len=num_pairs) * * num_pairs = 0 # <<<<<<<<<<<<<< @@ -15844,7 +15844,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ __pyx_v_num_pairs = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":177 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":177 * * num_pairs = 0 * for i from 0 <= i < V_F: # <<<<<<<<<<<<<< @@ -15854,7 +15854,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob __pyx_t_7 = __pyx_v_V_F; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_7; __pyx_v_i++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":179 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":179 * for i from 0 <= i < V_F: * #self.f_index[i] = num_pairs * self.f_index.set(i, num_pairs) # <<<<<<<<<<<<<< @@ -15863,7 +15863,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->f_index->__pyx_vtab)->set(__pyx_v_self->f_index, __pyx_v_i, __pyx_v_num_pairs); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":180 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":180 * #self.f_index[i] = num_pairs * self.f_index.set(i, num_pairs) * if dict[i] != NULL: # <<<<<<<<<<<<<< @@ -15873,7 +15873,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob __pyx_t_11 = (((__pyx_v_dict[__pyx_v_i]) != NULL) != 0); if (__pyx_t_11) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":181 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":181 * self.f_index.set(i, num_pairs) * if dict[i] != NULL: * self._add_node(dict[i], &num_pairs, float(fmargin[i]), emargin) # <<<<<<<<<<<<<< @@ -15884,7 +15884,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":182 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":182 * if dict[i] != NULL: * self._add_node(dict[i], &num_pairs, float(fmargin[i]), emargin) * del_node(dict[i]) # <<<<<<<<<<<<<< @@ -15899,7 +15899,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob __pyx_L30:; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":183 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":183 * self._add_node(dict[i], &num_pairs, float(fmargin[i]), emargin) * del_node(dict[i]) * free(fmargin) # <<<<<<<<<<<<<< @@ -15908,7 +15908,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ free(__pyx_v_fmargin); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":184 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":184 * del_node(dict[i]) * free(fmargin) * free(emargin) # <<<<<<<<<<<<<< @@ -15917,7 +15917,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ free(__pyx_v_emargin); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":185 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":185 * free(fmargin) * free(emargin) * free(dict) # <<<<<<<<<<<<<< @@ -15926,7 +15926,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ free(__pyx_v_dict); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":186 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":186 * free(emargin) * free(dict) * return # <<<<<<<<<<<<<< @@ -15937,7 +15937,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":72 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":72 * * * cdef compute_from_data(self, SuffixArray fsa, DataArray eda, Alignment aa): # <<<<<<<<<<<<<< @@ -15964,7 +15964,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":189 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":189 * * * cdef _add_node(self, _node* n, int* num_pairs, float fmargin, int* emargin): # <<<<<<<<<<<<<< @@ -15983,7 +15983,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex__add_node(struct __pyx_obj_4cdec_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_add_node", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":191 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":191 * cdef _add_node(self, _node* n, int* num_pairs, float fmargin, int* emargin): * cdef int loc * if n.smaller != NULL: # <<<<<<<<<<<<<< @@ -15993,7 +15993,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex__add_node(struct __pyx_obj_4cdec_ __pyx_t_1 = ((__pyx_v_n->smaller != NULL) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":192 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":192 * cdef int loc * if n.smaller != NULL: * self._add_node(n.smaller, num_pairs, fmargin, emargin) # <<<<<<<<<<<<<< @@ -16007,7 +16007,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex__add_node(struct __pyx_obj_4cdec_ } __pyx_L3:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":193 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":193 * if n.smaller != NULL: * self._add_node(n.smaller, num_pairs, fmargin, emargin) * loc = num_pairs[0] # <<<<<<<<<<<<<< @@ -16016,7 +16016,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex__add_node(struct __pyx_obj_4cdec_ */ __pyx_v_loc = (__pyx_v_num_pairs[0]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":194 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":194 * self._add_node(n.smaller, num_pairs, fmargin, emargin) * loc = num_pairs[0] * self.e_index.set(loc, n.key) # <<<<<<<<<<<<<< @@ -16025,7 +16025,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex__add_node(struct __pyx_obj_4cdec_ */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->e_index->__pyx_vtab)->set(__pyx_v_self->e_index, __pyx_v_loc, __pyx_v_n->key); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":195 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":195 * loc = num_pairs[0] * self.e_index.set(loc, n.key) * self.col1.set(loc, float(n.val)/fmargin) # <<<<<<<<<<<<<< @@ -16044,7 +16044,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex__add_node(struct __pyx_obj_4cdec_ } ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_FloatList *)__pyx_v_self->col1->__pyx_vtab)->set(__pyx_v_self->col1, __pyx_v_loc, (((double)__pyx_v_n->val) / __pyx_v_fmargin)); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":196 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":196 * self.e_index.set(loc, n.key) * self.col1.set(loc, float(n.val)/fmargin) * self.col2.set(loc, float(n.val)/float(emargin[n.key])) # <<<<<<<<<<<<<< @@ -16063,7 +16063,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex__add_node(struct __pyx_obj_4cdec_ } ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_FloatList *)__pyx_v_self->col2->__pyx_vtab)->set(__pyx_v_self->col2, __pyx_v_loc, (((double)__pyx_v_n->val) / ((double)(__pyx_v_emargin[__pyx_v_n->key])))); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":197 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":197 * self.col1.set(loc, float(n.val)/fmargin) * self.col2.set(loc, float(n.val)/float(emargin[n.key])) * num_pairs[0] = loc + 1 # <<<<<<<<<<<<<< @@ -16072,7 +16072,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex__add_node(struct __pyx_obj_4cdec_ */ (__pyx_v_num_pairs[0]) = (__pyx_v_loc + 1); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":198 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":198 * self.col2.set(loc, float(n.val)/float(emargin[n.key])) * num_pairs[0] = loc + 1 * if n.bigger != NULL: # <<<<<<<<<<<<<< @@ -16082,7 +16082,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex__add_node(struct __pyx_obj_4cdec_ __pyx_t_1 = ((__pyx_v_n->bigger != NULL) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":199 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":199 * num_pairs[0] = loc + 1 * if n.bigger != NULL: * self._add_node(n.bigger, num_pairs, fmargin, emargin) # <<<<<<<<<<<<<< @@ -16096,7 +16096,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex__add_node(struct __pyx_obj_4cdec_ } __pyx_L4:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":189 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":189 * * * cdef _add_node(self, _node* n, int* num_pairs, float fmargin, int* emargin): # <<<<<<<<<<<<<< @@ -16117,7 +16117,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex__add_node(struct __pyx_obj_4cdec_ return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":202 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":202 * * * def write_binary(self, char* filename): # <<<<<<<<<<<<<< @@ -16162,7 +16162,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_2write_binary(struct __pyx_obj_4 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("write_binary", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":204 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":204 * def write_binary(self, char* filename): * cdef FILE* f * f = fopen(filename, "w") # <<<<<<<<<<<<<< @@ -16171,7 +16171,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_2write_binary(struct __pyx_obj_4 */ __pyx_v_f = fopen(__pyx_v_filename, __pyx_k_w); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":205 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":205 * cdef FILE* f * f = fopen(filename, "w") * self.f_index.write_handle(f) # <<<<<<<<<<<<<< @@ -16180,7 +16180,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_2write_binary(struct __pyx_obj_4 */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->f_index->__pyx_vtab)->write_handle(__pyx_v_self->f_index, __pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":206 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":206 * f = fopen(filename, "w") * self.f_index.write_handle(f) * self.e_index.write_handle(f) # <<<<<<<<<<<<<< @@ -16189,7 +16189,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_2write_binary(struct __pyx_obj_4 */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->e_index->__pyx_vtab)->write_handle(__pyx_v_self->e_index, __pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":207 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":207 * self.f_index.write_handle(f) * self.e_index.write_handle(f) * self.col1.write_handle(f) # <<<<<<<<<<<<<< @@ -16198,7 +16198,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_2write_binary(struct __pyx_obj_4 */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_FloatList *)__pyx_v_self->col1->__pyx_vtab)->write_handle(__pyx_v_self->col1, __pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":208 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":208 * self.e_index.write_handle(f) * self.col1.write_handle(f) * self.col2.write_handle(f) # <<<<<<<<<<<<<< @@ -16207,7 +16207,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_2write_binary(struct __pyx_obj_4 */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_FloatList *)__pyx_v_self->col2->__pyx_vtab)->write_handle(__pyx_v_self->col2, __pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":209 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":209 * self.col1.write_handle(f) * self.col2.write_handle(f) * self.write_wordlist(self.id2fword, f) # <<<<<<<<<<<<<< @@ -16221,7 +16221,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_2write_binary(struct __pyx_obj_4 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":210 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":210 * self.col2.write_handle(f) * self.write_wordlist(self.id2fword, f) * self.write_wordlist(self.id2eword, f) # <<<<<<<<<<<<<< @@ -16235,7 +16235,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_2write_binary(struct __pyx_obj_4 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":211 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":211 * self.write_wordlist(self.id2fword, f) * self.write_wordlist(self.id2eword, f) * fclose(f) # <<<<<<<<<<<<<< @@ -16244,7 +16244,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_2write_binary(struct __pyx_obj_4 */ fclose(__pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":202 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":202 * * * def write_binary(self, char* filename): # <<<<<<<<<<<<<< @@ -16266,7 +16266,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_2write_binary(struct __pyx_obj_4 return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":214 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":214 * * * cdef write_wordlist(self, wordlist, FILE* f): # <<<<<<<<<<<<<< @@ -16291,7 +16291,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_write_wordlist(CYTHON_UNUSED stru int __pyx_clineno = 0; __Pyx_RefNannySetupContext("write_wordlist", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":218 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":218 * cdef int num_words * * num_words = len(wordlist) # <<<<<<<<<<<<<< @@ -16301,7 +16301,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_write_wordlist(CYTHON_UNUSED stru __pyx_t_1 = PyObject_Length(__pyx_v_wordlist); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_num_words = __pyx_t_1; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":219 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":219 * * num_words = len(wordlist) * fwrite(&(num_words), sizeof(int), 1, f) # <<<<<<<<<<<<<< @@ -16310,7 +16310,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_write_wordlist(CYTHON_UNUSED stru */ fwrite((&__pyx_v_num_words), (sizeof(int)), 1, __pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":220 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":220 * num_words = len(wordlist) * fwrite(&(num_words), sizeof(int), 1, f) * for word in wordlist: # <<<<<<<<<<<<<< @@ -16355,7 +16355,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_write_wordlist(CYTHON_UNUSED stru __Pyx_XDECREF_SET(__pyx_v_word, __pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":221 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":221 * fwrite(&(num_words), sizeof(int), 1, f) * for word in wordlist: * word_len = len(word) + 1 # <<<<<<<<<<<<<< @@ -16365,7 +16365,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_write_wordlist(CYTHON_UNUSED stru __pyx_t_5 = PyObject_Length(__pyx_v_word); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_word_len = (__pyx_t_5 + 1); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":222 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":222 * for word in wordlist: * word_len = len(word) + 1 * fwrite(&(word_len), sizeof(int), 1, f) # <<<<<<<<<<<<<< @@ -16374,7 +16374,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_write_wordlist(CYTHON_UNUSED stru */ fwrite((&__pyx_v_word_len), (sizeof(int)), 1, __pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":223 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":223 * word_len = len(word) + 1 * fwrite(&(word_len), sizeof(int), 1, f) * fwrite(word, sizeof(char), word_len, f) # <<<<<<<<<<<<<< @@ -16386,7 +16386,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_write_wordlist(CYTHON_UNUSED stru } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":214 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":214 * * * cdef write_wordlist(self, wordlist, FILE* f): # <<<<<<<<<<<<<< @@ -16409,7 +16409,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_write_wordlist(CYTHON_UNUSED stru return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":226 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":226 * * * cdef read_wordlist(self, word2id, id2word, FILE* f): # <<<<<<<<<<<<<< @@ -16434,7 +16434,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_read_wordlist(CYTHON_UNUSED struc int __pyx_clineno = 0; __Pyx_RefNannySetupContext("read_wordlist", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":231 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":231 * cdef char* word * * fread(&(num_words), sizeof(int), 1, f) # <<<<<<<<<<<<<< @@ -16443,7 +16443,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_read_wordlist(CYTHON_UNUSED struc */ fread((&__pyx_v_num_words), (sizeof(int)), 1, __pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":232 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":232 * * fread(&(num_words), sizeof(int), 1, f) * for i from 0 <= i < num_words: # <<<<<<<<<<<<<< @@ -16453,7 +16453,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_read_wordlist(CYTHON_UNUSED struc __pyx_t_1 = __pyx_v_num_words; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":233 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":233 * fread(&(num_words), sizeof(int), 1, f) * for i from 0 <= i < num_words: * fread(&(word_len), sizeof(int), 1, f) # <<<<<<<<<<<<<< @@ -16462,7 +16462,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_read_wordlist(CYTHON_UNUSED struc */ fread((&__pyx_v_word_len), (sizeof(int)), 1, __pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":234 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":234 * for i from 0 <= i < num_words: * fread(&(word_len), sizeof(int), 1, f) * word = malloc (word_len * sizeof(char)) # <<<<<<<<<<<<<< @@ -16471,7 +16471,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_read_wordlist(CYTHON_UNUSED struc */ __pyx_v_word = ((char *)malloc((__pyx_v_word_len * (sizeof(char))))); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":235 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":235 * fread(&(word_len), sizeof(int), 1, f) * word = malloc (word_len * sizeof(char)) * fread(word, sizeof(char), word_len, f) # <<<<<<<<<<<<<< @@ -16480,7 +16480,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_read_wordlist(CYTHON_UNUSED struc */ fread(__pyx_v_word, (sizeof(char)), __pyx_v_word_len, __pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":236 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":236 * word = malloc (word_len * sizeof(char)) * fread(word, sizeof(char), word_len, f) * word2id[word] = len(id2word) # <<<<<<<<<<<<<< @@ -16496,7 +16496,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_read_wordlist(CYTHON_UNUSED struc __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":237 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":237 * fread(word, sizeof(char), word_len, f) * word2id[word] = len(id2word) * id2word.append(word) # <<<<<<<<<<<<<< @@ -16508,7 +16508,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_read_wordlist(CYTHON_UNUSED struc __pyx_t_5 = __Pyx_PyObject_Append(__pyx_v_id2word, __pyx_t_3); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":238 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":238 * word2id[word] = len(id2word) * id2word.append(word) * free(word) # <<<<<<<<<<<<<< @@ -16518,7 +16518,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_read_wordlist(CYTHON_UNUSED struc free(__pyx_v_word); } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":226 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":226 * * * cdef read_wordlist(self, word2id, id2word, FILE* f): # <<<<<<<<<<<<<< @@ -16540,7 +16540,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_read_wordlist(CYTHON_UNUSED struc return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":240 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":240 * free(word) * * def read_binary(self, char* filename): # <<<<<<<<<<<<<< @@ -16586,7 +16586,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_4read_binary(struct __pyx_obj_4c int __pyx_clineno = 0; __Pyx_RefNannySetupContext("read_binary", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":242 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":242 * def read_binary(self, char* filename): * cdef FILE* f * f = fopen(filename, "r") # <<<<<<<<<<<<<< @@ -16595,7 +16595,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_4read_binary(struct __pyx_obj_4c */ __pyx_v_f = fopen(__pyx_v_filename, __pyx_k_r); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":243 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":243 * cdef FILE* f * f = fopen(filename, "r") * self.f_index.read_handle(f) # <<<<<<<<<<<<<< @@ -16604,7 +16604,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_4read_binary(struct __pyx_obj_4c */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->f_index->__pyx_vtab)->read_handle(__pyx_v_self->f_index, __pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":244 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":244 * f = fopen(filename, "r") * self.f_index.read_handle(f) * self.e_index.read_handle(f) # <<<<<<<<<<<<<< @@ -16613,7 +16613,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_4read_binary(struct __pyx_obj_4c */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->e_index->__pyx_vtab)->read_handle(__pyx_v_self->e_index, __pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":245 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":245 * self.f_index.read_handle(f) * self.e_index.read_handle(f) * self.col1.read_handle(f) # <<<<<<<<<<<<<< @@ -16622,7 +16622,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_4read_binary(struct __pyx_obj_4c */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_FloatList *)__pyx_v_self->col1->__pyx_vtab)->read_handle(__pyx_v_self->col1, __pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":246 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":246 * self.e_index.read_handle(f) * self.col1.read_handle(f) * self.col2.read_handle(f) # <<<<<<<<<<<<<< @@ -16631,7 +16631,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_4read_binary(struct __pyx_obj_4c */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_FloatList *)__pyx_v_self->col2->__pyx_vtab)->read_handle(__pyx_v_self->col2, __pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":247 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":247 * self.col1.read_handle(f) * self.col2.read_handle(f) * self.read_wordlist(self.fword2id, self.id2fword, f) # <<<<<<<<<<<<<< @@ -16648,7 +16648,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_4read_binary(struct __pyx_obj_4c __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":248 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":248 * self.col2.read_handle(f) * self.read_wordlist(self.fword2id, self.id2fword, f) * self.read_wordlist(self.eword2id, self.id2eword, f) # <<<<<<<<<<<<<< @@ -16665,7 +16665,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_4read_binary(struct __pyx_obj_4c __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":249 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":249 * self.read_wordlist(self.fword2id, self.id2fword, f) * self.read_wordlist(self.eword2id, self.id2eword, f) * fclose(f) # <<<<<<<<<<<<<< @@ -16674,7 +16674,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_4read_binary(struct __pyx_obj_4c */ fclose(__pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":240 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":240 * free(word) * * def read_binary(self, char* filename): # <<<<<<<<<<<<<< @@ -16697,7 +16697,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_4read_binary(struct __pyx_obj_4c return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":252 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":252 * * * def contains_e_word(self, eword): # <<<<<<<<<<<<<< @@ -16728,7 +16728,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_6contains_e_word(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("contains_e_word", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":253 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":253 * * def contains_e_word(self, eword): * return (eword in self.eword2id) # <<<<<<<<<<<<<< @@ -16743,7 +16743,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_6contains_e_word(struct __pyx_ob __pyx_t_2 = 0; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":252 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":252 * * * def contains_e_word(self, eword): # <<<<<<<<<<<<<< @@ -16762,7 +16762,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_6contains_e_word(struct __pyx_ob return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":256 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":256 * * * def contains_f_word(self, fword): # <<<<<<<<<<<<<< @@ -16793,7 +16793,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_8contains_f_word(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("contains_f_word", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":257 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":257 * * def contains_f_word(self, fword): * return (fword in self.fword2id) # <<<<<<<<<<<<<< @@ -16808,7 +16808,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_8contains_f_word(struct __pyx_ob __pyx_t_2 = 0; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":256 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":256 * * * def contains_f_word(self, fword): # <<<<<<<<<<<<<< @@ -16827,7 +16827,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_8contains_f_word(struct __pyx_ob return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":260 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":260 * * * def get_e_id(self, eword): # <<<<<<<<<<<<<< @@ -16862,7 +16862,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_10get_e_id(struct __pyx_obj_4cde int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_e_id", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":261 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":261 * * def get_e_id(self, eword): * if eword not in self.eword2id: # <<<<<<<<<<<<<< @@ -16873,7 +16873,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_10get_e_id(struct __pyx_obj_4cde __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":262 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":262 * def get_e_id(self, eword): * if eword not in self.eword2id: * e_id = len(self.id2eword) # <<<<<<<<<<<<<< @@ -16886,7 +16886,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_10get_e_id(struct __pyx_obj_4cde __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_e_id = __pyx_t_4; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":263 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":263 * if eword not in self.eword2id: * e_id = len(self.id2eword) * self.id2eword.append(eword) # <<<<<<<<<<<<<< @@ -16895,7 +16895,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_10get_e_id(struct __pyx_obj_4cde */ __pyx_t_5 = __Pyx_PyObject_Append(__pyx_v_self->id2eword, __pyx_v_eword); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":264 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":264 * e_id = len(self.id2eword) * self.id2eword.append(eword) * self.eword2id[eword] = e_id # <<<<<<<<<<<<<< @@ -16910,7 +16910,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_10get_e_id(struct __pyx_obj_4cde } __pyx_L3:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":265 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":265 * self.id2eword.append(eword) * self.eword2id[eword] = e_id * return self.eword2id[eword] # <<<<<<<<<<<<<< @@ -16924,7 +16924,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_10get_e_id(struct __pyx_obj_4cde __pyx_t_3 = 0; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":260 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":260 * * * def get_e_id(self, eword): # <<<<<<<<<<<<<< @@ -16943,7 +16943,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_10get_e_id(struct __pyx_obj_4cde return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":268 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":268 * * * def get_f_id(self, fword): # <<<<<<<<<<<<<< @@ -16978,7 +16978,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_12get_f_id(struct __pyx_obj_4cde int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_f_id", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":269 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":269 * * def get_f_id(self, fword): * if fword not in self.fword2id: # <<<<<<<<<<<<<< @@ -16989,7 +16989,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_12get_f_id(struct __pyx_obj_4cde __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":270 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":270 * def get_f_id(self, fword): * if fword not in self.fword2id: * f_id = len(self.id2fword) # <<<<<<<<<<<<<< @@ -17002,7 +17002,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_12get_f_id(struct __pyx_obj_4cde __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_f_id = __pyx_t_4; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":271 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":271 * if fword not in self.fword2id: * f_id = len(self.id2fword) * self.id2fword.append(fword) # <<<<<<<<<<<<<< @@ -17011,7 +17011,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_12get_f_id(struct __pyx_obj_4cde */ __pyx_t_5 = __Pyx_PyObject_Append(__pyx_v_self->id2fword, __pyx_v_fword); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":272 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":272 * f_id = len(self.id2fword) * self.id2fword.append(fword) * self.fword2id[fword] = f_id # <<<<<<<<<<<<<< @@ -17026,7 +17026,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_12get_f_id(struct __pyx_obj_4cde } __pyx_L3:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":273 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":273 * self.id2fword.append(fword) * self.fword2id[fword] = f_id * return self.fword2id[fword] # <<<<<<<<<<<<<< @@ -17040,7 +17040,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_12get_f_id(struct __pyx_obj_4cde __pyx_t_3 = 0; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":268 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":268 * * * def get_f_id(self, fword): # <<<<<<<<<<<<<< @@ -17059,7 +17059,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_12get_f_id(struct __pyx_obj_4cde return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":276 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":276 * * * def read_text(self, char* filename): # <<<<<<<<<<<<<< @@ -17141,7 +17141,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd int __pyx_clineno = 0; __Pyx_RefNannySetupContext("read_text", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":280 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":280 * cdef IntList fcount * * fcount = IntList() # <<<<<<<<<<<<<< @@ -17153,7 +17153,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __pyx_v_fcount = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":281 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":281 * * fcount = IntList() * with gzip_or_text(filename) as f: # <<<<<<<<<<<<<< @@ -17193,7 +17193,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __pyx_v_f = __pyx_t_1; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":283 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":283 * with gzip_or_text(filename) as f: * # first loop merely establishes size of array objects * for line in f: # <<<<<<<<<<<<<< @@ -17238,7 +17238,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __Pyx_XDECREF_SET(__pyx_v_line, __pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":284 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":284 * # first loop merely establishes size of array objects * for line in f: * (fword, eword, score1, score2) = line.split() # <<<<<<<<<<<<<< @@ -17322,7 +17322,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __Pyx_XDECREF_SET(__pyx_v_score2, __pyx_t_12); __pyx_t_12 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":285 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":285 * for line in f: * (fword, eword, score1, score2) = line.split() * f_id = self.get_f_id(fword) # <<<<<<<<<<<<<< @@ -17343,7 +17343,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __Pyx_XDECREF_SET(__pyx_v_f_id, __pyx_t_11); __pyx_t_11 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":286 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":286 * (fword, eword, score1, score2) = line.split() * f_id = self.get_f_id(fword) * e_id = self.get_e_id(eword) # <<<<<<<<<<<<<< @@ -17364,7 +17364,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __Pyx_XDECREF_SET(__pyx_v_e_id, __pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":287 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":287 * f_id = self.get_f_id(fword) * e_id = self.get_e_id(eword) * while f_id >= len(fcount): # <<<<<<<<<<<<<< @@ -17381,7 +17381,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (!__pyx_t_16) break; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":288 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":288 * e_id = self.get_e_id(eword) * while f_id >= len(fcount): * fcount.append(0) # <<<<<<<<<<<<<< @@ -17391,7 +17391,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __pyx_t_17 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_fcount), __pyx_int_0); if (unlikely(__pyx_t_17 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L7_error;} } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":289 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":289 * while f_id >= len(fcount): * fcount.append(0) * fcount.arr[f_id] = fcount.arr[f_id] + 1 # <<<<<<<<<<<<<< @@ -17404,7 +17404,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":292 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":292 * * # Allocate space for dictionary in arrays * N = 0 # <<<<<<<<<<<<<< @@ -17414,7 +17414,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __Pyx_INCREF(__pyx_int_0); __pyx_v_N = __pyx_int_0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":293 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":293 * # Allocate space for dictionary in arrays * N = 0 * n_f = len(fcount) # <<<<<<<<<<<<<< @@ -17427,7 +17427,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __pyx_v_n_f = __pyx_t_1; __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":294 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":294 * N = 0 * n_f = len(fcount) * self.f_index = IntList(initial_len=n_f+1) # <<<<<<<<<<<<<< @@ -17449,7 +17449,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __pyx_v_self->f_index = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_12); __pyx_t_12 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":295 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":295 * n_f = len(fcount) * self.f_index = IntList(initial_len=n_f+1) * for i from 0 <= i < n_f: # <<<<<<<<<<<<<< @@ -17463,7 +17463,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_12); __pyx_t_12 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":296 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":296 * self.f_index = IntList(initial_len=n_f+1) * for i from 0 <= i < n_f: * self.f_index.arr[i] = N # <<<<<<<<<<<<<< @@ -17474,7 +17474,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L7_error;} (__pyx_v_self->f_index->arr[__pyx_t_8]) = __pyx_t_21; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":297 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":297 * for i from 0 <= i < n_f: * self.f_index.arr[i] = N * N = N + fcount.arr[i] # <<<<<<<<<<<<<< @@ -17490,7 +17490,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __Pyx_DECREF_SET(__pyx_v_N, __pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":298 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":298 * self.f_index.arr[i] = N * N = N + fcount.arr[i] * fcount.arr[i] = 0 # <<<<<<<<<<<<<< @@ -17502,7 +17502,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __pyx_t_20 = __Pyx_PyInt_As_long(__pyx_v_i); if (unlikely((__pyx_t_20 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L7_error;} } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":295 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":295 * n_f = len(fcount) * self.f_index = IntList(initial_len=n_f+1) * for i from 0 <= i < n_f: # <<<<<<<<<<<<<< @@ -17514,7 +17514,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":299 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":299 * N = N + fcount.arr[i] * fcount.arr[i] = 0 * self.f_index.arr[n_f] = N # <<<<<<<<<<<<<< @@ -17525,7 +17525,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n_f); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L7_error;} (__pyx_v_self->f_index->arr[__pyx_t_8]) = __pyx_t_21; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":300 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":300 * fcount.arr[i] = 0 * self.f_index.arr[n_f] = N * self.e_index = IntList(initial_len=N) # <<<<<<<<<<<<<< @@ -17544,7 +17544,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __pyx_v_self->e_index = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_12); __pyx_t_12 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":301 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":301 * self.f_index.arr[n_f] = N * self.e_index = IntList(initial_len=N) * self.col1 = FloatList(initial_len=N) # <<<<<<<<<<<<<< @@ -17563,7 +17563,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __pyx_v_self->col1 = ((struct __pyx_obj_4cdec_2sa_3_sa_FloatList *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":302 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":302 * self.e_index = IntList(initial_len=N) * self.col1 = FloatList(initial_len=N) * self.col2 = FloatList(initial_len=N) # <<<<<<<<<<<<<< @@ -17582,7 +17582,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __pyx_v_self->col2 = ((struct __pyx_obj_4cdec_2sa_3_sa_FloatList *)__pyx_t_12); __pyx_t_12 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":305 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":305 * * # Re-read file, placing words into buckets * f.seek(0) # <<<<<<<<<<<<<< @@ -17596,7 +17596,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":306 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":306 * # Re-read file, placing words into buckets * f.seek(0) * for line in f: # <<<<<<<<<<<<<< @@ -17641,7 +17641,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __Pyx_XDECREF_SET(__pyx_v_line, __pyx_t_12); __pyx_t_12 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":307 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":307 * f.seek(0) * for line in f: * (fword, eword, score1, score2) = line.split() # <<<<<<<<<<<<<< @@ -17725,7 +17725,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __Pyx_XDECREF_SET(__pyx_v_score2, __pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":308 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":308 * for line in f: * (fword, eword, score1, score2) = line.split() * f_id = self.get_f_id(fword) # <<<<<<<<<<<<<< @@ -17746,7 +17746,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __Pyx_XDECREF_SET(__pyx_v_f_id, __pyx_t_10); __pyx_t_10 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":309 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":309 * (fword, eword, score1, score2) = line.split() * f_id = self.get_f_id(fword) * e_id = self.get_e_id(eword) # <<<<<<<<<<<<<< @@ -17767,7 +17767,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __Pyx_XDECREF_SET(__pyx_v_e_id, __pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":310 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":310 * f_id = self.get_f_id(fword) * e_id = self.get_e_id(eword) * index = self.f_index.arr[f_id] + fcount.arr[f_id] # <<<<<<<<<<<<<< @@ -17781,7 +17781,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":311 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":311 * e_id = self.get_e_id(eword) * index = self.f_index.arr[f_id] + fcount.arr[f_id] * fcount.arr[f_id] = fcount.arr[f_id] + 1 # <<<<<<<<<<<<<< @@ -17792,7 +17792,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __pyx_t_15 = __Pyx_PyIndex_AsSsize_t(__pyx_v_f_id); if (unlikely((__pyx_t_15 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L7_error;} (__pyx_v_fcount->arr[__pyx_t_15]) = ((__pyx_v_fcount->arr[__pyx_t_18]) + 1); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":312 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":312 * index = self.f_index.arr[f_id] + fcount.arr[f_id] * fcount.arr[f_id] = fcount.arr[f_id] + 1 * self.e_index.arr[index] = int(e_id) # <<<<<<<<<<<<<< @@ -17806,7 +17806,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __pyx_t_18 = __Pyx_PyIndex_AsSsize_t(__pyx_v_index); if (unlikely((__pyx_t_18 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L7_error;} (__pyx_v_self->e_index->arr[__pyx_t_18]) = __pyx_t_21; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":313 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":313 * fcount.arr[f_id] = fcount.arr[f_id] + 1 * self.e_index.arr[index] = int(e_id) * self.col1[index] = float(score1) # <<<<<<<<<<<<<< @@ -17819,7 +17819,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_self->col1), __pyx_v_index, __pyx_t_3) < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":314 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":314 * self.e_index.arr[index] = int(e_id) * self.col1[index] = float(score1) * self.col2[index] = float(score2) # <<<<<<<<<<<<<< @@ -17847,7 +17847,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":281 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":281 * * fcount = IntList() * with gzip_or_text(filename) as f: # <<<<<<<<<<<<<< @@ -17918,7 +17918,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __pyx_L31:; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":317 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":317 * * # Sort buckets by eword * for b from 0 <= b < n_f: # <<<<<<<<<<<<<< @@ -17933,7 +17933,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __Pyx_XDECREF_SET(__pyx_v_b, __pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":318 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":318 * # Sort buckets by eword * for b from 0 <= b < n_f: * i = self.f_index.arr[b] # <<<<<<<<<<<<<< @@ -17946,7 +17946,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":319 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":319 * for b from 0 <= b < n_f: * i = self.f_index.arr[b] * j = self.f_index.arr[b+1] # <<<<<<<<<<<<<< @@ -17962,7 +17962,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __Pyx_XDECREF_SET(__pyx_v_j, __pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":320 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":320 * i = self.f_index.arr[b] * j = self.f_index.arr[b+1] * self.qsort(i,j, "") # <<<<<<<<<<<<<< @@ -17977,7 +17977,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __pyx_t_19 = __Pyx_PyInt_As_long(__pyx_v_b); if (unlikely((__pyx_t_19 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":317 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":317 * * # Sort buckets by eword * for b from 0 <= b < n_f: # <<<<<<<<<<<<<< @@ -17989,7 +17989,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __Pyx_XDECREF_SET(__pyx_v_b, __pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":276 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":276 * * * def read_text(self, char* filename): # <<<<<<<<<<<<<< @@ -18031,7 +18031,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":323 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":323 * * * cdef swap(self, int i, int j): # <<<<<<<<<<<<<< @@ -18047,7 +18047,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_swap(struct __pyx_obj_4cdec_2sa_3 int __pyx_t_1; __Pyx_RefNannySetupContext("swap", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":327 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":327 * cdef float ftmp * * if i == j: # <<<<<<<<<<<<<< @@ -18057,7 +18057,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_swap(struct __pyx_obj_4cdec_2sa_3 __pyx_t_1 = ((__pyx_v_i == __pyx_v_j) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":328 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":328 * * if i == j: * return # <<<<<<<<<<<<<< @@ -18069,7 +18069,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_swap(struct __pyx_obj_4cdec_2sa_3 goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":330 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":330 * return * * itmp = self.e_index.arr[i] # <<<<<<<<<<<<<< @@ -18078,7 +18078,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_swap(struct __pyx_obj_4cdec_2sa_3 */ __pyx_v_itmp = (__pyx_v_self->e_index->arr[__pyx_v_i]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":331 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":331 * * itmp = self.e_index.arr[i] * self.e_index.arr[i] = self.e_index.arr[j] # <<<<<<<<<<<<<< @@ -18087,7 +18087,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_swap(struct __pyx_obj_4cdec_2sa_3 */ (__pyx_v_self->e_index->arr[__pyx_v_i]) = (__pyx_v_self->e_index->arr[__pyx_v_j]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":332 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":332 * itmp = self.e_index.arr[i] * self.e_index.arr[i] = self.e_index.arr[j] * self.e_index.arr[j] = itmp # <<<<<<<<<<<<<< @@ -18096,7 +18096,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_swap(struct __pyx_obj_4cdec_2sa_3 */ (__pyx_v_self->e_index->arr[__pyx_v_j]) = __pyx_v_itmp; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":334 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":334 * self.e_index.arr[j] = itmp * * ftmp = self.col1.arr[i] # <<<<<<<<<<<<<< @@ -18105,7 +18105,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_swap(struct __pyx_obj_4cdec_2sa_3 */ __pyx_v_ftmp = (__pyx_v_self->col1->arr[__pyx_v_i]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":335 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":335 * * ftmp = self.col1.arr[i] * self.col1.arr[i] = self.col1.arr[j] # <<<<<<<<<<<<<< @@ -18114,7 +18114,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_swap(struct __pyx_obj_4cdec_2sa_3 */ (__pyx_v_self->col1->arr[__pyx_v_i]) = (__pyx_v_self->col1->arr[__pyx_v_j]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":336 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":336 * ftmp = self.col1.arr[i] * self.col1.arr[i] = self.col1.arr[j] * self.col1.arr[j] = ftmp # <<<<<<<<<<<<<< @@ -18123,7 +18123,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_swap(struct __pyx_obj_4cdec_2sa_3 */ (__pyx_v_self->col1->arr[__pyx_v_j]) = __pyx_v_ftmp; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":338 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":338 * self.col1.arr[j] = ftmp * * ftmp = self.col2.arr[i] # <<<<<<<<<<<<<< @@ -18132,7 +18132,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_swap(struct __pyx_obj_4cdec_2sa_3 */ __pyx_v_ftmp = (__pyx_v_self->col2->arr[__pyx_v_i]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":339 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":339 * * ftmp = self.col2.arr[i] * self.col2.arr[i] = self.col2.arr[j] # <<<<<<<<<<<<<< @@ -18141,7 +18141,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_swap(struct __pyx_obj_4cdec_2sa_3 */ (__pyx_v_self->col2->arr[__pyx_v_i]) = (__pyx_v_self->col2->arr[__pyx_v_j]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":340 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":340 * ftmp = self.col2.arr[i] * self.col2.arr[i] = self.col2.arr[j] * self.col2.arr[j] = ftmp # <<<<<<<<<<<<<< @@ -18150,7 +18150,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_swap(struct __pyx_obj_4cdec_2sa_3 */ (__pyx_v_self->col2->arr[__pyx_v_j]) = __pyx_v_ftmp; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":323 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":323 * * * cdef swap(self, int i, int j): # <<<<<<<<<<<<<< @@ -18166,7 +18166,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_swap(struct __pyx_obj_4cdec_2sa_3 return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":343 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":343 * * * cdef qsort(self, int i, int j, pad): # <<<<<<<<<<<<<< @@ -18189,7 +18189,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_qsort(struct __pyx_obj_4cdec_2sa_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("qsort", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":346 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":346 * cdef int pval, p * * if i > j: # <<<<<<<<<<<<<< @@ -18199,7 +18199,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_qsort(struct __pyx_obj_4cdec_2sa_ __pyx_t_1 = ((__pyx_v_i > __pyx_v_j) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":347 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":347 * * if i > j: * raise Exception("Sort error in CLex") # <<<<<<<<<<<<<< @@ -18213,7 +18213,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_qsort(struct __pyx_obj_4cdec_2sa_ {__pyx_filename = __pyx_f[5]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":348 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":348 * if i > j: * raise Exception("Sort error in CLex") * if i == j: #empty interval # <<<<<<<<<<<<<< @@ -18223,7 +18223,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_qsort(struct __pyx_obj_4cdec_2sa_ __pyx_t_1 = ((__pyx_v_i == __pyx_v_j) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":349 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":349 * raise Exception("Sort error in CLex") * if i == j: #empty interval * return # <<<<<<<<<<<<<< @@ -18235,7 +18235,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_qsort(struct __pyx_obj_4cdec_2sa_ goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":350 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":350 * if i == j: #empty interval * return * if i == j-1: # singleton interval # <<<<<<<<<<<<<< @@ -18245,7 +18245,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_qsort(struct __pyx_obj_4cdec_2sa_ __pyx_t_1 = ((__pyx_v_i == (__pyx_v_j - 1)) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":351 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":351 * return * if i == j-1: # singleton interval * return # <<<<<<<<<<<<<< @@ -18257,7 +18257,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_qsort(struct __pyx_obj_4cdec_2sa_ goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":353 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":353 * return * * p = (i+j)/2 # <<<<<<<<<<<<<< @@ -18266,7 +18266,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_qsort(struct __pyx_obj_4cdec_2sa_ */ __pyx_v_p = __Pyx_div_long((__pyx_v_i + __pyx_v_j), 2); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":354 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":354 * * p = (i+j)/2 * pval = self.e_index.arr[p] # <<<<<<<<<<<<<< @@ -18275,7 +18275,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_qsort(struct __pyx_obj_4cdec_2sa_ */ __pyx_v_pval = (__pyx_v_self->e_index->arr[__pyx_v_p]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":355 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":355 * p = (i+j)/2 * pval = self.e_index.arr[p] * self.swap(i, p) # <<<<<<<<<<<<<< @@ -18286,7 +18286,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_qsort(struct __pyx_obj_4cdec_2sa_ __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":356 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":356 * pval = self.e_index.arr[p] * self.swap(i, p) * p = i # <<<<<<<<<<<<<< @@ -18295,7 +18295,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_qsort(struct __pyx_obj_4cdec_2sa_ */ __pyx_v_p = __pyx_v_i; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":357 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":357 * self.swap(i, p) * p = i * for k from i+1 <= k < j: # <<<<<<<<<<<<<< @@ -18305,7 +18305,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_qsort(struct __pyx_obj_4cdec_2sa_ __pyx_t_3 = __pyx_v_j; for (__pyx_v_k = (__pyx_v_i + 1); __pyx_v_k < __pyx_t_3; __pyx_v_k++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":358 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":358 * p = i * for k from i+1 <= k < j: * if pval >= self.e_index.arr[k]: # <<<<<<<<<<<<<< @@ -18315,7 +18315,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_qsort(struct __pyx_obj_4cdec_2sa_ __pyx_t_1 = ((__pyx_v_pval >= (__pyx_v_self->e_index->arr[__pyx_v_k])) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":359 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":359 * for k from i+1 <= k < j: * if pval >= self.e_index.arr[k]: * self.swap(p+1, k) # <<<<<<<<<<<<<< @@ -18326,7 +18326,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_qsort(struct __pyx_obj_4cdec_2sa_ __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":360 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":360 * if pval >= self.e_index.arr[k]: * self.swap(p+1, k) * self.swap(p, p+1) # <<<<<<<<<<<<<< @@ -18337,7 +18337,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_qsort(struct __pyx_obj_4cdec_2sa_ __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":361 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":361 * self.swap(p+1, k) * self.swap(p, p+1) * p = p + 1 # <<<<<<<<<<<<<< @@ -18350,7 +18350,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_qsort(struct __pyx_obj_4cdec_2sa_ __pyx_L8:; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":362 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":362 * self.swap(p, p+1) * p = p + 1 * self.qsort(i,p, pad+" ") # <<<<<<<<<<<<<< @@ -18364,7 +18364,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_qsort(struct __pyx_obj_4cdec_2sa_ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":363 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":363 * p = p + 1 * self.qsort(i,p, pad+" ") * self.qsort(p+1,j, pad+" ") # <<<<<<<<<<<<<< @@ -18378,7 +18378,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_qsort(struct __pyx_obj_4cdec_2sa_ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":343 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":343 * * * cdef qsort(self, int i, int j, pad): # <<<<<<<<<<<<<< @@ -18400,7 +18400,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_qsort(struct __pyx_obj_4cdec_2sa_ return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":366 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":366 * * * def write_enhanced(self, char* filename): # <<<<<<<<<<<<<< @@ -18463,7 +18463,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_16write_enhanced(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("write_enhanced", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":367 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":367 * * def write_enhanced(self, char* filename): * with open(filename, "w") as f: # <<<<<<<<<<<<<< @@ -18503,7 +18503,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_16write_enhanced(struct __pyx_ob __pyx_v_f = __pyx_t_4; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":368 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":368 * def write_enhanced(self, char* filename): * with open(filename, "w") as f: * for i in self.f_index: # <<<<<<<<<<<<<< @@ -18548,7 +18548,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_16write_enhanced(struct __pyx_ob __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":369 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":369 * with open(filename, "w") as f: * for i in self.f_index: * f.write("%d " % i) # <<<<<<<<<<<<<< @@ -18572,7 +18572,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_16write_enhanced(struct __pyx_ob } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":370 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":370 * for i in self.f_index: * f.write("%d " % i) * f.write("\n") # <<<<<<<<<<<<<< @@ -18586,7 +18586,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_16write_enhanced(struct __pyx_ob __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":371 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":371 * f.write("%d " % i) * f.write("\n") * for i, s1, s2 in zip(self.e_index, self.col1, self.col2): # <<<<<<<<<<<<<< @@ -18707,7 +18707,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_16write_enhanced(struct __pyx_ob __Pyx_XDECREF_SET(__pyx_v_s2, __pyx_t_11); __pyx_t_11 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":372 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":372 * f.write("\n") * for i, s1, s2 in zip(self.e_index, self.col1, self.col2): * f.write("%d %f %f " % (i, s1, s2)) # <<<<<<<<<<<<<< @@ -18743,7 +18743,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_16write_enhanced(struct __pyx_ob } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":373 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":373 * for i, s1, s2 in zip(self.e_index, self.col1, self.col2): * f.write("%d %f %f " % (i, s1, s2)) * f.write("\n") # <<<<<<<<<<<<<< @@ -18757,7 +18757,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_16write_enhanced(struct __pyx_ob __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":374 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":374 * f.write("%d %f %f " % (i, s1, s2)) * f.write("\n") * for i, w in enumerate(self.id2fword): # <<<<<<<<<<<<<< @@ -18811,7 +18811,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_16write_enhanced(struct __pyx_ob __pyx_t_1 = __pyx_t_11; __pyx_t_11 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":375 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":375 * f.write("\n") * for i, w in enumerate(self.id2fword): * f.write("%d %s " % (i, w)) # <<<<<<<<<<<<<< @@ -18845,7 +18845,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_16write_enhanced(struct __pyx_ob __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":376 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":376 * for i, w in enumerate(self.id2fword): * f.write("%d %s " % (i, w)) * f.write("\n") # <<<<<<<<<<<<<< @@ -18859,7 +18859,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_16write_enhanced(struct __pyx_ob __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":377 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":377 * f.write("%d %s " % (i, w)) * f.write("\n") * for i, w in enumerate(self.id2eword): # <<<<<<<<<<<<<< @@ -18913,7 +18913,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_16write_enhanced(struct __pyx_ob __pyx_t_2 = __pyx_t_10; __pyx_t_10 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":378 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":378 * f.write("\n") * for i, w in enumerate(self.id2eword): * f.write("%d %s " % (i, w)) # <<<<<<<<<<<<<< @@ -18947,7 +18947,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_16write_enhanced(struct __pyx_ob __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":379 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":379 * for i, w in enumerate(self.id2eword): * f.write("%d %s " % (i, w)) * f.write("\n") # <<<<<<<<<<<<<< @@ -18973,7 +18973,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_16write_enhanced(struct __pyx_ob __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":367 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":367 * * def write_enhanced(self, char* filename): * with open(filename, "w") as f: # <<<<<<<<<<<<<< @@ -19044,7 +19044,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_16write_enhanced(struct __pyx_ob __pyx_L29:; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":366 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":366 * * * def write_enhanced(self, char* filename): # <<<<<<<<<<<<<< @@ -19075,7 +19075,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_16write_enhanced(struct __pyx_ob return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":382 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":382 * * * def get_score(self, fword, eword, col): # <<<<<<<<<<<<<< @@ -19172,7 +19172,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_18get_score(struct __pyx_obj_4cd int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_score", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":385 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":385 * cdef e_id, f_id, low, high, midpoint, val * * if eword not in self.eword2id: # <<<<<<<<<<<<<< @@ -19183,7 +19183,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_18get_score(struct __pyx_obj_4cd __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":386 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":386 * * if eword not in self.eword2id: * return None # <<<<<<<<<<<<<< @@ -19196,7 +19196,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_18get_score(struct __pyx_obj_4cd goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":387 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":387 * if eword not in self.eword2id: * return None * if fword not in self.fword2id: # <<<<<<<<<<<<<< @@ -19207,7 +19207,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_18get_score(struct __pyx_obj_4cd __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":388 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":388 * return None * if fword not in self.fword2id: * return None # <<<<<<<<<<<<<< @@ -19220,7 +19220,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_18get_score(struct __pyx_obj_4cd goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":389 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":389 * if fword not in self.fword2id: * return None * f_id = self.fword2id[fword] # <<<<<<<<<<<<<< @@ -19232,7 +19232,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_18get_score(struct __pyx_obj_4cd __pyx_v_f_id = __pyx_t_3; __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":390 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":390 * return None * f_id = self.fword2id[fword] * e_id = self.eword2id[eword] # <<<<<<<<<<<<<< @@ -19244,7 +19244,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_18get_score(struct __pyx_obj_4cd __pyx_v_e_id = __pyx_t_3; __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":391 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":391 * f_id = self.fword2id[fword] * e_id = self.eword2id[eword] * low = self.f_index.arr[f_id] # <<<<<<<<<<<<<< @@ -19257,7 +19257,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_18get_score(struct __pyx_obj_4cd __pyx_v_low = __pyx_t_3; __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":392 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":392 * e_id = self.eword2id[eword] * low = self.f_index.arr[f_id] * high = self.f_index.arr[f_id+1] # <<<<<<<<<<<<<< @@ -19273,7 +19273,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_18get_score(struct __pyx_obj_4cd __pyx_v_high = __pyx_t_3; __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":393 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":393 * low = self.f_index.arr[f_id] * high = self.f_index.arr[f_id+1] * while high - low > 0: # <<<<<<<<<<<<<< @@ -19289,7 +19289,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_18get_score(struct __pyx_obj_4cd __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!__pyx_t_1) break; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":394 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":394 * high = self.f_index.arr[f_id+1] * while high - low > 0: * midpoint = (low+high)/2 # <<<<<<<<<<<<<< @@ -19304,7 +19304,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_18get_score(struct __pyx_obj_4cd __Pyx_XDECREF_SET(__pyx_v_midpoint, __pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":395 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":395 * while high - low > 0: * midpoint = (low+high)/2 * val = self.e_index.arr[midpoint] # <<<<<<<<<<<<<< @@ -19317,7 +19317,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_18get_score(struct __pyx_obj_4cd __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":396 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":396 * midpoint = (low+high)/2 * val = self.e_index.arr[midpoint] * if val == e_id: # <<<<<<<<<<<<<< @@ -19329,7 +19329,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_18get_score(struct __pyx_obj_4cd __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":397 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":397 * val = self.e_index.arr[midpoint] * if val == e_id: * if col == 0: # <<<<<<<<<<<<<< @@ -19341,7 +19341,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_18get_score(struct __pyx_obj_4cd __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":398 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":398 * if val == e_id: * if col == 0: * return self.col1.arr[midpoint] # <<<<<<<<<<<<<< @@ -19357,7 +19357,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_18get_score(struct __pyx_obj_4cd goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":399 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":399 * if col == 0: * return self.col1.arr[midpoint] * if col == 1: # <<<<<<<<<<<<<< @@ -19369,7 +19369,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_18get_score(struct __pyx_obj_4cd __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":400 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":400 * return self.col1.arr[midpoint] * if col == 1: * return self.col2.arr[midpoint] # <<<<<<<<<<<<<< @@ -19388,7 +19388,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_18get_score(struct __pyx_obj_4cd } __pyx_L7:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":401 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":401 * if col == 1: * return self.col2.arr[midpoint] * if val > e_id: # <<<<<<<<<<<<<< @@ -19400,7 +19400,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_18get_score(struct __pyx_obj_4cd __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":402 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":402 * return self.col2.arr[midpoint] * if val > e_id: * high = midpoint # <<<<<<<<<<<<<< @@ -19413,7 +19413,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_18get_score(struct __pyx_obj_4cd } __pyx_L10:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":403 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":403 * if val > e_id: * high = midpoint * if val < e_id: # <<<<<<<<<<<<<< @@ -19425,7 +19425,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_18get_score(struct __pyx_obj_4cd __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":404 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":404 * high = midpoint * if val < e_id: * low = midpoint + 1 # <<<<<<<<<<<<<< @@ -19441,7 +19441,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_18get_score(struct __pyx_obj_4cd __pyx_L11:; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":405 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":405 * if val < e_id: * low = midpoint + 1 * return None # <<<<<<<<<<<<<< @@ -19453,7 +19453,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_18get_score(struct __pyx_obj_4cd __pyx_r = Py_None; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":382 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":382 * * * def get_score(self, fword, eword, col): # <<<<<<<<<<<<<< @@ -19479,7 +19479,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_18get_score(struct __pyx_obj_4cd return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":408 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":408 * * * def write_text(self, char* filename): # <<<<<<<<<<<<<< @@ -19543,7 +19543,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_20write_text(struct __pyx_obj_4c int __pyx_clineno = 0; __Pyx_RefNannySetupContext("write_text", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":412 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":412 * cdef i, N, e_id, f_id * * with open(filename, "w") as f: # <<<<<<<<<<<<<< @@ -19583,7 +19583,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_20write_text(struct __pyx_obj_4c __pyx_v_f = __pyx_t_4; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":413 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":413 * * with open(filename, "w") as f: * N = len(self.e_index) # <<<<<<<<<<<<<< @@ -19599,7 +19599,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_20write_text(struct __pyx_obj_4c __pyx_v_N = __pyx_t_4; __pyx_t_4 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":414 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":414 * with open(filename, "w") as f: * N = len(self.e_index) * f_id = 0 # <<<<<<<<<<<<<< @@ -19609,7 +19609,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_20write_text(struct __pyx_obj_4c __Pyx_INCREF(__pyx_int_0); __pyx_v_f_id = __pyx_int_0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":415 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":415 * N = len(self.e_index) * f_id = 0 * for i from 0 <= i < N: # <<<<<<<<<<<<<< @@ -19623,7 +19623,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_20write_text(struct __pyx_obj_4c __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":416 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":416 * f_id = 0 * for i from 0 <= i < N: * while self.f_index.arr[f_id+1] == i: # <<<<<<<<<<<<<< @@ -19643,7 +19643,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_20write_text(struct __pyx_obj_4c __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!__pyx_t_11) break; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":417 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":417 * for i from 0 <= i < N: * while self.f_index.arr[f_id+1] == i: * f_id = f_id + 1 # <<<<<<<<<<<<<< @@ -19656,7 +19656,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_20write_text(struct __pyx_obj_4c __pyx_t_1 = 0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":418 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":418 * while self.f_index.arr[f_id+1] == i: * f_id = f_id + 1 * e_id = self.e_index.arr[i] # <<<<<<<<<<<<<< @@ -19669,7 +19669,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_20write_text(struct __pyx_obj_4c __Pyx_XDECREF_SET(__pyx_v_e_id, __pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":419 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":419 * f_id = f_id + 1 * e_id = self.e_index.arr[i] * score1 = self.col1.arr[i] # <<<<<<<<<<<<<< @@ -19682,7 +19682,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_20write_text(struct __pyx_obj_4c __Pyx_XDECREF_SET(__pyx_v_score1, __pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":420 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":420 * e_id = self.e_index.arr[i] * score1 = self.col1.arr[i] * score2 = self.col2.arr[i] # <<<<<<<<<<<<<< @@ -19694,7 +19694,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_20write_text(struct __pyx_obj_4c __Pyx_XDECREF_SET(__pyx_v_score2, __pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":421 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":421 * score1 = self.col1.arr[i] * score2 = self.col2.arr[i] * f.write("%s %s %.6f %.6f\n" % (self.id2fword[f_id], self.id2eword[e_id], score1, score2)) # <<<<<<<<<<<<<< @@ -19735,7 +19735,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_20write_text(struct __pyx_obj_4c __pyx_t_10 = __Pyx_PyInt_As_long(__pyx_v_i); if (unlikely((__pyx_t_10 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L7_error;} } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":415 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":415 * N = len(self.e_index) * f_id = 0 * for i from 0 <= i < N: # <<<<<<<<<<<<<< @@ -19757,7 +19757,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_20write_text(struct __pyx_obj_4c __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":412 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":412 * cdef i, N, e_id, f_id * * with open(filename, "w") as f: # <<<<<<<<<<<<<< @@ -19828,7 +19828,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_20write_text(struct __pyx_obj_4c __pyx_L23:; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":408 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":408 * * * def write_text(self, char* filename): # <<<<<<<<<<<<<< @@ -19859,7 +19859,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_20write_text(struct __pyx_obj_4c return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":21 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":21 * cdef int LOWER_MASK[32] * * cdef void _init_lower_mask(): # <<<<<<<<<<<<<< @@ -19875,7 +19875,7 @@ static void __pyx_f_4cdec_2sa_3_sa__init_lower_mask(void) { unsigned int __pyx_t_2; __Pyx_RefNannySetupContext("_init_lower_mask", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":23 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":23 * cdef void _init_lower_mask(): * cdef unsigned i * cdef int mask = 0 # <<<<<<<<<<<<<< @@ -19884,7 +19884,7 @@ static void __pyx_f_4cdec_2sa_3_sa__init_lower_mask(void) { */ __pyx_v_mask = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":24 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":24 * cdef unsigned i * cdef int mask = 0 * for i in range(MIN_BOTTOM_SIZE): # <<<<<<<<<<<<<< @@ -19895,7 +19895,7 @@ static void __pyx_f_4cdec_2sa_3_sa__init_lower_mask(void) { for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":25 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":25 * cdef int mask = 0 * for i in range(MIN_BOTTOM_SIZE): * mask = (mask << 1) + 1 # <<<<<<<<<<<<<< @@ -19904,7 +19904,7 @@ static void __pyx_f_4cdec_2sa_3_sa__init_lower_mask(void) { */ __pyx_v_mask = ((__pyx_v_mask << 1) + 1); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":26 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":26 * for i in range(MIN_BOTTOM_SIZE): * mask = (mask << 1) + 1 * LOWER_MASK[i] = mask # <<<<<<<<<<<<<< @@ -19914,7 +19914,7 @@ static void __pyx_f_4cdec_2sa_3_sa__init_lower_mask(void) { (__pyx_v_4cdec_2sa_3_sa_LOWER_MASK[__pyx_v_i]) = __pyx_v_mask; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":21 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":21 * cdef int LOWER_MASK[32] * * cdef void _init_lower_mask(): # <<<<<<<<<<<<<< @@ -19926,7 +19926,7 @@ static void __pyx_f_4cdec_2sa_3_sa__init_lower_mask(void) { __Pyx_RefNannyFinishContext(); } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":37 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":37 * * * cdef _BitSet* new_BitSet(): # <<<<<<<<<<<<<< @@ -19940,7 +19940,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__BitSet *__pyx_f_4cdec_2sa_3_sa_new_BitSet( __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("new_BitSet", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":40 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":40 * cdef _BitSet* b * * b = <_BitSet*> malloc(sizeof(_BitSet)) # <<<<<<<<<<<<<< @@ -19949,7 +19949,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__BitSet *__pyx_f_4cdec_2sa_3_sa_new_BitSet( */ __pyx_v_b = ((struct __pyx_t_4cdec_2sa_3_sa__BitSet *)malloc((sizeof(struct __pyx_t_4cdec_2sa_3_sa__BitSet)))); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":41 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":41 * * b = <_BitSet*> malloc(sizeof(_BitSet)) * b.bitset = 0 # <<<<<<<<<<<<<< @@ -19958,7 +19958,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__BitSet *__pyx_f_4cdec_2sa_3_sa_new_BitSet( */ __pyx_v_b->bitset = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":42 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":42 * b = <_BitSet*> malloc(sizeof(_BitSet)) * b.bitset = 0 * b.min_val = -1 # <<<<<<<<<<<<<< @@ -19967,7 +19967,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__BitSet *__pyx_f_4cdec_2sa_3_sa_new_BitSet( */ __pyx_v_b->min_val = -1; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":43 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":43 * b.bitset = 0 * b.min_val = -1 * b.max_val = -1 # <<<<<<<<<<<<<< @@ -19976,7 +19976,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__BitSet *__pyx_f_4cdec_2sa_3_sa_new_BitSet( */ __pyx_v_b->max_val = -1; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":44 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":44 * b.min_val = -1 * b.max_val = -1 * b.size = 0 # <<<<<<<<<<<<<< @@ -19985,7 +19985,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__BitSet *__pyx_f_4cdec_2sa_3_sa_new_BitSet( */ __pyx_v_b->size = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":45 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":45 * b.max_val = -1 * b.size = 0 * return b # <<<<<<<<<<<<<< @@ -19995,7 +19995,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__BitSet *__pyx_f_4cdec_2sa_3_sa_new_BitSet( __pyx_r = __pyx_v_b; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":37 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":37 * * * cdef _BitSet* new_BitSet(): # <<<<<<<<<<<<<< @@ -20009,7 +20009,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__BitSet *__pyx_f_4cdec_2sa_3_sa_new_BitSet( return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":48 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":48 * * * cdef int bitset_findsucc(_BitSet* b, int i): # <<<<<<<<<<<<<< @@ -20030,7 +20030,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_findsucc(struct __pyx_t_4cdec_2sa_3_sa_ int __pyx_t_3; __Pyx_RefNannySetupContext("bitset_findsucc", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":52 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":52 * cdef int low, high, mid * * if b.max_val == -1 or i >= b.max_val: # <<<<<<<<<<<<<< @@ -20046,7 +20046,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_findsucc(struct __pyx_t_4cdec_2sa_3_sa_ } if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":53 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":53 * * if b.max_val == -1 or i >= b.max_val: * return -1 # <<<<<<<<<<<<<< @@ -20057,7 +20057,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_findsucc(struct __pyx_t_4cdec_2sa_3_sa_ goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":54 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":54 * if b.max_val == -1 or i >= b.max_val: * return -1 * if i < b.min_val: # <<<<<<<<<<<<<< @@ -20067,7 +20067,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_findsucc(struct __pyx_t_4cdec_2sa_3_sa_ __pyx_t_3 = ((__pyx_v_i < __pyx_v_b->min_val) != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":55 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":55 * return -1 * if i < b.min_val: * return b.min_val # <<<<<<<<<<<<<< @@ -20078,7 +20078,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_findsucc(struct __pyx_t_4cdec_2sa_3_sa_ goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":57 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":57 * return b.min_val * * bitset = b.bitset & ~LOWER_MASK[i] # <<<<<<<<<<<<<< @@ -20087,7 +20087,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_findsucc(struct __pyx_t_4cdec_2sa_3_sa_ */ __pyx_v_bitset = (__pyx_v_b->bitset & (~(__pyx_v_4cdec_2sa_3_sa_LOWER_MASK[__pyx_v_i]))); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":58 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":58 * * bitset = b.bitset & ~LOWER_MASK[i] * low = i+1 # <<<<<<<<<<<<<< @@ -20096,7 +20096,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_findsucc(struct __pyx_t_4cdec_2sa_3_sa_ */ __pyx_v_low = (__pyx_v_i + 1); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":59 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":59 * bitset = b.bitset & ~LOWER_MASK[i] * low = i+1 * high = b.max_val+1 # <<<<<<<<<<<<<< @@ -20105,7 +20105,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_findsucc(struct __pyx_t_4cdec_2sa_3_sa_ */ __pyx_v_high = (__pyx_v_b->max_val + 1); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":60 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":60 * low = i+1 * high = b.max_val+1 * while low < high-1: # <<<<<<<<<<<<<< @@ -20116,7 +20116,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_findsucc(struct __pyx_t_4cdec_2sa_3_sa_ __pyx_t_3 = ((__pyx_v_low < (__pyx_v_high - 1)) != 0); if (!__pyx_t_3) break; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":61 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":61 * high = b.max_val+1 * while low < high-1: * mid = (high + low)/2 # <<<<<<<<<<<<<< @@ -20125,7 +20125,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_findsucc(struct __pyx_t_4cdec_2sa_3_sa_ */ __pyx_v_mid = __Pyx_div_long((__pyx_v_high + __pyx_v_low), 2); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":62 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":62 * while low < high-1: * mid = (high + low)/2 * mask = ~(LOWER_MASK[high-1] ^ LOWER_MASK[mid-1]) # <<<<<<<<<<<<<< @@ -20134,7 +20134,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_findsucc(struct __pyx_t_4cdec_2sa_3_sa_ */ __pyx_v_mask = (~((__pyx_v_4cdec_2sa_3_sa_LOWER_MASK[(__pyx_v_high - 1)]) ^ (__pyx_v_4cdec_2sa_3_sa_LOWER_MASK[(__pyx_v_mid - 1)]))); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":63 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":63 * mid = (high + low)/2 * mask = ~(LOWER_MASK[high-1] ^ LOWER_MASK[mid-1]) * if bitset & mask == 0: # <<<<<<<<<<<<<< @@ -20144,7 +20144,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_findsucc(struct __pyx_t_4cdec_2sa_3_sa_ __pyx_t_3 = (((__pyx_v_bitset & __pyx_v_mask) == 0) != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":64 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":64 * mask = ~(LOWER_MASK[high-1] ^ LOWER_MASK[mid-1]) * if bitset & mask == 0: * low = mid # <<<<<<<<<<<<<< @@ -20156,7 +20156,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_findsucc(struct __pyx_t_4cdec_2sa_3_sa_ } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":66 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":66 * low = mid * else: * bitset = bitset & mask # <<<<<<<<<<<<<< @@ -20165,7 +20165,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_findsucc(struct __pyx_t_4cdec_2sa_3_sa_ */ __pyx_v_bitset = (__pyx_v_bitset & __pyx_v_mask); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":67 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":67 * else: * bitset = bitset & mask * high = mid # <<<<<<<<<<<<<< @@ -20177,7 +20177,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_findsucc(struct __pyx_t_4cdec_2sa_3_sa_ __pyx_L7:; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":68 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":68 * bitset = bitset & mask * high = mid * return low # <<<<<<<<<<<<<< @@ -20187,7 +20187,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_findsucc(struct __pyx_t_4cdec_2sa_3_sa_ __pyx_r = __pyx_v_low; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":48 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":48 * * * cdef int bitset_findsucc(_BitSet* b, int i): # <<<<<<<<<<<<<< @@ -20201,7 +20201,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_findsucc(struct __pyx_t_4cdec_2sa_3_sa_ return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":71 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":71 * * * cdef int bitset_insert(_BitSet* b, int i): # <<<<<<<<<<<<<< @@ -20216,7 +20216,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_insert(struct __pyx_t_4cdec_2sa_3_sa__B int __pyx_t_1; __Pyx_RefNannySetupContext("bitset_insert", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":74 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":74 * cdef int val * * val = 1 << i # <<<<<<<<<<<<<< @@ -20225,7 +20225,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_insert(struct __pyx_t_4cdec_2sa_3_sa__B */ __pyx_v_val = (1 << __pyx_v_i); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":75 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":75 * * val = 1 << i * if b.bitset & val == 0: # <<<<<<<<<<<<<< @@ -20235,7 +20235,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_insert(struct __pyx_t_4cdec_2sa_3_sa__B __pyx_t_1 = (((__pyx_v_b->bitset & __pyx_v_val) == 0) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":76 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":76 * val = 1 << i * if b.bitset & val == 0: * b.bitset = b.bitset | val # <<<<<<<<<<<<<< @@ -20244,7 +20244,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_insert(struct __pyx_t_4cdec_2sa_3_sa__B */ __pyx_v_b->bitset = (__pyx_v_b->bitset | __pyx_v_val); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":77 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":77 * if b.bitset & val == 0: * b.bitset = b.bitset | val * if b.size == 0: # <<<<<<<<<<<<<< @@ -20254,7 +20254,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_insert(struct __pyx_t_4cdec_2sa_3_sa__B __pyx_t_1 = ((__pyx_v_b->size == 0) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":78 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":78 * b.bitset = b.bitset | val * if b.size == 0: * b.min_val = i # <<<<<<<<<<<<<< @@ -20263,7 +20263,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_insert(struct __pyx_t_4cdec_2sa_3_sa__B */ __pyx_v_b->min_val = __pyx_v_i; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":79 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":79 * if b.size == 0: * b.min_val = i * b.max_val = i # <<<<<<<<<<<<<< @@ -20275,7 +20275,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_insert(struct __pyx_t_4cdec_2sa_3_sa__B } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":81 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":81 * b.max_val = i * else: * if i < b.min_val: # <<<<<<<<<<<<<< @@ -20285,7 +20285,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_insert(struct __pyx_t_4cdec_2sa_3_sa__B __pyx_t_1 = ((__pyx_v_i < __pyx_v_b->min_val) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":82 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":82 * else: * if i < b.min_val: * b.min_val = i # <<<<<<<<<<<<<< @@ -20297,7 +20297,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_insert(struct __pyx_t_4cdec_2sa_3_sa__B } __pyx_L5:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":83 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":83 * if i < b.min_val: * b.min_val = i * if i > b.max_val: # <<<<<<<<<<<<<< @@ -20307,7 +20307,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_insert(struct __pyx_t_4cdec_2sa_3_sa__B __pyx_t_1 = ((__pyx_v_i > __pyx_v_b->max_val) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":84 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":84 * b.min_val = i * if i > b.max_val: * b.max_val = i # <<<<<<<<<<<<<< @@ -20321,7 +20321,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_insert(struct __pyx_t_4cdec_2sa_3_sa__B } __pyx_L4:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":85 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":85 * if i > b.max_val: * b.max_val = i * b.size = b.size + 1 # <<<<<<<<<<<<<< @@ -20330,7 +20330,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_insert(struct __pyx_t_4cdec_2sa_3_sa__B */ __pyx_v_b->size = (__pyx_v_b->size + 1); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":86 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":86 * b.max_val = i * b.size = b.size + 1 * return 1 # <<<<<<<<<<<<<< @@ -20341,7 +20341,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_insert(struct __pyx_t_4cdec_2sa_3_sa__B goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":87 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":87 * b.size = b.size + 1 * return 1 * return 0 # <<<<<<<<<<<<<< @@ -20351,7 +20351,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_insert(struct __pyx_t_4cdec_2sa_3_sa__B __pyx_r = 0; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":71 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":71 * * * cdef int bitset_insert(_BitSet* b, int i): # <<<<<<<<<<<<<< @@ -20365,7 +20365,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_insert(struct __pyx_t_4cdec_2sa_3_sa__B return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":90 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":90 * * * cdef int bitset_contains(_BitSet* b, int i): # <<<<<<<<<<<<<< @@ -20380,7 +20380,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_contains(struct __pyx_t_4cdec_2sa_3_sa_ int __pyx_t_1; __Pyx_RefNannySetupContext("bitset_contains", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":93 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":93 * cdef int val * * val = 1 << i # <<<<<<<<<<<<<< @@ -20389,7 +20389,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_contains(struct __pyx_t_4cdec_2sa_3_sa_ */ __pyx_v_val = (1 << __pyx_v_i); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":94 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":94 * * val = 1 << i * if b.bitset & val == 0: # <<<<<<<<<<<<<< @@ -20399,7 +20399,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_contains(struct __pyx_t_4cdec_2sa_3_sa_ __pyx_t_1 = (((__pyx_v_b->bitset & __pyx_v_val) == 0) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":95 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":95 * val = 1 << i * if b.bitset & val == 0: * return 0 # <<<<<<<<<<<<<< @@ -20411,7 +20411,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_contains(struct __pyx_t_4cdec_2sa_3_sa_ } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":97 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":97 * return 0 * else: * return 1 # <<<<<<<<<<<<<< @@ -20422,7 +20422,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_contains(struct __pyx_t_4cdec_2sa_3_sa_ goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":90 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":90 * * * cdef int bitset_contains(_BitSet* b, int i): # <<<<<<<<<<<<<< @@ -20436,7 +20436,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_contains(struct __pyx_t_4cdec_2sa_3_sa_ return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":104 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":104 * cdef int next_val * * def __next__(self): # <<<<<<<<<<<<<< @@ -20469,7 +20469,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14BitSetIterator___next__(struct __pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__next__", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":107 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":107 * cdef int ret_val * * if self.next_val == -1: # <<<<<<<<<<<<<< @@ -20479,7 +20479,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14BitSetIterator___next__(struct __pyx_ __pyx_t_1 = ((__pyx_v_self->next_val == -1) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":108 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":108 * * if self.next_val == -1: * raise StopIteration() # <<<<<<<<<<<<<< @@ -20493,7 +20493,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14BitSetIterator___next__(struct __pyx_ {__pyx_filename = __pyx_f[6]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":109 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":109 * if self.next_val == -1: * raise StopIteration() * ret_val = self.next_val # <<<<<<<<<<<<<< @@ -20503,7 +20503,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14BitSetIterator___next__(struct __pyx_ __pyx_t_3 = __pyx_v_self->next_val; __pyx_v_ret_val = __pyx_t_3; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":110 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":110 * raise StopIteration() * ret_val = self.next_val * self.next_val = bitset_findsucc(self.b, ret_val) # <<<<<<<<<<<<<< @@ -20512,7 +20512,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14BitSetIterator___next__(struct __pyx_ */ __pyx_v_self->next_val = __pyx_f_4cdec_2sa_3_sa_bitset_findsucc(__pyx_v_self->b, __pyx_v_ret_val); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":111 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":111 * ret_val = self.next_val * self.next_val = bitset_findsucc(self.b, ret_val) * return ret_val # <<<<<<<<<<<<<< @@ -20526,7 +20526,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14BitSetIterator___next__(struct __pyx_ __pyx_t_2 = 0; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":104 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":104 * cdef int next_val * * def __next__(self): # <<<<<<<<<<<<<< @@ -20545,7 +20545,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14BitSetIterator___next__(struct __pyx_ return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":122 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":122 * cdef _BitSet* b * * def __cinit__(self): # <<<<<<<<<<<<<< @@ -20574,7 +20574,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6BitSet___cinit__(struct __pyx_obj_4cdec_2sa_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":123 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":123 * * def __cinit__(self): * self.b = new_BitSet() # <<<<<<<<<<<<<< @@ -20583,7 +20583,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6BitSet___cinit__(struct __pyx_obj_4cdec_2sa_ */ __pyx_v_self->b = __pyx_f_4cdec_2sa_3_sa_new_BitSet(); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":122 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":122 * cdef _BitSet* b * * def __cinit__(self): # <<<<<<<<<<<<<< @@ -20597,7 +20597,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6BitSet___cinit__(struct __pyx_obj_4cdec_2sa_ return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":125 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":125 * self.b = new_BitSet() * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -20620,7 +20620,7 @@ static void __pyx_pf_4cdec_2sa_3_sa_6BitSet_2__dealloc__(struct __pyx_obj_4cdec_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":126 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":126 * * def __dealloc__(self): * free(self.b) # <<<<<<<<<<<<<< @@ -20629,7 +20629,7 @@ static void __pyx_pf_4cdec_2sa_3_sa_6BitSet_2__dealloc__(struct __pyx_obj_4cdec_ */ free(__pyx_v_self->b); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":125 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":125 * self.b = new_BitSet() * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -20641,7 +20641,7 @@ static void __pyx_pf_4cdec_2sa_3_sa_6BitSet_2__dealloc__(struct __pyx_obj_4cdec_ __Pyx_RefNannyFinishContext(); } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":128 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":128 * free(self.b) * * def __iter__(self): # <<<<<<<<<<<<<< @@ -20674,7 +20674,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6BitSet_4__iter__(struct __pyx_obj_4cde int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__iter__", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":130 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":130 * def __iter__(self): * cdef BitSetIterator it * it = BitSetIterator() # <<<<<<<<<<<<<< @@ -20686,7 +20686,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6BitSet_4__iter__(struct __pyx_obj_4cde __pyx_v_it = ((struct __pyx_obj_4cdec_2sa_3_sa_BitSetIterator *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":131 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":131 * cdef BitSetIterator it * it = BitSetIterator() * it.b = self.b # <<<<<<<<<<<<<< @@ -20696,7 +20696,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6BitSet_4__iter__(struct __pyx_obj_4cde __pyx_t_2 = __pyx_v_self->b; __pyx_v_it->b = __pyx_t_2; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":132 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":132 * it = BitSetIterator() * it.b = self.b * it.next_val = self.b.min_val # <<<<<<<<<<<<<< @@ -20706,7 +20706,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6BitSet_4__iter__(struct __pyx_obj_4cde __pyx_t_3 = __pyx_v_self->b->min_val; __pyx_v_it->next_val = __pyx_t_3; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":133 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":133 * it.b = self.b * it.next_val = self.b.min_val * return it # <<<<<<<<<<<<<< @@ -20718,7 +20718,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6BitSet_4__iter__(struct __pyx_obj_4cde __pyx_r = ((PyObject *)__pyx_v_it); goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":128 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":128 * free(self.b) * * def __iter__(self): # <<<<<<<<<<<<<< @@ -20738,7 +20738,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6BitSet_4__iter__(struct __pyx_obj_4cde return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":135 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":135 * return it * * def insert(self, i): # <<<<<<<<<<<<<< @@ -20769,7 +20769,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6BitSet_6insert(struct __pyx_obj_4cdec_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("insert", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":136 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":136 * * def insert(self, i): * return bitset_insert(self.b, i) # <<<<<<<<<<<<<< @@ -20784,7 +20784,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6BitSet_6insert(struct __pyx_obj_4cdec_ __pyx_t_2 = 0; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":135 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":135 * return it * * def insert(self, i): # <<<<<<<<<<<<<< @@ -20803,7 +20803,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6BitSet_6insert(struct __pyx_obj_4cdec_ return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":138 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":138 * return bitset_insert(self.b, i) * * def findsucc(self, i): # <<<<<<<<<<<<<< @@ -20834,7 +20834,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6BitSet_8findsucc(struct __pyx_obj_4cde int __pyx_clineno = 0; __Pyx_RefNannySetupContext("findsucc", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":139 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":139 * * def findsucc(self, i): * return bitset_findsucc(self.b, i) # <<<<<<<<<<<<<< @@ -20849,7 +20849,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6BitSet_8findsucc(struct __pyx_obj_4cde __pyx_t_2 = 0; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":138 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":138 * return bitset_insert(self.b, i) * * def findsucc(self, i): # <<<<<<<<<<<<<< @@ -20868,7 +20868,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6BitSet_8findsucc(struct __pyx_obj_4cde return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":141 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":141 * return bitset_findsucc(self.b, i) * * def __str__(self): # <<<<<<<<<<<<<< @@ -20900,7 +20900,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6BitSet_10__str__(struct __pyx_obj_4cde int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__str__", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":142 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":142 * * def __str__(self): * return dec2bin(self.b.bitset)+" ("+str(self.b.size)+","+str(self.b.min_val)+","+str(self.b.max_val)+")" # <<<<<<<<<<<<<< @@ -20968,7 +20968,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6BitSet_10__str__(struct __pyx_obj_4cde __pyx_t_2 = 0; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":141 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":141 * return bitset_findsucc(self.b, i) * * def __str__(self): # <<<<<<<<<<<<<< @@ -20989,7 +20989,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6BitSet_10__str__(struct __pyx_obj_4cde return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":144 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":144 * return dec2bin(self.b.bitset)+" ("+str(self.b.size)+","+str(self.b.min_val)+","+str(self.b.max_val)+")" * * def min(self): # <<<<<<<<<<<<<< @@ -21019,7 +21019,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6BitSet_12min(struct __pyx_obj_4cdec_2s int __pyx_clineno = 0; __Pyx_RefNannySetupContext("min", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":145 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":145 * * def min(self): * return self.b.min_val # <<<<<<<<<<<<<< @@ -21033,7 +21033,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6BitSet_12min(struct __pyx_obj_4cdec_2s __pyx_t_1 = 0; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":144 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":144 * return dec2bin(self.b.bitset)+" ("+str(self.b.size)+","+str(self.b.min_val)+","+str(self.b.max_val)+")" * * def min(self): # <<<<<<<<<<<<<< @@ -21052,7 +21052,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6BitSet_12min(struct __pyx_obj_4cdec_2s return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":147 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":147 * return self.b.min_val * * def max(self): # <<<<<<<<<<<<<< @@ -21082,7 +21082,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6BitSet_14max(struct __pyx_obj_4cdec_2s int __pyx_clineno = 0; __Pyx_RefNannySetupContext("max", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":148 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":148 * * def max(self): * return self.b.max_val # <<<<<<<<<<<<<< @@ -21096,7 +21096,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6BitSet_14max(struct __pyx_obj_4cdec_2s __pyx_t_1 = 0; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":147 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":147 * return self.b.min_val * * def max(self): # <<<<<<<<<<<<<< @@ -21115,7 +21115,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6BitSet_14max(struct __pyx_obj_4cdec_2s return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":150 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":150 * return self.b.max_val * * def __len__(self): # <<<<<<<<<<<<<< @@ -21141,7 +21141,7 @@ static Py_ssize_t __pyx_pf_4cdec_2sa_3_sa_6BitSet_16__len__(struct __pyx_obj_4cd __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":151 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":151 * * def __len__(self): * return self.b.size # <<<<<<<<<<<<<< @@ -21151,7 +21151,7 @@ static Py_ssize_t __pyx_pf_4cdec_2sa_3_sa_6BitSet_16__len__(struct __pyx_obj_4cd __pyx_r = __pyx_v_self->b->size; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":150 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":150 * return self.b.max_val * * def __len__(self): # <<<<<<<<<<<<<< @@ -21165,7 +21165,7 @@ static Py_ssize_t __pyx_pf_4cdec_2sa_3_sa_6BitSet_16__len__(struct __pyx_obj_4cd return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":153 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":153 * return self.b.size * * def __contains__(self, i): # <<<<<<<<<<<<<< @@ -21197,7 +21197,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6BitSet_18__contains__(struct __pyx_obj_4cdec int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__contains__", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":154 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":154 * * def __contains__(self, i): * return bool(bitset_contains(self.b, i)) # <<<<<<<<<<<<<< @@ -21212,7 +21212,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6BitSet_18__contains__(struct __pyx_obj_4cdec __pyx_r = (!(!__pyx_t_3)); goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":153 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":153 * return self.b.size * * def __contains__(self, i): # <<<<<<<<<<<<<< @@ -21230,7 +21230,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6BitSet_18__contains__(struct __pyx_obj_4cdec return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":157 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":157 * * * cdef str dec2bin(long i): # <<<<<<<<<<<<<< @@ -21252,7 +21252,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_dec2bin(long __pyx_v_i) { int __pyx_clineno = 0; __Pyx_RefNannySetupContext("dec2bin", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":158 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":158 * * cdef str dec2bin(long i): * cdef str result = "" # <<<<<<<<<<<<<< @@ -21262,7 +21262,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_dec2bin(long __pyx_v_i) { __Pyx_INCREF(__pyx_kp_s__32); __pyx_v_result = __pyx_kp_s__32; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":160 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":160 * cdef str result = "" * cdef unsigned d * for d in range(MIN_BOTTOM_SIZE): # <<<<<<<<<<<<<< @@ -21273,7 +21273,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_dec2bin(long __pyx_v_i) { for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_d = __pyx_t_2; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":161 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":161 * cdef unsigned d * for d in range(MIN_BOTTOM_SIZE): * if i & LOWER_MASK[0] == 0: # <<<<<<<<<<<<<< @@ -21283,7 +21283,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_dec2bin(long __pyx_v_i) { __pyx_t_3 = (((__pyx_v_i & (__pyx_v_4cdec_2sa_3_sa_LOWER_MASK[0])) == 0) != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":162 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":162 * for d in range(MIN_BOTTOM_SIZE): * if i & LOWER_MASK[0] == 0: * result = "0"+result # <<<<<<<<<<<<<< @@ -21298,7 +21298,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_dec2bin(long __pyx_v_i) { } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":164 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":164 * result = "0"+result * else: * result = "1"+result # <<<<<<<<<<<<<< @@ -21312,7 +21312,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_dec2bin(long __pyx_v_i) { } __pyx_L5:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":165 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":165 * else: * result = "1"+result * i = i >> 1 # <<<<<<<<<<<<<< @@ -21322,7 +21322,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_dec2bin(long __pyx_v_i) { __pyx_v_i = (__pyx_v_i >> 1); } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":166 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":166 * result = "1"+result * i = i >> 1 * return result # <<<<<<<<<<<<<< @@ -21334,7 +21334,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_dec2bin(long __pyx_v_i) { __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":157 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":157 * * * cdef str dec2bin(long i): # <<<<<<<<<<<<<< @@ -21354,7 +21354,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_dec2bin(long __pyx_v_i) { return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":177 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":177 * void** bottom * * cdef _VEB* new_VEB(int n): # <<<<<<<<<<<<<< @@ -21375,7 +21375,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__VEB *__pyx_f_4cdec_2sa_3_sa_new_VEB(int __ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("new_VEB", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":181 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":181 * cdef int num_bits, num_top_bits, i * * veb = <_VEB*> malloc(sizeof(_VEB)) # <<<<<<<<<<<<<< @@ -21384,7 +21384,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__VEB *__pyx_f_4cdec_2sa_3_sa_new_VEB(int __ */ __pyx_v_veb = ((struct __pyx_t_4cdec_2sa_3_sa__VEB *)malloc((sizeof(struct __pyx_t_4cdec_2sa_3_sa__VEB)))); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":183 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":183 * veb = <_VEB*> malloc(sizeof(_VEB)) * * num_bits = int(ceil(log(n) / log(2))) # <<<<<<<<<<<<<< @@ -21405,7 +21405,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__VEB *__pyx_f_4cdec_2sa_3_sa_new_VEB(int __ } __pyx_v_num_bits = ((int)ceil((__pyx_t_1 / __pyx_t_2))); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":184 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":184 * * num_bits = int(ceil(log(n) / log(2))) * veb.num_bottom_bits = num_bits/2 # <<<<<<<<<<<<<< @@ -21414,7 +21414,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__VEB *__pyx_f_4cdec_2sa_3_sa_new_VEB(int __ */ __pyx_v_veb->num_bottom_bits = __Pyx_div_long(__pyx_v_num_bits, 2); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":185 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":185 * num_bits = int(ceil(log(n) / log(2))) * veb.num_bottom_bits = num_bits/2 * if veb.num_bottom_bits < MIN_BOTTOM_BITS: # <<<<<<<<<<<<<< @@ -21424,7 +21424,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__VEB *__pyx_f_4cdec_2sa_3_sa_new_VEB(int __ __pyx_t_3 = ((__pyx_v_veb->num_bottom_bits < __pyx_v_4cdec_2sa_3_sa_MIN_BOTTOM_BITS) != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":186 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":186 * veb.num_bottom_bits = num_bits/2 * if veb.num_bottom_bits < MIN_BOTTOM_BITS: * veb.num_bottom_bits = MIN_BOTTOM_BITS # <<<<<<<<<<<<<< @@ -21436,7 +21436,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__VEB *__pyx_f_4cdec_2sa_3_sa_new_VEB(int __ } __pyx_L3:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":187 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":187 * if veb.num_bottom_bits < MIN_BOTTOM_BITS: * veb.num_bottom_bits = MIN_BOTTOM_BITS * veb.top_universe_size = (n >> veb.num_bottom_bits) + 1 # <<<<<<<<<<<<<< @@ -21445,7 +21445,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__VEB *__pyx_f_4cdec_2sa_3_sa_new_VEB(int __ */ __pyx_v_veb->top_universe_size = ((__pyx_v_n >> __pyx_v_veb->num_bottom_bits) + 1); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":189 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":189 * veb.top_universe_size = (n >> veb.num_bottom_bits) + 1 * * veb.bottom = malloc(veb.top_universe_size * sizeof(void*)) # <<<<<<<<<<<<<< @@ -21454,7 +21454,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__VEB *__pyx_f_4cdec_2sa_3_sa_new_VEB(int __ */ __pyx_v_veb->bottom = ((void **)malloc((__pyx_v_veb->top_universe_size * (sizeof(void *))))); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":190 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":190 * * veb.bottom = malloc(veb.top_universe_size * sizeof(void*)) * memset(veb.bottom, 0, veb.top_universe_size * sizeof(void*)) # <<<<<<<<<<<<<< @@ -21463,7 +21463,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__VEB *__pyx_f_4cdec_2sa_3_sa_new_VEB(int __ */ memset(__pyx_v_veb->bottom, 0, (__pyx_v_veb->top_universe_size * (sizeof(void *)))); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":192 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":192 * memset(veb.bottom, 0, veb.top_universe_size * sizeof(void*)) * * if veb.top_universe_size > MIN_BOTTOM_SIZE: # <<<<<<<<<<<<<< @@ -21473,7 +21473,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__VEB *__pyx_f_4cdec_2sa_3_sa_new_VEB(int __ __pyx_t_3 = ((__pyx_v_veb->top_universe_size > __pyx_v_4cdec_2sa_3_sa_MIN_BOTTOM_SIZE) != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":193 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":193 * * if veb.top_universe_size > MIN_BOTTOM_SIZE: * veb.top = new_VEB(veb.top_universe_size) # <<<<<<<<<<<<<< @@ -21485,7 +21485,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__VEB *__pyx_f_4cdec_2sa_3_sa_new_VEB(int __ } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":195 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":195 * veb.top = new_VEB(veb.top_universe_size) * else: * veb.top = new_BitSet() # <<<<<<<<<<<<<< @@ -21496,7 +21496,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__VEB *__pyx_f_4cdec_2sa_3_sa_new_VEB(int __ } __pyx_L4:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":197 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":197 * veb.top = new_BitSet() * * veb.max_val = -1 # <<<<<<<<<<<<<< @@ -21505,7 +21505,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__VEB *__pyx_f_4cdec_2sa_3_sa_new_VEB(int __ */ __pyx_v_veb->max_val = -1; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":198 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":198 * * veb.max_val = -1 * veb.min_val = -1 # <<<<<<<<<<<<<< @@ -21514,7 +21514,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__VEB *__pyx_f_4cdec_2sa_3_sa_new_VEB(int __ */ __pyx_v_veb->min_val = -1; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":199 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":199 * veb.max_val = -1 * veb.min_val = -1 * veb.size = 0 # <<<<<<<<<<<<<< @@ -21523,7 +21523,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__VEB *__pyx_f_4cdec_2sa_3_sa_new_VEB(int __ */ __pyx_v_veb->size = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":200 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":200 * veb.min_val = -1 * veb.size = 0 * return veb # <<<<<<<<<<<<<< @@ -21533,7 +21533,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__VEB *__pyx_f_4cdec_2sa_3_sa_new_VEB(int __ __pyx_r = __pyx_v_veb; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":177 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":177 * void** bottom * * cdef _VEB* new_VEB(int n): # <<<<<<<<<<<<<< @@ -21550,7 +21550,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__VEB *__pyx_f_4cdec_2sa_3_sa_new_VEB(int __ return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":203 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":203 * * * cdef int VEB_insert(_VEB* veb, int i): # <<<<<<<<<<<<<< @@ -21572,7 +21572,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB int __pyx_t_4; __Pyx_RefNannySetupContext("VEB_insert", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":208 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":208 * cdef int a, b, tmp * * if veb.size == 0: # <<<<<<<<<<<<<< @@ -21582,7 +21582,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB __pyx_t_1 = ((__pyx_v_veb->size == 0) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":209 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":209 * * if veb.size == 0: * veb.min_val = i # <<<<<<<<<<<<<< @@ -21591,7 +21591,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB */ __pyx_v_veb->min_val = __pyx_v_i; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":210 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":210 * if veb.size == 0: * veb.min_val = i * veb.max_val = i # <<<<<<<<<<<<<< @@ -21602,7 +21602,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB goto __pyx_L3; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":211 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":211 * veb.min_val = i * veb.max_val = i * elif i == veb.min_val or i == veb.max_val: # <<<<<<<<<<<<<< @@ -21618,7 +21618,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB } if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":212 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":212 * veb.max_val = i * elif i == veb.min_val or i == veb.max_val: * return 0 # <<<<<<<<<<<<<< @@ -21630,7 +21630,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":214 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":214 * return 0 * else: * if i < veb.min_val: # <<<<<<<<<<<<<< @@ -21640,7 +21640,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB __pyx_t_3 = ((__pyx_v_i < __pyx_v_veb->min_val) != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":215 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":215 * else: * if i < veb.min_val: * tmp = i # <<<<<<<<<<<<<< @@ -21649,7 +21649,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB */ __pyx_v_tmp = __pyx_v_i; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":216 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":216 * if i < veb.min_val: * tmp = i * i = veb.min_val # <<<<<<<<<<<<<< @@ -21659,7 +21659,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB __pyx_t_4 = __pyx_v_veb->min_val; __pyx_v_i = __pyx_t_4; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":217 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":217 * tmp = i * i = veb.min_val * veb.min_val = tmp # <<<<<<<<<<<<<< @@ -21671,7 +21671,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB } __pyx_L4:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":218 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":218 * i = veb.min_val * veb.min_val = tmp * a = i >> veb.num_bottom_bits # <<<<<<<<<<<<<< @@ -21680,7 +21680,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB */ __pyx_v_a = (__pyx_v_i >> __pyx_v_veb->num_bottom_bits); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":219 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":219 * veb.min_val = tmp * a = i >> veb.num_bottom_bits * b = i & LOWER_MASK[veb.num_bottom_bits-1] # <<<<<<<<<<<<<< @@ -21689,7 +21689,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB */ __pyx_v_b = (__pyx_v_i & (__pyx_v_4cdec_2sa_3_sa_LOWER_MASK[(__pyx_v_veb->num_bottom_bits - 1)])); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":220 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":220 * a = i >> veb.num_bottom_bits * b = i & LOWER_MASK[veb.num_bottom_bits-1] * if veb.bottom[a] == NULL: # <<<<<<<<<<<<<< @@ -21699,7 +21699,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB __pyx_t_3 = (((__pyx_v_veb->bottom[__pyx_v_a]) == NULL) != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":221 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":221 * b = i & LOWER_MASK[veb.num_bottom_bits-1] * if veb.bottom[a] == NULL: * if veb.top_universe_size > MIN_BOTTOM_SIZE: # <<<<<<<<<<<<<< @@ -21709,7 +21709,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB __pyx_t_3 = ((__pyx_v_veb->top_universe_size > __pyx_v_4cdec_2sa_3_sa_MIN_BOTTOM_SIZE) != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":222 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":222 * if veb.bottom[a] == NULL: * if veb.top_universe_size > MIN_BOTTOM_SIZE: * subv = <_VEB*> veb.top # <<<<<<<<<<<<<< @@ -21718,7 +21718,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB */ __pyx_v_subv = ((struct __pyx_t_4cdec_2sa_3_sa__VEB *)__pyx_v_veb->top); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":223 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":223 * if veb.top_universe_size > MIN_BOTTOM_SIZE: * subv = <_VEB*> veb.top * VEB_insert(subv, a) # <<<<<<<<<<<<<< @@ -21730,7 +21730,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":225 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":225 * VEB_insert(subv, a) * else: * subb = <_BitSet*> veb.top # <<<<<<<<<<<<<< @@ -21739,7 +21739,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB */ __pyx_v_subb = ((struct __pyx_t_4cdec_2sa_3_sa__BitSet *)__pyx_v_veb->top); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":226 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":226 * else: * subb = <_BitSet*> veb.top * bitset_insert(subb, a) # <<<<<<<<<<<<<< @@ -21750,7 +21750,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB } __pyx_L6:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":227 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":227 * subb = <_BitSet*> veb.top * bitset_insert(subb, a) * if veb.num_bottom_bits > MIN_BOTTOM_BITS: # <<<<<<<<<<<<<< @@ -21760,7 +21760,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB __pyx_t_3 = ((__pyx_v_veb->num_bottom_bits > __pyx_v_4cdec_2sa_3_sa_MIN_BOTTOM_BITS) != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":228 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":228 * bitset_insert(subb, a) * if veb.num_bottom_bits > MIN_BOTTOM_BITS: * veb.bottom[a] = new_VEB(1 << veb.num_bottom_bits) # <<<<<<<<<<<<<< @@ -21772,7 +21772,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":230 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":230 * veb.bottom[a] = new_VEB(1 << veb.num_bottom_bits) * else: * veb.bottom[a] = new_BitSet() # <<<<<<<<<<<<<< @@ -21786,7 +21786,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB } __pyx_L5:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":231 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":231 * else: * veb.bottom[a] = new_BitSet() * if veb.num_bottom_bits > MIN_BOTTOM_BITS: # <<<<<<<<<<<<<< @@ -21796,7 +21796,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB __pyx_t_3 = ((__pyx_v_veb->num_bottom_bits > __pyx_v_4cdec_2sa_3_sa_MIN_BOTTOM_BITS) != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":232 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":232 * veb.bottom[a] = new_BitSet() * if veb.num_bottom_bits > MIN_BOTTOM_BITS: * subv = <_VEB*> veb.bottom[a] # <<<<<<<<<<<<<< @@ -21805,7 +21805,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB */ __pyx_v_subv = ((struct __pyx_t_4cdec_2sa_3_sa__VEB *)(__pyx_v_veb->bottom[__pyx_v_a])); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":233 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":233 * if veb.num_bottom_bits > MIN_BOTTOM_BITS: * subv = <_VEB*> veb.bottom[a] * if VEB_insert(subv, b) == 0: # <<<<<<<<<<<<<< @@ -21815,7 +21815,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB __pyx_t_3 = ((__pyx_f_4cdec_2sa_3_sa_VEB_insert(__pyx_v_subv, __pyx_v_b) == 0) != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":234 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":234 * subv = <_VEB*> veb.bottom[a] * if VEB_insert(subv, b) == 0: * return 0 # <<<<<<<<<<<<<< @@ -21829,7 +21829,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":236 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":236 * return 0 * else: * subb = <_BitSet*> veb.bottom[a] # <<<<<<<<<<<<<< @@ -21838,7 +21838,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB */ __pyx_v_subb = ((struct __pyx_t_4cdec_2sa_3_sa__BitSet *)(__pyx_v_veb->bottom[__pyx_v_a])); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":237 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":237 * else: * subb = <_BitSet*> veb.bottom[a] * if bitset_insert(subb, b) == 0: # <<<<<<<<<<<<<< @@ -21848,7 +21848,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB __pyx_t_3 = ((__pyx_f_4cdec_2sa_3_sa_bitset_insert(__pyx_v_subb, __pyx_v_b) == 0) != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":238 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":238 * subb = <_BitSet*> veb.bottom[a] * if bitset_insert(subb, b) == 0: * return 0 # <<<<<<<<<<<<<< @@ -21861,7 +21861,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB } __pyx_L8:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":240 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":240 * return 0 * * if i > veb.max_val: # <<<<<<<<<<<<<< @@ -21871,7 +21871,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB __pyx_t_3 = ((__pyx_v_i > __pyx_v_veb->max_val) != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":241 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":241 * * if i > veb.max_val: * veb.max_val = i # <<<<<<<<<<<<<< @@ -21885,7 +21885,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB } __pyx_L3:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":242 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":242 * if i > veb.max_val: * veb.max_val = i * veb.size = veb.size + 1 # <<<<<<<<<<<<<< @@ -21894,7 +21894,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB */ __pyx_v_veb->size = (__pyx_v_veb->size + 1); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":243 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":243 * veb.max_val = i * veb.size = veb.size + 1 * return 1 # <<<<<<<<<<<<<< @@ -21904,7 +21904,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB __pyx_r = 1; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":203 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":203 * * * cdef int VEB_insert(_VEB* veb, int i): # <<<<<<<<<<<<<< @@ -21918,7 +21918,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":246 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":246 * * * cdef del_VEB(_VEB* veb): # <<<<<<<<<<<<<< @@ -21938,7 +21938,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_del_VEB(struct __pyx_t_4cdec_2sa_3_sa__V int __pyx_clineno = 0; __Pyx_RefNannySetupContext("del_VEB", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":249 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":249 * cdef int i * * if veb.top_universe_size > MIN_BOTTOM_SIZE: # <<<<<<<<<<<<<< @@ -21948,7 +21948,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_del_VEB(struct __pyx_t_4cdec_2sa_3_sa__V __pyx_t_1 = ((__pyx_v_veb->top_universe_size > __pyx_v_4cdec_2sa_3_sa_MIN_BOTTOM_SIZE) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":250 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":250 * * if veb.top_universe_size > MIN_BOTTOM_SIZE: * i = (<_VEB*> veb.top).min_val # <<<<<<<<<<<<<< @@ -21961,7 +21961,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_del_VEB(struct __pyx_t_4cdec_2sa_3_sa__V } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":252 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":252 * i = (<_VEB*> veb.top).min_val * else: * i = (<_BitSet*> veb.top).min_val # <<<<<<<<<<<<<< @@ -21973,7 +21973,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_del_VEB(struct __pyx_t_4cdec_2sa_3_sa__V } __pyx_L3:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":254 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":254 * i = (<_BitSet*> veb.top).min_val * * while i != -1: # <<<<<<<<<<<<<< @@ -21984,7 +21984,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_del_VEB(struct __pyx_t_4cdec_2sa_3_sa__V __pyx_t_1 = ((__pyx_v_i != -1) != 0); if (!__pyx_t_1) break; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":255 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":255 * * while i != -1: * if veb.num_bottom_bits > MIN_BOTTOM_BITS: # <<<<<<<<<<<<<< @@ -21994,7 +21994,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_del_VEB(struct __pyx_t_4cdec_2sa_3_sa__V __pyx_t_1 = ((__pyx_v_veb->num_bottom_bits > __pyx_v_4cdec_2sa_3_sa_MIN_BOTTOM_BITS) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":256 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":256 * while i != -1: * if veb.num_bottom_bits > MIN_BOTTOM_BITS: * del_VEB(<_VEB*> veb.bottom[i]) # <<<<<<<<<<<<<< @@ -22008,7 +22008,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_del_VEB(struct __pyx_t_4cdec_2sa_3_sa__V } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":258 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":258 * del_VEB(<_VEB*> veb.bottom[i]) * else: * free(<_BitSet*> veb.bottom[i]) # <<<<<<<<<<<<<< @@ -22019,7 +22019,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_del_VEB(struct __pyx_t_4cdec_2sa_3_sa__V } __pyx_L6:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":260 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":260 * free(<_BitSet*> veb.bottom[i]) * * if veb.top_universe_size > MIN_BOTTOM_SIZE: # <<<<<<<<<<<<<< @@ -22029,7 +22029,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_del_VEB(struct __pyx_t_4cdec_2sa_3_sa__V __pyx_t_1 = ((__pyx_v_veb->top_universe_size > __pyx_v_4cdec_2sa_3_sa_MIN_BOTTOM_SIZE) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":261 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":261 * * if veb.top_universe_size > MIN_BOTTOM_SIZE: * i = VEB_findsucc(<_VEB*> veb.top, i) # <<<<<<<<<<<<<< @@ -22041,7 +22041,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_del_VEB(struct __pyx_t_4cdec_2sa_3_sa__V } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":263 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":263 * i = VEB_findsucc(<_VEB*> veb.top, i) * else: * i = bitset_findsucc(<_BitSet*> veb.top, i) # <<<<<<<<<<<<<< @@ -22053,7 +22053,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_del_VEB(struct __pyx_t_4cdec_2sa_3_sa__V __pyx_L7:; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":265 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":265 * i = bitset_findsucc(<_BitSet*> veb.top, i) * * if veb.top_universe_size > MIN_BOTTOM_SIZE: # <<<<<<<<<<<<<< @@ -22063,7 +22063,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_del_VEB(struct __pyx_t_4cdec_2sa_3_sa__V __pyx_t_1 = ((__pyx_v_veb->top_universe_size > __pyx_v_4cdec_2sa_3_sa_MIN_BOTTOM_SIZE) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":266 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":266 * * if veb.top_universe_size > MIN_BOTTOM_SIZE: * del_VEB(<_VEB*> veb.top) # <<<<<<<<<<<<<< @@ -22077,7 +22077,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_del_VEB(struct __pyx_t_4cdec_2sa_3_sa__V } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":268 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":268 * del_VEB(<_VEB*> veb.top) * else: * free(<_BitSet*> veb.top) # <<<<<<<<<<<<<< @@ -22088,7 +22088,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_del_VEB(struct __pyx_t_4cdec_2sa_3_sa__V } __pyx_L8:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":269 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":269 * else: * free(<_BitSet*> veb.top) * free(veb.bottom) # <<<<<<<<<<<<<< @@ -22097,7 +22097,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_del_VEB(struct __pyx_t_4cdec_2sa_3_sa__V */ free(__pyx_v_veb->bottom); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":270 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":270 * free(<_BitSet*> veb.top) * free(veb.bottom) * free(veb) # <<<<<<<<<<<<<< @@ -22106,7 +22106,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_del_VEB(struct __pyx_t_4cdec_2sa_3_sa__V */ free(__pyx_v_veb); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":246 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":246 * * * cdef del_VEB(_VEB* veb): # <<<<<<<<<<<<<< @@ -22127,7 +22127,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_del_VEB(struct __pyx_t_4cdec_2sa_3_sa__V return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":273 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":273 * * * cdef int VEB_findsucc(_VEB* veb, int i): # <<<<<<<<<<<<<< @@ -22150,7 +22150,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(struct __pyx_t_4cdec_2sa_3_sa__VE int __pyx_t_3; __Pyx_RefNannySetupContext("VEB_findsucc", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":278 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":278 * cdef int a, b, j, c, found * * if veb.max_val == -1 or i>=veb.max_val: # <<<<<<<<<<<<<< @@ -22166,7 +22166,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(struct __pyx_t_4cdec_2sa_3_sa__VE } if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":279 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":279 * * if veb.max_val == -1 or i>=veb.max_val: * return -1 # <<<<<<<<<<<<<< @@ -22177,7 +22177,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(struct __pyx_t_4cdec_2sa_3_sa__VE goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":280 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":280 * if veb.max_val == -1 or i>=veb.max_val: * return -1 * if i < veb.min_val: # <<<<<<<<<<<<<< @@ -22187,7 +22187,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(struct __pyx_t_4cdec_2sa_3_sa__VE __pyx_t_3 = ((__pyx_v_i < __pyx_v_veb->min_val) != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":281 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":281 * return -1 * if i < veb.min_val: * return veb.min_val # <<<<<<<<<<<<<< @@ -22198,7 +22198,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(struct __pyx_t_4cdec_2sa_3_sa__VE goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":283 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":283 * return veb.min_val * * a = i >> veb.num_bottom_bits # <<<<<<<<<<<<<< @@ -22207,7 +22207,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(struct __pyx_t_4cdec_2sa_3_sa__VE */ __pyx_v_a = (__pyx_v_i >> __pyx_v_veb->num_bottom_bits); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":284 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":284 * * a = i >> veb.num_bottom_bits * b = i & LOWER_MASK[veb.num_bottom_bits-1] # <<<<<<<<<<<<<< @@ -22216,7 +22216,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(struct __pyx_t_4cdec_2sa_3_sa__VE */ __pyx_v_b = (__pyx_v_i & (__pyx_v_4cdec_2sa_3_sa_LOWER_MASK[(__pyx_v_veb->num_bottom_bits - 1)])); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":285 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":285 * a = i >> veb.num_bottom_bits * b = i & LOWER_MASK[veb.num_bottom_bits-1] * found = 0 # <<<<<<<<<<<<<< @@ -22225,7 +22225,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(struct __pyx_t_4cdec_2sa_3_sa__VE */ __pyx_v_found = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":286 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":286 * b = i & LOWER_MASK[veb.num_bottom_bits-1] * found = 0 * if veb.bottom[a] != NULL: # <<<<<<<<<<<<<< @@ -22235,7 +22235,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(struct __pyx_t_4cdec_2sa_3_sa__VE __pyx_t_3 = (((__pyx_v_veb->bottom[__pyx_v_a]) != NULL) != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":287 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":287 * found = 0 * if veb.bottom[a] != NULL: * if veb.num_bottom_bits > MIN_BOTTOM_BITS: # <<<<<<<<<<<<<< @@ -22245,7 +22245,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(struct __pyx_t_4cdec_2sa_3_sa__VE __pyx_t_3 = ((__pyx_v_veb->num_bottom_bits > __pyx_v_4cdec_2sa_3_sa_MIN_BOTTOM_BITS) != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":288 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":288 * if veb.bottom[a] != NULL: * if veb.num_bottom_bits > MIN_BOTTOM_BITS: * subv = <_VEB*> veb.bottom[a] # <<<<<<<<<<<<<< @@ -22254,7 +22254,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(struct __pyx_t_4cdec_2sa_3_sa__VE */ __pyx_v_subv = ((struct __pyx_t_4cdec_2sa_3_sa__VEB *)(__pyx_v_veb->bottom[__pyx_v_a])); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":289 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":289 * if veb.num_bottom_bits > MIN_BOTTOM_BITS: * subv = <_VEB*> veb.bottom[a] * if subv.max_val > b: # <<<<<<<<<<<<<< @@ -22264,7 +22264,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(struct __pyx_t_4cdec_2sa_3_sa__VE __pyx_t_3 = ((__pyx_v_subv->max_val > __pyx_v_b) != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":290 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":290 * subv = <_VEB*> veb.bottom[a] * if subv.max_val > b: * j = (a << veb.num_bottom_bits) + VEB_findsucc(subv, b) # <<<<<<<<<<<<<< @@ -22273,7 +22273,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(struct __pyx_t_4cdec_2sa_3_sa__VE */ __pyx_v_j = ((__pyx_v_a << __pyx_v_veb->num_bottom_bits) + __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(__pyx_v_subv, __pyx_v_b)); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":291 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":291 * if subv.max_val > b: * j = (a << veb.num_bottom_bits) + VEB_findsucc(subv, b) * found = 1 # <<<<<<<<<<<<<< @@ -22288,7 +22288,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(struct __pyx_t_4cdec_2sa_3_sa__VE } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":293 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":293 * found = 1 * else: * subb = <_BitSet*> veb.bottom[a] # <<<<<<<<<<<<<< @@ -22297,7 +22297,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(struct __pyx_t_4cdec_2sa_3_sa__VE */ __pyx_v_subb = ((struct __pyx_t_4cdec_2sa_3_sa__BitSet *)(__pyx_v_veb->bottom[__pyx_v_a])); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":294 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":294 * else: * subb = <_BitSet*> veb.bottom[a] * if subb.max_val > b: # <<<<<<<<<<<<<< @@ -22307,7 +22307,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(struct __pyx_t_4cdec_2sa_3_sa__VE __pyx_t_3 = ((__pyx_v_subb->max_val > __pyx_v_b) != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":295 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":295 * subb = <_BitSet*> veb.bottom[a] * if subb.max_val > b: * j = (a << veb.num_bottom_bits) + bitset_findsucc(subb, b) # <<<<<<<<<<<<<< @@ -22316,7 +22316,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(struct __pyx_t_4cdec_2sa_3_sa__VE */ __pyx_v_j = ((__pyx_v_a << __pyx_v_veb->num_bottom_bits) + __pyx_f_4cdec_2sa_3_sa_bitset_findsucc(__pyx_v_subb, __pyx_v_b)); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":296 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":296 * if subb.max_val > b: * j = (a << veb.num_bottom_bits) + bitset_findsucc(subb, b) * found = 1 # <<<<<<<<<<<<<< @@ -22333,7 +22333,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(struct __pyx_t_4cdec_2sa_3_sa__VE } __pyx_L5:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":297 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":297 * j = (a << veb.num_bottom_bits) + bitset_findsucc(subb, b) * found = 1 * if found==0: # <<<<<<<<<<<<<< @@ -22343,7 +22343,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(struct __pyx_t_4cdec_2sa_3_sa__VE __pyx_t_3 = ((__pyx_v_found == 0) != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":298 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":298 * found = 1 * if found==0: * if veb.top_universe_size > MIN_BOTTOM_SIZE: # <<<<<<<<<<<<<< @@ -22353,7 +22353,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(struct __pyx_t_4cdec_2sa_3_sa__VE __pyx_t_3 = ((__pyx_v_veb->top_universe_size > __pyx_v_4cdec_2sa_3_sa_MIN_BOTTOM_SIZE) != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":299 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":299 * if found==0: * if veb.top_universe_size > MIN_BOTTOM_SIZE: * subv = <_VEB*> veb.top # <<<<<<<<<<<<<< @@ -22362,7 +22362,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(struct __pyx_t_4cdec_2sa_3_sa__VE */ __pyx_v_subv = ((struct __pyx_t_4cdec_2sa_3_sa__VEB *)__pyx_v_veb->top); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":300 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":300 * if veb.top_universe_size > MIN_BOTTOM_SIZE: * subv = <_VEB*> veb.top * c = VEB_findsucc(subv, a) # <<<<<<<<<<<<<< @@ -22374,7 +22374,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(struct __pyx_t_4cdec_2sa_3_sa__VE } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":302 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":302 * c = VEB_findsucc(subv, a) * else: * subb = <_BitSet*> veb.top # <<<<<<<<<<<<<< @@ -22383,7 +22383,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(struct __pyx_t_4cdec_2sa_3_sa__VE */ __pyx_v_subb = ((struct __pyx_t_4cdec_2sa_3_sa__BitSet *)__pyx_v_veb->top); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":303 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":303 * else: * subb = <_BitSet*> veb.top * c = bitset_findsucc(subb, a) # <<<<<<<<<<<<<< @@ -22394,7 +22394,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(struct __pyx_t_4cdec_2sa_3_sa__VE } __pyx_L10:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":304 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":304 * subb = <_BitSet*> veb.top * c = bitset_findsucc(subb, a) * if veb.num_bottom_bits > MIN_BOTTOM_BITS: # <<<<<<<<<<<<<< @@ -22404,7 +22404,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(struct __pyx_t_4cdec_2sa_3_sa__VE __pyx_t_3 = ((__pyx_v_veb->num_bottom_bits > __pyx_v_4cdec_2sa_3_sa_MIN_BOTTOM_BITS) != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":305 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":305 * c = bitset_findsucc(subb, a) * if veb.num_bottom_bits > MIN_BOTTOM_BITS: * subv = <_VEB*> veb.bottom[c] # <<<<<<<<<<<<<< @@ -22413,7 +22413,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(struct __pyx_t_4cdec_2sa_3_sa__VE */ __pyx_v_subv = ((struct __pyx_t_4cdec_2sa_3_sa__VEB *)(__pyx_v_veb->bottom[__pyx_v_c])); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":306 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":306 * if veb.num_bottom_bits > MIN_BOTTOM_BITS: * subv = <_VEB*> veb.bottom[c] * j = (c << veb.num_bottom_bits) + subv.min_val # <<<<<<<<<<<<<< @@ -22425,7 +22425,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(struct __pyx_t_4cdec_2sa_3_sa__VE } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":308 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":308 * j = (c << veb.num_bottom_bits) + subv.min_val * else: * subb = <_BitSet*> veb.bottom[c] # <<<<<<<<<<<<<< @@ -22434,7 +22434,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(struct __pyx_t_4cdec_2sa_3_sa__VE */ __pyx_v_subb = ((struct __pyx_t_4cdec_2sa_3_sa__BitSet *)(__pyx_v_veb->bottom[__pyx_v_c])); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":309 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":309 * else: * subb = <_BitSet*> veb.bottom[c] * j = (c << veb.num_bottom_bits) + subb.min_val # <<<<<<<<<<<<<< @@ -22448,7 +22448,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(struct __pyx_t_4cdec_2sa_3_sa__VE } __pyx_L9:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":310 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":310 * subb = <_BitSet*> veb.bottom[c] * j = (c << veb.num_bottom_bits) + subb.min_val * return j # <<<<<<<<<<<<<< @@ -22458,7 +22458,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(struct __pyx_t_4cdec_2sa_3_sa__VE __pyx_r = __pyx_v_j; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":273 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":273 * * * cdef int VEB_findsucc(_VEB* veb, int i): # <<<<<<<<<<<<<< @@ -22472,7 +22472,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(struct __pyx_t_4cdec_2sa_3_sa__VE return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":313 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":313 * * * cdef int VEB_contains(_VEB* veb, int i): # <<<<<<<<<<<<<< @@ -22493,7 +22493,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_contains(struct __pyx_t_4cdec_2sa_3_sa__VE int __pyx_t_4; __Pyx_RefNannySetupContext("VEB_contains", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":318 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":318 * cdef int a, b * * if veb.size == 0 or i < veb.min_val or i > veb.max_val: # <<<<<<<<<<<<<< @@ -22515,7 +22515,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_contains(struct __pyx_t_4cdec_2sa_3_sa__VE } if (__pyx_t_2) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":319 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":319 * * if veb.size == 0 or i < veb.min_val or i > veb.max_val: * return 0 # <<<<<<<<<<<<<< @@ -22526,7 +22526,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_contains(struct __pyx_t_4cdec_2sa_3_sa__VE goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":321 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":321 * return 0 * * if veb.min_val == i: # <<<<<<<<<<<<<< @@ -22536,7 +22536,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_contains(struct __pyx_t_4cdec_2sa_3_sa__VE __pyx_t_2 = ((__pyx_v_veb->min_val == __pyx_v_i) != 0); if (__pyx_t_2) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":322 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":322 * * if veb.min_val == i: * return 1 # <<<<<<<<<<<<<< @@ -22548,7 +22548,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_contains(struct __pyx_t_4cdec_2sa_3_sa__VE } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":324 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":324 * return 1 * else: * if veb.size == 1: # <<<<<<<<<<<<<< @@ -22558,7 +22558,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_contains(struct __pyx_t_4cdec_2sa_3_sa__VE __pyx_t_2 = ((__pyx_v_veb->size == 1) != 0); if (__pyx_t_2) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":325 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":325 * else: * if veb.size == 1: * return 0 # <<<<<<<<<<<<<< @@ -22570,7 +22570,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_contains(struct __pyx_t_4cdec_2sa_3_sa__VE } } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":327 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":327 * return 0 * * a = i >> veb.num_bottom_bits # <<<<<<<<<<<<<< @@ -22579,7 +22579,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_contains(struct __pyx_t_4cdec_2sa_3_sa__VE */ __pyx_v_a = (__pyx_v_i >> __pyx_v_veb->num_bottom_bits); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":328 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":328 * * a = i >> veb.num_bottom_bits * b = i & LOWER_MASK[veb.num_bottom_bits-1] # <<<<<<<<<<<<<< @@ -22588,7 +22588,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_contains(struct __pyx_t_4cdec_2sa_3_sa__VE */ __pyx_v_b = (__pyx_v_i & (__pyx_v_4cdec_2sa_3_sa_LOWER_MASK[(__pyx_v_veb->num_bottom_bits - 1)])); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":329 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":329 * a = i >> veb.num_bottom_bits * b = i & LOWER_MASK[veb.num_bottom_bits-1] * if veb.bottom[a] == NULL: # <<<<<<<<<<<<<< @@ -22598,7 +22598,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_contains(struct __pyx_t_4cdec_2sa_3_sa__VE __pyx_t_2 = (((__pyx_v_veb->bottom[__pyx_v_a]) == NULL) != 0); if (__pyx_t_2) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":330 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":330 * b = i & LOWER_MASK[veb.num_bottom_bits-1] * if veb.bottom[a] == NULL: * return 0 # <<<<<<<<<<<<<< @@ -22610,7 +22610,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_contains(struct __pyx_t_4cdec_2sa_3_sa__VE } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":332 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":332 * return 0 * else: * if veb.num_bottom_bits > MIN_BOTTOM_BITS: # <<<<<<<<<<<<<< @@ -22620,7 +22620,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_contains(struct __pyx_t_4cdec_2sa_3_sa__VE __pyx_t_2 = ((__pyx_v_veb->num_bottom_bits > __pyx_v_4cdec_2sa_3_sa_MIN_BOTTOM_BITS) != 0); if (__pyx_t_2) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":333 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":333 * else: * if veb.num_bottom_bits > MIN_BOTTOM_BITS: * subv = <_VEB*> veb.bottom[a] # <<<<<<<<<<<<<< @@ -22629,7 +22629,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_contains(struct __pyx_t_4cdec_2sa_3_sa__VE */ __pyx_v_subv = ((struct __pyx_t_4cdec_2sa_3_sa__VEB *)(__pyx_v_veb->bottom[__pyx_v_a])); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":334 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":334 * if veb.num_bottom_bits > MIN_BOTTOM_BITS: * subv = <_VEB*> veb.bottom[a] * return VEB_contains(subv, b) # <<<<<<<<<<<<<< @@ -22641,7 +22641,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_contains(struct __pyx_t_4cdec_2sa_3_sa__VE } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":336 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":336 * return VEB_contains(subv, b) * else: * subb = <_BitSet*> veb.bottom[a] # <<<<<<<<<<<<<< @@ -22650,7 +22650,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_contains(struct __pyx_t_4cdec_2sa_3_sa__VE */ __pyx_v_subb = ((struct __pyx_t_4cdec_2sa_3_sa__BitSet *)(__pyx_v_veb->bottom[__pyx_v_a])); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":337 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":337 * else: * subb = <_BitSet*> veb.bottom[a] * return bitset_contains(subb, b) # <<<<<<<<<<<<<< @@ -22662,7 +22662,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_contains(struct __pyx_t_4cdec_2sa_3_sa__VE } } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":313 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":313 * * * cdef int VEB_contains(_VEB* veb, int i): # <<<<<<<<<<<<<< @@ -22676,7 +22676,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_contains(struct __pyx_t_4cdec_2sa_3_sa__VE return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":344 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":344 * cdef int next_val * * def __next__(self): # <<<<<<<<<<<<<< @@ -22709,7 +22709,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11VEBIterator___next__(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__next__", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":347 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":347 * cdef int ret_val * * if self.next_val == -1: # <<<<<<<<<<<<<< @@ -22719,7 +22719,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11VEBIterator___next__(struct __pyx_obj __pyx_t_1 = ((__pyx_v_self->next_val == -1) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":348 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":348 * * if self.next_val == -1: * raise StopIteration() # <<<<<<<<<<<<<< @@ -22733,7 +22733,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11VEBIterator___next__(struct __pyx_obj {__pyx_filename = __pyx_f[6]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":349 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":349 * if self.next_val == -1: * raise StopIteration() * ret_val = self.next_val # <<<<<<<<<<<<<< @@ -22743,7 +22743,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11VEBIterator___next__(struct __pyx_obj __pyx_t_3 = __pyx_v_self->next_val; __pyx_v_ret_val = __pyx_t_3; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":350 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":350 * raise StopIteration() * ret_val = self.next_val * self.next_val = VEB_findsucc(self.v, ret_val) # <<<<<<<<<<<<<< @@ -22752,7 +22752,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11VEBIterator___next__(struct __pyx_obj */ __pyx_v_self->next_val = __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(__pyx_v_self->v, __pyx_v_ret_val); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":351 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":351 * ret_val = self.next_val * self.next_val = VEB_findsucc(self.v, ret_val) * return ret_val # <<<<<<<<<<<<<< @@ -22766,7 +22766,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11VEBIterator___next__(struct __pyx_obj __pyx_t_2 = 0; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":344 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":344 * cdef int next_val * * def __next__(self): # <<<<<<<<<<<<<< @@ -22785,7 +22785,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11VEBIterator___next__(struct __pyx_obj return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":360 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":360 * cdef int _first(self) * * def __cinit__(self, int size): # <<<<<<<<<<<<<< @@ -22850,7 +22850,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_3VEB___cinit__(struct __pyx_obj_4cdec_2sa_3_s __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":361 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":361 * * def __cinit__(self, int size): * self.veb = new_VEB(size) # <<<<<<<<<<<<<< @@ -22859,7 +22859,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_3VEB___cinit__(struct __pyx_obj_4cdec_2sa_3_s */ __pyx_v_self->veb = __pyx_f_4cdec_2sa_3_sa_new_VEB(__pyx_v_size); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":360 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":360 * cdef int _first(self) * * def __cinit__(self, int size): # <<<<<<<<<<<<<< @@ -22873,7 +22873,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_3VEB___cinit__(struct __pyx_obj_4cdec_2sa_3_s return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":363 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":363 * self.veb = new_VEB(size) * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -22900,7 +22900,7 @@ static void __pyx_pf_4cdec_2sa_3_sa_3VEB_2__dealloc__(struct __pyx_obj_4cdec_2sa int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":364 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":364 * * def __dealloc__(self): * del_VEB(self.veb) # <<<<<<<<<<<<<< @@ -22911,7 +22911,7 @@ static void __pyx_pf_4cdec_2sa_3_sa_3VEB_2__dealloc__(struct __pyx_obj_4cdec_2sa __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":363 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":363 * self.veb = new_VEB(size) * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -22928,7 +22928,7 @@ static void __pyx_pf_4cdec_2sa_3_sa_3VEB_2__dealloc__(struct __pyx_obj_4cdec_2sa __Pyx_RefNannyFinishContext(); } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":366 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":366 * del_VEB(self.veb) * * def __iter__(self): # <<<<<<<<<<<<<< @@ -22961,7 +22961,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_3VEB_4__iter__(struct __pyx_obj_4cdec_2 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__iter__", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":368 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":368 * def __iter__(self): * cdef VEBIterator it * it = VEBIterator() # <<<<<<<<<<<<<< @@ -22973,7 +22973,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_3VEB_4__iter__(struct __pyx_obj_4cdec_2 __pyx_v_it = ((struct __pyx_obj_4cdec_2sa_3_sa_VEBIterator *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":369 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":369 * cdef VEBIterator it * it = VEBIterator() * it.v = self.veb # <<<<<<<<<<<<<< @@ -22983,7 +22983,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_3VEB_4__iter__(struct __pyx_obj_4cdec_2 __pyx_t_2 = __pyx_v_self->veb; __pyx_v_it->v = __pyx_t_2; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":370 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":370 * it = VEBIterator() * it.v = self.veb * it.next_val = self.veb.min_val # <<<<<<<<<<<<<< @@ -22993,7 +22993,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_3VEB_4__iter__(struct __pyx_obj_4cdec_2 __pyx_t_3 = __pyx_v_self->veb->min_val; __pyx_v_it->next_val = __pyx_t_3; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":371 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":371 * it.v = self.veb * it.next_val = self.veb.min_val * return it # <<<<<<<<<<<<<< @@ -23005,7 +23005,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_3VEB_4__iter__(struct __pyx_obj_4cdec_2 __pyx_r = ((PyObject *)__pyx_v_it); goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":366 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":366 * del_VEB(self.veb) * * def __iter__(self): # <<<<<<<<<<<<<< @@ -23025,7 +23025,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_3VEB_4__iter__(struct __pyx_obj_4cdec_2 return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":373 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":373 * return it * * def insert(self, i): # <<<<<<<<<<<<<< @@ -23056,7 +23056,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_3VEB_6insert(struct __pyx_obj_4cdec_2sa int __pyx_clineno = 0; __Pyx_RefNannySetupContext("insert", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":374 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":374 * * def insert(self, i): * return VEB_insert(self.veb, i) # <<<<<<<<<<<<<< @@ -23071,7 +23071,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_3VEB_6insert(struct __pyx_obj_4cdec_2sa __pyx_t_2 = 0; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":373 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":373 * return it * * def insert(self, i): # <<<<<<<<<<<<<< @@ -23090,7 +23090,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_3VEB_6insert(struct __pyx_obj_4cdec_2sa return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":376 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":376 * return VEB_insert(self.veb, i) * * cdef int _insert(self, int i): # <<<<<<<<<<<<<< @@ -23103,7 +23103,7 @@ static int __pyx_f_4cdec_2sa_3_sa_3VEB__insert(struct __pyx_obj_4cdec_2sa_3_sa_V __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_insert", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":377 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":377 * * cdef int _insert(self, int i): * return VEB_insert(self.veb, i) # <<<<<<<<<<<<<< @@ -23113,7 +23113,7 @@ static int __pyx_f_4cdec_2sa_3_sa_3VEB__insert(struct __pyx_obj_4cdec_2sa_3_sa_V __pyx_r = __pyx_f_4cdec_2sa_3_sa_VEB_insert(__pyx_v_self->veb, __pyx_v_i); goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":376 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":376 * return VEB_insert(self.veb, i) * * cdef int _insert(self, int i): # <<<<<<<<<<<<<< @@ -23127,7 +23127,7 @@ static int __pyx_f_4cdec_2sa_3_sa_3VEB__insert(struct __pyx_obj_4cdec_2sa_3_sa_V return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":379 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":379 * return VEB_insert(self.veb, i) * * def findsucc(self, i): # <<<<<<<<<<<<<< @@ -23158,7 +23158,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_3VEB_8findsucc(struct __pyx_obj_4cdec_2 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("findsucc", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":380 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":380 * * def findsucc(self, i): * return VEB_findsucc(self.veb, i) # <<<<<<<<<<<<<< @@ -23173,7 +23173,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_3VEB_8findsucc(struct __pyx_obj_4cdec_2 __pyx_t_2 = 0; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":379 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":379 * return VEB_insert(self.veb, i) * * def findsucc(self, i): # <<<<<<<<<<<<<< @@ -23192,7 +23192,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_3VEB_8findsucc(struct __pyx_obj_4cdec_2 return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":382 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":382 * return VEB_findsucc(self.veb, i) * * cdef int _first(self): # <<<<<<<<<<<<<< @@ -23205,7 +23205,7 @@ static int __pyx_f_4cdec_2sa_3_sa_3VEB__first(struct __pyx_obj_4cdec_2sa_3_sa_VE __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_first", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":383 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":383 * * cdef int _first(self): * return self.veb.min_val # <<<<<<<<<<<<<< @@ -23215,7 +23215,7 @@ static int __pyx_f_4cdec_2sa_3_sa_3VEB__first(struct __pyx_obj_4cdec_2sa_3_sa_VE __pyx_r = __pyx_v_self->veb->min_val; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":382 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":382 * return VEB_findsucc(self.veb, i) * * cdef int _first(self): # <<<<<<<<<<<<<< @@ -23229,7 +23229,7 @@ static int __pyx_f_4cdec_2sa_3_sa_3VEB__first(struct __pyx_obj_4cdec_2sa_3_sa_VE return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":385 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":385 * return self.veb.min_val * * cdef int _findsucc(self, int i): # <<<<<<<<<<<<<< @@ -23242,7 +23242,7 @@ static int __pyx_f_4cdec_2sa_3_sa_3VEB__findsucc(struct __pyx_obj_4cdec_2sa_3_sa __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_findsucc", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":386 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":386 * * cdef int _findsucc(self, int i): * return VEB_findsucc(self.veb, i) # <<<<<<<<<<<<<< @@ -23252,7 +23252,7 @@ static int __pyx_f_4cdec_2sa_3_sa_3VEB__findsucc(struct __pyx_obj_4cdec_2sa_3_sa __pyx_r = __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(__pyx_v_self->veb, __pyx_v_i); goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":385 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":385 * return self.veb.min_val * * cdef int _findsucc(self, int i): # <<<<<<<<<<<<<< @@ -23266,7 +23266,7 @@ static int __pyx_f_4cdec_2sa_3_sa_3VEB__findsucc(struct __pyx_obj_4cdec_2sa_3_sa return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":388 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":388 * return VEB_findsucc(self.veb, i) * * def __len__(self): # <<<<<<<<<<<<<< @@ -23292,7 +23292,7 @@ static Py_ssize_t __pyx_pf_4cdec_2sa_3_sa_3VEB_10__len__(struct __pyx_obj_4cdec_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":389 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":389 * * def __len__(self): * return self.veb.size # <<<<<<<<<<<<<< @@ -23302,7 +23302,7 @@ static Py_ssize_t __pyx_pf_4cdec_2sa_3_sa_3VEB_10__len__(struct __pyx_obj_4cdec_ __pyx_r = __pyx_v_self->veb->size; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":388 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":388 * return VEB_findsucc(self.veb, i) * * def __len__(self): # <<<<<<<<<<<<<< @@ -23316,7 +23316,7 @@ static Py_ssize_t __pyx_pf_4cdec_2sa_3_sa_3VEB_10__len__(struct __pyx_obj_4cdec_ return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":391 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":391 * return self.veb.size * * def __contains__(self, i): # <<<<<<<<<<<<<< @@ -23345,7 +23345,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_3VEB_12__contains__(struct __pyx_obj_4cdec_2s int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__contains__", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":392 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":392 * * def __contains__(self, i): * return VEB_contains(self.veb, i) # <<<<<<<<<<<<<< @@ -23354,7 +23354,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_3VEB_12__contains__(struct __pyx_obj_4cdec_2s __pyx_r = __pyx_f_4cdec_2sa_3_sa_VEB_contains(__pyx_v_self->veb, __pyx_t_1); goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":391 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":391 * return self.veb.size * * def __contains__(self, i): # <<<<<<<<<<<<<< @@ -23370,7 +23370,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_3VEB_12__contains__(struct __pyx_obj_4cdec_2s return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/lcp.pxi":9 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":9 * cdef IntList lcp * * def __cinit__(self, SuffixArray sa): # <<<<<<<<<<<<<< @@ -23456,7 +23456,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_3LCP___cinit__(struct __pyx_obj_4cdec_2sa_3_s int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/lcp.pxi":13 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":13 * cdef IntList rank * * logger.info("Constructing LCP array") # <<<<<<<<<<<<<< @@ -23473,7 +23473,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_3LCP___cinit__(struct __pyx_obj_4cdec_2sa_3_s __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/lcp.pxi":14 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":14 * * logger.info("Constructing LCP array") * self.sa = sa # <<<<<<<<<<<<<< @@ -23486,7 +23486,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_3LCP___cinit__(struct __pyx_obj_4cdec_2sa_3_s __Pyx_DECREF(((PyObject *)__pyx_v_self->sa)); __pyx_v_self->sa = __pyx_v_sa; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/lcp.pxi":15 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":15 * logger.info("Constructing LCP array") * self.sa = sa * n = self.sa.sa.len # <<<<<<<<<<<<<< @@ -23496,7 +23496,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_3LCP___cinit__(struct __pyx_obj_4cdec_2sa_3_s __pyx_t_3 = __pyx_v_self->sa->sa->len; __pyx_v_n = __pyx_t_3; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/lcp.pxi":16 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":16 * self.sa = sa * n = self.sa.sa.len * self.lcp = IntList(initial_len=n) # <<<<<<<<<<<<<< @@ -23518,7 +23518,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_3LCP___cinit__(struct __pyx_obj_4cdec_2sa_3_s __pyx_v_self->lcp = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/lcp.pxi":18 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":18 * self.lcp = IntList(initial_len=n) * * rank = IntList(initial_len=n) # <<<<<<<<<<<<<< @@ -23537,7 +23537,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_3LCP___cinit__(struct __pyx_obj_4cdec_2sa_3_s __pyx_v_rank = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/lcp.pxi":19 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":19 * * rank = IntList(initial_len=n) * for i from 0 <= i < n: # <<<<<<<<<<<<<< @@ -23547,7 +23547,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_3LCP___cinit__(struct __pyx_obj_4cdec_2sa_3_s __pyx_t_3 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_3; __pyx_v_i++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/lcp.pxi":20 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":20 * rank = IntList(initial_len=n) * for i from 0 <= i < n: * rank.arr[sa.sa.arr[i]] = i # <<<<<<<<<<<<<< @@ -23557,7 +23557,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_3LCP___cinit__(struct __pyx_obj_4cdec_2sa_3_s (__pyx_v_rank->arr[(__pyx_v_sa->sa->arr[__pyx_v_i])]) = __pyx_v_i; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/lcp.pxi":22 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":22 * rank.arr[sa.sa.arr[i]] = i * * h = 0 # <<<<<<<<<<<<<< @@ -23566,7 +23566,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_3LCP___cinit__(struct __pyx_obj_4cdec_2sa_3_s */ __pyx_v_h = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/lcp.pxi":23 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":23 * * h = 0 * for i from 0 <= i < n: # <<<<<<<<<<<<<< @@ -23576,7 +23576,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_3LCP___cinit__(struct __pyx_obj_4cdec_2sa_3_s __pyx_t_3 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_3; __pyx_v_i++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/lcp.pxi":24 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":24 * h = 0 * for i from 0 <= i < n: * k = rank.arr[i] # <<<<<<<<<<<<<< @@ -23585,7 +23585,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_3LCP___cinit__(struct __pyx_obj_4cdec_2sa_3_s */ __pyx_v_k = (__pyx_v_rank->arr[__pyx_v_i]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/lcp.pxi":25 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":25 * for i from 0 <= i < n: * k = rank.arr[i] * if k == 0: # <<<<<<<<<<<<<< @@ -23595,7 +23595,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_3LCP___cinit__(struct __pyx_obj_4cdec_2sa_3_s __pyx_t_4 = ((__pyx_v_k == 0) != 0); if (__pyx_t_4) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/lcp.pxi":26 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":26 * k = rank.arr[i] * if k == 0: * self.lcp.arr[k] = -1 # <<<<<<<<<<<<<< @@ -23607,7 +23607,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_3LCP___cinit__(struct __pyx_obj_4cdec_2sa_3_s } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/lcp.pxi":28 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":28 * self.lcp.arr[k] = -1 * else: * j = sa.sa.arr[k-1] # <<<<<<<<<<<<<< @@ -23616,7 +23616,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_3LCP___cinit__(struct __pyx_obj_4cdec_2sa_3_s */ __pyx_v_j = (__pyx_v_sa->sa->arr[(__pyx_v_k - 1)]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/lcp.pxi":29 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":29 * else: * j = sa.sa.arr[k-1] * while i+h < n and j+h < n and sa.darray.data.arr[i+h] == sa.darray.data.arr[j+h]: # <<<<<<<<<<<<<< @@ -23639,7 +23639,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_3LCP___cinit__(struct __pyx_obj_4cdec_2sa_3_s } if (!__pyx_t_5) break; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/lcp.pxi":30 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":30 * j = sa.sa.arr[k-1] * while i+h < n and j+h < n and sa.darray.data.arr[i+h] == sa.darray.data.arr[j+h]: * h = h+1 # <<<<<<<<<<<<<< @@ -23649,7 +23649,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_3LCP___cinit__(struct __pyx_obj_4cdec_2sa_3_s __pyx_v_h = (__pyx_v_h + 1); } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/lcp.pxi":31 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":31 * while i+h < n and j+h < n and sa.darray.data.arr[i+h] == sa.darray.data.arr[j+h]: * h = h+1 * self.lcp.arr[k] = h # <<<<<<<<<<<<<< @@ -23660,7 +23660,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_3LCP___cinit__(struct __pyx_obj_4cdec_2sa_3_s } __pyx_L7:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/lcp.pxi":32 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":32 * h = h+1 * self.lcp.arr[k] = h * if h > 0: # <<<<<<<<<<<<<< @@ -23670,7 +23670,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_3LCP___cinit__(struct __pyx_obj_4cdec_2sa_3_s __pyx_t_5 = ((__pyx_v_h > 0) != 0); if (__pyx_t_5) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/lcp.pxi":33 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":33 * self.lcp.arr[k] = h * if h > 0: * h = h-1 # <<<<<<<<<<<<<< @@ -23683,7 +23683,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_3LCP___cinit__(struct __pyx_obj_4cdec_2sa_3_s __pyx_L10:; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/lcp.pxi":34 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":34 * if h > 0: * h = h-1 * logger.info("LCP array completed") # <<<<<<<<<<<<<< @@ -23700,7 +23700,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_3LCP___cinit__(struct __pyx_obj_4cdec_2sa_3_s __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/lcp.pxi":9 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":9 * cdef IntList lcp * * def __cinit__(self, SuffixArray sa): # <<<<<<<<<<<<<< @@ -23723,7 +23723,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_3LCP___cinit__(struct __pyx_obj_4cdec_2sa_3_s } static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/lcp.pxi":36 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":36 * logger.info("LCP array completed") * * def compute_stats(self, int max_n): # <<<<<<<<<<<<<< @@ -23825,7 +23825,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/lcp.pxi":48 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":48 * cdef VEB veb * * N = self.sa.sa.len # <<<<<<<<<<<<<< @@ -23835,7 +23835,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject __pyx_t_1 = __pyx_cur_scope->__pyx_v_self->sa->sa->len; __pyx_cur_scope->__pyx_v_N = __pyx_t_1; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/lcp.pxi":50 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":50 * N = self.sa.sa.len * * ngram_starts = [] # <<<<<<<<<<<<<< @@ -23848,7 +23848,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject __pyx_cur_scope->__pyx_v_ngram_starts = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/lcp.pxi":51 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":51 * * ngram_starts = [] * for n from 0 <= n < max_n: # <<<<<<<<<<<<<< @@ -23858,7 +23858,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject __pyx_t_1 = __pyx_cur_scope->__pyx_v_max_n; for (__pyx_cur_scope->__pyx_v_n = 0; __pyx_cur_scope->__pyx_v_n < __pyx_t_1; __pyx_cur_scope->__pyx_v_n++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/lcp.pxi":52 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":52 * ngram_starts = [] * for n from 0 <= n < max_n: * ngram_starts.append(IntList(initial_len=N)) # <<<<<<<<<<<<<< @@ -23878,7 +23878,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/lcp.pxi":54 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":54 * ngram_starts.append(IntList(initial_len=N)) * * run_start = IntList(initial_len=max_n) # <<<<<<<<<<<<<< @@ -23898,7 +23898,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject __pyx_cur_scope->__pyx_v_run_start = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/lcp.pxi":55 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":55 * * run_start = IntList(initial_len=max_n) * veb = VEB(N) # <<<<<<<<<<<<<< @@ -23919,7 +23919,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject __pyx_cur_scope->__pyx_v_veb = ((struct __pyx_obj_4cdec_2sa_3_sa_VEB *)__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/lcp.pxi":57 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":57 * veb = VEB(N) * * for i from 0 <= i < N: # <<<<<<<<<<<<<< @@ -23929,7 +23929,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject __pyx_t_1 = __pyx_cur_scope->__pyx_v_N; for (__pyx_cur_scope->__pyx_v_i = 0; __pyx_cur_scope->__pyx_v_i < __pyx_t_1; __pyx_cur_scope->__pyx_v_i++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/lcp.pxi":58 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":58 * * for i from 0 <= i < N: * h = self.lcp.arr[i] # <<<<<<<<<<<<<< @@ -23938,7 +23938,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject */ __pyx_cur_scope->__pyx_v_h = (__pyx_cur_scope->__pyx_v_self->lcp->arr[__pyx_cur_scope->__pyx_v_i]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/lcp.pxi":59 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":59 * for i from 0 <= i < N: * h = self.lcp.arr[i] * if h < 0: # <<<<<<<<<<<<<< @@ -23948,7 +23948,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject __pyx_t_5 = ((__pyx_cur_scope->__pyx_v_h < 0) != 0); if (__pyx_t_5) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/lcp.pxi":60 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":60 * h = self.lcp.arr[i] * if h < 0: * h = 0 # <<<<<<<<<<<<<< @@ -23960,7 +23960,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject } __pyx_L8:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/lcp.pxi":61 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":61 * if h < 0: * h = 0 * for n from h <= n < max_n: # <<<<<<<<<<<<<< @@ -23970,7 +23970,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject __pyx_t_6 = __pyx_cur_scope->__pyx_v_max_n; for (__pyx_cur_scope->__pyx_v_n = __pyx_cur_scope->__pyx_v_h; __pyx_cur_scope->__pyx_v_n < __pyx_t_6; __pyx_cur_scope->__pyx_v_n++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/lcp.pxi":62 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":62 * h = 0 * for n from h <= n < max_n: * rs = run_start.arr[n] # <<<<<<<<<<<<<< @@ -23979,7 +23979,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject */ __pyx_cur_scope->__pyx_v_rs = (__pyx_cur_scope->__pyx_v_run_start->arr[__pyx_cur_scope->__pyx_v_n]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/lcp.pxi":63 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":63 * for n from h <= n < max_n: * rs = run_start.arr[n] * run_start.arr[n] = i # <<<<<<<<<<<<<< @@ -23988,7 +23988,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject */ (__pyx_cur_scope->__pyx_v_run_start->arr[__pyx_cur_scope->__pyx_v_n]) = __pyx_cur_scope->__pyx_v_i; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/lcp.pxi":64 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":64 * rs = run_start.arr[n] * run_start.arr[n] = i * freq = i - rs # <<<<<<<<<<<<<< @@ -23997,7 +23997,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject */ __pyx_cur_scope->__pyx_v_freq = (__pyx_cur_scope->__pyx_v_i - __pyx_cur_scope->__pyx_v_rs); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/lcp.pxi":65 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":65 * run_start.arr[n] = i * freq = i - rs * if freq > 1000: # arbitrary, but see note below # <<<<<<<<<<<<<< @@ -24007,7 +24007,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject __pyx_t_5 = ((__pyx_cur_scope->__pyx_v_freq > 1000) != 0); if (__pyx_t_5) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/lcp.pxi":66 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":66 * freq = i - rs * if freq > 1000: # arbitrary, but see note below * veb._insert(freq) # <<<<<<<<<<<<<< @@ -24016,7 +24016,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_VEB *)__pyx_cur_scope->__pyx_v_veb->__pyx_vtab)->_insert(__pyx_cur_scope->__pyx_v_veb, __pyx_cur_scope->__pyx_v_freq); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/lcp.pxi":67 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":67 * if freq > 1000: # arbitrary, but see note below * veb._insert(freq) * ngram_start = ngram_starts[n] # <<<<<<<<<<<<<< @@ -24031,7 +24031,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/lcp.pxi":68 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":68 * veb._insert(freq) * ngram_start = ngram_starts[n] * while ngram_start.arr[freq] > 0: # <<<<<<<<<<<<<< @@ -24042,7 +24042,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject __pyx_t_5 = (((__pyx_cur_scope->__pyx_v_ngram_start->arr[__pyx_cur_scope->__pyx_v_freq]) > 0) != 0); if (!__pyx_t_5) break; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/lcp.pxi":69 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":69 * ngram_start = ngram_starts[n] * while ngram_start.arr[freq] > 0: * freq = freq + 1 # cheating a bit, should be ok for sparse histogram # <<<<<<<<<<<<<< @@ -24052,7 +24052,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject __pyx_cur_scope->__pyx_v_freq = (__pyx_cur_scope->__pyx_v_freq + 1); } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/lcp.pxi":70 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":70 * while ngram_start.arr[freq] > 0: * freq = freq + 1 # cheating a bit, should be ok for sparse histogram * ngram_start.arr[freq] = rs # <<<<<<<<<<<<<< @@ -24066,7 +24066,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject } } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/lcp.pxi":71 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":71 * freq = freq + 1 # cheating a bit, should be ok for sparse histogram * ngram_start.arr[freq] = rs * i = veb.veb.min_val # <<<<<<<<<<<<<< @@ -24076,7 +24076,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject __pyx_t_1 = __pyx_cur_scope->__pyx_v_veb->veb->min_val; __pyx_cur_scope->__pyx_v_i = __pyx_t_1; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/lcp.pxi":72 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":72 * ngram_start.arr[freq] = rs * i = veb.veb.min_val * while i != -1: # <<<<<<<<<<<<<< @@ -24087,7 +24087,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject __pyx_t_5 = ((__pyx_cur_scope->__pyx_v_i != -1) != 0); if (!__pyx_t_5) break; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/lcp.pxi":73 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":73 * i = veb.veb.min_val * while i != -1: * ii = veb._findsucc(i) # <<<<<<<<<<<<<< @@ -24096,7 +24096,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject */ __pyx_cur_scope->__pyx_v_ii = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_VEB *)__pyx_cur_scope->__pyx_v_veb->__pyx_vtab)->_findsucc(__pyx_cur_scope->__pyx_v_veb, __pyx_cur_scope->__pyx_v_i); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/lcp.pxi":74 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":74 * while i != -1: * ii = veb._findsucc(i) * for n from 0 <= n < max_n: # <<<<<<<<<<<<<< @@ -24106,7 +24106,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject __pyx_t_1 = __pyx_cur_scope->__pyx_v_max_n; for (__pyx_cur_scope->__pyx_v_n = 0; __pyx_cur_scope->__pyx_v_n < __pyx_t_1; __pyx_cur_scope->__pyx_v_n++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/lcp.pxi":75 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":75 * ii = veb._findsucc(i) * for n from 0 <= n < max_n: * ngram_start = ngram_starts[n] # <<<<<<<<<<<<<< @@ -24121,7 +24121,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/lcp.pxi":76 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":76 * for n from 0 <= n < max_n: * ngram_start = ngram_starts[n] * iii = i # <<<<<<<<<<<<<< @@ -24130,7 +24130,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject */ __pyx_cur_scope->__pyx_v_iii = __pyx_cur_scope->__pyx_v_i; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/lcp.pxi":77 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":77 * ngram_start = ngram_starts[n] * iii = i * rs = ngram_start.arr[iii] # <<<<<<<<<<<<<< @@ -24139,7 +24139,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject */ __pyx_cur_scope->__pyx_v_rs = (__pyx_cur_scope->__pyx_v_ngram_start->arr[__pyx_cur_scope->__pyx_v_iii]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/lcp.pxi":78 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":78 * iii = i * rs = ngram_start.arr[iii] * while (ii==-1 or iii < ii) and rs != 0: # <<<<<<<<<<<<<< @@ -24162,7 +24162,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject } if (!__pyx_t_7) break; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/lcp.pxi":79 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":79 * rs = ngram_start.arr[iii] * while (ii==-1 or iii < ii) and rs != 0: * j = self.sa.sa.arr[rs] # <<<<<<<<<<<<<< @@ -24171,7 +24171,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject */ __pyx_cur_scope->__pyx_v_j = (__pyx_cur_scope->__pyx_v_self->sa->sa->arr[__pyx_cur_scope->__pyx_v_rs]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/lcp.pxi":80 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":80 * while (ii==-1 or iii < ii) and rs != 0: * j = self.sa.sa.arr[rs] * valid = 1 # <<<<<<<<<<<<<< @@ -24180,7 +24180,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject */ __pyx_cur_scope->__pyx_v_valid = 1; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/lcp.pxi":81 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":81 * j = self.sa.sa.arr[rs] * valid = 1 * for k from 0 <= k < n+1: # <<<<<<<<<<<<<< @@ -24190,7 +24190,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject __pyx_t_9 = (__pyx_cur_scope->__pyx_v_n + 1); for (__pyx_cur_scope->__pyx_v_k = 0; __pyx_cur_scope->__pyx_v_k < __pyx_t_9; __pyx_cur_scope->__pyx_v_k++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/lcp.pxi":82 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":82 * valid = 1 * for k from 0 <= k < n+1: * if self.sa.darray.data.arr[j+k] < 2: # <<<<<<<<<<<<<< @@ -24200,7 +24200,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject __pyx_t_7 = (((__pyx_cur_scope->__pyx_v_self->sa->darray->data->arr[(__pyx_cur_scope->__pyx_v_j + __pyx_cur_scope->__pyx_v_k)]) < 2) != 0); if (__pyx_t_7) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/lcp.pxi":83 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":83 * for k from 0 <= k < n+1: * if self.sa.darray.data.arr[j+k] < 2: * valid = 0 # <<<<<<<<<<<<<< @@ -24213,7 +24213,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject __pyx_L22:; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/lcp.pxi":84 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":84 * if self.sa.darray.data.arr[j+k] < 2: * valid = 0 * if valid: # <<<<<<<<<<<<<< @@ -24223,7 +24223,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject __pyx_t_7 = (__pyx_cur_scope->__pyx_v_valid != 0); if (__pyx_t_7) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/lcp.pxi":85 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":85 * valid = 0 * if valid: * ngram = tuple([self.sa.darray.data.arr[j+k] for k in range(n+1)]) # <<<<<<<<<<<<<< @@ -24248,7 +24248,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/lcp.pxi":86 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":86 * if valid: * ngram = tuple([self.sa.darray.data.arr[j+k] for k in range(n+1)]) * yield i, n+1, ngram # <<<<<<<<<<<<<< @@ -24285,7 +24285,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject } __pyx_L23:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/lcp.pxi":87 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":87 * ngram = tuple([self.sa.darray.data.arr[j+k] for k in range(n+1)]) * yield i, n+1, ngram * iii = iii + 1 # <<<<<<<<<<<<<< @@ -24294,7 +24294,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject */ __pyx_cur_scope->__pyx_v_iii = (__pyx_cur_scope->__pyx_v_iii + 1); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/lcp.pxi":88 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":88 * yield i, n+1, ngram * iii = iii + 1 * rs = ngram_start.arr[iii] # <<<<<<<<<<<<<< @@ -24304,7 +24304,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject } } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/lcp.pxi":89 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":89 * iii = iii + 1 * rs = ngram_start.arr[iii] * i = ii # <<<<<<<<<<<<<< @@ -24312,7 +24312,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject __pyx_cur_scope->__pyx_v_i = __pyx_cur_scope->__pyx_v_ii; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/lcp.pxi":36 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":36 * logger.info("LCP array completed") * * def compute_stats(self, int max_n): # <<<<<<<<<<<<<< @@ -24336,7 +24336,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject return NULL; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":12 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":12 * cdef dict id2sym * * def __cinit__(self): # <<<<<<<<<<<<<< @@ -24369,7 +24369,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_8Alphabet___cinit__(struct __pyx_obj_4cdec_2s int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":13 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":13 * * def __cinit__(self): * self.terminals = StringMap() # <<<<<<<<<<<<<< @@ -24384,7 +24384,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_8Alphabet___cinit__(struct __pyx_obj_4cdec_2s __pyx_v_self->terminals = ((struct __pyx_obj_4cdec_2sa_3_sa_StringMap *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":14 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":14 * def __cinit__(self): * self.terminals = StringMap() * self.nonterminals = StringMap() # <<<<<<<<<<<<<< @@ -24399,7 +24399,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_8Alphabet___cinit__(struct __pyx_obj_4cdec_2s __pyx_v_self->nonterminals = ((struct __pyx_obj_4cdec_2sa_3_sa_StringMap *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":15 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":15 * self.terminals = StringMap() * self.nonterminals = StringMap() * self.id2sym = {} # <<<<<<<<<<<<<< @@ -24414,7 +24414,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_8Alphabet___cinit__(struct __pyx_obj_4cdec_2s __pyx_v_self->id2sym = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":16 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":16 * self.nonterminals = StringMap() * self.id2sym = {} * self.first_nonterminal = -1 # <<<<<<<<<<<<<< @@ -24423,7 +24423,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_8Alphabet___cinit__(struct __pyx_obj_4cdec_2s */ __pyx_v_self->first_nonterminal = -1; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":12 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":12 * cdef dict id2sym * * def __cinit__(self): # <<<<<<<<<<<<<< @@ -24443,7 +24443,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_8Alphabet___cinit__(struct __pyx_obj_4cdec_2s return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":18 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":18 * self.first_nonterminal = -1 * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -24470,7 +24470,7 @@ static void __pyx_pf_4cdec_2sa_3_sa_8Alphabet_2__dealloc__(CYTHON_UNUSED struct __Pyx_RefNannyFinishContext(); } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":21 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":21 * pass * * cdef int isvar(self, int sym): # <<<<<<<<<<<<<< @@ -24483,7 +24483,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_isvar(CYTHON_UNUSED struct __pyx_obj __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("isvar", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":22 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":22 * * cdef int isvar(self, int sym): * return sym < 0 # <<<<<<<<<<<<<< @@ -24493,7 +24493,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_isvar(CYTHON_UNUSED struct __pyx_obj __pyx_r = (__pyx_v_sym < 0); goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":21 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":21 * pass * * cdef int isvar(self, int sym): # <<<<<<<<<<<<<< @@ -24507,7 +24507,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_isvar(CYTHON_UNUSED struct __pyx_obj return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":24 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":24 * return sym < 0 * * cdef int isword(self, int sym): # <<<<<<<<<<<<<< @@ -24520,7 +24520,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_isword(CYTHON_UNUSED struct __pyx_ob __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("isword", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":25 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":25 * * cdef int isword(self, int sym): * return sym >= 0 # <<<<<<<<<<<<<< @@ -24530,7 +24530,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_isword(CYTHON_UNUSED struct __pyx_ob __pyx_r = (__pyx_v_sym >= 0); goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":24 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":24 * return sym < 0 * * cdef int isword(self, int sym): # <<<<<<<<<<<<<< @@ -24544,7 +24544,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_isword(CYTHON_UNUSED struct __pyx_ob return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":27 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":27 * return sym >= 0 * * cdef int getindex(self, int sym): # <<<<<<<<<<<<<< @@ -24557,7 +24557,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_getindex(CYTHON_UNUSED struct __pyx_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getindex", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":28 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":28 * * cdef int getindex(self, int sym): * return -sym & INDEX_MASK # <<<<<<<<<<<<<< @@ -24567,7 +24567,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_getindex(CYTHON_UNUSED struct __pyx_ __pyx_r = ((-__pyx_v_sym) & __pyx_v_4cdec_2sa_3_sa_INDEX_MASK); goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":27 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":27 * return sym >= 0 * * cdef int getindex(self, int sym): # <<<<<<<<<<<<<< @@ -24581,7 +24581,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_getindex(CYTHON_UNUSED struct __pyx_ return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":30 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":30 * return -sym & INDEX_MASK * * cdef int setindex(self, int sym, int ind): # <<<<<<<<<<<<<< @@ -24594,7 +24594,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_setindex(CYTHON_UNUSED struct __pyx_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setindex", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":31 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":31 * * cdef int setindex(self, int sym, int ind): * return -(-sym & ~INDEX_MASK | ind) # <<<<<<<<<<<<<< @@ -24604,7 +24604,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_setindex(CYTHON_UNUSED struct __pyx_ __pyx_r = (-(((-__pyx_v_sym) & (~__pyx_v_4cdec_2sa_3_sa_INDEX_MASK)) | __pyx_v_ind)); goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":30 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":30 * return -sym & INDEX_MASK * * cdef int setindex(self, int sym, int ind): # <<<<<<<<<<<<<< @@ -24618,7 +24618,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_setindex(CYTHON_UNUSED struct __pyx_ return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":33 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":33 * return -(-sym & ~INDEX_MASK | ind) * * cdef int clearindex(self, int sym): # <<<<<<<<<<<<<< @@ -24631,7 +24631,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_clearindex(CYTHON_UNUSED struct __py __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("clearindex", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":34 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":34 * * cdef int clearindex(self, int sym): * return -(-sym& ~INDEX_MASK) # <<<<<<<<<<<<<< @@ -24641,7 +24641,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_clearindex(CYTHON_UNUSED struct __py __pyx_r = (-((-__pyx_v_sym) & (~__pyx_v_4cdec_2sa_3_sa_INDEX_MASK))); goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":33 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":33 * return -(-sym & ~INDEX_MASK | ind) * * cdef int clearindex(self, int sym): # <<<<<<<<<<<<<< @@ -24655,7 +24655,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_clearindex(CYTHON_UNUSED struct __py return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":36 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":36 * return -(-sym& ~INDEX_MASK) * * cdef int match(self, int sym1, int sym2): # <<<<<<<<<<<<<< @@ -24668,7 +24668,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_match(struct __pyx_obj_4cdec_2sa_3_s __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("match", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":37 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":37 * * cdef int match(self, int sym1, int sym2): * return self.clearindex(sym1) == self.clearindex(sym2); # <<<<<<<<<<<<<< @@ -24678,7 +24678,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_match(struct __pyx_obj_4cdec_2sa_3_s __pyx_r = (((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Alphabet *)__pyx_v_self->__pyx_vtab)->clearindex(__pyx_v_self, __pyx_v_sym1) == ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Alphabet *)__pyx_v_self->__pyx_vtab)->clearindex(__pyx_v_self, __pyx_v_sym2)); goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":36 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":36 * return -(-sym& ~INDEX_MASK) * * cdef int match(self, int sym1, int sym2): # <<<<<<<<<<<<<< @@ -24692,7 +24692,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_match(struct __pyx_obj_4cdec_2sa_3_s return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":39 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":39 * return self.clearindex(sym1) == self.clearindex(sym2); * * cdef char* tocat(self, int sym): # <<<<<<<<<<<<<< @@ -24705,7 +24705,7 @@ static char *__pyx_f_4cdec_2sa_3_sa_8Alphabet_tocat(struct __pyx_obj_4cdec_2sa_3 __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("tocat", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":40 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":40 * * cdef char* tocat(self, int sym): * return self.nonterminals.word((-sym >> INDEX_SHIFT)-1) # <<<<<<<<<<<<<< @@ -24715,7 +24715,7 @@ static char *__pyx_f_4cdec_2sa_3_sa_8Alphabet_tocat(struct __pyx_obj_4cdec_2sa_3 __pyx_r = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_StringMap *)__pyx_v_self->nonterminals->__pyx_vtab)->word(__pyx_v_self->nonterminals, (((-__pyx_v_sym) >> __pyx_v_4cdec_2sa_3_sa_INDEX_SHIFT) - 1)); goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":39 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":39 * return self.clearindex(sym1) == self.clearindex(sym2); * * cdef char* tocat(self, int sym): # <<<<<<<<<<<<<< @@ -24729,7 +24729,7 @@ static char *__pyx_f_4cdec_2sa_3_sa_8Alphabet_tocat(struct __pyx_obj_4cdec_2sa_3 return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":42 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":42 * return self.nonterminals.word((-sym >> INDEX_SHIFT)-1) * * cdef int fromcat(self, char *s): # <<<<<<<<<<<<<< @@ -24744,7 +24744,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_fromcat(struct __pyx_obj_4cdec_2sa_3 int __pyx_t_1; __Pyx_RefNannySetupContext("fromcat", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":44 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":44 * cdef int fromcat(self, char *s): * cdef int i * i = self.nonterminals.index(s) # <<<<<<<<<<<<<< @@ -24753,7 +24753,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_fromcat(struct __pyx_obj_4cdec_2sa_3 */ __pyx_v_i = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_StringMap *)__pyx_v_self->nonterminals->__pyx_vtab)->index(__pyx_v_self->nonterminals, __pyx_v_s); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":45 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":45 * cdef int i * i = self.nonterminals.index(s) * if self.first_nonterminal == -1: # <<<<<<<<<<<<<< @@ -24763,7 +24763,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_fromcat(struct __pyx_obj_4cdec_2sa_3 __pyx_t_1 = ((__pyx_v_self->first_nonterminal == -1) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":46 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":46 * i = self.nonterminals.index(s) * if self.first_nonterminal == -1: * self.first_nonterminal = i # <<<<<<<<<<<<<< @@ -24775,7 +24775,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_fromcat(struct __pyx_obj_4cdec_2sa_3 } __pyx_L3:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":47 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":47 * if self.first_nonterminal == -1: * self.first_nonterminal = i * if i > self.last_nonterminal: # <<<<<<<<<<<<<< @@ -24785,7 +24785,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_fromcat(struct __pyx_obj_4cdec_2sa_3 __pyx_t_1 = ((__pyx_v_i > __pyx_v_self->last_nonterminal) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":48 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":48 * self.first_nonterminal = i * if i > self.last_nonterminal: * self.last_nonterminal = i # <<<<<<<<<<<<<< @@ -24797,7 +24797,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_fromcat(struct __pyx_obj_4cdec_2sa_3 } __pyx_L4:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":49 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":49 * if i > self.last_nonterminal: * self.last_nonterminal = i * return -(i+1 << INDEX_SHIFT) # <<<<<<<<<<<<<< @@ -24807,7 +24807,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_fromcat(struct __pyx_obj_4cdec_2sa_3 __pyx_r = (-((__pyx_v_i + 1) << __pyx_v_4cdec_2sa_3_sa_INDEX_SHIFT)); goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":42 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":42 * return self.nonterminals.word((-sym >> INDEX_SHIFT)-1) * * cdef int fromcat(self, char *s): # <<<<<<<<<<<<<< @@ -24821,7 +24821,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_fromcat(struct __pyx_obj_4cdec_2sa_3 return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":51 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":51 * return -(i+1 << INDEX_SHIFT) * * cdef char* tostring(self, int sym): # <<<<<<<<<<<<<< @@ -24844,7 +24844,7 @@ static char *__pyx_f_4cdec_2sa_3_sa_8Alphabet_tostring(struct __pyx_obj_4cdec_2s int __pyx_clineno = 0; __Pyx_RefNannySetupContext("tostring", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":53 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":53 * cdef char* tostring(self, int sym): * cdef int ind * if self.isvar(sym): # <<<<<<<<<<<<<< @@ -24854,7 +24854,7 @@ static char *__pyx_f_4cdec_2sa_3_sa_8Alphabet_tostring(struct __pyx_obj_4cdec_2s __pyx_t_1 = (((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Alphabet *)__pyx_v_self->__pyx_vtab)->isvar(__pyx_v_self, __pyx_v_sym) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":54 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":54 * cdef int ind * if self.isvar(sym): * if sym in self.id2sym: # <<<<<<<<<<<<<< @@ -24872,7 +24872,7 @@ static char *__pyx_f_4cdec_2sa_3_sa_8Alphabet_tostring(struct __pyx_obj_4cdec_2s __pyx_t_3 = (__pyx_t_1 != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":55 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":55 * if self.isvar(sym): * if sym in self.id2sym: * return self.id2sym[sym] # <<<<<<<<<<<<<< @@ -24894,7 +24894,7 @@ static char *__pyx_f_4cdec_2sa_3_sa_8Alphabet_tostring(struct __pyx_obj_4cdec_2s goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":56 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":56 * if sym in self.id2sym: * return self.id2sym[sym] * ind = self.getindex(sym) # <<<<<<<<<<<<<< @@ -24903,7 +24903,7 @@ static char *__pyx_f_4cdec_2sa_3_sa_8Alphabet_tostring(struct __pyx_obj_4cdec_2s */ __pyx_v_ind = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Alphabet *)__pyx_v_self->__pyx_vtab)->getindex(__pyx_v_self, __pyx_v_sym); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":57 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":57 * return self.id2sym[sym] * ind = self.getindex(sym) * if ind > 0: # <<<<<<<<<<<<<< @@ -24913,7 +24913,7 @@ static char *__pyx_f_4cdec_2sa_3_sa_8Alphabet_tostring(struct __pyx_obj_4cdec_2s __pyx_t_3 = ((__pyx_v_ind > 0) != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":58 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":58 * ind = self.getindex(sym) * if ind > 0: * self.id2sym[sym] = "[%s,%d]" % (self.tocat(sym), ind) # <<<<<<<<<<<<<< @@ -24948,7 +24948,7 @@ static char *__pyx_f_4cdec_2sa_3_sa_8Alphabet_tostring(struct __pyx_obj_4cdec_2s } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":60 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":60 * self.id2sym[sym] = "[%s,%d]" % (self.tocat(sym), ind) * else: * self.id2sym[sym] = "[%s]" % self.tocat(sym) # <<<<<<<<<<<<<< @@ -24972,7 +24972,7 @@ static char *__pyx_f_4cdec_2sa_3_sa_8Alphabet_tostring(struct __pyx_obj_4cdec_2s } __pyx_L5:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":61 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":61 * else: * self.id2sym[sym] = "[%s]" % self.tocat(sym) * return self.id2sym[sym] # <<<<<<<<<<<<<< @@ -24995,7 +24995,7 @@ static char *__pyx_f_4cdec_2sa_3_sa_8Alphabet_tostring(struct __pyx_obj_4cdec_2s } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":63 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":63 * return self.id2sym[sym] * else: * return self.terminals.word(sym) # <<<<<<<<<<<<<< @@ -25006,7 +25006,7 @@ static char *__pyx_f_4cdec_2sa_3_sa_8Alphabet_tostring(struct __pyx_obj_4cdec_2s goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":51 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":51 * return -(i+1 << INDEX_SHIFT) * * cdef char* tostring(self, int sym): # <<<<<<<<<<<<<< @@ -25026,7 +25026,7 @@ static char *__pyx_f_4cdec_2sa_3_sa_8Alphabet_tostring(struct __pyx_obj_4cdec_2s return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":65 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":65 * return self.terminals.word(sym) * * cdef int fromstring(self, char *s, bint terminal): # <<<<<<<<<<<<<< @@ -25054,7 +25054,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_fromstring(struct __pyx_obj_4cdec_2s int __pyx_clineno = 0; __Pyx_RefNannySetupContext("fromstring", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":69 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":69 * cdef char *comma * cdef int n * n = strlen(s) # <<<<<<<<<<<<<< @@ -25063,7 +25063,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_fromstring(struct __pyx_obj_4cdec_2s */ __pyx_v_n = strlen(__pyx_v_s); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":71 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":71 * n = strlen(s) * cdef char *sep * sep = strstr(s,"_SEP_") # <<<<<<<<<<<<<< @@ -25072,7 +25072,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_fromstring(struct __pyx_obj_4cdec_2s */ __pyx_v_sep = strstr(__pyx_v_s, __pyx_k_SEP); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":72 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":72 * cdef char *sep * sep = strstr(s,"_SEP_") * if n >= 3 and s[0] == c'[' and s[n-1] == c']' and sep == NULL: # <<<<<<<<<<<<<< @@ -25100,7 +25100,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_fromstring(struct __pyx_obj_4cdec_2s } if (__pyx_t_2) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":73 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":73 * sep = strstr(s,"_SEP_") * if n >= 3 and s[0] == c'[' and s[n-1] == c']' and sep == NULL: * if terminal: # <<<<<<<<<<<<<< @@ -25110,7 +25110,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_fromstring(struct __pyx_obj_4cdec_2s __pyx_t_2 = (__pyx_v_terminal != 0); if (__pyx_t_2) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":74 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":74 * if n >= 3 and s[0] == c'[' and s[n-1] == c']' and sep == NULL: * if terminal: * s1 = "\\"+s # <<<<<<<<<<<<<< @@ -25125,7 +25125,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_fromstring(struct __pyx_obj_4cdec_2s __pyx_v_s1 = __pyx_t_7; __pyx_t_7 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":75 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":75 * if terminal: * s1 = "\\"+s * return self.terminals.index(s1) # <<<<<<<<<<<<<< @@ -25137,7 +25137,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_fromstring(struct __pyx_obj_4cdec_2s goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":76 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":76 * s1 = "\\"+s * return self.terminals.index(s1) * s[n-1] = c'\0' # <<<<<<<<<<<<<< @@ -25146,7 +25146,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_fromstring(struct __pyx_obj_4cdec_2s */ (__pyx_v_s[(__pyx_v_n - 1)]) = '\x00'; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":77 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":77 * return self.terminals.index(s1) * s[n-1] = c'\0' * s = s + 1 # <<<<<<<<<<<<<< @@ -25155,7 +25155,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_fromstring(struct __pyx_obj_4cdec_2s */ __pyx_v_s = (__pyx_v_s + 1); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":78 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":78 * s[n-1] = c'\0' * s = s + 1 * comma = strrchr(s, c',') # <<<<<<<<<<<<<< @@ -25164,7 +25164,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_fromstring(struct __pyx_obj_4cdec_2s */ __pyx_v_comma = strrchr(__pyx_v_s, ','); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":79 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":79 * s = s + 1 * comma = strrchr(s, c',') * if comma != NULL: # <<<<<<<<<<<<<< @@ -25174,7 +25174,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_fromstring(struct __pyx_obj_4cdec_2s __pyx_t_2 = ((__pyx_v_comma != NULL) != 0); if (__pyx_t_2) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":80 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":80 * comma = strrchr(s, c',') * if comma != NULL: * comma[0] = c'\0' # <<<<<<<<<<<<<< @@ -25183,7 +25183,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_fromstring(struct __pyx_obj_4cdec_2s */ (__pyx_v_comma[0]) = '\x00'; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":81 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":81 * if comma != NULL: * comma[0] = c'\0' * return self.setindex(self.fromcat(s), strtol(comma+1, NULL, 10)) # <<<<<<<<<<<<<< @@ -25195,7 +25195,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_fromstring(struct __pyx_obj_4cdec_2s } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":83 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":83 * return self.setindex(self.fromcat(s), strtol(comma+1, NULL, 10)) * else: * return self.fromcat(s) # <<<<<<<<<<<<<< @@ -25208,7 +25208,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_fromstring(struct __pyx_obj_4cdec_2s } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":85 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":85 * return self.fromcat(s) * else: * return self.terminals.index(s) # <<<<<<<<<<<<<< @@ -25219,7 +25219,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_fromstring(struct __pyx_obj_4cdec_2s goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":65 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":65 * return self.terminals.word(sym) * * cdef int fromstring(self, char *s, bint terminal): # <<<<<<<<<<<<<< @@ -25239,7 +25239,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_fromstring(struct __pyx_obj_4cdec_2s return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":8 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":8 * * cdef class Alphabet: * cdef readonly StringMap terminals, nonterminals # <<<<<<<<<<<<<< @@ -25305,7 +25305,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_8Alphabet_12nonterminals___get__(struct return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":89 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":89 * cdef Alphabet ALPHABET = Alphabet() * * cdef char* sym_tostring(int sym): # <<<<<<<<<<<<<< @@ -25318,7 +25318,7 @@ static char *__pyx_f_4cdec_2sa_3_sa_sym_tostring(int __pyx_v_sym) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sym_tostring", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":90 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":90 * * cdef char* sym_tostring(int sym): * return ALPHABET.tostring(sym) # <<<<<<<<<<<<<< @@ -25328,7 +25328,7 @@ static char *__pyx_f_4cdec_2sa_3_sa_sym_tostring(int __pyx_v_sym) { __pyx_r = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Alphabet *)__pyx_v_4cdec_2sa_3_sa_ALPHABET->__pyx_vtab)->tostring(__pyx_v_4cdec_2sa_3_sa_ALPHABET, __pyx_v_sym); goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":89 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":89 * cdef Alphabet ALPHABET = Alphabet() * * cdef char* sym_tostring(int sym): # <<<<<<<<<<<<<< @@ -25342,7 +25342,7 @@ static char *__pyx_f_4cdec_2sa_3_sa_sym_tostring(int __pyx_v_sym) { return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":92 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":92 * return ALPHABET.tostring(sym) * * cdef char* sym_tocat(int sym): # <<<<<<<<<<<<<< @@ -25355,7 +25355,7 @@ static char *__pyx_f_4cdec_2sa_3_sa_sym_tocat(int __pyx_v_sym) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sym_tocat", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":93 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":93 * * cdef char* sym_tocat(int sym): * return ALPHABET.tocat(sym) # <<<<<<<<<<<<<< @@ -25365,7 +25365,7 @@ static char *__pyx_f_4cdec_2sa_3_sa_sym_tocat(int __pyx_v_sym) { __pyx_r = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Alphabet *)__pyx_v_4cdec_2sa_3_sa_ALPHABET->__pyx_vtab)->tocat(__pyx_v_4cdec_2sa_3_sa_ALPHABET, __pyx_v_sym); goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":92 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":92 * return ALPHABET.tostring(sym) * * cdef char* sym_tocat(int sym): # <<<<<<<<<<<<<< @@ -25379,7 +25379,7 @@ static char *__pyx_f_4cdec_2sa_3_sa_sym_tocat(int __pyx_v_sym) { return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":95 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":95 * return ALPHABET.tocat(sym) * * cdef int sym_isvar(int sym): # <<<<<<<<<<<<<< @@ -25392,7 +25392,7 @@ static int __pyx_f_4cdec_2sa_3_sa_sym_isvar(int __pyx_v_sym) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sym_isvar", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":96 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":96 * * cdef int sym_isvar(int sym): * return ALPHABET.isvar(sym) # <<<<<<<<<<<<<< @@ -25402,7 +25402,7 @@ static int __pyx_f_4cdec_2sa_3_sa_sym_isvar(int __pyx_v_sym) { __pyx_r = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Alphabet *)__pyx_v_4cdec_2sa_3_sa_ALPHABET->__pyx_vtab)->isvar(__pyx_v_4cdec_2sa_3_sa_ALPHABET, __pyx_v_sym); goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":95 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":95 * return ALPHABET.tocat(sym) * * cdef int sym_isvar(int sym): # <<<<<<<<<<<<<< @@ -25416,7 +25416,7 @@ static int __pyx_f_4cdec_2sa_3_sa_sym_isvar(int __pyx_v_sym) { return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":98 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":98 * return ALPHABET.isvar(sym) * * cdef int sym_getindex(int sym): # <<<<<<<<<<<<<< @@ -25429,7 +25429,7 @@ static int __pyx_f_4cdec_2sa_3_sa_sym_getindex(int __pyx_v_sym) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sym_getindex", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":99 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":99 * * cdef int sym_getindex(int sym): * return ALPHABET.getindex(sym) # <<<<<<<<<<<<<< @@ -25439,7 +25439,7 @@ static int __pyx_f_4cdec_2sa_3_sa_sym_getindex(int __pyx_v_sym) { __pyx_r = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Alphabet *)__pyx_v_4cdec_2sa_3_sa_ALPHABET->__pyx_vtab)->getindex(__pyx_v_4cdec_2sa_3_sa_ALPHABET, __pyx_v_sym); goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":98 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":98 * return ALPHABET.isvar(sym) * * cdef int sym_getindex(int sym): # <<<<<<<<<<<<<< @@ -25453,7 +25453,7 @@ static int __pyx_f_4cdec_2sa_3_sa_sym_getindex(int __pyx_v_sym) { return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":101 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":101 * return ALPHABET.getindex(sym) * * cdef int sym_setindex(int sym, int id): # <<<<<<<<<<<<<< @@ -25466,7 +25466,7 @@ static int __pyx_f_4cdec_2sa_3_sa_sym_setindex(int __pyx_v_sym, int __pyx_v_id) __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sym_setindex", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":102 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":102 * * cdef int sym_setindex(int sym, int id): * return ALPHABET.setindex(sym, id) # <<<<<<<<<<<<<< @@ -25476,7 +25476,7 @@ static int __pyx_f_4cdec_2sa_3_sa_sym_setindex(int __pyx_v_sym, int __pyx_v_id) __pyx_r = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Alphabet *)__pyx_v_4cdec_2sa_3_sa_ALPHABET->__pyx_vtab)->setindex(__pyx_v_4cdec_2sa_3_sa_ALPHABET, __pyx_v_sym, __pyx_v_id); goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":101 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":101 * return ALPHABET.getindex(sym) * * cdef int sym_setindex(int sym, int id): # <<<<<<<<<<<<<< @@ -25490,7 +25490,7 @@ static int __pyx_f_4cdec_2sa_3_sa_sym_setindex(int __pyx_v_sym, int __pyx_v_id) return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":104 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":104 * return ALPHABET.setindex(sym, id) * * cdef int sym_fromstring(char* string, bint terminal): # <<<<<<<<<<<<<< @@ -25503,7 +25503,7 @@ static int __pyx_f_4cdec_2sa_3_sa_sym_fromstring(char *__pyx_v_string, int __pyx __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sym_fromstring", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":105 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":105 * * cdef int sym_fromstring(char* string, bint terminal): * return ALPHABET.fromstring(string, terminal) # <<<<<<<<<<<<<< @@ -25513,7 +25513,7 @@ static int __pyx_f_4cdec_2sa_3_sa_sym_fromstring(char *__pyx_v_string, int __pyx __pyx_r = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Alphabet *)__pyx_v_4cdec_2sa_3_sa_ALPHABET->__pyx_vtab)->fromstring(__pyx_v_4cdec_2sa_3_sa_ALPHABET, __pyx_v_string, __pyx_v_terminal); goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":104 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":104 * return ALPHABET.setindex(sym, id) * * cdef int sym_fromstring(char* string, bint terminal): # <<<<<<<<<<<<<< @@ -25527,7 +25527,7 @@ static int __pyx_f_4cdec_2sa_3_sa_sym_fromstring(char *__pyx_v_string, int __pyx return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":107 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":107 * return ALPHABET.fromstring(string, terminal) * * def isvar(sym): # <<<<<<<<<<<<<< @@ -25559,7 +25559,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_4isvar(CYTHON_UNUSED PyObject *__pyx_se int __pyx_clineno = 0; __Pyx_RefNannySetupContext("isvar", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":108 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":108 * * def isvar(sym): * return sym_isvar(sym) # <<<<<<<<<<<<<< @@ -25574,7 +25574,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_4isvar(CYTHON_UNUSED PyObject *__pyx_se __pyx_t_2 = 0; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":107 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":107 * return ALPHABET.fromstring(string, terminal) * * def isvar(sym): # <<<<<<<<<<<<<< @@ -25593,7 +25593,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_4isvar(CYTHON_UNUSED PyObject *__pyx_se return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":110 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":110 * return sym_isvar(sym) * * def make_lattice(words): # <<<<<<<<<<<<<< @@ -25616,7 +25616,7 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_7make_lattice(PyObject *__pyx_self, PyO } static PyObject *__pyx_gb_4cdec_2sa_3_sa_12make_lattice_2generator7(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":111 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":111 * * def make_lattice(words): * word_ids = (sym_fromstring(word, True) for word in words) # <<<<<<<<<<<<<< @@ -25764,7 +25764,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_12make_lattice_2generator7(__pyx_Genera } static PyObject *__pyx_gb_4cdec_2sa_3_sa_12make_lattice_5generator8(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":112 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":112 * def make_lattice(words): * word_ids = (sym_fromstring(word, True) for word in words) * return tuple(((word, None, 1), ) for word in word_ids) # <<<<<<<<<<<<<< @@ -25925,7 +25925,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_12make_lattice_5generator8(__pyx_Genera return NULL; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":110 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":110 * return sym_isvar(sym) * * def make_lattice(words): # <<<<<<<<<<<<<< @@ -25953,7 +25953,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6make_lattice(CYTHON_UNUSED PyObject *_ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_words); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_words); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":111 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":111 * * def make_lattice(words): * word_ids = (sym_fromstring(word, True) for word in words) # <<<<<<<<<<<<<< @@ -25966,7 +25966,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6make_lattice(CYTHON_UNUSED PyObject *_ __pyx_cur_scope->__pyx_v_word_ids = __pyx_t_1; __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":112 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":112 * def make_lattice(words): * word_ids = (sym_fromstring(word, True) for word in words) * return tuple(((word, None, 1), ) for word in word_ids) # <<<<<<<<<<<<<< @@ -25988,7 +25988,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6make_lattice(CYTHON_UNUSED PyObject *_ __pyx_t_1 = 0; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":110 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":110 * return sym_isvar(sym) * * def make_lattice(words): # <<<<<<<<<<<<<< @@ -26009,7 +26009,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6make_lattice(CYTHON_UNUSED PyObject *_ return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":114 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":114 * return tuple(((word, None, 1), ) for word in word_ids) * * def decode_lattice(lattice): # <<<<<<<<<<<<<< @@ -26032,7 +26032,7 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_9decode_lattice(PyObject *__pyx_self, P } static PyObject *__pyx_gb_4cdec_2sa_3_sa_14decode_lattice_2generator9(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":115 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":115 * * def decode_lattice(lattice): * return tuple((sym_tostring(sym), weight, dist) for (sym, weight, dist) in arc # <<<<<<<<<<<<<< @@ -26110,7 +26110,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_14decode_lattice_2generator9(__pyx_Gene __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":116 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":116 * def decode_lattice(lattice): * return tuple((sym_tostring(sym), weight, dist) for (sym, weight, dist) in arc * for arc in node for node in lattice) # <<<<<<<<<<<<<< @@ -26119,7 +26119,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_14decode_lattice_2generator9(__pyx_Gene */ if (unlikely(!__pyx_cur_scope->__pyx_v_arc)) { __Pyx_RaiseUnboundLocalError("arc"); {__pyx_filename = __pyx_f[10]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":115 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":115 * * def decode_lattice(lattice): * return tuple((sym_tostring(sym), weight, dist) for (sym, weight, dist) in arc # <<<<<<<<<<<<<< @@ -26231,7 +26231,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_14decode_lattice_2generator9(__pyx_Gene __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":116 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":116 * def decode_lattice(lattice): * return tuple((sym_tostring(sym), weight, dist) for (sym, weight, dist) in arc * for arc in node for node in lattice) # <<<<<<<<<<<<<< @@ -26319,7 +26319,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_14decode_lattice_2generator9(__pyx_Gene __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":115 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":115 * * def decode_lattice(lattice): * return tuple((sym_tostring(sym), weight, dist) for (sym, weight, dist) in arc # <<<<<<<<<<<<<< @@ -26402,7 +26402,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_14decode_lattice_2generator9(__pyx_Gene return NULL; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":114 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":114 * return tuple(((word, None, 1), ) for word in word_ids) * * def decode_lattice(lattice): # <<<<<<<<<<<<<< @@ -26430,7 +26430,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_8decode_lattice(CYTHON_UNUSED PyObject __Pyx_INCREF(__pyx_cur_scope->__pyx_v_lattice); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_lattice); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":115 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":115 * * def decode_lattice(lattice): * return tuple((sym_tostring(sym), weight, dist) for (sym, weight, dist) in arc # <<<<<<<<<<<<<< @@ -26452,7 +26452,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_8decode_lattice(CYTHON_UNUSED PyObject __pyx_t_1 = 0; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":114 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":114 * return tuple(((word, None, 1), ) for word in word_ids) * * def decode_lattice(lattice): # <<<<<<<<<<<<<< @@ -26473,7 +26473,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_8decode_lattice(CYTHON_UNUSED PyObject return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":118 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":118 * for arc in node for node in lattice) * * def decode_sentence(lattice): # <<<<<<<<<<<<<< @@ -26496,7 +26496,7 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_11decode_sentence(PyObject *__pyx_self, } static PyObject *__pyx_gb_4cdec_2sa_3_sa_15decode_sentence_2generator10(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":119 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":119 * * def decode_sentence(lattice): * return tuple(sym_tostring(sym) for ((sym, _, _),) in lattice) # <<<<<<<<<<<<<< @@ -26762,7 +26762,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_15decode_sentence_2generator10(__pyx_Ge return NULL; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":118 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":118 * for arc in node for node in lattice) * * def decode_sentence(lattice): # <<<<<<<<<<<<<< @@ -26790,7 +26790,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_10decode_sentence(CYTHON_UNUSED PyObjec __Pyx_INCREF(__pyx_cur_scope->__pyx_v_lattice); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_lattice); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":119 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":119 * * def decode_sentence(lattice): * return tuple(sym_tostring(sym) for ((sym, _, _),) in lattice) # <<<<<<<<<<<<<< @@ -26812,7 +26812,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_10decode_sentence(CYTHON_UNUSED PyObjec __pyx_t_1 = 0; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":118 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":118 * for arc in node for node in lattice) * * def decode_sentence(lattice): # <<<<<<<<<<<<<< @@ -26833,7 +26833,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_10decode_sentence(CYTHON_UNUSED PyObjec return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":121 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":121 * return tuple(sym_tostring(sym) for ((sym, _, _),) in lattice) * * def encode_words(words): # <<<<<<<<<<<<<< @@ -26856,7 +26856,7 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_13encode_words(PyObject *__pyx_self, Py } static PyObject *__pyx_gb_4cdec_2sa_3_sa_12encode_words_2generator11(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":122 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":122 * * def encode_words(words): * return tuple(sym_fromstring(word, True) for word in words) # <<<<<<<<<<<<<< @@ -27003,7 +27003,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_12encode_words_2generator11(__pyx_Gener return NULL; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":121 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":121 * return tuple(sym_tostring(sym) for ((sym, _, _),) in lattice) * * def encode_words(words): # <<<<<<<<<<<<<< @@ -27031,7 +27031,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_12encode_words(CYTHON_UNUSED PyObject * __Pyx_INCREF(__pyx_cur_scope->__pyx_v_words); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_words); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":122 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":122 * * def encode_words(words): * return tuple(sym_fromstring(word, True) for word in words) # <<<<<<<<<<<<<< @@ -27053,7 +27053,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_12encode_words(CYTHON_UNUSED PyObject * __pyx_t_1 = 0; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":121 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":121 * return tuple(sym_tostring(sym) for ((sym, _, _),) in lattice) * * def encode_words(words): # <<<<<<<<<<<<<< @@ -27074,7 +27074,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_12encode_words(CYTHON_UNUSED PyObject * return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":124 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":124 * return tuple(sym_fromstring(word, True) for word in words) * * def decode_words(syms): # <<<<<<<<<<<<<< @@ -27096,7 +27096,7 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_15decode_words(PyObject *__pyx_self, Py } static PyObject *__pyx_gb_4cdec_2sa_3_sa_12decode_words_2generator12(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":125 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":125 * * def decode_words(syms): * return tuple(sym_tostring(sym) for sym in syms) # <<<<<<<<<<<<<< @@ -27241,7 +27241,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_12decode_words_2generator12(__pyx_Gener return NULL; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":124 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":124 * return tuple(sym_fromstring(word, True) for word in words) * * def decode_words(syms): # <<<<<<<<<<<<<< @@ -27268,7 +27268,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14decode_words(CYTHON_UNUSED PyObject * __Pyx_INCREF(__pyx_cur_scope->__pyx_v_syms); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_syms); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":125 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":125 * * def decode_words(syms): * return tuple(sym_tostring(sym) for sym in syms) # <<<<<<<<<<<<<< @@ -27288,7 +27288,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14decode_words(CYTHON_UNUSED PyObject * __pyx_t_1 = 0; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":124 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":124 * return tuple(sym_fromstring(word, True) for word in words) * * def decode_words(syms): # <<<<<<<<<<<<<< @@ -27308,7 +27308,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14decode_words(CYTHON_UNUSED PyObject * return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":6 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":6 * cdef class Phrase: * * def __cinit__(self, words): # <<<<<<<<<<<<<< @@ -27385,7 +27385,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Phrase___cinit__(struct __pyx_obj_4cdec_2sa_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":8 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":8 * def __cinit__(self, words): * cdef int i, j, n, n_vars * n_vars = 0 # <<<<<<<<<<<<<< @@ -27394,7 +27394,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Phrase___cinit__(struct __pyx_obj_4cdec_2sa_ */ __pyx_v_n_vars = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":9 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":9 * cdef int i, j, n, n_vars * n_vars = 0 * n = len(words) # <<<<<<<<<<<<<< @@ -27404,7 +27404,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Phrase___cinit__(struct __pyx_obj_4cdec_2sa_ __pyx_t_1 = PyObject_Length(__pyx_v_words); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":10 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":10 * n_vars = 0 * n = len(words) * self.syms = malloc(n*sizeof(int)) # <<<<<<<<<<<<<< @@ -27413,7 +27413,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Phrase___cinit__(struct __pyx_obj_4cdec_2sa_ */ __pyx_v_self->syms = ((int *)malloc((__pyx_v_n * (sizeof(int))))); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":11 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":11 * n = len(words) * self.syms = malloc(n*sizeof(int)) * for i from 0 <= i < n: # <<<<<<<<<<<<<< @@ -27423,7 +27423,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Phrase___cinit__(struct __pyx_obj_4cdec_2sa_ __pyx_t_2 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":12 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":12 * self.syms = malloc(n*sizeof(int)) * for i from 0 <= i < n: * self.syms[i] = words[i] # <<<<<<<<<<<<<< @@ -27436,7 +27436,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Phrase___cinit__(struct __pyx_obj_4cdec_2sa_ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; (__pyx_v_self->syms[__pyx_v_i]) = __pyx_t_4; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":13 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":13 * for i from 0 <= i < n: * self.syms[i] = words[i] * if sym_isvar(self.syms[i]): # <<<<<<<<<<<<<< @@ -27446,7 +27446,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Phrase___cinit__(struct __pyx_obj_4cdec_2sa_ __pyx_t_5 = (__pyx_f_4cdec_2sa_3_sa_sym_isvar((__pyx_v_self->syms[__pyx_v_i])) != 0); if (__pyx_t_5) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":14 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":14 * self.syms[i] = words[i] * if sym_isvar(self.syms[i]): * n_vars += 1 # <<<<<<<<<<<<<< @@ -27459,7 +27459,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Phrase___cinit__(struct __pyx_obj_4cdec_2sa_ __pyx_L5:; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":15 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":15 * if sym_isvar(self.syms[i]): * n_vars += 1 * self.n = n # <<<<<<<<<<<<<< @@ -27468,7 +27468,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Phrase___cinit__(struct __pyx_obj_4cdec_2sa_ */ __pyx_v_self->n = __pyx_v_n; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":16 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":16 * n_vars += 1 * self.n = n * self.n_vars = n_vars # <<<<<<<<<<<<<< @@ -27477,7 +27477,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Phrase___cinit__(struct __pyx_obj_4cdec_2sa_ */ __pyx_v_self->n_vars = __pyx_v_n_vars; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":17 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":17 * self.n = n * self.n_vars = n_vars * self.varpos = malloc(n_vars*sizeof(int)) # <<<<<<<<<<<<<< @@ -27486,7 +27486,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Phrase___cinit__(struct __pyx_obj_4cdec_2sa_ */ __pyx_v_self->varpos = ((int *)malloc((__pyx_v_n_vars * (sizeof(int))))); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":18 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":18 * self.n_vars = n_vars * self.varpos = malloc(n_vars*sizeof(int)) * j = 0 # <<<<<<<<<<<<<< @@ -27495,7 +27495,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Phrase___cinit__(struct __pyx_obj_4cdec_2sa_ */ __pyx_v_j = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":19 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":19 * self.varpos = malloc(n_vars*sizeof(int)) * j = 0 * for i from 0 <= i < n: # <<<<<<<<<<<<<< @@ -27505,7 +27505,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Phrase___cinit__(struct __pyx_obj_4cdec_2sa_ __pyx_t_2 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":20 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":20 * j = 0 * for i from 0 <= i < n: * if sym_isvar(self.syms[i]): # <<<<<<<<<<<<<< @@ -27515,7 +27515,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Phrase___cinit__(struct __pyx_obj_4cdec_2sa_ __pyx_t_5 = (__pyx_f_4cdec_2sa_3_sa_sym_isvar((__pyx_v_self->syms[__pyx_v_i])) != 0); if (__pyx_t_5) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":21 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":21 * for i from 0 <= i < n: * if sym_isvar(self.syms[i]): * self.varpos[j] = i # <<<<<<<<<<<<<< @@ -27524,7 +27524,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Phrase___cinit__(struct __pyx_obj_4cdec_2sa_ */ (__pyx_v_self->varpos[__pyx_v_j]) = __pyx_v_i; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":22 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":22 * if sym_isvar(self.syms[i]): * self.varpos[j] = i * j = j + 1 # <<<<<<<<<<<<<< @@ -27537,7 +27537,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Phrase___cinit__(struct __pyx_obj_4cdec_2sa_ __pyx_L8:; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":6 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":6 * cdef class Phrase: * * def __cinit__(self, words): # <<<<<<<<<<<<<< @@ -27557,7 +27557,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Phrase___cinit__(struct __pyx_obj_4cdec_2sa_ return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":24 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":24 * j = j + 1 * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -27580,7 +27580,7 @@ static void __pyx_pf_4cdec_2sa_3_sa_6Phrase_2__dealloc__(struct __pyx_obj_4cdec_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":25 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":25 * * def __dealloc__(self): * free(self.syms) # <<<<<<<<<<<<<< @@ -27589,7 +27589,7 @@ static void __pyx_pf_4cdec_2sa_3_sa_6Phrase_2__dealloc__(struct __pyx_obj_4cdec_ */ free(__pyx_v_self->syms); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":26 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":26 * def __dealloc__(self): * free(self.syms) * free(self.varpos) # <<<<<<<<<<<<<< @@ -27598,7 +27598,7 @@ static void __pyx_pf_4cdec_2sa_3_sa_6Phrase_2__dealloc__(struct __pyx_obj_4cdec_ */ free(__pyx_v_self->varpos); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":24 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":24 * j = j + 1 * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -27610,7 +27610,7 @@ static void __pyx_pf_4cdec_2sa_3_sa_6Phrase_2__dealloc__(struct __pyx_obj_4cdec_ __Pyx_RefNannyFinishContext(); } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":28 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":28 * free(self.varpos) * * def __str__(self): # <<<<<<<<<<<<<< @@ -27645,7 +27645,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_4__str__(struct __pyx_obj_4cdec int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__str__", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":29 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":29 * * def __str__(self): * strs = [] # <<<<<<<<<<<<<< @@ -27657,7 +27657,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_4__str__(struct __pyx_obj_4cdec __pyx_v_strs = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":31 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":31 * strs = [] * cdef int i, s * for i from 0 <= i < self.n: # <<<<<<<<<<<<<< @@ -27667,7 +27667,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_4__str__(struct __pyx_obj_4cdec __pyx_t_2 = __pyx_v_self->n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":32 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":32 * cdef int i, s * for i from 0 <= i < self.n: * s = self.syms[i] # <<<<<<<<<<<<<< @@ -27676,7 +27676,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_4__str__(struct __pyx_obj_4cdec */ __pyx_v_s = (__pyx_v_self->syms[__pyx_v_i]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":33 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":33 * for i from 0 <= i < self.n: * s = self.syms[i] * strs.append(sym_tostring(s)) # <<<<<<<<<<<<<< @@ -27689,7 +27689,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_4__str__(struct __pyx_obj_4cdec __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":34 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":34 * s = self.syms[i] * strs.append(sym_tostring(s)) * return ' '.join(strs) # <<<<<<<<<<<<<< @@ -27703,7 +27703,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_4__str__(struct __pyx_obj_4cdec __pyx_t_1 = 0; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":28 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":28 * free(self.varpos) * * def __str__(self): # <<<<<<<<<<<<<< @@ -27723,7 +27723,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_4__str__(struct __pyx_obj_4cdec return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":36 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":36 * return ' '.join(strs) * * def handle(self): # <<<<<<<<<<<<<< @@ -27761,7 +27761,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_6handle(struct __pyx_obj_4cdec_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("handle", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":39 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":39 * """return a hashable representation that normalizes the ordering * of the nonterminal indices""" * norm = [] # <<<<<<<<<<<<<< @@ -27773,7 +27773,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_6handle(struct __pyx_obj_4cdec_ __pyx_v_norm = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":41 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":41 * norm = [] * cdef int i, j, s * i = 1 # <<<<<<<<<<<<<< @@ -27782,7 +27782,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_6handle(struct __pyx_obj_4cdec_ */ __pyx_v_i = 1; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":42 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":42 * cdef int i, j, s * i = 1 * j = 0 # <<<<<<<<<<<<<< @@ -27791,7 +27791,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_6handle(struct __pyx_obj_4cdec_ */ __pyx_v_j = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":43 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":43 * i = 1 * j = 0 * for j from 0 <= j < self.n: # <<<<<<<<<<<<<< @@ -27801,7 +27801,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_6handle(struct __pyx_obj_4cdec_ __pyx_t_2 = __pyx_v_self->n; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_2; __pyx_v_j++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":44 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":44 * j = 0 * for j from 0 <= j < self.n: * s = self.syms[j] # <<<<<<<<<<<<<< @@ -27810,7 +27810,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_6handle(struct __pyx_obj_4cdec_ */ __pyx_v_s = (__pyx_v_self->syms[__pyx_v_j]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":45 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":45 * for j from 0 <= j < self.n: * s = self.syms[j] * if sym_isvar(s): # <<<<<<<<<<<<<< @@ -27820,7 +27820,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_6handle(struct __pyx_obj_4cdec_ __pyx_t_3 = (__pyx_f_4cdec_2sa_3_sa_sym_isvar(__pyx_v_s) != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":46 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":46 * s = self.syms[j] * if sym_isvar(s): * s = sym_setindex(s,i) # <<<<<<<<<<<<<< @@ -27829,7 +27829,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_6handle(struct __pyx_obj_4cdec_ */ __pyx_v_s = __pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_s, __pyx_v_i); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":47 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":47 * if sym_isvar(s): * s = sym_setindex(s,i) * i = i + 1 # <<<<<<<<<<<<<< @@ -27841,7 +27841,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_6handle(struct __pyx_obj_4cdec_ } __pyx_L5:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":48 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":48 * s = sym_setindex(s,i) * i = i + 1 * norm.append(s) # <<<<<<<<<<<<<< @@ -27854,7 +27854,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_6handle(struct __pyx_obj_4cdec_ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":49 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":49 * i = i + 1 * norm.append(s) * return tuple(norm) # <<<<<<<<<<<<<< @@ -27868,7 +27868,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_6handle(struct __pyx_obj_4cdec_ __pyx_t_1 = 0; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":36 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":36 * return ' '.join(strs) * * def handle(self): # <<<<<<<<<<<<<< @@ -27888,7 +27888,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_6handle(struct __pyx_obj_4cdec_ return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":51 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":51 * return tuple(norm) * * def strhandle(self): # <<<<<<<<<<<<<< @@ -27925,7 +27925,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_8strhandle(struct __pyx_obj_4cd int __pyx_clineno = 0; __Pyx_RefNannySetupContext("strhandle", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":52 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":52 * * def strhandle(self): * norm = [] # <<<<<<<<<<<<<< @@ -27937,7 +27937,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_8strhandle(struct __pyx_obj_4cd __pyx_v_norm = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":54 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":54 * norm = [] * cdef int i, j, s * i = 1 # <<<<<<<<<<<<<< @@ -27946,7 +27946,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_8strhandle(struct __pyx_obj_4cd */ __pyx_v_i = 1; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":55 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":55 * cdef int i, j, s * i = 1 * j = 0 # <<<<<<<<<<<<<< @@ -27955,7 +27955,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_8strhandle(struct __pyx_obj_4cd */ __pyx_v_j = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":56 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":56 * i = 1 * j = 0 * for j from 0 <= j < self.n: # <<<<<<<<<<<<<< @@ -27965,7 +27965,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_8strhandle(struct __pyx_obj_4cd __pyx_t_2 = __pyx_v_self->n; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_2; __pyx_v_j++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":57 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":57 * j = 0 * for j from 0 <= j < self.n: * s = self.syms[j] # <<<<<<<<<<<<<< @@ -27974,7 +27974,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_8strhandle(struct __pyx_obj_4cd */ __pyx_v_s = (__pyx_v_self->syms[__pyx_v_j]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":58 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":58 * for j from 0 <= j < self.n: * s = self.syms[j] * if sym_isvar(s): # <<<<<<<<<<<<<< @@ -27984,7 +27984,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_8strhandle(struct __pyx_obj_4cd __pyx_t_3 = (__pyx_f_4cdec_2sa_3_sa_sym_isvar(__pyx_v_s) != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":59 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":59 * s = self.syms[j] * if sym_isvar(s): * s = sym_setindex(s,i) # <<<<<<<<<<<<<< @@ -27993,7 +27993,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_8strhandle(struct __pyx_obj_4cd */ __pyx_v_s = __pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_s, __pyx_v_i); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":60 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":60 * if sym_isvar(s): * s = sym_setindex(s,i) * i = i + 1 # <<<<<<<<<<<<<< @@ -28005,7 +28005,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_8strhandle(struct __pyx_obj_4cd } __pyx_L5:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":61 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":61 * s = sym_setindex(s,i) * i = i + 1 * norm.append(sym_tostring(s)) # <<<<<<<<<<<<<< @@ -28018,7 +28018,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_8strhandle(struct __pyx_obj_4cd __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":62 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":62 * i = i + 1 * norm.append(sym_tostring(s)) * return ' '.join(norm) # <<<<<<<<<<<<<< @@ -28032,7 +28032,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_8strhandle(struct __pyx_obj_4cd __pyx_t_1 = 0; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":51 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":51 * return tuple(norm) * * def strhandle(self): # <<<<<<<<<<<<<< @@ -28052,7 +28052,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_8strhandle(struct __pyx_obj_4cd return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":64 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":64 * return ' '.join(norm) * * def arity(self): # <<<<<<<<<<<<<< @@ -28082,7 +28082,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_10arity(struct __pyx_obj_4cdec_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("arity", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":65 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":65 * * def arity(self): * return self.n_vars # <<<<<<<<<<<<<< @@ -28096,7 +28096,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_10arity(struct __pyx_obj_4cdec_ __pyx_t_1 = 0; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":64 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":64 * return ' '.join(norm) * * def arity(self): # <<<<<<<<<<<<<< @@ -28115,7 +28115,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_10arity(struct __pyx_obj_4cdec_ return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":67 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":67 * return self.n_vars * * def getvarpos(self, i): # <<<<<<<<<<<<<< @@ -28148,7 +28148,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_12getvarpos(struct __pyx_obj_4c int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getvarpos", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":68 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":68 * * def getvarpos(self, i): * if 0 <= i < self.n_vars: # <<<<<<<<<<<<<< @@ -28167,7 +28167,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_12getvarpos(struct __pyx_obj_4c __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":69 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":69 * def getvarpos(self, i): * if 0 <= i < self.n_vars: * return self.varpos[i] # <<<<<<<<<<<<<< @@ -28184,7 +28184,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_12getvarpos(struct __pyx_obj_4c } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":71 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":71 * return self.varpos[i] * else: * raise IndexError # <<<<<<<<<<<<<< @@ -28195,7 +28195,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_12getvarpos(struct __pyx_obj_4c {__pyx_filename = __pyx_f[7]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":67 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":67 * return self.n_vars * * def getvarpos(self, i): # <<<<<<<<<<<<<< @@ -28215,7 +28215,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_12getvarpos(struct __pyx_obj_4c return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":73 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":73 * raise IndexError * * def getvar(self, i): # <<<<<<<<<<<<<< @@ -28248,7 +28248,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_14getvar(struct __pyx_obj_4cdec int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getvar", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":74 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":74 * * def getvar(self, i): * if 0 <= i < self.n_vars: # <<<<<<<<<<<<<< @@ -28267,7 +28267,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_14getvar(struct __pyx_obj_4cdec __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":75 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":75 * def getvar(self, i): * if 0 <= i < self.n_vars: * return self.syms[self.varpos[i]] # <<<<<<<<<<<<<< @@ -28284,7 +28284,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_14getvar(struct __pyx_obj_4cdec } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":77 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":77 * return self.syms[self.varpos[i]] * else: * raise IndexError # <<<<<<<<<<<<<< @@ -28295,7 +28295,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_14getvar(struct __pyx_obj_4cdec {__pyx_filename = __pyx_f[7]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":73 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":73 * raise IndexError * * def getvar(self, i): # <<<<<<<<<<<<<< @@ -28315,7 +28315,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_14getvar(struct __pyx_obj_4cdec return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":79 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":79 * raise IndexError * * cdef int chunkpos(self, int k): # <<<<<<<<<<<<<< @@ -28329,7 +28329,7 @@ int __pyx_f_4cdec_2sa_3_sa_6Phrase_chunkpos(struct __pyx_obj_4cdec_2sa_3_sa_Phra int __pyx_t_1; __Pyx_RefNannySetupContext("chunkpos", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":80 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":80 * * cdef int chunkpos(self, int k): * if k == 0: # <<<<<<<<<<<<<< @@ -28339,7 +28339,7 @@ int __pyx_f_4cdec_2sa_3_sa_6Phrase_chunkpos(struct __pyx_obj_4cdec_2sa_3_sa_Phra __pyx_t_1 = ((__pyx_v_k == 0) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":81 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":81 * cdef int chunkpos(self, int k): * if k == 0: * return 0 # <<<<<<<<<<<<<< @@ -28351,7 +28351,7 @@ int __pyx_f_4cdec_2sa_3_sa_6Phrase_chunkpos(struct __pyx_obj_4cdec_2sa_3_sa_Phra } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":83 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":83 * return 0 * else: * return self.varpos[k-1]+1 # <<<<<<<<<<<<<< @@ -28362,7 +28362,7 @@ int __pyx_f_4cdec_2sa_3_sa_6Phrase_chunkpos(struct __pyx_obj_4cdec_2sa_3_sa_Phra goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":79 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":79 * raise IndexError * * cdef int chunkpos(self, int k): # <<<<<<<<<<<<<< @@ -28376,7 +28376,7 @@ int __pyx_f_4cdec_2sa_3_sa_6Phrase_chunkpos(struct __pyx_obj_4cdec_2sa_3_sa_Phra return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":85 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":85 * return self.varpos[k-1]+1 * * cdef int chunklen(self, int k): # <<<<<<<<<<<<<< @@ -28390,7 +28390,7 @@ int __pyx_f_4cdec_2sa_3_sa_6Phrase_chunklen(struct __pyx_obj_4cdec_2sa_3_sa_Phra int __pyx_t_1; __Pyx_RefNannySetupContext("chunklen", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":86 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":86 * * cdef int chunklen(self, int k): * if self.n_vars == 0: # <<<<<<<<<<<<<< @@ -28400,7 +28400,7 @@ int __pyx_f_4cdec_2sa_3_sa_6Phrase_chunklen(struct __pyx_obj_4cdec_2sa_3_sa_Phra __pyx_t_1 = ((__pyx_v_self->n_vars == 0) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":87 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":87 * cdef int chunklen(self, int k): * if self.n_vars == 0: * return self.n # <<<<<<<<<<<<<< @@ -28411,7 +28411,7 @@ int __pyx_f_4cdec_2sa_3_sa_6Phrase_chunklen(struct __pyx_obj_4cdec_2sa_3_sa_Phra goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":88 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":88 * if self.n_vars == 0: * return self.n * elif k == 0: # <<<<<<<<<<<<<< @@ -28421,7 +28421,7 @@ int __pyx_f_4cdec_2sa_3_sa_6Phrase_chunklen(struct __pyx_obj_4cdec_2sa_3_sa_Phra __pyx_t_1 = ((__pyx_v_k == 0) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":89 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":89 * return self.n * elif k == 0: * return self.varpos[0] # <<<<<<<<<<<<<< @@ -28432,7 +28432,7 @@ int __pyx_f_4cdec_2sa_3_sa_6Phrase_chunklen(struct __pyx_obj_4cdec_2sa_3_sa_Phra goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":90 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":90 * elif k == 0: * return self.varpos[0] * elif k == self.n_vars: # <<<<<<<<<<<<<< @@ -28442,7 +28442,7 @@ int __pyx_f_4cdec_2sa_3_sa_6Phrase_chunklen(struct __pyx_obj_4cdec_2sa_3_sa_Phra __pyx_t_1 = ((__pyx_v_k == __pyx_v_self->n_vars) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":91 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":91 * return self.varpos[0] * elif k == self.n_vars: * return self.n-self.varpos[k-1]-1 # <<<<<<<<<<<<<< @@ -28454,7 +28454,7 @@ int __pyx_f_4cdec_2sa_3_sa_6Phrase_chunklen(struct __pyx_obj_4cdec_2sa_3_sa_Phra } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":93 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":93 * return self.n-self.varpos[k-1]-1 * else: * return self.varpos[k]-self.varpos[k-1]-1 # <<<<<<<<<<<<<< @@ -28465,7 +28465,7 @@ int __pyx_f_4cdec_2sa_3_sa_6Phrase_chunklen(struct __pyx_obj_4cdec_2sa_3_sa_Phra goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":85 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":85 * return self.varpos[k-1]+1 * * cdef int chunklen(self, int k): # <<<<<<<<<<<<<< @@ -28479,7 +28479,7 @@ int __pyx_f_4cdec_2sa_3_sa_6Phrase_chunklen(struct __pyx_obj_4cdec_2sa_3_sa_Phra return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":95 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":95 * return self.varpos[k]-self.varpos[k-1]-1 * * def clen(self, k): # <<<<<<<<<<<<<< @@ -28510,7 +28510,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_16clen(struct __pyx_obj_4cdec_2 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("clen", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":96 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":96 * * def clen(self, k): * return self.chunklen(k) # <<<<<<<<<<<<<< @@ -28525,7 +28525,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_16clen(struct __pyx_obj_4cdec_2 __pyx_t_2 = 0; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":95 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":95 * return self.varpos[k]-self.varpos[k-1]-1 * * def clen(self, k): # <<<<<<<<<<<<<< @@ -28544,7 +28544,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_16clen(struct __pyx_obj_4cdec_2 return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":98 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":98 * return self.chunklen(k) * * def getchunk(self, ci): # <<<<<<<<<<<<<< @@ -28580,7 +28580,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_18getchunk(struct __pyx_obj_4cd int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getchunk", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":100 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":100 * def getchunk(self, ci): * cdef int start, stop * start = self.chunkpos(ci) # <<<<<<<<<<<<<< @@ -28590,7 +28590,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_18getchunk(struct __pyx_obj_4cd __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_ci); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_start = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Phrase *)__pyx_v_self->__pyx_vtab)->chunkpos(__pyx_v_self, __pyx_t_1); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":101 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":101 * cdef int start, stop * start = self.chunkpos(ci) * stop = start+self.chunklen(ci) # <<<<<<<<<<<<<< @@ -28600,7 +28600,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_18getchunk(struct __pyx_obj_4cd __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_ci); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_stop = (__pyx_v_start + ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Phrase *)__pyx_v_self->__pyx_vtab)->chunklen(__pyx_v_self, __pyx_t_1)); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":102 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":102 * start = self.chunkpos(ci) * stop = start+self.chunklen(ci) * chunk = [] # <<<<<<<<<<<<<< @@ -28612,7 +28612,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_18getchunk(struct __pyx_obj_4cd __pyx_v_chunk = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":103 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":103 * stop = start+self.chunklen(ci) * chunk = [] * for i from start <= i < stop: # <<<<<<<<<<<<<< @@ -28622,7 +28622,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_18getchunk(struct __pyx_obj_4cd __pyx_t_1 = __pyx_v_stop; for (__pyx_v_i = __pyx_v_start; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":104 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":104 * chunk = [] * for i from start <= i < stop: * chunk.append(self.syms[i]) # <<<<<<<<<<<<<< @@ -28635,7 +28635,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_18getchunk(struct __pyx_obj_4cd __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":105 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":105 * for i from start <= i < stop: * chunk.append(self.syms[i]) * return chunk # <<<<<<<<<<<<<< @@ -28647,7 +28647,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_18getchunk(struct __pyx_obj_4cd __pyx_r = __pyx_v_chunk; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":98 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":98 * return self.chunklen(k) * * def getchunk(self, ci): # <<<<<<<<<<<<<< @@ -28667,7 +28667,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_18getchunk(struct __pyx_obj_4cd return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":107 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":107 * return chunk * * def __cmp__(self, other): # <<<<<<<<<<<<<< @@ -28706,7 +28706,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Phrase_20__cmp__(struct __pyx_obj_4cdec_2sa_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cmp__", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":110 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":110 * cdef Phrase otherp * cdef int i * otherp = other # <<<<<<<<<<<<<< @@ -28719,7 +28719,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Phrase_20__cmp__(struct __pyx_obj_4cdec_2sa_ __pyx_v_otherp = ((struct __pyx_obj_4cdec_2sa_3_sa_Phrase *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":111 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":111 * cdef int i * otherp = other * for i from 0 <= i < min(self.n, otherp.n): # <<<<<<<<<<<<<< @@ -28736,7 +28736,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Phrase_20__cmp__(struct __pyx_obj_4cdec_2sa_ __pyx_t_2 = __pyx_t_4; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":112 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":112 * otherp = other * for i from 0 <= i < min(self.n, otherp.n): * if self.syms[i] < otherp.syms[i]: # <<<<<<<<<<<<<< @@ -28746,7 +28746,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Phrase_20__cmp__(struct __pyx_obj_4cdec_2sa_ __pyx_t_5 = (((__pyx_v_self->syms[__pyx_v_i]) < (__pyx_v_otherp->syms[__pyx_v_i])) != 0); if (__pyx_t_5) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":113 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":113 * for i from 0 <= i < min(self.n, otherp.n): * if self.syms[i] < otherp.syms[i]: * return -1 # <<<<<<<<<<<<<< @@ -28757,7 +28757,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Phrase_20__cmp__(struct __pyx_obj_4cdec_2sa_ goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":114 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":114 * if self.syms[i] < otherp.syms[i]: * return -1 * elif self.syms[i] > otherp.syms[i]: # <<<<<<<<<<<<<< @@ -28767,7 +28767,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Phrase_20__cmp__(struct __pyx_obj_4cdec_2sa_ __pyx_t_5 = (((__pyx_v_self->syms[__pyx_v_i]) > (__pyx_v_otherp->syms[__pyx_v_i])) != 0); if (__pyx_t_5) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":115 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":115 * return -1 * elif self.syms[i] > otherp.syms[i]: * return 1 # <<<<<<<<<<<<<< @@ -28779,7 +28779,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Phrase_20__cmp__(struct __pyx_obj_4cdec_2sa_ } } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":116 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":116 * elif self.syms[i] > otherp.syms[i]: * return 1 * if self.n < otherp.n: # <<<<<<<<<<<<<< @@ -28789,7 +28789,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Phrase_20__cmp__(struct __pyx_obj_4cdec_2sa_ __pyx_t_5 = ((__pyx_v_self->n < __pyx_v_otherp->n) != 0); if (__pyx_t_5) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":117 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":117 * return 1 * if self.n < otherp.n: * return -1 # <<<<<<<<<<<<<< @@ -28800,7 +28800,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Phrase_20__cmp__(struct __pyx_obj_4cdec_2sa_ goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":118 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":118 * if self.n < otherp.n: * return -1 * elif self.n > otherp.n: # <<<<<<<<<<<<<< @@ -28810,7 +28810,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Phrase_20__cmp__(struct __pyx_obj_4cdec_2sa_ __pyx_t_5 = ((__pyx_v_self->n > __pyx_v_otherp->n) != 0); if (__pyx_t_5) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":119 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":119 * return -1 * elif self.n > otherp.n: * return 1 # <<<<<<<<<<<<<< @@ -28822,7 +28822,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Phrase_20__cmp__(struct __pyx_obj_4cdec_2sa_ } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":121 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":121 * return 1 * else: * return 0 # <<<<<<<<<<<<<< @@ -28833,7 +28833,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Phrase_20__cmp__(struct __pyx_obj_4cdec_2sa_ goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":107 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":107 * return chunk * * def __cmp__(self, other): # <<<<<<<<<<<<<< @@ -28853,7 +28853,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Phrase_20__cmp__(struct __pyx_obj_4cdec_2sa_ } #endif /*!(#if PY_MAJOR_VERSION < 3)*/ -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":123 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":123 * return 0 * * def __hash__(self): # <<<<<<<<<<<<<< @@ -28883,7 +28883,7 @@ static Py_hash_t __pyx_pf_4cdec_2sa_3_sa_6Phrase_22__hash__(struct __pyx_obj_4cd int __pyx_t_2; __Pyx_RefNannySetupContext("__hash__", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":126 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":126 * cdef int i * cdef unsigned h * h = 0 # <<<<<<<<<<<<<< @@ -28892,7 +28892,7 @@ static Py_hash_t __pyx_pf_4cdec_2sa_3_sa_6Phrase_22__hash__(struct __pyx_obj_4cd */ __pyx_v_h = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":127 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":127 * cdef unsigned h * h = 0 * for i from 0 <= i < self.n: # <<<<<<<<<<<<<< @@ -28902,7 +28902,7 @@ static Py_hash_t __pyx_pf_4cdec_2sa_3_sa_6Phrase_22__hash__(struct __pyx_obj_4cd __pyx_t_1 = __pyx_v_self->n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":128 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":128 * h = 0 * for i from 0 <= i < self.n: * if self.syms[i] > 0: # <<<<<<<<<<<<<< @@ -28912,7 +28912,7 @@ static Py_hash_t __pyx_pf_4cdec_2sa_3_sa_6Phrase_22__hash__(struct __pyx_obj_4cd __pyx_t_2 = (((__pyx_v_self->syms[__pyx_v_i]) > 0) != 0); if (__pyx_t_2) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":129 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":129 * for i from 0 <= i < self.n: * if self.syms[i] > 0: * h = (h << 1) + self.syms[i] # <<<<<<<<<<<<<< @@ -28924,7 +28924,7 @@ static Py_hash_t __pyx_pf_4cdec_2sa_3_sa_6Phrase_22__hash__(struct __pyx_obj_4cd } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":131 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":131 * h = (h << 1) + self.syms[i] * else: * h = (h << 1) + -self.syms[i] # <<<<<<<<<<<<<< @@ -28936,7 +28936,7 @@ static Py_hash_t __pyx_pf_4cdec_2sa_3_sa_6Phrase_22__hash__(struct __pyx_obj_4cd __pyx_L5:; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":132 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":132 * else: * h = (h << 1) + -self.syms[i] * return h # <<<<<<<<<<<<<< @@ -28946,7 +28946,7 @@ static Py_hash_t __pyx_pf_4cdec_2sa_3_sa_6Phrase_22__hash__(struct __pyx_obj_4cd __pyx_r = __pyx_v_h; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":123 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":123 * return 0 * * def __hash__(self): # <<<<<<<<<<<<<< @@ -28961,7 +28961,7 @@ static Py_hash_t __pyx_pf_4cdec_2sa_3_sa_6Phrase_22__hash__(struct __pyx_obj_4cd return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":134 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":134 * return h * * def __len__(self): # <<<<<<<<<<<<<< @@ -28987,7 +28987,7 @@ static Py_ssize_t __pyx_pf_4cdec_2sa_3_sa_6Phrase_24__len__(struct __pyx_obj_4cd __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":135 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":135 * * def __len__(self): * return self.n # <<<<<<<<<<<<<< @@ -28997,7 +28997,7 @@ static Py_ssize_t __pyx_pf_4cdec_2sa_3_sa_6Phrase_24__len__(struct __pyx_obj_4cd __pyx_r = __pyx_v_self->n; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":134 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":134 * return h * * def __len__(self): # <<<<<<<<<<<<<< @@ -29011,7 +29011,7 @@ static Py_ssize_t __pyx_pf_4cdec_2sa_3_sa_6Phrase_24__len__(struct __pyx_obj_4cd return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":137 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":137 * return self.n * * def __getitem__(self, i): # <<<<<<<<<<<<<< @@ -29042,7 +29042,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_26__getitem__(struct __pyx_obj_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getitem__", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":138 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":138 * * def __getitem__(self, i): * return self.syms[i] # <<<<<<<<<<<<<< @@ -29057,7 +29057,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_26__getitem__(struct __pyx_obj_ __pyx_t_2 = 0; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":137 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":137 * return self.n * * def __getitem__(self, i): # <<<<<<<<<<<<<< @@ -29077,7 +29077,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_26__getitem__(struct __pyx_obj_ } static PyObject *__pyx_gb_4cdec_2sa_3_sa_6Phrase_30generator2(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":140 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":140 * return self.syms[i] * * def __iter__(self): # <<<<<<<<<<<<<< @@ -29156,7 +29156,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_6Phrase_30generator2(__pyx_GeneratorObj __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":142 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":142 * def __iter__(self): * cdef int i * for i from 0 <= i < self.n: # <<<<<<<<<<<<<< @@ -29166,7 +29166,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_6Phrase_30generator2(__pyx_GeneratorObj __pyx_t_1 = __pyx_cur_scope->__pyx_v_self->n; for (__pyx_cur_scope->__pyx_v_i = 0; __pyx_cur_scope->__pyx_v_i < __pyx_t_1; __pyx_cur_scope->__pyx_v_i++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":143 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":143 * cdef int i * for i from 0 <= i < self.n: * yield self.syms[i] # <<<<<<<<<<<<<< @@ -29188,7 +29188,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_6Phrase_30generator2(__pyx_GeneratorObj if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":140 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":140 * return self.syms[i] * * def __iter__(self): # <<<<<<<<<<<<<< @@ -29210,7 +29210,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_6Phrase_30generator2(__pyx_GeneratorObj return NULL; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":145 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":145 * yield self.syms[i] * * def subst(self, start, children): # <<<<<<<<<<<<<< @@ -29294,7 +29294,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_31subst(struct __pyx_obj_4cdec_ __Pyx_RefNannySetupContext("subst", 0); __Pyx_INCREF(__pyx_v_start); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":147 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":147 * def subst(self, start, children): * cdef int i * for i from 0 <= i < self.n: # <<<<<<<<<<<<<< @@ -29304,7 +29304,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_31subst(struct __pyx_obj_4cdec_ __pyx_t_1 = __pyx_v_self->n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":148 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":148 * cdef int i * for i from 0 <= i < self.n: * if sym_isvar(self.syms[i]): # <<<<<<<<<<<<<< @@ -29314,7 +29314,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_31subst(struct __pyx_obj_4cdec_ __pyx_t_2 = (__pyx_f_4cdec_2sa_3_sa_sym_isvar((__pyx_v_self->syms[__pyx_v_i])) != 0); if (__pyx_t_2) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":149 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":149 * for i from 0 <= i < self.n: * if sym_isvar(self.syms[i]): * start = start + children[sym_getindex(self.syms[i])-1] # <<<<<<<<<<<<<< @@ -29333,7 +29333,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_31subst(struct __pyx_obj_4cdec_ } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":151 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":151 * start = start + children[sym_getindex(self.syms[i])-1] * else: * start = start + (self.syms[i],) # <<<<<<<<<<<<<< @@ -29356,7 +29356,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_31subst(struct __pyx_obj_4cdec_ __pyx_L5:; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":152 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":152 * else: * start = start + (self.syms[i],) * return start # <<<<<<<<<<<<<< @@ -29368,7 +29368,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_31subst(struct __pyx_obj_4cdec_ __pyx_r = __pyx_v_start; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":145 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":145 * yield self.syms[i] * * def subst(self, start, children): # <<<<<<<<<<<<<< @@ -29389,7 +29389,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_31subst(struct __pyx_obj_4cdec_ return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":155 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":155 * * property words: * def __get__(self): # <<<<<<<<<<<<<< @@ -29426,7 +29426,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_5words___get__(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":156 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":156 * property words: * def __get__(self): * return [sym_tostring(w) for w in self if not sym_isvar(w)] # <<<<<<<<<<<<<< @@ -29490,7 +29490,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_5words___get__(struct __pyx_obj __pyx_t_1 = 0; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":155 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":155 * * property words: * def __get__(self): # <<<<<<<<<<<<<< @@ -29512,7 +29512,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_5words___get__(struct __pyx_obj return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":160 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":160 * cdef class Rule: * * def __cinit__(self, int lhs, Phrase f, Phrase e, scores=None, word_alignments=None): # <<<<<<<<<<<<<< @@ -29629,7 +29629,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_4Rule___cinit__(struct __pyx_obj_4cdec_2sa_3_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":161 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":161 * * def __cinit__(self, int lhs, Phrase f, Phrase e, scores=None, word_alignments=None): * if not sym_isvar(lhs): raise Exception('Invalid LHS symbol: %d' % lhs) # <<<<<<<<<<<<<< @@ -29656,7 +29656,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_4Rule___cinit__(struct __pyx_obj_4cdec_2sa_3_ {__pyx_filename = __pyx_f[7]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":162 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":162 * def __cinit__(self, int lhs, Phrase f, Phrase e, scores=None, word_alignments=None): * if not sym_isvar(lhs): raise Exception('Invalid LHS symbol: %d' % lhs) * self.lhs = lhs # <<<<<<<<<<<<<< @@ -29665,7 +29665,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_4Rule___cinit__(struct __pyx_obj_4cdec_2sa_3_ */ __pyx_v_self->lhs = __pyx_v_lhs; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":163 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":163 * if not sym_isvar(lhs): raise Exception('Invalid LHS symbol: %d' % lhs) * self.lhs = lhs * self.f = f # <<<<<<<<<<<<<< @@ -29678,7 +29678,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_4Rule___cinit__(struct __pyx_obj_4cdec_2sa_3_ __Pyx_DECREF(((PyObject *)__pyx_v_self->f)); __pyx_v_self->f = __pyx_v_f; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":164 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":164 * self.lhs = lhs * self.f = f * self.e = e # <<<<<<<<<<<<<< @@ -29691,7 +29691,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_4Rule___cinit__(struct __pyx_obj_4cdec_2sa_3_ __Pyx_DECREF(((PyObject *)__pyx_v_self->e)); __pyx_v_self->e = __pyx_v_e; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":165 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":165 * self.f = f * self.e = e * self.word_alignments = word_alignments # <<<<<<<<<<<<<< @@ -29704,7 +29704,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_4Rule___cinit__(struct __pyx_obj_4cdec_2sa_3_ __Pyx_DECREF(__pyx_v_self->word_alignments); __pyx_v_self->word_alignments = __pyx_v_word_alignments; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":166 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":166 * self.e = e * self.word_alignments = word_alignments * self.scores = scores # <<<<<<<<<<<<<< @@ -29720,7 +29720,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_4Rule___cinit__(struct __pyx_obj_4cdec_2sa_3_ __pyx_v_self->scores = ((struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector *)__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":160 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":160 * cdef class Rule: * * def __cinit__(self, int lhs, Phrase f, Phrase e, scores=None, word_alignments=None): # <<<<<<<<<<<<<< @@ -29741,7 +29741,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_4Rule___cinit__(struct __pyx_obj_4cdec_2sa_3_ return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":168 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":168 * self.scores = scores * * def __hash__(self): # <<<<<<<<<<<<<< @@ -29773,7 +29773,7 @@ static Py_hash_t __pyx_pf_4cdec_2sa_3_sa_4Rule_2__hash__(struct __pyx_obj_4cdec_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__hash__", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":169 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":169 * * def __hash__(self): * return hash((self.lhs, self.f, self.e)) # <<<<<<<<<<<<<< @@ -29798,7 +29798,7 @@ static Py_hash_t __pyx_pf_4cdec_2sa_3_sa_4Rule_2__hash__(struct __pyx_obj_4cdec_ __pyx_r = __pyx_t_3; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":168 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":168 * self.scores = scores * * def __hash__(self): # <<<<<<<<<<<<<< @@ -29818,7 +29818,7 @@ static Py_hash_t __pyx_pf_4cdec_2sa_3_sa_4Rule_2__hash__(struct __pyx_obj_4cdec_ return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":171 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":171 * return hash((self.lhs, self.f, self.e)) * * def __cmp__(self, Rule other): # <<<<<<<<<<<<<< @@ -29862,7 +29862,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_4Rule_4__cmp__(struct __pyx_obj_4cdec_2sa_3_s int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cmp__", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":172 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":172 * * def __cmp__(self, Rule other): * return cmp((self.lhs, self.f, self.e, self.word_alignments), # <<<<<<<<<<<<<< @@ -29886,7 +29886,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_4Rule_4__cmp__(struct __pyx_obj_4cdec_2sa_3_s __Pyx_GIVEREF(__pyx_v_self->word_alignments); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":173 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":173 * def __cmp__(self, Rule other): * return cmp((self.lhs, self.f, self.e, self.word_alignments), * (other.lhs, other.f, other.e, self.word_alignments)) # <<<<<<<<<<<<<< @@ -29910,7 +29910,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_4Rule_4__cmp__(struct __pyx_obj_4cdec_2sa_3_s __Pyx_GIVEREF(__pyx_v_self->word_alignments); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":172 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":172 * * def __cmp__(self, Rule other): * return cmp((self.lhs, self.f, self.e, self.word_alignments), # <<<<<<<<<<<<<< @@ -29933,7 +29933,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_4Rule_4__cmp__(struct __pyx_obj_4cdec_2sa_3_s __pyx_r = __pyx_t_4; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":171 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":171 * return hash((self.lhs, self.f, self.e)) * * def __cmp__(self, Rule other): # <<<<<<<<<<<<<< @@ -29954,7 +29954,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_4Rule_4__cmp__(struct __pyx_obj_4cdec_2sa_3_s } #endif /*!(#if PY_MAJOR_VERSION < 3)*/ -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":175 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":175 * (other.lhs, other.f, other.e, self.word_alignments)) * * def fmerge(self, Phrase f): # <<<<<<<<<<<<<< @@ -29993,7 +29993,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_4Rule_6fmerge(struct __pyx_obj_4cdec_2s int __pyx_clineno = 0; __Pyx_RefNannySetupContext("fmerge", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":176 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":176 * * def fmerge(self, Phrase f): * if self.f == f: # <<<<<<<<<<<<<< @@ -30005,7 +30005,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_4Rule_6fmerge(struct __pyx_obj_4cdec_2s __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":177 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":177 * def fmerge(self, Phrase f): * if self.f == f: * self.f = f # <<<<<<<<<<<<<< @@ -30021,7 +30021,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_4Rule_6fmerge(struct __pyx_obj_4cdec_2s } __pyx_L3:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":175 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":175 * (other.lhs, other.f, other.e, self.word_alignments)) * * def fmerge(self, Phrase f): # <<<<<<<<<<<<<< @@ -30042,7 +30042,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_4Rule_6fmerge(struct __pyx_obj_4cdec_2s return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":179 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":179 * self.f = f * * def arity(self): # <<<<<<<<<<<<<< @@ -30073,7 +30073,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_4Rule_8arity(struct __pyx_obj_4cdec_2sa int __pyx_clineno = 0; __Pyx_RefNannySetupContext("arity", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":180 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":180 * * def arity(self): * return self.f.arity() # <<<<<<<<<<<<<< @@ -30090,7 +30090,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_4Rule_8arity(struct __pyx_obj_4cdec_2sa __pyx_t_2 = 0; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":179 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":179 * self.f = f * * def arity(self): # <<<<<<<<<<<<<< @@ -30110,7 +30110,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_4Rule_8arity(struct __pyx_obj_4cdec_2sa return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":182 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":182 * return self.f.arity() * * def __str__(self): # <<<<<<<<<<<<<< @@ -30132,7 +30132,7 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_4Rule_11__str__(PyObject *__pyx_v_self) } static PyObject *__pyx_gb_4cdec_2sa_3_sa_4Rule_7__str___2generator13(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":186 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":186 * fields = [sym_tostring(self.lhs), str(self.f), str(self.e), str(self.scores)] * if self.word_alignments is not None: * fields.append(' '.join('%d-%d' % a for a in self.alignments())) # <<<<<<<<<<<<<< @@ -30283,7 +30283,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_4Rule_7__str___2generator13(__pyx_Gener return NULL; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":182 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":182 * return self.f.arity() * * def __str__(self): # <<<<<<<<<<<<<< @@ -30318,7 +30318,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_4Rule_10__str__(struct __pyx_obj_4cdec_ __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":184 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":184 * def __str__(self): * cdef unsigned i * fields = [sym_tostring(self.lhs), str(self.f), str(self.e), str(self.scores)] # <<<<<<<<<<<<<< @@ -30368,7 +30368,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_4Rule_10__str__(struct __pyx_obj_4cdec_ __pyx_v_fields = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":185 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":185 * cdef unsigned i * fields = [sym_tostring(self.lhs), str(self.f), str(self.e), str(self.scores)] * if self.word_alignments is not None: # <<<<<<<<<<<<<< @@ -30379,7 +30379,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_4Rule_10__str__(struct __pyx_obj_4cdec_ __pyx_t_7 = (__pyx_t_6 != 0); if (__pyx_t_7) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":186 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":186 * fields = [sym_tostring(self.lhs), str(self.f), str(self.e), str(self.scores)] * if self.word_alignments is not None: * fields.append(' '.join('%d-%d' % a for a in self.alignments())) # <<<<<<<<<<<<<< @@ -30397,7 +30397,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_4Rule_10__str__(struct __pyx_obj_4cdec_ } __pyx_L3:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":187 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":187 * if self.word_alignments is not None: * fields.append(' '.join('%d-%d' % a for a in self.alignments())) * return ' ||| '.join(fields) # <<<<<<<<<<<<<< @@ -30411,7 +30411,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_4Rule_10__str__(struct __pyx_obj_4cdec_ __pyx_t_5 = 0; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":182 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":182 * return self.f.arity() * * def __str__(self): # <<<<<<<<<<<<<< @@ -30437,7 +30437,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_4Rule_10__str__(struct __pyx_obj_4cdec_ } static PyObject *__pyx_gb_4cdec_2sa_3_sa_4Rule_14generator3(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":189 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":189 * return ' ||| '.join(fields) * * def alignments(self): # <<<<<<<<<<<<<< @@ -30520,7 +30520,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_4Rule_14generator3(__pyx_GeneratorObjec __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":190 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":190 * * def alignments(self): * for point in self.word_alignments: # <<<<<<<<<<<<<< @@ -30566,7 +30566,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_4Rule_14generator3(__pyx_GeneratorObjec __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":191 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":191 * def alignments(self): * for point in self.word_alignments: * yield point / ALIGNMENT_CODE, point % ALIGNMENT_CODE # <<<<<<<<<<<<<< @@ -30610,7 +30610,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_4Rule_14generator3(__pyx_GeneratorObjec } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rule.pxi":189 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":189 * return ' ||| '.join(fields) * * def alignments(self): # <<<<<<<<<<<<<< @@ -30701,7 +30701,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_4Rule_1e___get__(struct __pyx_obj_4cdec return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":21 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":21 * int arr_len * * cdef _Trie_Node* new_trie_node(): # <<<<<<<<<<<<<< @@ -30715,7 +30715,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_new_trie __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("new_trie_node", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":23 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":23 * cdef _Trie_Node* new_trie_node(): * cdef _Trie_Node* node * node = <_Trie_Node*> malloc(sizeof(_Trie_Node)) # <<<<<<<<<<<<<< @@ -30724,7 +30724,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_new_trie */ __pyx_v_node = ((struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *)malloc((sizeof(struct __pyx_t_4cdec_2sa_3_sa__Trie_Node)))); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":24 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":24 * cdef _Trie_Node* node * node = <_Trie_Node*> malloc(sizeof(_Trie_Node)) * node.root = NULL # <<<<<<<<<<<<<< @@ -30733,7 +30733,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_new_trie */ __pyx_v_node->root = NULL; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":25 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":25 * node = <_Trie_Node*> malloc(sizeof(_Trie_Node)) * node.root = NULL * node.arr_len = 0 # <<<<<<<<<<<<<< @@ -30742,7 +30742,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_new_trie */ __pyx_v_node->arr_len = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":26 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":26 * node.root = NULL * node.arr_len = 0 * node.arr = malloc(sizeof(0*sizeof(int))) # <<<<<<<<<<<<<< @@ -30751,7 +30751,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_new_trie */ __pyx_v_node->arr = ((int *)malloc((sizeof((0 * (sizeof(int))))))); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":27 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":27 * node.arr_len = 0 * node.arr = malloc(sizeof(0*sizeof(int))) * return node # <<<<<<<<<<<<<< @@ -30761,7 +30761,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_new_trie __pyx_r = __pyx_v_node; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":21 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":21 * int arr_len * * cdef _Trie_Node* new_trie_node(): # <<<<<<<<<<<<<< @@ -30775,7 +30775,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_new_trie return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":29 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":29 * return node * * cdef _Trie_Edge* new_trie_edge(int val): # <<<<<<<<<<<<<< @@ -30789,7 +30789,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Edge *__pyx_f_4cdec_2sa_3_sa_new_trie __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("new_trie_edge", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":31 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":31 * cdef _Trie_Edge* new_trie_edge(int val): * cdef _Trie_Edge* edge * edge = <_Trie_Edge*> malloc(sizeof(_Trie_Edge)) # <<<<<<<<<<<<<< @@ -30798,7 +30798,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Edge *__pyx_f_4cdec_2sa_3_sa_new_trie */ __pyx_v_edge = ((struct __pyx_t_4cdec_2sa_3_sa__Trie_Edge *)malloc((sizeof(struct __pyx_t_4cdec_2sa_3_sa__Trie_Edge)))); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":32 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":32 * cdef _Trie_Edge* edge * edge = <_Trie_Edge*> malloc(sizeof(_Trie_Edge)) * edge.node = new_trie_node() # <<<<<<<<<<<<<< @@ -30807,7 +30807,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Edge *__pyx_f_4cdec_2sa_3_sa_new_trie */ __pyx_v_edge->node = __pyx_f_4cdec_2sa_3_sa_new_trie_node(); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":33 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":33 * edge = <_Trie_Edge*> malloc(sizeof(_Trie_Edge)) * edge.node = new_trie_node() * edge.bigger = NULL # <<<<<<<<<<<<<< @@ -30816,7 +30816,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Edge *__pyx_f_4cdec_2sa_3_sa_new_trie */ __pyx_v_edge->bigger = NULL; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":34 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":34 * edge.node = new_trie_node() * edge.bigger = NULL * edge.smaller = NULL # <<<<<<<<<<<<<< @@ -30825,7 +30825,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Edge *__pyx_f_4cdec_2sa_3_sa_new_trie */ __pyx_v_edge->smaller = NULL; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":35 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":35 * edge.bigger = NULL * edge.smaller = NULL * edge.val = val # <<<<<<<<<<<<<< @@ -30834,7 +30834,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Edge *__pyx_f_4cdec_2sa_3_sa_new_trie */ __pyx_v_edge->val = __pyx_v_val; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":36 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":36 * edge.smaller = NULL * edge.val = val * return edge # <<<<<<<<<<<<<< @@ -30844,7 +30844,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Edge *__pyx_f_4cdec_2sa_3_sa_new_trie __pyx_r = __pyx_v_edge; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":29 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":29 * return node * * cdef _Trie_Edge* new_trie_edge(int val): # <<<<<<<<<<<<<< @@ -30858,7 +30858,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Edge *__pyx_f_4cdec_2sa_3_sa_new_trie return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":38 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":38 * return edge * * cdef free_trie_node(_Trie_Node* node): # <<<<<<<<<<<<<< @@ -30876,7 +30876,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_free_trie_node(struct __pyx_t_4cdec_2sa_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("free_trie_node", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":39 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":39 * * cdef free_trie_node(_Trie_Node* node): * if node != NULL: # <<<<<<<<<<<<<< @@ -30886,7 +30886,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_free_trie_node(struct __pyx_t_4cdec_2sa_ __pyx_t_1 = ((__pyx_v_node != NULL) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":40 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":40 * cdef free_trie_node(_Trie_Node* node): * if node != NULL: * free_trie_edge(node.root) # <<<<<<<<<<<<<< @@ -30897,7 +30897,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_free_trie_node(struct __pyx_t_4cdec_2sa_ __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":41 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":41 * if node != NULL: * free_trie_edge(node.root) * free(node.arr) # <<<<<<<<<<<<<< @@ -30909,7 +30909,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_free_trie_node(struct __pyx_t_4cdec_2sa_ } __pyx_L3:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":38 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":38 * return edge * * cdef free_trie_node(_Trie_Node* node): # <<<<<<<<<<<<<< @@ -30930,7 +30930,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_free_trie_node(struct __pyx_t_4cdec_2sa_ return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":43 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":43 * free(node.arr) * * cdef free_trie_edge(_Trie_Edge* edge): # <<<<<<<<<<<<<< @@ -30948,7 +30948,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_free_trie_edge(struct __pyx_t_4cdec_2sa_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("free_trie_edge", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":44 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":44 * * cdef free_trie_edge(_Trie_Edge* edge): * if edge != NULL: # <<<<<<<<<<<<<< @@ -30958,7 +30958,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_free_trie_edge(struct __pyx_t_4cdec_2sa_ __pyx_t_1 = ((__pyx_v_edge != NULL) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":45 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":45 * cdef free_trie_edge(_Trie_Edge* edge): * if edge != NULL: * free_trie_node(edge.node) # <<<<<<<<<<<<<< @@ -30969,7 +30969,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_free_trie_edge(struct __pyx_t_4cdec_2sa_ __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":46 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":46 * if edge != NULL: * free_trie_node(edge.node) * free_trie_edge(edge.bigger) # <<<<<<<<<<<<<< @@ -30980,7 +30980,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_free_trie_edge(struct __pyx_t_4cdec_2sa_ __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":47 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":47 * free_trie_node(edge.node) * free_trie_edge(edge.bigger) * free_trie_edge(edge.smaller) # <<<<<<<<<<<<<< @@ -30994,7 +30994,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_free_trie_edge(struct __pyx_t_4cdec_2sa_ } __pyx_L3:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":43 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":43 * free(node.arr) * * cdef free_trie_edge(_Trie_Edge* edge): # <<<<<<<<<<<<<< @@ -31015,7 +31015,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_free_trie_edge(struct __pyx_t_4cdec_2sa_ return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":49 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":49 * free_trie_edge(edge.smaller) * * cdef _Trie_Node* trie_find(_Trie_Node* node, int val): # <<<<<<<<<<<<<< @@ -31033,7 +31033,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_trie_fin int __pyx_t_4; __Pyx_RefNannySetupContext("trie_find", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":51 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":51 * cdef _Trie_Node* trie_find(_Trie_Node* node, int val): * cdef _Trie_Edge* cur * cur = node.root # <<<<<<<<<<<<<< @@ -31043,7 +31043,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_trie_fin __pyx_t_1 = __pyx_v_node->root; __pyx_v_cur = __pyx_t_1; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":52 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":52 * cdef _Trie_Edge* cur * cur = node.root * while cur != NULL and cur.val != val: # <<<<<<<<<<<<<< @@ -31060,7 +31060,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_trie_fin } if (!__pyx_t_4) break; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":53 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":53 * cur = node.root * while cur != NULL and cur.val != val: * if val > cur.val: # <<<<<<<<<<<<<< @@ -31070,7 +31070,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_trie_fin __pyx_t_4 = ((__pyx_v_val > __pyx_v_cur->val) != 0); if (__pyx_t_4) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":54 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":54 * while cur != NULL and cur.val != val: * if val > cur.val: * cur = cur.bigger # <<<<<<<<<<<<<< @@ -31082,7 +31082,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_trie_fin goto __pyx_L5; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":55 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":55 * if val > cur.val: * cur = cur.bigger * elif val < cur.val: # <<<<<<<<<<<<<< @@ -31092,7 +31092,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_trie_fin __pyx_t_4 = ((__pyx_v_val < __pyx_v_cur->val) != 0); if (__pyx_t_4) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":56 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":56 * cur = cur.bigger * elif val < cur.val: * cur = cur.smaller # <<<<<<<<<<<<<< @@ -31106,7 +31106,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_trie_fin __pyx_L5:; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":57 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":57 * elif val < cur.val: * cur = cur.smaller * if cur == NULL: # <<<<<<<<<<<<<< @@ -31116,7 +31116,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_trie_fin __pyx_t_4 = ((__pyx_v_cur == NULL) != 0); if (__pyx_t_4) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":58 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":58 * cur = cur.smaller * if cur == NULL: * return NULL # <<<<<<<<<<<<<< @@ -31128,7 +31128,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_trie_fin } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":60 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":60 * return NULL * else: * return cur.node # <<<<<<<<<<<<<< @@ -31139,7 +31139,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_trie_fin goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":49 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":49 * free_trie_edge(edge.smaller) * * cdef _Trie_Node* trie_find(_Trie_Node* node, int val): # <<<<<<<<<<<<<< @@ -31153,7 +31153,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_trie_fin return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":62 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":62 * return cur.node * * cdef trie_node_data_append(_Trie_Node* node, int val): # <<<<<<<<<<<<<< @@ -31167,7 +31167,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_node_data_append(struct __pyx_t_4cd __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("trie_node_data_append", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":64 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":64 * cdef trie_node_data_append(_Trie_Node* node, int val): * cdef int new_len * new_len = node.arr_len + 1 # <<<<<<<<<<<<<< @@ -31176,7 +31176,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_node_data_append(struct __pyx_t_4cd */ __pyx_v_new_len = (__pyx_v_node->arr_len + 1); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":65 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":65 * cdef int new_len * new_len = node.arr_len + 1 * node.arr = realloc(node.arr, new_len*sizeof(int)) # <<<<<<<<<<<<<< @@ -31185,7 +31185,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_node_data_append(struct __pyx_t_4cd */ __pyx_v_node->arr = ((int *)realloc(__pyx_v_node->arr, (__pyx_v_new_len * (sizeof(int))))); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":66 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":66 * new_len = node.arr_len + 1 * node.arr = realloc(node.arr, new_len*sizeof(int)) * node.arr[node.arr_len] = val # <<<<<<<<<<<<<< @@ -31194,7 +31194,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_node_data_append(struct __pyx_t_4cd */ (__pyx_v_node->arr[__pyx_v_node->arr_len]) = __pyx_v_val; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":67 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":67 * node.arr = realloc(node.arr, new_len*sizeof(int)) * node.arr[node.arr_len] = val * node.arr_len = new_len # <<<<<<<<<<<<<< @@ -31203,7 +31203,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_node_data_append(struct __pyx_t_4cd */ __pyx_v_node->arr_len = __pyx_v_new_len; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":62 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":62 * return cur.node * * cdef trie_node_data_append(_Trie_Node* node, int val): # <<<<<<<<<<<<<< @@ -31218,7 +31218,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_node_data_append(struct __pyx_t_4cd return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":69 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":69 * node.arr_len = new_len * * cdef trie_node_data_extend(_Trie_Node* node, int* vals, int num_vals): # <<<<<<<<<<<<<< @@ -31232,7 +31232,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_node_data_extend(struct __pyx_t_4cd __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("trie_node_data_extend", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":71 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":71 * cdef trie_node_data_extend(_Trie_Node* node, int* vals, int num_vals): * cdef int new_len * new_len = node.arr_len + num_vals # <<<<<<<<<<<<<< @@ -31241,7 +31241,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_node_data_extend(struct __pyx_t_4cd */ __pyx_v_new_len = (__pyx_v_node->arr_len + __pyx_v_num_vals); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":72 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":72 * cdef int new_len * new_len = node.arr_len + num_vals * node.arr = realloc(node.arr, new_len*sizeof(int)) # <<<<<<<<<<<<<< @@ -31250,7 +31250,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_node_data_extend(struct __pyx_t_4cd */ __pyx_v_node->arr = ((int *)realloc(__pyx_v_node->arr, (__pyx_v_new_len * (sizeof(int))))); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":73 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":73 * new_len = node.arr_len + num_vals * node.arr = realloc(node.arr, new_len*sizeof(int)) * memcpy(node.arr + node.arr_len, vals, num_vals*sizeof(int)) # <<<<<<<<<<<<<< @@ -31259,7 +31259,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_node_data_extend(struct __pyx_t_4cd */ memcpy((__pyx_v_node->arr + __pyx_v_node->arr_len), __pyx_v_vals, (__pyx_v_num_vals * (sizeof(int)))); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":74 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":74 * node.arr = realloc(node.arr, new_len*sizeof(int)) * memcpy(node.arr + node.arr_len, vals, num_vals*sizeof(int)) * node.arr_len = new_len # <<<<<<<<<<<<<< @@ -31268,7 +31268,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_node_data_extend(struct __pyx_t_4cd */ __pyx_v_node->arr_len = __pyx_v_new_len; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":69 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":69 * node.arr_len = new_len * * cdef trie_node_data_extend(_Trie_Node* node, int* vals, int num_vals): # <<<<<<<<<<<<<< @@ -31283,7 +31283,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_node_data_extend(struct __pyx_t_4cd return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":77 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":77 * * * cdef _Trie_Node* trie_insert(_Trie_Node* node, int val): # <<<<<<<<<<<<<< @@ -31300,7 +31300,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_trie_ins int __pyx_t_3; __Pyx_RefNannySetupContext("trie_insert", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":79 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":79 * cdef _Trie_Node* trie_insert(_Trie_Node* node, int val): * cdef _Trie_Edge** cur * cur = &node.root # <<<<<<<<<<<<<< @@ -31309,7 +31309,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_trie_ins */ __pyx_v_cur = (&__pyx_v_node->root); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":80 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":80 * cdef _Trie_Edge** cur * cur = &node.root * while cur[0] != NULL and cur[0].val != val: # <<<<<<<<<<<<<< @@ -31326,7 +31326,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_trie_ins } if (!__pyx_t_3) break; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":81 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":81 * cur = &node.root * while cur[0] != NULL and cur[0].val != val: * if val > cur[0].val: # <<<<<<<<<<<<<< @@ -31336,7 +31336,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_trie_ins __pyx_t_3 = ((__pyx_v_val > (__pyx_v_cur[0])->val) != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":82 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":82 * while cur[0] != NULL and cur[0].val != val: * if val > cur[0].val: * cur = &cur[0].bigger # <<<<<<<<<<<<<< @@ -31347,7 +31347,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_trie_ins goto __pyx_L5; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":83 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":83 * if val > cur[0].val: * cur = &cur[0].bigger * elif val < cur[0].val: # <<<<<<<<<<<<<< @@ -31357,7 +31357,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_trie_ins __pyx_t_3 = ((__pyx_v_val < (__pyx_v_cur[0])->val) != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":84 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":84 * cur = &cur[0].bigger * elif val < cur[0].val: * cur = &cur[0].smaller # <<<<<<<<<<<<<< @@ -31370,7 +31370,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_trie_ins __pyx_L5:; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":85 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":85 * elif val < cur[0].val: * cur = &cur[0].smaller * if cur[0] == NULL: # <<<<<<<<<<<<<< @@ -31380,7 +31380,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_trie_ins __pyx_t_3 = (((__pyx_v_cur[0]) == NULL) != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":86 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":86 * cur = &cur[0].smaller * if cur[0] == NULL: * cur[0] = new_trie_edge(val) # <<<<<<<<<<<<<< @@ -31392,7 +31392,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_trie_ins } __pyx_L6:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":87 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":87 * if cur[0] == NULL: * cur[0] = new_trie_edge(val) * return cur[0].node # <<<<<<<<<<<<<< @@ -31402,7 +31402,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_trie_ins __pyx_r = (__pyx_v_cur[0])->node; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":77 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":77 * * * cdef _Trie_Node* trie_insert(_Trie_Node* node, int val): # <<<<<<<<<<<<<< @@ -31416,7 +31416,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_trie_ins return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":89 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":89 * return cur[0].node * * cdef trie_node_to_map(_Trie_Node* node, result, prefix, int include_zeros): # <<<<<<<<<<<<<< @@ -31437,7 +31437,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_node_to_map(struct __pyx_t_4cdec_2s int __pyx_clineno = 0; __Pyx_RefNannySetupContext("trie_node_to_map", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":92 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":92 * cdef IntList arr * * if include_zeros or node.arr_len > 0: # <<<<<<<<<<<<<< @@ -31452,7 +31452,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_node_to_map(struct __pyx_t_4cdec_2s } if (__pyx_t_2) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":93 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":93 * * if include_zeros or node.arr_len > 0: * arr = IntList() # <<<<<<<<<<<<<< @@ -31464,7 +31464,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_node_to_map(struct __pyx_t_4cdec_2s __pyx_v_arr = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":94 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":94 * if include_zeros or node.arr_len > 0: * arr = IntList() * free(arr.arr) # <<<<<<<<<<<<<< @@ -31473,7 +31473,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_node_to_map(struct __pyx_t_4cdec_2s */ free(__pyx_v_arr->arr); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":95 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":95 * arr = IntList() * free(arr.arr) * arr.arr = malloc(node.arr_len * sizeof(int)) # <<<<<<<<<<<<<< @@ -31482,7 +31482,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_node_to_map(struct __pyx_t_4cdec_2s */ __pyx_v_arr->arr = ((int *)malloc((__pyx_v_node->arr_len * (sizeof(int))))); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":96 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":96 * free(arr.arr) * arr.arr = malloc(node.arr_len * sizeof(int)) * memcpy(arr.arr, node.arr, node.arr_len * sizeof(int)) # <<<<<<<<<<<<<< @@ -31491,7 +31491,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_node_to_map(struct __pyx_t_4cdec_2s */ memcpy(__pyx_v_arr->arr, __pyx_v_node->arr, (__pyx_v_node->arr_len * (sizeof(int)))); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":97 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":97 * arr.arr = malloc(node.arr_len * sizeof(int)) * memcpy(arr.arr, node.arr, node.arr_len * sizeof(int)) * arr.len = node.arr_len # <<<<<<<<<<<<<< @@ -31501,7 +31501,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_node_to_map(struct __pyx_t_4cdec_2s __pyx_t_4 = __pyx_v_node->arr_len; __pyx_v_arr->len = __pyx_t_4; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":98 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":98 * memcpy(arr.arr, node.arr, node.arr_len * sizeof(int)) * arr.len = node.arr_len * arr.size = node.arr_len # <<<<<<<<<<<<<< @@ -31511,7 +31511,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_node_to_map(struct __pyx_t_4cdec_2s __pyx_t_4 = __pyx_v_node->arr_len; __pyx_v_arr->size = __pyx_t_4; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":99 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":99 * arr.len = node.arr_len * arr.size = node.arr_len * result[prefix] = arr # <<<<<<<<<<<<<< @@ -31523,7 +31523,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_node_to_map(struct __pyx_t_4cdec_2s } __pyx_L3:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":100 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":100 * arr.size = node.arr_len * result[prefix] = arr * trie_edge_to_map(node.root, result, prefix, include_zeros) # <<<<<<<<<<<<<< @@ -31534,7 +31534,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_node_to_map(struct __pyx_t_4cdec_2s __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":89 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":89 * return cur[0].node * * cdef trie_node_to_map(_Trie_Node* node, result, prefix, int include_zeros): # <<<<<<<<<<<<<< @@ -31556,7 +31556,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_node_to_map(struct __pyx_t_4cdec_2s return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":102 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":102 * trie_edge_to_map(node.root, result, prefix, include_zeros) * * cdef trie_edge_to_map(_Trie_Edge* edge, result, prefix, int include_zeros): # <<<<<<<<<<<<<< @@ -31576,7 +31576,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_edge_to_map(struct __pyx_t_4cdec_2s __Pyx_RefNannySetupContext("trie_edge_to_map", 0); __Pyx_INCREF(__pyx_v_prefix); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":103 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":103 * * cdef trie_edge_to_map(_Trie_Edge* edge, result, prefix, int include_zeros): * if edge != NULL: # <<<<<<<<<<<<<< @@ -31586,7 +31586,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_edge_to_map(struct __pyx_t_4cdec_2s __pyx_t_1 = ((__pyx_v_edge != NULL) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":104 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":104 * cdef trie_edge_to_map(_Trie_Edge* edge, result, prefix, int include_zeros): * if edge != NULL: * trie_edge_to_map(edge.smaller, result, prefix, include_zeros) # <<<<<<<<<<<<<< @@ -31597,7 +31597,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_edge_to_map(struct __pyx_t_4cdec_2s __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":105 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":105 * if edge != NULL: * trie_edge_to_map(edge.smaller, result, prefix, include_zeros) * trie_edge_to_map(edge.bigger, result, prefix, include_zeros) # <<<<<<<<<<<<<< @@ -31608,7 +31608,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_edge_to_map(struct __pyx_t_4cdec_2s __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":106 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":106 * trie_edge_to_map(edge.smaller, result, prefix, include_zeros) * trie_edge_to_map(edge.bigger, result, prefix, include_zeros) * prefix = prefix + (edge.val,) # <<<<<<<<<<<<<< @@ -31628,7 +31628,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_edge_to_map(struct __pyx_t_4cdec_2s __Pyx_DECREF_SET(__pyx_v_prefix, __pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":107 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":107 * trie_edge_to_map(edge.bigger, result, prefix, include_zeros) * prefix = prefix + (edge.val,) * trie_node_to_map(edge.node, result, prefix, include_zeros) # <<<<<<<<<<<<<< @@ -31642,7 +31642,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_edge_to_map(struct __pyx_t_4cdec_2s } __pyx_L3:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":102 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":102 * trie_edge_to_map(node.root, result, prefix, include_zeros) * * cdef trie_edge_to_map(_Trie_Edge* edge, result, prefix, int include_zeros): # <<<<<<<<<<<<<< @@ -31665,7 +31665,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_edge_to_map(struct __pyx_t_4cdec_2s return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":114 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":114 * cdef int V * * def __cinit__(self, int alphabet_size): # <<<<<<<<<<<<<< @@ -31730,7 +31730,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_7TrieMap___cinit__(struct __pyx_obj_4cdec_2sa __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":115 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":115 * * def __cinit__(self, int alphabet_size): * self.V = alphabet_size # <<<<<<<<<<<<<< @@ -31739,7 +31739,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_7TrieMap___cinit__(struct __pyx_obj_4cdec_2sa */ __pyx_v_self->V = __pyx_v_alphabet_size; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":116 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":116 * def __cinit__(self, int alphabet_size): * self.V = alphabet_size * self.root = <_Trie_Node**> malloc(self.V * sizeof(_Trie_Node*)) # <<<<<<<<<<<<<< @@ -31748,7 +31748,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_7TrieMap___cinit__(struct __pyx_obj_4cdec_2sa */ __pyx_v_self->root = ((struct __pyx_t_4cdec_2sa_3_sa__Trie_Node **)malloc((__pyx_v_self->V * (sizeof(struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *))))); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":117 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":117 * self.V = alphabet_size * self.root = <_Trie_Node**> malloc(self.V * sizeof(_Trie_Node*)) * memset(self.root, 0, self.V * sizeof(_Trie_Node*)) # <<<<<<<<<<<<<< @@ -31757,7 +31757,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_7TrieMap___cinit__(struct __pyx_obj_4cdec_2sa */ memset(__pyx_v_self->root, 0, (__pyx_v_self->V * (sizeof(struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *)))); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":114 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":114 * cdef int V * * def __cinit__(self, int alphabet_size): # <<<<<<<<<<<<<< @@ -31771,7 +31771,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_7TrieMap___cinit__(struct __pyx_obj_4cdec_2sa return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":120 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":120 * * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -31801,7 +31801,7 @@ static void __pyx_pf_4cdec_2sa_3_sa_7TrieMap_2__dealloc__(struct __pyx_obj_4cdec int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":122 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":122 * def __dealloc__(self): * cdef int i * for i from 0 <= i < self.V: # <<<<<<<<<<<<<< @@ -31811,7 +31811,7 @@ static void __pyx_pf_4cdec_2sa_3_sa_7TrieMap_2__dealloc__(struct __pyx_obj_4cdec __pyx_t_1 = __pyx_v_self->V; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":123 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":123 * cdef int i * for i from 0 <= i < self.V: * if self.root[i] != NULL: # <<<<<<<<<<<<<< @@ -31821,7 +31821,7 @@ static void __pyx_pf_4cdec_2sa_3_sa_7TrieMap_2__dealloc__(struct __pyx_obj_4cdec __pyx_t_2 = (((__pyx_v_self->root[__pyx_v_i]) != NULL) != 0); if (__pyx_t_2) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":124 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":124 * for i from 0 <= i < self.V: * if self.root[i] != NULL: * free_trie_node(self.root[i]) # <<<<<<<<<<<<<< @@ -31836,7 +31836,7 @@ static void __pyx_pf_4cdec_2sa_3_sa_7TrieMap_2__dealloc__(struct __pyx_obj_4cdec __pyx_L5:; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":125 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":125 * if self.root[i] != NULL: * free_trie_node(self.root[i]) * free(self.root) # <<<<<<<<<<<<<< @@ -31845,7 +31845,7 @@ static void __pyx_pf_4cdec_2sa_3_sa_7TrieMap_2__dealloc__(struct __pyx_obj_4cdec */ free(__pyx_v_self->root); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":120 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":120 * * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -31862,7 +31862,7 @@ static void __pyx_pf_4cdec_2sa_3_sa_7TrieMap_2__dealloc__(struct __pyx_obj_4cdec __Pyx_RefNannyFinishContext(); } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":128 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":128 * * * def insert(self, pattern): # <<<<<<<<<<<<<< @@ -31898,7 +31898,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7TrieMap_4insert(struct __pyx_obj_4cdec int __pyx_clineno = 0; __Pyx_RefNannySetupContext("insert", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":131 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":131 * cdef int* p * cdef int i, l * l = len(pattern) # <<<<<<<<<<<<<< @@ -31908,7 +31908,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7TrieMap_4insert(struct __pyx_obj_4cdec __pyx_t_1 = PyObject_Length(__pyx_v_pattern); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_l = __pyx_t_1; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":132 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":132 * cdef int i, l * l = len(pattern) * p = malloc(l*sizeof(int)) # <<<<<<<<<<<<<< @@ -31917,7 +31917,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7TrieMap_4insert(struct __pyx_obj_4cdec */ __pyx_v_p = ((int *)malloc((__pyx_v_l * (sizeof(int))))); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":133 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":133 * l = len(pattern) * p = malloc(l*sizeof(int)) * for i from 0 <= i < l: # <<<<<<<<<<<<<< @@ -31927,7 +31927,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7TrieMap_4insert(struct __pyx_obj_4cdec __pyx_t_2 = __pyx_v_l; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":134 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":134 * p = malloc(l*sizeof(int)) * for i from 0 <= i < l: * p[i] = pattern[i] # <<<<<<<<<<<<<< @@ -31941,7 +31941,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7TrieMap_4insert(struct __pyx_obj_4cdec (__pyx_v_p[__pyx_v_i]) = __pyx_t_4; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":135 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":135 * for i from 0 <= i < l: * p[i] = pattern[i] * self._insert(p,l) # <<<<<<<<<<<<<< @@ -31950,7 +31950,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7TrieMap_4insert(struct __pyx_obj_4cdec */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_TrieMap *)__pyx_v_self->__pyx_vtab)->_insert(__pyx_v_self, __pyx_v_p, __pyx_v_l); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":136 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":136 * p[i] = pattern[i] * self._insert(p,l) * free(p) # <<<<<<<<<<<<<< @@ -31959,7 +31959,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7TrieMap_4insert(struct __pyx_obj_4cdec */ free(__pyx_v_p); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":128 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":128 * * * def insert(self, pattern): # <<<<<<<<<<<<<< @@ -31980,7 +31980,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7TrieMap_4insert(struct __pyx_obj_4cdec return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":139 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":139 * * * cdef _Trie_Node* _insert(self, int* pattern, int pattern_len): # <<<<<<<<<<<<<< @@ -31997,7 +31997,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_7TrieMap int __pyx_t_2; __Pyx_RefNannySetupContext("_insert", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":142 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":142 * cdef int i * cdef _Trie_Node* node * if self.root[pattern[0]] == NULL: # <<<<<<<<<<<<<< @@ -32007,7 +32007,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_7TrieMap __pyx_t_1 = (((__pyx_v_self->root[(__pyx_v_pattern[0])]) == NULL) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":143 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":143 * cdef _Trie_Node* node * if self.root[pattern[0]] == NULL: * self.root[pattern[0]] = new_trie_node() # <<<<<<<<<<<<<< @@ -32019,7 +32019,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_7TrieMap } __pyx_L3:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":144 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":144 * if self.root[pattern[0]] == NULL: * self.root[pattern[0]] = new_trie_node() * node = self.root[pattern[0]] # <<<<<<<<<<<<<< @@ -32028,7 +32028,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_7TrieMap */ __pyx_v_node = (__pyx_v_self->root[(__pyx_v_pattern[0])]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":145 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":145 * self.root[pattern[0]] = new_trie_node() * node = self.root[pattern[0]] * for i from 1 <= i < pattern_len: # <<<<<<<<<<<<<< @@ -32038,7 +32038,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_7TrieMap __pyx_t_2 = __pyx_v_pattern_len; for (__pyx_v_i = 1; __pyx_v_i < __pyx_t_2; __pyx_v_i++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":146 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":146 * node = self.root[pattern[0]] * for i from 1 <= i < pattern_len: * node = trie_insert(node, pattern[i]) # <<<<<<<<<<<<<< @@ -32048,7 +32048,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_7TrieMap __pyx_v_node = __pyx_f_4cdec_2sa_3_sa_trie_insert(__pyx_v_node, (__pyx_v_pattern[__pyx_v_i])); } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":147 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":147 * for i from 1 <= i < pattern_len: * node = trie_insert(node, pattern[i]) * return node # <<<<<<<<<<<<<< @@ -32058,7 +32058,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_7TrieMap __pyx_r = __pyx_v_node; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":139 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":139 * * * cdef _Trie_Node* _insert(self, int* pattern, int pattern_len): # <<<<<<<<<<<<<< @@ -32072,7 +32072,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_7TrieMap return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":149 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":149 * return node * * def contains(self, pattern): # <<<<<<<<<<<<<< @@ -32110,7 +32110,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7TrieMap_6contains(struct __pyx_obj_4cd int __pyx_clineno = 0; __Pyx_RefNannySetupContext("contains", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":153 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":153 * cdef int i, l * cdef _Trie_Node* node * l = len(pattern) # <<<<<<<<<<<<<< @@ -32120,7 +32120,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7TrieMap_6contains(struct __pyx_obj_4cd __pyx_t_1 = PyObject_Length(__pyx_v_pattern); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_l = __pyx_t_1; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":154 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":154 * cdef _Trie_Node* node * l = len(pattern) * p = malloc(l*sizeof(int)) # <<<<<<<<<<<<<< @@ -32129,7 +32129,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7TrieMap_6contains(struct __pyx_obj_4cd */ __pyx_v_p = ((int *)malloc((__pyx_v_l * (sizeof(int))))); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":155 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":155 * l = len(pattern) * p = malloc(l*sizeof(int)) * for i from 0 <= i < l: # <<<<<<<<<<<<<< @@ -32139,7 +32139,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7TrieMap_6contains(struct __pyx_obj_4cd __pyx_t_2 = __pyx_v_l; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":156 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":156 * p = malloc(l*sizeof(int)) * for i from 0 <= i < l: * p[i] = pattern[i] # <<<<<<<<<<<<<< @@ -32153,7 +32153,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7TrieMap_6contains(struct __pyx_obj_4cd (__pyx_v_p[__pyx_v_i]) = __pyx_t_4; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":157 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":157 * for i from 0 <= i < l: * p[i] = pattern[i] * node = self._contains(p,l) # <<<<<<<<<<<<<< @@ -32162,7 +32162,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7TrieMap_6contains(struct __pyx_obj_4cd */ __pyx_v_node = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_TrieMap *)__pyx_v_self->__pyx_vtab)->_contains(__pyx_v_self, __pyx_v_p, __pyx_v_l); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":158 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":158 * p[i] = pattern[i] * node = self._contains(p,l) * free(p) # <<<<<<<<<<<<<< @@ -32171,7 +32171,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7TrieMap_6contains(struct __pyx_obj_4cd */ free(__pyx_v_p); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":159 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":159 * node = self._contains(p,l) * free(p) * if node == NULL: # <<<<<<<<<<<<<< @@ -32181,7 +32181,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7TrieMap_6contains(struct __pyx_obj_4cd __pyx_t_5 = ((__pyx_v_node == NULL) != 0); if (__pyx_t_5) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":160 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":160 * free(p) * if node == NULL: * return False # <<<<<<<<<<<<<< @@ -32195,7 +32195,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7TrieMap_6contains(struct __pyx_obj_4cd } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":162 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":162 * return False * else: * return True # <<<<<<<<<<<<<< @@ -32208,7 +32208,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7TrieMap_6contains(struct __pyx_obj_4cd goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":149 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":149 * return node * * def contains(self, pattern): # <<<<<<<<<<<<<< @@ -32227,7 +32227,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7TrieMap_6contains(struct __pyx_obj_4cd return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":164 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":164 * return True * * cdef _Trie_Node* _contains(self, int* pattern, int pattern_len): # <<<<<<<<<<<<<< @@ -32245,7 +32245,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_7TrieMap int __pyx_t_3; __Pyx_RefNannySetupContext("_contains", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":167 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":167 * cdef int i * cdef _Trie_Node* node * node = self.root[pattern[0]] # <<<<<<<<<<<<<< @@ -32254,7 +32254,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_7TrieMap */ __pyx_v_node = (__pyx_v_self->root[(__pyx_v_pattern[0])]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":168 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":168 * cdef _Trie_Node* node * node = self.root[pattern[0]] * i = 1 # <<<<<<<<<<<<<< @@ -32263,7 +32263,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_7TrieMap */ __pyx_v_i = 1; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":169 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":169 * node = self.root[pattern[0]] * i = 1 * while node != NULL and i < pattern_len: # <<<<<<<<<<<<<< @@ -32280,7 +32280,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_7TrieMap } if (!__pyx_t_3) break; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":170 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":170 * i = 1 * while node != NULL and i < pattern_len: * node = trie_find(node, pattern[i]) # <<<<<<<<<<<<<< @@ -32289,7 +32289,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_7TrieMap */ __pyx_v_node = __pyx_f_4cdec_2sa_3_sa_trie_find(__pyx_v_node, (__pyx_v_pattern[__pyx_v_i])); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":171 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":171 * while node != NULL and i < pattern_len: * node = trie_find(node, pattern[i]) * i = i+1 # <<<<<<<<<<<<<< @@ -32299,7 +32299,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_7TrieMap __pyx_v_i = (__pyx_v_i + 1); } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":172 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":172 * node = trie_find(node, pattern[i]) * i = i+1 * return node # <<<<<<<<<<<<<< @@ -32309,7 +32309,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_7TrieMap __pyx_r = __pyx_v_node; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":164 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":164 * return True * * cdef _Trie_Node* _contains(self, int* pattern, int pattern_len): # <<<<<<<<<<<<<< @@ -32323,7 +32323,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_7TrieMap return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":174 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":174 * return node * * def toMap(self, flag): # <<<<<<<<<<<<<< @@ -32359,7 +32359,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7TrieMap_8toMap(struct __pyx_obj_4cdec_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("toMap", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":177 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":177 * cdef int i, include_zeros * * if flag: # <<<<<<<<<<<<<< @@ -32369,7 +32369,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7TrieMap_8toMap(struct __pyx_obj_4cdec_ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_flag); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":178 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":178 * * if flag: * include_zeros=1 # <<<<<<<<<<<<<< @@ -32381,7 +32381,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7TrieMap_8toMap(struct __pyx_obj_4cdec_ } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":180 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":180 * include_zeros=1 * else: * include_zeros=0 # <<<<<<<<<<<<<< @@ -32392,7 +32392,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7TrieMap_8toMap(struct __pyx_obj_4cdec_ } __pyx_L3:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":181 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":181 * else: * include_zeros=0 * result = {} # <<<<<<<<<<<<<< @@ -32404,7 +32404,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7TrieMap_8toMap(struct __pyx_obj_4cdec_ __pyx_v_result = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":182 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":182 * include_zeros=0 * result = {} * for i from 0 <= i < self.V: # <<<<<<<<<<<<<< @@ -32414,7 +32414,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7TrieMap_8toMap(struct __pyx_obj_4cdec_ __pyx_t_3 = __pyx_v_self->V; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_3; __pyx_v_i++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":183 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":183 * result = {} * for i from 0 <= i < self.V: * if self.root[i] != NULL: # <<<<<<<<<<<<<< @@ -32424,7 +32424,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7TrieMap_8toMap(struct __pyx_obj_4cdec_ __pyx_t_1 = (((__pyx_v_self->root[__pyx_v_i]) != NULL) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":184 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":184 * for i from 0 <= i < self.V: * if self.root[i] != NULL: * trie_node_to_map(self.root[i], result, (i,), include_zeros) # <<<<<<<<<<<<<< @@ -32447,7 +32447,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7TrieMap_8toMap(struct __pyx_obj_4cdec_ __pyx_L6:; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":185 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":185 * if self.root[i] != NULL: * trie_node_to_map(self.root[i], result, (i,), include_zeros) * return result # <<<<<<<<<<<<<< @@ -32459,7 +32459,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7TrieMap_8toMap(struct __pyx_obj_4cdec_ __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":174 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":174 * return node * * def toMap(self, flag): # <<<<<<<<<<<<<< @@ -32480,7 +32480,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7TrieMap_8toMap(struct __pyx_obj_4cdec_ return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":200 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":200 * cdef write_map(self, m, FILE* f) * * def __cinit__(self, fsarray=None, from_stats=None, from_binary=None, # <<<<<<<<<<<<<< @@ -32638,7 +32638,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_14Precomputation___cinit__(struct __pyx_obj_4 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":204 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":204 * max_length=5, max_nonterminals=2, * train_max_initial_size=10, train_min_gap_size=2): * self.precompute_rank = precompute_rank # <<<<<<<<<<<<<< @@ -32648,7 +32648,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_14Precomputation___cinit__(struct __pyx_obj_4 __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_precompute_rank); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->precompute_rank = __pyx_t_1; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":205 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":205 * train_max_initial_size=10, train_min_gap_size=2): * self.precompute_rank = precompute_rank * self.precompute_secondary_rank = precompute_secondary_rank # <<<<<<<<<<<<<< @@ -32658,7 +32658,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_14Precomputation___cinit__(struct __pyx_obj_4 __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_precompute_secondary_rank); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->precompute_secondary_rank = __pyx_t_1; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":206 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":206 * self.precompute_rank = precompute_rank * self.precompute_secondary_rank = precompute_secondary_rank * self.max_length = max_length # <<<<<<<<<<<<<< @@ -32668,7 +32668,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_14Precomputation___cinit__(struct __pyx_obj_4 __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_max_length); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->max_length = __pyx_t_1; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":207 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":207 * self.precompute_secondary_rank = precompute_secondary_rank * self.max_length = max_length * self.max_nonterminals = max_nonterminals # <<<<<<<<<<<<<< @@ -32678,7 +32678,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_14Precomputation___cinit__(struct __pyx_obj_4 __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_max_nonterminals); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->max_nonterminals = __pyx_t_1; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":208 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":208 * self.max_length = max_length * self.max_nonterminals = max_nonterminals * self.train_max_initial_size = train_max_initial_size # <<<<<<<<<<<<<< @@ -32688,7 +32688,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_14Precomputation___cinit__(struct __pyx_obj_4 __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_train_max_initial_size); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->train_max_initial_size = __pyx_t_1; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":209 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":209 * self.max_nonterminals = max_nonterminals * self.train_max_initial_size = train_max_initial_size * self.train_min_gap_size = train_min_gap_size # <<<<<<<<<<<<<< @@ -32698,7 +32698,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_14Precomputation___cinit__(struct __pyx_obj_4 __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_train_min_gap_size); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->train_min_gap_size = __pyx_t_1; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":210 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":210 * self.train_max_initial_size = train_max_initial_size * self.train_min_gap_size = train_min_gap_size * if from_binary: # <<<<<<<<<<<<<< @@ -32708,7 +32708,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_14Precomputation___cinit__(struct __pyx_obj_4 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_from_binary); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_2) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":211 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":211 * self.train_min_gap_size = train_min_gap_size * if from_binary: * self.read_binary(from_binary) # <<<<<<<<<<<<<< @@ -32730,7 +32730,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_14Precomputation___cinit__(struct __pyx_obj_4 goto __pyx_L3; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":212 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":212 * if from_binary: * self.read_binary(from_binary) * elif from_stats: # <<<<<<<<<<<<<< @@ -32740,7 +32740,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_14Precomputation___cinit__(struct __pyx_obj_4 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_from_stats); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_2) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":213 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":213 * self.read_binary(from_binary) * elif from_stats: * self.precompute(from_stats, fsarray) # <<<<<<<<<<<<<< @@ -32766,7 +32766,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_14Precomputation___cinit__(struct __pyx_obj_4 } __pyx_L3:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":200 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":200 * cdef write_map(self, m, FILE* f) * * def __cinit__(self, fsarray=None, from_stats=None, from_binary=None, # <<<<<<<<<<<<<< @@ -32788,7 +32788,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_14Precomputation___cinit__(struct __pyx_obj_4 return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":216 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":216 * * * def read_binary(self, char* filename): # <<<<<<<<<<<<<< @@ -32832,7 +32832,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_2read_binary(struct __ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("read_binary", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":218 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":218 * def read_binary(self, char* filename): * cdef FILE* f * f = fopen(filename, "r") # <<<<<<<<<<<<<< @@ -32841,7 +32841,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_2read_binary(struct __ */ __pyx_v_f = fopen(__pyx_v_filename, __pyx_k_r); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":219 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":219 * cdef FILE* f * f = fopen(filename, "r") * fread(&(self.precompute_rank), sizeof(int), 1, f) # <<<<<<<<<<<<<< @@ -32850,7 +32850,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_2read_binary(struct __ */ fread((&__pyx_v_self->precompute_rank), (sizeof(int)), 1, __pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":220 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":220 * f = fopen(filename, "r") * fread(&(self.precompute_rank), sizeof(int), 1, f) * fread(&(self.precompute_secondary_rank), sizeof(int), 1, f) # <<<<<<<<<<<<<< @@ -32859,7 +32859,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_2read_binary(struct __ */ fread((&__pyx_v_self->precompute_secondary_rank), (sizeof(int)), 1, __pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":221 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":221 * fread(&(self.precompute_rank), sizeof(int), 1, f) * fread(&(self.precompute_secondary_rank), sizeof(int), 1, f) * fread(&(self.max_length), sizeof(int), 1, f) # <<<<<<<<<<<<<< @@ -32868,7 +32868,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_2read_binary(struct __ */ fread((&__pyx_v_self->max_length), (sizeof(int)), 1, __pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":222 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":222 * fread(&(self.precompute_secondary_rank), sizeof(int), 1, f) * fread(&(self.max_length), sizeof(int), 1, f) * fread(&(self.max_nonterminals), sizeof(int), 1, f) # <<<<<<<<<<<<<< @@ -32877,7 +32877,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_2read_binary(struct __ */ fread((&__pyx_v_self->max_nonterminals), (sizeof(int)), 1, __pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":223 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":223 * fread(&(self.max_length), sizeof(int), 1, f) * fread(&(self.max_nonterminals), sizeof(int), 1, f) * fread(&(self.train_max_initial_size), sizeof(int), 1, f) # <<<<<<<<<<<<<< @@ -32886,7 +32886,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_2read_binary(struct __ */ fread((&__pyx_v_self->train_max_initial_size), (sizeof(int)), 1, __pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":224 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":224 * fread(&(self.max_nonterminals), sizeof(int), 1, f) * fread(&(self.train_max_initial_size), sizeof(int), 1, f) * fread(&(self.train_min_gap_size), sizeof(int), 1, f) # <<<<<<<<<<<<<< @@ -32895,7 +32895,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_2read_binary(struct __ */ fread((&__pyx_v_self->train_min_gap_size), (sizeof(int)), 1, __pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":225 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":225 * fread(&(self.train_max_initial_size), sizeof(int), 1, f) * fread(&(self.train_min_gap_size), sizeof(int), 1, f) * self.precomputed_index = self.read_map(f) # <<<<<<<<<<<<<< @@ -32910,7 +32910,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_2read_binary(struct __ __pyx_v_self->precomputed_index = __pyx_t_1; __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":226 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":226 * fread(&(self.train_min_gap_size), sizeof(int), 1, f) * self.precomputed_index = self.read_map(f) * self.precomputed_collocations = self.read_map(f) # <<<<<<<<<<<<<< @@ -32925,7 +32925,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_2read_binary(struct __ __pyx_v_self->precomputed_collocations = __pyx_t_1; __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":227 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":227 * self.precomputed_index = self.read_map(f) * self.precomputed_collocations = self.read_map(f) * fclose(f) # <<<<<<<<<<<<<< @@ -32934,7 +32934,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_2read_binary(struct __ */ fclose(__pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":216 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":216 * * * def read_binary(self, char* filename): # <<<<<<<<<<<<<< @@ -32955,7 +32955,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_2read_binary(struct __ return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":230 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":230 * * * def write_binary(self, char* filename): # <<<<<<<<<<<<<< @@ -33000,7 +33000,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_4write_binary(struct _ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("write_binary", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":232 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":232 * def write_binary(self, char* filename): * cdef FILE* f * f = fopen(filename, "w") # <<<<<<<<<<<<<< @@ -33009,7 +33009,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_4write_binary(struct _ */ __pyx_v_f = fopen(__pyx_v_filename, __pyx_k_w); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":233 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":233 * cdef FILE* f * f = fopen(filename, "w") * fwrite(&(self.precompute_rank), sizeof(int), 1, f) # <<<<<<<<<<<<<< @@ -33018,7 +33018,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_4write_binary(struct _ */ fwrite((&__pyx_v_self->precompute_rank), (sizeof(int)), 1, __pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":234 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":234 * f = fopen(filename, "w") * fwrite(&(self.precompute_rank), sizeof(int), 1, f) * fwrite(&(self.precompute_secondary_rank), sizeof(int), 1, f) # <<<<<<<<<<<<<< @@ -33027,7 +33027,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_4write_binary(struct _ */ fwrite((&__pyx_v_self->precompute_secondary_rank), (sizeof(int)), 1, __pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":235 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":235 * fwrite(&(self.precompute_rank), sizeof(int), 1, f) * fwrite(&(self.precompute_secondary_rank), sizeof(int), 1, f) * fwrite(&(self.max_length), sizeof(int), 1, f) # <<<<<<<<<<<<<< @@ -33036,7 +33036,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_4write_binary(struct _ */ fwrite((&__pyx_v_self->max_length), (sizeof(int)), 1, __pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":236 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":236 * fwrite(&(self.precompute_secondary_rank), sizeof(int), 1, f) * fwrite(&(self.max_length), sizeof(int), 1, f) * fwrite(&(self.max_nonterminals), sizeof(int), 1, f) # <<<<<<<<<<<<<< @@ -33045,7 +33045,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_4write_binary(struct _ */ fwrite((&__pyx_v_self->max_nonterminals), (sizeof(int)), 1, __pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":237 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":237 * fwrite(&(self.max_length), sizeof(int), 1, f) * fwrite(&(self.max_nonterminals), sizeof(int), 1, f) * fwrite(&(self.train_max_initial_size), sizeof(int), 1, f) # <<<<<<<<<<<<<< @@ -33054,7 +33054,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_4write_binary(struct _ */ fwrite((&__pyx_v_self->train_max_initial_size), (sizeof(int)), 1, __pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":238 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":238 * fwrite(&(self.max_nonterminals), sizeof(int), 1, f) * fwrite(&(self.train_max_initial_size), sizeof(int), 1, f) * fwrite(&(self.train_min_gap_size), sizeof(int), 1, f) # <<<<<<<<<<<<<< @@ -33063,7 +33063,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_4write_binary(struct _ */ fwrite((&__pyx_v_self->train_min_gap_size), (sizeof(int)), 1, __pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":239 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":239 * fwrite(&(self.train_max_initial_size), sizeof(int), 1, f) * fwrite(&(self.train_min_gap_size), sizeof(int), 1, f) * self.write_map(self.precomputed_index, f) # <<<<<<<<<<<<<< @@ -33077,7 +33077,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_4write_binary(struct _ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":240 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":240 * fwrite(&(self.train_min_gap_size), sizeof(int), 1, f) * self.write_map(self.precomputed_index, f) * self.write_map(self.precomputed_collocations, f) # <<<<<<<<<<<<<< @@ -33091,7 +33091,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_4write_binary(struct _ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":241 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":241 * self.write_map(self.precomputed_index, f) * self.write_map(self.precomputed_collocations, f) * fclose(f) # <<<<<<<<<<<<<< @@ -33100,7 +33100,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_4write_binary(struct _ */ fclose(__pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":230 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":230 * * * def write_binary(self, char* filename): # <<<<<<<<<<<<<< @@ -33122,7 +33122,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_4write_binary(struct _ return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":244 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":244 * * * cdef write_map(self, m, FILE* f): # <<<<<<<<<<<<<< @@ -33153,7 +33153,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_14Precomputation_write_map(CYTHON_UNUSED int __pyx_clineno = 0; __Pyx_RefNannySetupContext("write_map", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":248 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":248 * cdef IntList arr * * N = len(m) # <<<<<<<<<<<<<< @@ -33163,7 +33163,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_14Precomputation_write_map(CYTHON_UNUSED __pyx_t_1 = PyObject_Length(__pyx_v_m); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_N = __pyx_t_1; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":249 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":249 * * N = len(m) * fwrite(&(N), sizeof(int), 1, f) # <<<<<<<<<<<<<< @@ -33172,7 +33172,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_14Precomputation_write_map(CYTHON_UNUSED */ fwrite((&__pyx_v_N), (sizeof(int)), 1, __pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":250 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":250 * N = len(m) * fwrite(&(N), sizeof(int), 1, f) * for pattern, val in m.iteritems(): # <<<<<<<<<<<<<< @@ -33200,7 +33200,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_14Precomputation_write_map(CYTHON_UNUSED __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_6); __pyx_t_6 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":251 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":251 * fwrite(&(N), sizeof(int), 1, f) * for pattern, val in m.iteritems(): * N = len(pattern) # <<<<<<<<<<<<<< @@ -33210,7 +33210,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_14Precomputation_write_map(CYTHON_UNUSED __pyx_t_8 = PyObject_Length(__pyx_v_pattern); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_N = __pyx_t_8; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":252 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":252 * for pattern, val in m.iteritems(): * N = len(pattern) * fwrite(&(N), sizeof(int), 1, f) # <<<<<<<<<<<<<< @@ -33219,7 +33219,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_14Precomputation_write_map(CYTHON_UNUSED */ fwrite((&__pyx_v_N), (sizeof(int)), 1, __pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":253 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":253 * N = len(pattern) * fwrite(&(N), sizeof(int), 1, f) * for word_id in pattern: # <<<<<<<<<<<<<< @@ -33264,7 +33264,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_14Precomputation_write_map(CYTHON_UNUSED __Pyx_XDECREF_SET(__pyx_v_word_id, __pyx_t_5); __pyx_t_5 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":254 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":254 * fwrite(&(N), sizeof(int), 1, f) * for word_id in pattern: * i = word_id # <<<<<<<<<<<<<< @@ -33274,7 +33274,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_14Precomputation_write_map(CYTHON_UNUSED __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_word_id); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_i = __pyx_t_7; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":255 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":255 * for word_id in pattern: * i = word_id * fwrite(&(i), sizeof(int), 1, f) # <<<<<<<<<<<<<< @@ -33285,7 +33285,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_14Precomputation_write_map(CYTHON_UNUSED } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":256 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":256 * i = word_id * fwrite(&(i), sizeof(int), 1, f) * arr = val # <<<<<<<<<<<<<< @@ -33298,7 +33298,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_14Precomputation_write_map(CYTHON_UNUSED __Pyx_XDECREF_SET(__pyx_v_arr, ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_6)); __pyx_t_6 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":257 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":257 * fwrite(&(i), sizeof(int), 1, f) * arr = val * arr.write_handle(f) # <<<<<<<<<<<<<< @@ -33309,7 +33309,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_14Precomputation_write_map(CYTHON_UNUSED } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":244 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":244 * * * cdef write_map(self, m, FILE* f): # <<<<<<<<<<<<<< @@ -33336,7 +33336,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_14Precomputation_write_map(CYTHON_UNUSED return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":260 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":260 * * * cdef read_map(self, FILE* f): # <<<<<<<<<<<<<< @@ -33364,7 +33364,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_14Precomputation_read_map(CYTHON_UNUSED int __pyx_clineno = 0; __Pyx_RefNannySetupContext("read_map", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":264 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":264 * cdef IntList arr * * m = {} # <<<<<<<<<<<<<< @@ -33376,7 +33376,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_14Precomputation_read_map(CYTHON_UNUSED __pyx_v_m = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":265 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":265 * * m = {} * fread(&(N), sizeof(int), 1, f) # <<<<<<<<<<<<<< @@ -33385,7 +33385,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_14Precomputation_read_map(CYTHON_UNUSED */ fread((&__pyx_v_N), (sizeof(int)), 1, __pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":266 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":266 * m = {} * fread(&(N), sizeof(int), 1, f) * for j from 0 <= j < N: # <<<<<<<<<<<<<< @@ -33395,7 +33395,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_14Precomputation_read_map(CYTHON_UNUSED __pyx_t_2 = __pyx_v_N; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_2; __pyx_v_j++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":267 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":267 * fread(&(N), sizeof(int), 1, f) * for j from 0 <= j < N: * fread(&(i), sizeof(int), 1, f) # <<<<<<<<<<<<<< @@ -33404,7 +33404,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_14Precomputation_read_map(CYTHON_UNUSED */ fread((&__pyx_v_i), (sizeof(int)), 1, __pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":268 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":268 * for j from 0 <= j < N: * fread(&(i), sizeof(int), 1, f) * key = () # <<<<<<<<<<<<<< @@ -33414,7 +33414,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_14Precomputation_read_map(CYTHON_UNUSED __Pyx_INCREF(__pyx_empty_tuple); __Pyx_XDECREF_SET(__pyx_v_key, __pyx_empty_tuple); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":269 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":269 * fread(&(i), sizeof(int), 1, f) * key = () * for k from 0 <= k < i: # <<<<<<<<<<<<<< @@ -33424,7 +33424,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_14Precomputation_read_map(CYTHON_UNUSED __pyx_t_3 = __pyx_v_i; for (__pyx_v_k = 0; __pyx_v_k < __pyx_t_3; __pyx_v_k++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":270 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":270 * key = () * for k from 0 <= k < i: * fread(&(word_id), sizeof(int), 1, f) # <<<<<<<<<<<<<< @@ -33433,7 +33433,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_14Precomputation_read_map(CYTHON_UNUSED */ fread((&__pyx_v_word_id), (sizeof(int)), 1, __pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":271 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":271 * for k from 0 <= k < i: * fread(&(word_id), sizeof(int), 1, f) * key = key + (word_id,) # <<<<<<<<<<<<<< @@ -33454,7 +33454,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_14Precomputation_read_map(CYTHON_UNUSED __pyx_t_1 = 0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":272 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":272 * fread(&(word_id), sizeof(int), 1, f) * key = key + (word_id,) * arr = IntList() # <<<<<<<<<<<<<< @@ -33466,7 +33466,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_14Precomputation_read_map(CYTHON_UNUSED __Pyx_XDECREF_SET(__pyx_v_arr, ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1)); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":273 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":273 * key = key + (word_id,) * arr = IntList() * arr.read_handle(f) # <<<<<<<<<<<<<< @@ -33475,7 +33475,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_14Precomputation_read_map(CYTHON_UNUSED */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_arr->__pyx_vtab)->read_handle(__pyx_v_arr, __pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":274 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":274 * arr = IntList() * arr.read_handle(f) * m[key] = arr # <<<<<<<<<<<<<< @@ -33485,7 +33485,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_14Precomputation_read_map(CYTHON_UNUSED if (unlikely(PyDict_SetItem(__pyx_v_m, __pyx_v_key, ((PyObject *)__pyx_v_arr)) < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":275 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":275 * arr.read_handle(f) * m[key] = arr * return m # <<<<<<<<<<<<<< @@ -33497,7 +33497,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_14Precomputation_read_map(CYTHON_UNUSED __pyx_r = __pyx_v_m; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":260 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":260 * * * cdef read_map(self, FILE* f): # <<<<<<<<<<<<<< @@ -33520,7 +33520,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_14Precomputation_read_map(CYTHON_UNUSED return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":278 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":278 * * * def precompute(self, stats, SuffixArray sarray): # <<<<<<<<<<<<<< @@ -33672,7 +33672,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("precompute", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":280 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":280 * def precompute(self, stats, SuffixArray sarray): * cdef int i, l, N, max_pattern_len, i1, l1, i2, l2, i3, l3, ptr1, ptr2, ptr3, is_super, sent_count, max_rank * cdef DataArray darray = sarray.darray # <<<<<<<<<<<<<< @@ -33684,7 +33684,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_v_darray = ((struct __pyx_obj_4cdec_2sa_3_sa_DataArray *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":285 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":285 * cdef _Trie_Node* node * * data = darray.data # <<<<<<<<<<<<<< @@ -33696,7 +33696,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_v_data = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":287 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":287 * data = darray.data * * frequent_patterns = TrieMap(len(darray.id2word)) # <<<<<<<<<<<<<< @@ -33720,7 +33720,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_v_frequent_patterns = ((struct __pyx_obj_4cdec_2sa_3_sa_TrieMap *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":288 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":288 * * frequent_patterns = TrieMap(len(darray.id2word)) * super_frequent_patterns = TrieMap(len(darray.id2word)) # <<<<<<<<<<<<<< @@ -33744,7 +33744,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_v_super_frequent_patterns = ((struct __pyx_obj_4cdec_2sa_3_sa_TrieMap *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":289 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":289 * frequent_patterns = TrieMap(len(darray.id2word)) * super_frequent_patterns = TrieMap(len(darray.id2word)) * collocations = TrieMap(len(darray.id2word)) # <<<<<<<<<<<<<< @@ -33768,7 +33768,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_v_collocations = ((struct __pyx_obj_4cdec_2sa_3_sa_TrieMap *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":291 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":291 * collocations = TrieMap(len(darray.id2word)) * * I_set = set() # <<<<<<<<<<<<<< @@ -33780,7 +33780,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_v_I_set = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":292 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":292 * * I_set = set() * J_set = set() # <<<<<<<<<<<<<< @@ -33792,7 +33792,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_v_J_set = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":293 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":293 * I_set = set() * J_set = set() * J2_set = set() # <<<<<<<<<<<<<< @@ -33804,7 +33804,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_v_J2_set = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":294 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":294 * J_set = set() * J2_set = set() * IJ_set = set() # <<<<<<<<<<<<<< @@ -33816,7 +33816,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_v_IJ_set = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":295 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":295 * J2_set = set() * IJ_set = set() * pattern_rank = {} # <<<<<<<<<<<<<< @@ -33828,7 +33828,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_v_pattern_rank = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":297 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":297 * pattern_rank = {} * * logger.info("Precomputing frequent intersections") # <<<<<<<<<<<<<< @@ -33845,7 +33845,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":298 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":298 * * logger.info("Precomputing frequent intersections") * cdef float start_time = monitor_cpu() # <<<<<<<<<<<<<< @@ -33861,7 +33861,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_start_time = __pyx_t_4; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":300 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":300 * cdef float start_time = monitor_cpu() * * max_pattern_len = 0 # <<<<<<<<<<<<<< @@ -33870,7 +33870,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p */ __pyx_v_max_pattern_len = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":301 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":301 * * max_pattern_len = 0 * for rank, (_, _, phrase) in enumerate(stats): # <<<<<<<<<<<<<< @@ -33985,7 +33985,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_t_3 = __pyx_t_6; __pyx_t_6 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":302 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":302 * max_pattern_len = 0 * for rank, (_, _, phrase) in enumerate(stats): * if rank >= self.precompute_rank: # <<<<<<<<<<<<<< @@ -34000,7 +34000,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (__pyx_t_12) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":303 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":303 * for rank, (_, _, phrase) in enumerate(stats): * if rank >= self.precompute_rank: * break # <<<<<<<<<<<<<< @@ -34010,7 +34010,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p goto __pyx_L4_break; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":304 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":304 * if rank >= self.precompute_rank: * break * max_pattern_len = max(max_pattern_len, len(phrase)) # <<<<<<<<<<<<<< @@ -34026,7 +34026,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p } __pyx_v_max_pattern_len = __pyx_t_15; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":305 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":305 * break * max_pattern_len = max(max_pattern_len, len(phrase)) * frequent_patterns.insert(phrase) # <<<<<<<<<<<<<< @@ -34046,7 +34046,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":306 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":306 * max_pattern_len = max(max_pattern_len, len(phrase)) * frequent_patterns.insert(phrase) * I_set.add(phrase) # <<<<<<<<<<<<<< @@ -34055,7 +34055,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p */ __pyx_t_16 = PySet_Add(__pyx_v_I_set, __pyx_v_phrase); if (unlikely(__pyx_t_16 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":307 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":307 * frequent_patterns.insert(phrase) * I_set.add(phrase) * pattern_rank[phrase] = rank # <<<<<<<<<<<<<< @@ -34064,7 +34064,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p */ if (unlikely(PyDict_SetItem(__pyx_v_pattern_rank, __pyx_v_phrase, __pyx_v_rank) < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":308 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":308 * I_set.add(phrase) * pattern_rank[phrase] = rank * if rank < self.precompute_secondary_rank: # <<<<<<<<<<<<<< @@ -34079,7 +34079,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_12) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":309 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":309 * pattern_rank[phrase] = rank * if rank < self.precompute_secondary_rank: * super_frequent_patterns.insert(phrase) # <<<<<<<<<<<<<< @@ -34099,7 +34099,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":310 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":310 * if rank < self.precompute_secondary_rank: * super_frequent_patterns.insert(phrase) * J_set.add(phrase) # <<<<<<<<<<<<<< @@ -34115,7 +34115,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":312 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":312 * J_set.add(phrase) * * queue = IntList(increment=1000) # <<<<<<<<<<<<<< @@ -34131,7 +34131,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_v_queue = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":314 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":314 * queue = IntList(increment=1000) * * logger.info(" Computing inverted indexes...") # <<<<<<<<<<<<<< @@ -34148,7 +34148,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":315 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":315 * * logger.info(" Computing inverted indexes...") * N = len(data) # <<<<<<<<<<<<<< @@ -34158,7 +34158,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_data)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_N = __pyx_t_2; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":316 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":316 * logger.info(" Computing inverted indexes...") * N = len(data) * for i from 0 <= i < N: # <<<<<<<<<<<<<< @@ -34168,7 +34168,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_t_14 = __pyx_v_N; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_14; __pyx_v_i++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":317 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":317 * N = len(data) * for i from 0 <= i < N: * sa_word_id = data.arr[i] # <<<<<<<<<<<<<< @@ -34177,7 +34177,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p */ __pyx_v_sa_word_id = (__pyx_v_data->arr[__pyx_v_i]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":318 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":318 * for i from 0 <= i < N: * sa_word_id = data.arr[i] * if sa_word_id == 1: # <<<<<<<<<<<<<< @@ -34187,7 +34187,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_t_12 = ((__pyx_v_sa_word_id == 1) != 0); if (__pyx_t_12) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":319 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":319 * sa_word_id = data.arr[i] * if sa_word_id == 1: * queue._append(-1) # <<<<<<<<<<<<<< @@ -34199,7 +34199,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":321 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":321 * queue._append(-1) * else: * for l from 1 <= l <= max_pattern_len: # <<<<<<<<<<<<<< @@ -34209,7 +34209,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_t_17 = __pyx_v_max_pattern_len; for (__pyx_v_l = 1; __pyx_v_l <= __pyx_t_17; __pyx_v_l++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":322 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":322 * else: * for l from 1 <= l <= max_pattern_len: * node = frequent_patterns._contains(data.arr+i, l) # <<<<<<<<<<<<<< @@ -34218,7 +34218,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p */ __pyx_v_node = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_TrieMap *)__pyx_v_frequent_patterns->__pyx_vtab)->_contains(__pyx_v_frequent_patterns, (__pyx_v_data->arr + __pyx_v_i), __pyx_v_l); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":323 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":323 * for l from 1 <= l <= max_pattern_len: * node = frequent_patterns._contains(data.arr+i, l) * if node == NULL: # <<<<<<<<<<<<<< @@ -34228,7 +34228,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_t_12 = ((__pyx_v_node == NULL) != 0); if (__pyx_t_12) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":324 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":324 * node = frequent_patterns._contains(data.arr+i, l) * if node == NULL: * break # <<<<<<<<<<<<<< @@ -34238,7 +34238,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p goto __pyx_L13_break; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":325 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":325 * if node == NULL: * break * queue._append(i) # <<<<<<<<<<<<<< @@ -34247,7 +34247,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_queue->__pyx_vtab)->_append(__pyx_v_queue, __pyx_v_i); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":326 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":326 * break * queue._append(i) * queue._append(l) # <<<<<<<<<<<<<< @@ -34256,7 +34256,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_queue->__pyx_vtab)->_append(__pyx_v_queue, __pyx_v_l); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":327 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":327 * queue._append(i) * queue._append(l) * trie_node_data_append(node, i) # <<<<<<<<<<<<<< @@ -34272,7 +34272,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_L11:; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":329 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":329 * trie_node_data_append(node, i) * * logger.info(" Computing collocations...") # <<<<<<<<<<<<<< @@ -34289,7 +34289,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":330 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":330 * * logger.info(" Computing collocations...") * N = len(queue) # <<<<<<<<<<<<<< @@ -34299,7 +34299,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_queue)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_N = __pyx_t_2; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":331 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":331 * logger.info(" Computing collocations...") * N = len(queue) * ptr1 = 0 # <<<<<<<<<<<<<< @@ -34308,7 +34308,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p */ __pyx_v_ptr1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":332 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":332 * N = len(queue) * ptr1 = 0 * sent_count = 0 # <<<<<<<<<<<<<< @@ -34317,7 +34317,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p */ __pyx_v_sent_count = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":333 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":333 * ptr1 = 0 * sent_count = 0 * while ptr1 < N: # main loop # <<<<<<<<<<<<<< @@ -34328,7 +34328,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_t_12 = ((__pyx_v_ptr1 < __pyx_v_N) != 0); if (!__pyx_t_12) break; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":334 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":334 * sent_count = 0 * while ptr1 < N: # main loop * i1 = queue.arr[ptr1] # <<<<<<<<<<<<<< @@ -34337,7 +34337,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p */ __pyx_v_i1 = (__pyx_v_queue->arr[__pyx_v_ptr1]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":335 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":335 * while ptr1 < N: # main loop * i1 = queue.arr[ptr1] * if i1 > -1: # <<<<<<<<<<<<<< @@ -34347,7 +34347,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_t_12 = ((__pyx_v_i1 > -1) != 0); if (__pyx_t_12) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":336 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":336 * i1 = queue.arr[ptr1] * if i1 > -1: * l1 = queue.arr[ptr1+1] # <<<<<<<<<<<<<< @@ -34356,7 +34356,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p */ __pyx_v_l1 = (__pyx_v_queue->arr[(__pyx_v_ptr1 + 1)]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":337 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":337 * if i1 > -1: * l1 = queue.arr[ptr1+1] * ptr2 = ptr1 + 2 # <<<<<<<<<<<<<< @@ -34365,7 +34365,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p */ __pyx_v_ptr2 = (__pyx_v_ptr1 + 2); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":338 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":338 * l1 = queue.arr[ptr1+1] * ptr2 = ptr1 + 2 * while ptr2 < N: # <<<<<<<<<<<<<< @@ -34376,7 +34376,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_t_12 = ((__pyx_v_ptr2 < __pyx_v_N) != 0); if (!__pyx_t_12) break; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":339 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":339 * ptr2 = ptr1 + 2 * while ptr2 < N: * i2 = queue.arr[ptr2] # <<<<<<<<<<<<<< @@ -34385,7 +34385,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p */ __pyx_v_i2 = (__pyx_v_queue->arr[__pyx_v_ptr2]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":340 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":340 * while ptr2 < N: * i2 = queue.arr[ptr2] * if i2 == -1 or i2 - i1 >= self.train_max_initial_size: # <<<<<<<<<<<<<< @@ -34401,7 +34401,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p } if (__pyx_t_19) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":341 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":341 * i2 = queue.arr[ptr2] * if i2 == -1 or i2 - i1 >= self.train_max_initial_size: * break # <<<<<<<<<<<<<< @@ -34411,7 +34411,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p goto __pyx_L19_break; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":342 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":342 * if i2 == -1 or i2 - i1 >= self.train_max_initial_size: * break * l2 = queue.arr[ptr2+1] # <<<<<<<<<<<<<< @@ -34420,7 +34420,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p */ __pyx_v_l2 = (__pyx_v_queue->arr[(__pyx_v_ptr2 + 1)]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":343 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":343 * break * l2 = queue.arr[ptr2+1] * if (i2 - i1 - l1 >= self.train_min_gap_size and # <<<<<<<<<<<<<< @@ -34430,7 +34430,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_t_19 = ((((__pyx_v_i2 - __pyx_v_i1) - __pyx_v_l1) >= __pyx_v_self->train_min_gap_size) != 0); if (__pyx_t_19) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":344 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":344 * l2 = queue.arr[ptr2+1] * if (i2 - i1 - l1 >= self.train_min_gap_size and * i2 + l2 - i1 <= self.train_max_initial_size and # <<<<<<<<<<<<<< @@ -34440,7 +34440,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_t_12 = ((((__pyx_v_i2 + __pyx_v_l2) - __pyx_v_i1) <= __pyx_v_self->train_max_initial_size) != 0); if (__pyx_t_12) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":345 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":345 * if (i2 - i1 - l1 >= self.train_min_gap_size and * i2 + l2 - i1 <= self.train_max_initial_size and * l1+l2+1 <= self.max_length): # <<<<<<<<<<<<<< @@ -34458,7 +34458,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p } if (__pyx_t_12) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":346 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":346 * i2 + l2 - i1 <= self.train_max_initial_size and * l1+l2+1 <= self.max_length): * node = collocations._insert(data.arr+i1, l1) # <<<<<<<<<<<<<< @@ -34467,7 +34467,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p */ __pyx_v_node = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_TrieMap *)__pyx_v_collocations->__pyx_vtab)->_insert(__pyx_v_collocations, (__pyx_v_data->arr + __pyx_v_i1), __pyx_v_l1); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":347 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":347 * l1+l2+1 <= self.max_length): * node = collocations._insert(data.arr+i1, l1) * node = trie_insert(node, -1) # <<<<<<<<<<<<<< @@ -34476,7 +34476,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p */ __pyx_v_node = __pyx_f_4cdec_2sa_3_sa_trie_insert(__pyx_v_node, -1); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":348 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":348 * node = collocations._insert(data.arr+i1, l1) * node = trie_insert(node, -1) * for i from i2 <= i < i2+l2: # <<<<<<<<<<<<<< @@ -34486,7 +34486,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_t_14 = (__pyx_v_i2 + __pyx_v_l2); for (__pyx_v_i = __pyx_v_i2; __pyx_v_i < __pyx_t_14; __pyx_v_i++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":349 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":349 * node = trie_insert(node, -1) * for i from i2 <= i < i2+l2: * node = trie_insert(node, data.arr[i]) # <<<<<<<<<<<<<< @@ -34496,7 +34496,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_v_node = __pyx_f_4cdec_2sa_3_sa_trie_insert(__pyx_v_node, (__pyx_v_data->arr[__pyx_v_i])); } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":350 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":350 * for i from i2 <= i < i2+l2: * node = trie_insert(node, data.arr[i]) * trie_node_data_append(node, i1) # <<<<<<<<<<<<<< @@ -34507,7 +34507,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":351 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":351 * node = trie_insert(node, data.arr[i]) * trie_node_data_append(node, i1) * trie_node_data_append(node, i2) # <<<<<<<<<<<<<< @@ -34518,7 +34518,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":352 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":352 * trie_node_data_append(node, i1) * trie_node_data_append(node, i2) * if super_frequent_patterns._contains(data.arr+i2, l2) != NULL: # <<<<<<<<<<<<<< @@ -34528,7 +34528,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_t_12 = ((((struct __pyx_vtabstruct_4cdec_2sa_3_sa_TrieMap *)__pyx_v_super_frequent_patterns->__pyx_vtab)->_contains(__pyx_v_super_frequent_patterns, (__pyx_v_data->arr + __pyx_v_i2), __pyx_v_l2) != NULL) != 0); if (__pyx_t_12) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":353 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":353 * trie_node_data_append(node, i2) * if super_frequent_patterns._contains(data.arr+i2, l2) != NULL: * if super_frequent_patterns._contains(data.arr+i1, l1) != NULL: # <<<<<<<<<<<<<< @@ -34538,7 +34538,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_t_12 = ((((struct __pyx_vtabstruct_4cdec_2sa_3_sa_TrieMap *)__pyx_v_super_frequent_patterns->__pyx_vtab)->_contains(__pyx_v_super_frequent_patterns, (__pyx_v_data->arr + __pyx_v_i1), __pyx_v_l1) != NULL) != 0); if (__pyx_t_12) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":354 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":354 * if super_frequent_patterns._contains(data.arr+i2, l2) != NULL: * if super_frequent_patterns._contains(data.arr+i1, l1) != NULL: * is_super = 1 # <<<<<<<<<<<<<< @@ -34550,7 +34550,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":356 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":356 * is_super = 1 * else: * is_super = 0 # <<<<<<<<<<<<<< @@ -34561,7 +34561,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p } __pyx_L25:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":357 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":357 * else: * is_super = 0 * ptr3 = ptr2 + 2 # <<<<<<<<<<<<<< @@ -34570,7 +34570,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p */ __pyx_v_ptr3 = (__pyx_v_ptr2 + 2); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":358 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":358 * is_super = 0 * ptr3 = ptr2 + 2 * while ptr3 < N: # <<<<<<<<<<<<<< @@ -34581,7 +34581,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_t_12 = ((__pyx_v_ptr3 < __pyx_v_N) != 0); if (!__pyx_t_12) break; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":359 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":359 * ptr3 = ptr2 + 2 * while ptr3 < N: * i3 = queue.arr[ptr3] # <<<<<<<<<<<<<< @@ -34590,7 +34590,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p */ __pyx_v_i3 = (__pyx_v_queue->arr[__pyx_v_ptr3]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":360 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":360 * while ptr3 < N: * i3 = queue.arr[ptr3] * if i3 == -1 or i3 - i1 >= self.train_max_initial_size: # <<<<<<<<<<<<<< @@ -34606,7 +34606,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p } if (__pyx_t_20) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":361 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":361 * i3 = queue.arr[ptr3] * if i3 == -1 or i3 - i1 >= self.train_max_initial_size: * break # <<<<<<<<<<<<<< @@ -34616,7 +34616,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p goto __pyx_L27_break; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":362 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":362 * if i3 == -1 or i3 - i1 >= self.train_max_initial_size: * break * l3 = queue.arr[ptr3+1] # <<<<<<<<<<<<<< @@ -34625,7 +34625,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p */ __pyx_v_l3 = (__pyx_v_queue->arr[(__pyx_v_ptr3 + 1)]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":363 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":363 * break * l3 = queue.arr[ptr3+1] * if (i3 - i2 - l2 >= self.train_min_gap_size and # <<<<<<<<<<<<<< @@ -34635,7 +34635,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_t_20 = ((((__pyx_v_i3 - __pyx_v_i2) - __pyx_v_l2) >= __pyx_v_self->train_min_gap_size) != 0); if (__pyx_t_20) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":364 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":364 * l3 = queue.arr[ptr3+1] * if (i3 - i2 - l2 >= self.train_min_gap_size and * i3 + l3 - i1 <= self.train_max_initial_size and # <<<<<<<<<<<<<< @@ -34645,7 +34645,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_t_12 = ((((__pyx_v_i3 + __pyx_v_l3) - __pyx_v_i1) <= __pyx_v_self->train_max_initial_size) != 0); if (__pyx_t_12) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":365 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":365 * if (i3 - i2 - l2 >= self.train_min_gap_size and * i3 + l3 - i1 <= self.train_max_initial_size and * l1+l2+l3+2 <= self.max_length): # <<<<<<<<<<<<<< @@ -34663,7 +34663,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p } if (__pyx_t_12) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":366 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":366 * i3 + l3 - i1 <= self.train_max_initial_size and * l1+l2+l3+2 <= self.max_length): * if is_super or super_frequent_patterns._contains(data.arr+i3, l3) != NULL: # <<<<<<<<<<<<<< @@ -34678,7 +34678,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p } if (__pyx_t_20) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":367 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":367 * l1+l2+l3+2 <= self.max_length): * if is_super or super_frequent_patterns._contains(data.arr+i3, l3) != NULL: * node = collocations._insert(data.arr+i1, l1) # <<<<<<<<<<<<<< @@ -34687,7 +34687,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p */ __pyx_v_node = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_TrieMap *)__pyx_v_collocations->__pyx_vtab)->_insert(__pyx_v_collocations, (__pyx_v_data->arr + __pyx_v_i1), __pyx_v_l1); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":368 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":368 * if is_super or super_frequent_patterns._contains(data.arr+i3, l3) != NULL: * node = collocations._insert(data.arr+i1, l1) * node = trie_insert(node, -1) # <<<<<<<<<<<<<< @@ -34696,7 +34696,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p */ __pyx_v_node = __pyx_f_4cdec_2sa_3_sa_trie_insert(__pyx_v_node, -1); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":369 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":369 * node = collocations._insert(data.arr+i1, l1) * node = trie_insert(node, -1) * for i from i2 <= i < i2+l2: # <<<<<<<<<<<<<< @@ -34706,7 +34706,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_t_14 = (__pyx_v_i2 + __pyx_v_l2); for (__pyx_v_i = __pyx_v_i2; __pyx_v_i < __pyx_t_14; __pyx_v_i++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":370 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":370 * node = trie_insert(node, -1) * for i from i2 <= i < i2+l2: * node = trie_insert(node, data.arr[i]) # <<<<<<<<<<<<<< @@ -34716,7 +34716,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_v_node = __pyx_f_4cdec_2sa_3_sa_trie_insert(__pyx_v_node, (__pyx_v_data->arr[__pyx_v_i])); } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":371 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":371 * for i from i2 <= i < i2+l2: * node = trie_insert(node, data.arr[i]) * node = trie_insert(node, -1) # <<<<<<<<<<<<<< @@ -34725,7 +34725,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p */ __pyx_v_node = __pyx_f_4cdec_2sa_3_sa_trie_insert(__pyx_v_node, -1); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":372 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":372 * node = trie_insert(node, data.arr[i]) * node = trie_insert(node, -1) * for i from i3 <= i < i3+l3: # <<<<<<<<<<<<<< @@ -34735,7 +34735,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_t_14 = (__pyx_v_i3 + __pyx_v_l3); for (__pyx_v_i = __pyx_v_i3; __pyx_v_i < __pyx_t_14; __pyx_v_i++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":373 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":373 * node = trie_insert(node, -1) * for i from i3 <= i < i3+l3: * node = trie_insert(node, data.arr[i]) # <<<<<<<<<<<<<< @@ -34745,7 +34745,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_v_node = __pyx_f_4cdec_2sa_3_sa_trie_insert(__pyx_v_node, (__pyx_v_data->arr[__pyx_v_i])); } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":374 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":374 * for i from i3 <= i < i3+l3: * node = trie_insert(node, data.arr[i]) * trie_node_data_append(node, i1) # <<<<<<<<<<<<<< @@ -34756,7 +34756,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":375 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":375 * node = trie_insert(node, data.arr[i]) * trie_node_data_append(node, i1) * trie_node_data_append(node, i2) # <<<<<<<<<<<<<< @@ -34767,7 +34767,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":376 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":376 * trie_node_data_append(node, i1) * trie_node_data_append(node, i2) * trie_node_data_append(node, i3) # <<<<<<<<<<<<<< @@ -34784,7 +34784,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p } __pyx_L29:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":377 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":377 * trie_node_data_append(node, i2) * trie_node_data_append(node, i3) * ptr3 = ptr3 + 2 # <<<<<<<<<<<<<< @@ -34801,7 +34801,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p } __pyx_L21:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":378 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":378 * trie_node_data_append(node, i3) * ptr3 = ptr3 + 2 * ptr2 = ptr2 + 2 # <<<<<<<<<<<<<< @@ -34812,7 +34812,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p } __pyx_L19_break:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":379 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":379 * ptr3 = ptr3 + 2 * ptr2 = ptr2 + 2 * ptr1 = ptr1 + 2 # <<<<<<<<<<<<<< @@ -34824,7 +34824,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":381 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":381 * ptr1 = ptr1 + 2 * else: * sent_count = sent_count + 1 # <<<<<<<<<<<<<< @@ -34833,7 +34833,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p */ __pyx_v_sent_count = (__pyx_v_sent_count + 1); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":382 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":382 * else: * sent_count = sent_count + 1 * if sent_count % 10000 == 0: # <<<<<<<<<<<<<< @@ -34843,7 +34843,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_t_20 = ((__Pyx_mod_long(__pyx_v_sent_count, 10000) == 0) != 0); if (__pyx_t_20) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":383 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":383 * sent_count = sent_count + 1 * if sent_count % 10000 == 0: * logger.debug(" %d sentences", sent_count) # <<<<<<<<<<<<<< @@ -34874,7 +34874,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p } __pyx_L35:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":384 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":384 * if sent_count % 10000 == 0: * logger.debug(" %d sentences", sent_count) * ptr1 = ptr1 + 1 # <<<<<<<<<<<<<< @@ -34886,7 +34886,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_L17:; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":386 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":386 * ptr1 = ptr1 + 1 * * self.precomputed_collocations = collocations.toMap(False) # <<<<<<<<<<<<<< @@ -34904,7 +34904,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_v_self->precomputed_collocations = __pyx_t_9; __pyx_t_9 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":387 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":387 * * self.precomputed_collocations = collocations.toMap(False) * self.precomputed_index = frequent_patterns.toMap(True) # <<<<<<<<<<<<<< @@ -34922,7 +34922,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_v_self->precomputed_index = __pyx_t_1; __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":389 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":389 * self.precomputed_index = frequent_patterns.toMap(True) * * x = 0 # <<<<<<<<<<<<<< @@ -34932,7 +34932,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_INCREF(__pyx_int_0); __pyx_v_x = __pyx_int_0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":390 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":390 * * x = 0 * for pattern1 in J_set: # <<<<<<<<<<<<<< @@ -34958,7 +34958,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_XDECREF_SET(__pyx_v_pattern1, __pyx_t_9); __pyx_t_9 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":391 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":391 * x = 0 * for pattern1 in J_set: * for pattern2 in J_set: # <<<<<<<<<<<<<< @@ -34984,7 +34984,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_XDECREF_SET(__pyx_v_pattern2, __pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":392 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":392 * for pattern1 in J_set: * for pattern2 in J_set: * if len(pattern1) + len(pattern2) + 1 < self.max_length: # <<<<<<<<<<<<<< @@ -34996,7 +34996,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_t_20 = ((((__pyx_t_2 + __pyx_t_15) + 1) < __pyx_v_self->max_length) != 0); if (__pyx_t_20) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":393 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":393 * for pattern2 in J_set: * if len(pattern1) + len(pattern2) + 1 < self.max_length: * combined_pattern = pattern1 + (-1,) + pattern2 # <<<<<<<<<<<<<< @@ -35011,7 +35011,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_XDECREF_SET(__pyx_v_combined_pattern, __pyx_t_8); __pyx_t_8 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":394 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":394 * if len(pattern1) + len(pattern2) + 1 < self.max_length: * combined_pattern = pattern1 + (-1,) + pattern2 * J2_set.add(combined_pattern) # <<<<<<<<<<<<<< @@ -35027,7 +35027,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":396 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":396 * J2_set.add(combined_pattern) * * for pattern1 in I_set: # <<<<<<<<<<<<<< @@ -35053,7 +35053,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_XDECREF_SET(__pyx_v_pattern1, __pyx_t_9); __pyx_t_9 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":397 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":397 * * for pattern1 in I_set: * for pattern2 in I_set: # <<<<<<<<<<<<<< @@ -35079,7 +35079,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_XDECREF_SET(__pyx_v_pattern2, __pyx_t_8); __pyx_t_8 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":398 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":398 * for pattern1 in I_set: * for pattern2 in I_set: * x = x+1 # <<<<<<<<<<<<<< @@ -35091,7 +35091,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_DECREF_SET(__pyx_v_x, __pyx_t_8); __pyx_t_8 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":399 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":399 * for pattern2 in I_set: * x = x+1 * if len(pattern1) + len(pattern2) + 1 <= self.max_length: # <<<<<<<<<<<<<< @@ -35103,7 +35103,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_t_20 = ((((__pyx_t_15 + __pyx_t_2) + 1) <= __pyx_v_self->max_length) != 0); if (__pyx_t_20) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":400 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":400 * x = x+1 * if len(pattern1) + len(pattern2) + 1 <= self.max_length: * combined_pattern = pattern1 + (-1,) + pattern2 # <<<<<<<<<<<<<< @@ -35118,7 +35118,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_XDECREF_SET(__pyx_v_combined_pattern, __pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":401 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":401 * if len(pattern1) + len(pattern2) + 1 <= self.max_length: * combined_pattern = pattern1 + (-1,) + pattern2 * IJ_set.add(combined_pattern) # <<<<<<<<<<<<<< @@ -35134,7 +35134,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":403 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":403 * IJ_set.add(combined_pattern) * * for pattern1 in I_set: # <<<<<<<<<<<<<< @@ -35160,7 +35160,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_XDECREF_SET(__pyx_v_pattern1, __pyx_t_9); __pyx_t_9 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":404 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":404 * * for pattern1 in I_set: * for pattern2 in J2_set: # <<<<<<<<<<<<<< @@ -35186,7 +35186,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_XDECREF_SET(__pyx_v_pattern2, __pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":405 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":405 * for pattern1 in I_set: * for pattern2 in J2_set: * x = x+2 # <<<<<<<<<<<<<< @@ -35198,7 +35198,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_DECREF_SET(__pyx_v_x, __pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":406 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":406 * for pattern2 in J2_set: * x = x+2 * if len(pattern1) + len(pattern2) + 1<= self.max_length: # <<<<<<<<<<<<<< @@ -35210,7 +35210,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_t_20 = ((((__pyx_t_2 + __pyx_t_15) + 1) <= __pyx_v_self->max_length) != 0); if (__pyx_t_20) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":407 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":407 * x = x+2 * if len(pattern1) + len(pattern2) + 1<= self.max_length: * combined_pattern = pattern1 + (-1,) + pattern2 # <<<<<<<<<<<<<< @@ -35225,7 +35225,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_XDECREF_SET(__pyx_v_combined_pattern, __pyx_t_8); __pyx_t_8 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":408 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":408 * if len(pattern1) + len(pattern2) + 1<= self.max_length: * combined_pattern = pattern1 + (-1,) + pattern2 * IJ_set.add(combined_pattern) # <<<<<<<<<<<<<< @@ -35234,7 +35234,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p */ __pyx_t_16 = PySet_Add(__pyx_v_IJ_set, __pyx_v_combined_pattern); if (unlikely(__pyx_t_16 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":409 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":409 * combined_pattern = pattern1 + (-1,) + pattern2 * IJ_set.add(combined_pattern) * combined_pattern = pattern2 + (-1,) + pattern1 # <<<<<<<<<<<<<< @@ -35249,7 +35249,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_DECREF_SET(__pyx_v_combined_pattern, __pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":410 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":410 * IJ_set.add(combined_pattern) * combined_pattern = pattern2 + (-1,) + pattern1 * IJ_set.add(combined_pattern) # <<<<<<<<<<<<<< @@ -35265,7 +35265,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":412 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":412 * IJ_set.add(combined_pattern) * * N = len(pattern_rank) # <<<<<<<<<<<<<< @@ -35275,7 +35275,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_t_15 = PyDict_Size(__pyx_v_pattern_rank); if (unlikely(__pyx_t_15 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_N = __pyx_t_15; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":413 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":413 * * N = len(pattern_rank) * cost_by_rank = IntList(initial_len=N) # <<<<<<<<<<<<<< @@ -35294,7 +35294,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_v_cost_by_rank = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_9); __pyx_t_9 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":414 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":414 * N = len(pattern_rank) * cost_by_rank = IntList(initial_len=N) * count_by_rank = IntList(initial_len=N) # <<<<<<<<<<<<<< @@ -35313,7 +35313,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_v_count_by_rank = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":415 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":415 * cost_by_rank = IntList(initial_len=N) * count_by_rank = IntList(initial_len=N) * for pattern, arr in self.precomputed_collocations.iteritems(): # <<<<<<<<<<<<<< @@ -35341,7 +35341,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_XDECREF_SET(__pyx_v_arr, __pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":416 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":416 * count_by_rank = IntList(initial_len=N) * for pattern, arr in self.precomputed_collocations.iteritems(): * if pattern not in IJ_set: # <<<<<<<<<<<<<< @@ -35352,7 +35352,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_t_12 = (__pyx_t_20 != 0); if (__pyx_t_12) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":417 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":417 * for pattern, arr in self.precomputed_collocations.iteritems(): * if pattern not in IJ_set: * s = "" # <<<<<<<<<<<<<< @@ -35362,7 +35362,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_INCREF(__pyx_kp_s__32); __Pyx_XDECREF_SET(__pyx_v_s, __pyx_kp_s__32); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":418 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":418 * if pattern not in IJ_set: * s = "" * for word_id in pattern: # <<<<<<<<<<<<<< @@ -35407,7 +35407,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_XDECREF_SET(__pyx_v_word_id, __pyx_t_9); __pyx_t_9 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":419 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":419 * s = "" * for word_id in pattern: * if word_id == -1: # <<<<<<<<<<<<<< @@ -35419,7 +35419,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (__pyx_t_12) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":420 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":420 * for word_id in pattern: * if word_id == -1: * s = s + "X " # <<<<<<<<<<<<<< @@ -35434,7 +35434,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":422 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":422 * s = s + "X " * else: * s = s + darray.id2word[word_id] + " " # <<<<<<<<<<<<<< @@ -35456,7 +35456,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":423 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":423 * else: * s = s + darray.id2word[word_id] + " " * logger.warn("ERROR: unexpected pattern %s in set of precomputed collocations", s) # <<<<<<<<<<<<<< @@ -35485,7 +35485,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":425 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":425 * logger.warn("ERROR: unexpected pattern %s in set of precomputed collocations", s) * else: * chunk = () # <<<<<<<<<<<<<< @@ -35495,7 +35495,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_INCREF(__pyx_empty_tuple); __Pyx_XDECREF_SET(__pyx_v_chunk, __pyx_empty_tuple); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":426 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":426 * else: * chunk = () * max_rank = 0 # <<<<<<<<<<<<<< @@ -35504,7 +35504,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p */ __pyx_v_max_rank = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":427 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":427 * chunk = () * max_rank = 0 * arity = 0 # <<<<<<<<<<<<<< @@ -35514,7 +35514,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_INCREF(__pyx_int_0); __Pyx_XDECREF_SET(__pyx_v_arity, __pyx_int_0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":428 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":428 * max_rank = 0 * arity = 0 * for word_id in pattern: # <<<<<<<<<<<<<< @@ -35559,7 +35559,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_XDECREF_SET(__pyx_v_word_id, __pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":429 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":429 * arity = 0 * for word_id in pattern: * if word_id == -1: # <<<<<<<<<<<<<< @@ -35571,7 +35571,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_12) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":430 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":430 * for word_id in pattern: * if word_id == -1: * max_rank = max(max_rank, pattern_rank[chunk]) # <<<<<<<<<<<<<< @@ -35601,7 +35601,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_v_max_rank = __pyx_t_17; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":431 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":431 * if word_id == -1: * max_rank = max(max_rank, pattern_rank[chunk]) * arity = arity + 1 # <<<<<<<<<<<<<< @@ -35613,7 +35613,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_DECREF_SET(__pyx_v_arity, __pyx_t_9); __pyx_t_9 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":432 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":432 * max_rank = max(max_rank, pattern_rank[chunk]) * arity = arity + 1 * chunk = () # <<<<<<<<<<<<<< @@ -35626,7 +35626,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":434 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":434 * chunk = () * else: * chunk = chunk + (word_id,) # <<<<<<<<<<<<<< @@ -35648,7 +35648,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":435 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":435 * else: * chunk = chunk + (word_id,) * max_rank = max(max_rank, pattern_rank[chunk]) # <<<<<<<<<<<<<< @@ -35678,7 +35678,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_max_rank = __pyx_t_17; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":436 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":436 * chunk = chunk + (word_id,) * max_rank = max(max_rank, pattern_rank[chunk]) * cost_by_rank.arr[max_rank] = cost_by_rank.arr[max_rank] + (4*len(arr)) # <<<<<<<<<<<<<< @@ -35688,7 +35688,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_t_13 = PyObject_Length(__pyx_v_arr); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} (__pyx_v_cost_by_rank->arr[__pyx_v_max_rank]) = ((__pyx_v_cost_by_rank->arr[__pyx_v_max_rank]) + (4 * __pyx_t_13)); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":437 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":437 * max_rank = max(max_rank, pattern_rank[chunk]) * cost_by_rank.arr[max_rank] = cost_by_rank.arr[max_rank] + (4*len(arr)) * count_by_rank.arr[max_rank] = count_by_rank.arr[max_rank] + (len(arr)/(arity+1)) # <<<<<<<<<<<<<< @@ -35718,7 +35718,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":439 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":439 * count_by_rank.arr[max_rank] = count_by_rank.arr[max_rank] + (len(arr)/(arity+1)) * * cumul_cost = 0 # <<<<<<<<<<<<<< @@ -35728,7 +35728,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_INCREF(__pyx_int_0); __pyx_v_cumul_cost = __pyx_int_0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":440 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":440 * * cumul_cost = 0 * cumul_count = 0 # <<<<<<<<<<<<<< @@ -35738,7 +35738,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_INCREF(__pyx_int_0); __pyx_v_cumul_count = __pyx_int_0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":441 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":441 * cumul_cost = 0 * cumul_count = 0 * for i from 0 <= i < N: # <<<<<<<<<<<<<< @@ -35748,7 +35748,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_t_14 = __pyx_v_N; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_14; __pyx_v_i++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":442 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":442 * cumul_count = 0 * for i from 0 <= i < N: * cumul_cost = cumul_cost + cost_by_rank.arr[i] # <<<<<<<<<<<<<< @@ -35763,7 +35763,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_DECREF_SET(__pyx_v_cumul_cost, __pyx_t_7); __pyx_t_7 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":443 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":443 * for i from 0 <= i < N: * cumul_cost = cumul_cost + cost_by_rank.arr[i] * cumul_count = cumul_count + count_by_rank.arr[i] # <<<<<<<<<<<<<< @@ -35778,7 +35778,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_DECREF_SET(__pyx_v_cumul_count, __pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":444 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":444 * cumul_cost = cumul_cost + cost_by_rank.arr[i] * cumul_count = cumul_count + count_by_rank.arr[i] * logger.debug("RANK %d\tCOUNT, COST: %d %d\tCUMUL: %d, %d", i, count_by_rank.arr[i], cost_by_rank.arr[i], cumul_count, cumul_cost) # <<<<<<<<<<<<<< @@ -35823,7 +35823,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":446 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":446 * logger.debug("RANK %d\tCOUNT, COST: %d %d\tCUMUL: %d, %d", i, count_by_rank.arr[i], cost_by_rank.arr[i], cumul_count, cumul_cost) * * num_found_patterns = len(self.precomputed_collocations) # <<<<<<<<<<<<<< @@ -35836,7 +35836,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_num_found_patterns = __pyx_t_2; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":447 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":447 * * num_found_patterns = len(self.precomputed_collocations) * for pattern in IJ_set: # <<<<<<<<<<<<<< @@ -35862,7 +35862,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_XDECREF_SET(__pyx_v_pattern, __pyx_t_8); __pyx_t_8 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":448 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":448 * num_found_patterns = len(self.precomputed_collocations) * for pattern in IJ_set: * if pattern not in self.precomputed_collocations: # <<<<<<<<<<<<<< @@ -35873,7 +35873,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_t_20 = (__pyx_t_12 != 0); if (__pyx_t_20) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":449 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":449 * for pattern in IJ_set: * if pattern not in self.precomputed_collocations: * self.precomputed_collocations[pattern] = IntList() # <<<<<<<<<<<<<< @@ -35890,7 +35890,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":451 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":451 * self.precomputed_collocations[pattern] = IntList() * * cdef float stop_time = monitor_cpu() # <<<<<<<<<<<<<< @@ -35906,7 +35906,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_stop_time = __pyx_t_4; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":452 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":452 * * cdef float stop_time = monitor_cpu() * logger.info("Precomputed collocations for %d patterns out of %d possible (upper bound %d)", num_found_patterns, len(self.precomputed_collocations), x) # <<<<<<<<<<<<<< @@ -35946,7 +35946,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":453 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":453 * cdef float stop_time = monitor_cpu() * logger.info("Precomputed collocations for %d patterns out of %d possible (upper bound %d)", num_found_patterns, len(self.precomputed_collocations), x) * logger.info("Precomputed inverted index for %d patterns ", len(self.precomputed_index)) # <<<<<<<<<<<<<< @@ -35977,7 +35977,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":454 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":454 * logger.info("Precomputed collocations for %d patterns out of %d possible (upper bound %d)", num_found_patterns, len(self.precomputed_collocations), x) * logger.info("Precomputed inverted index for %d patterns ", len(self.precomputed_index)) * logger.info("Precomputation took %f seconds", (stop_time - start_time)) # <<<<<<<<<<<<<< @@ -36003,7 +36003,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":278 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":278 * * * def precompute(self, stats, SuffixArray sarray): # <<<<<<<<<<<<<< @@ -36058,7 +36058,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":11 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":11 * cdef IntList ha * * def __cinit__(self, from_binary=None, from_text=None, side=None): # <<<<<<<<<<<<<< @@ -36155,7 +36155,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_11SuffixArray___cinit__(struct __pyx_obj_4cde int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":12 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":12 * * def __cinit__(self, from_binary=None, from_text=None, side=None): * self.darray = DataArray() # <<<<<<<<<<<<<< @@ -36170,7 +36170,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_11SuffixArray___cinit__(struct __pyx_obj_4cde __pyx_v_self->darray = ((struct __pyx_obj_4cdec_2sa_3_sa_DataArray *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":13 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":13 * def __cinit__(self, from_binary=None, from_text=None, side=None): * self.darray = DataArray() * self.sa = IntList() # <<<<<<<<<<<<<< @@ -36185,7 +36185,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_11SuffixArray___cinit__(struct __pyx_obj_4cde __pyx_v_self->sa = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":14 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":14 * self.darray = DataArray() * self.sa = IntList() * self.ha = IntList() # <<<<<<<<<<<<<< @@ -36200,7 +36200,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_11SuffixArray___cinit__(struct __pyx_obj_4cde __pyx_v_self->ha = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":15 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":15 * self.sa = IntList() * self.ha = IntList() * if from_binary: # <<<<<<<<<<<<<< @@ -36210,7 +36210,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_11SuffixArray___cinit__(struct __pyx_obj_4cde __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_from_binary); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_2) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":16 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":16 * self.ha = IntList() * if from_binary: * self.read_binary(from_binary) # <<<<<<<<<<<<<< @@ -36232,7 +36232,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_11SuffixArray___cinit__(struct __pyx_obj_4cde goto __pyx_L3; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":17 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":17 * if from_binary: * self.read_binary(from_binary) * elif from_text: # <<<<<<<<<<<<<< @@ -36242,7 +36242,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_11SuffixArray___cinit__(struct __pyx_obj_4cde __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_from_text); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_2) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":18 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":18 * self.read_binary(from_binary) * elif from_text: * self.read_text(from_text, side) # <<<<<<<<<<<<<< @@ -36268,7 +36268,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_11SuffixArray___cinit__(struct __pyx_obj_4cde } __pyx_L3:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":11 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":11 * cdef IntList ha * * def __cinit__(self, from_binary=None, from_text=None, side=None): # <<<<<<<<<<<<<< @@ -36290,7 +36290,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_11SuffixArray___cinit__(struct __pyx_obj_4cde return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":20 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":20 * self.read_text(from_text, side) * * def __getitem__(self, i): # <<<<<<<<<<<<<< @@ -36321,7 +36321,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_2__getitem__(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getitem__", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":21 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":21 * * def __getitem__(self, i): * return self.sa.arr[i] # <<<<<<<<<<<<<< @@ -36336,7 +36336,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_2__getitem__(struct __pyx __pyx_t_2 = 0; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":20 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":20 * self.read_text(from_text, side) * * def __getitem__(self, i): # <<<<<<<<<<<<<< @@ -36355,7 +36355,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_2__getitem__(struct __pyx return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":23 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":23 * return self.sa.arr[i] * * def read_text(self, filename, side): # <<<<<<<<<<<<<< @@ -36458,7 +36458,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o int __pyx_clineno = 0; __Pyx_RefNannySetupContext("read_text", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":29 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":29 * cdef IntList isa, word_count * * self.darray = DataArray(from_text=filename, side=side, use_sent_id=True) # <<<<<<<<<<<<<< @@ -36479,7 +36479,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o __pyx_v_self->darray = ((struct __pyx_obj_4cdec_2sa_3_sa_DataArray *)__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":30 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":30 * * self.darray = DataArray(from_text=filename, side=side, use_sent_id=True) * N = len(self.darray) # <<<<<<<<<<<<<< @@ -36492,7 +36492,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_N = __pyx_t_3; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":31 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":31 * self.darray = DataArray(from_text=filename, side=side, use_sent_id=True) * N = len(self.darray) * V = len(self.darray.id2word) # <<<<<<<<<<<<<< @@ -36505,7 +36505,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_V = __pyx_t_3; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":33 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":33 * V = len(self.darray.id2word) * * self.sa = IntList(initial_len=N) # <<<<<<<<<<<<<< @@ -36527,7 +36527,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o __pyx_v_self->sa = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":34 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":34 * * self.sa = IntList(initial_len=N) * self.ha = IntList(initial_len=V+1) # <<<<<<<<<<<<<< @@ -36549,7 +36549,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o __pyx_v_self->ha = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":36 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":36 * self.ha = IntList(initial_len=V+1) * * isa = IntList(initial_len=N) # <<<<<<<<<<<<<< @@ -36568,7 +36568,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o __pyx_v_isa = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":37 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":37 * * isa = IntList(initial_len=N) * word_count = IntList(initial_len=V+1) # <<<<<<<<<<<<<< @@ -36587,7 +36587,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o __pyx_v_word_count = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":40 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":40 * * '''Step 1: bucket sort data''' * cdef float sort_start_time = monitor_cpu() # <<<<<<<<<<<<<< @@ -36603,7 +36603,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_sort_start_time = __pyx_t_4; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":41 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":41 * '''Step 1: bucket sort data''' * cdef float sort_start_time = monitor_cpu() * cdef float start_time = sort_start_time # <<<<<<<<<<<<<< @@ -36612,7 +36612,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o */ __pyx_v_start_time = __pyx_v_sort_start_time; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":42 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":42 * cdef float sort_start_time = monitor_cpu() * cdef float start_time = sort_start_time * for i from 0 <= i < N: # <<<<<<<<<<<<<< @@ -36622,7 +36622,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o __pyx_t_5 = __pyx_v_N; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_5; __pyx_v_i++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":43 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":43 * cdef float start_time = sort_start_time * for i from 0 <= i < N: * a_i = self.darray.data.arr[i] # <<<<<<<<<<<<<< @@ -36631,7 +36631,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o */ __pyx_v_a_i = (__pyx_v_self->darray->data->arr[__pyx_v_i]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":44 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":44 * for i from 0 <= i < N: * a_i = self.darray.data.arr[i] * word_count.arr[a_i] = word_count.arr[a_i] + 1 # <<<<<<<<<<<<<< @@ -36641,7 +36641,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o (__pyx_v_word_count->arr[__pyx_v_a_i]) = ((__pyx_v_word_count->arr[__pyx_v_a_i]) + 1); } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":46 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":46 * word_count.arr[a_i] = word_count.arr[a_i] + 1 * * n = 0 # <<<<<<<<<<<<<< @@ -36650,7 +36650,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o */ __pyx_v_n = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":47 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":47 * * n = 0 * for i from 0 <= i < V+1: # <<<<<<<<<<<<<< @@ -36660,7 +36660,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o __pyx_t_6 = (__pyx_v_V + 1); for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_6; __pyx_v_i++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":48 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":48 * n = 0 * for i from 0 <= i < V+1: * self.ha.arr[i] = n # <<<<<<<<<<<<<< @@ -36669,7 +36669,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o */ (__pyx_v_self->ha->arr[__pyx_v_i]) = __pyx_v_n; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":49 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":49 * for i from 0 <= i < V+1: * self.ha.arr[i] = n * n = n + word_count.arr[i] # <<<<<<<<<<<<<< @@ -36678,7 +36678,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o */ __pyx_v_n = (__pyx_v_n + (__pyx_v_word_count->arr[__pyx_v_i])); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":50 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":50 * self.ha.arr[i] = n * n = n + word_count.arr[i] * word_count.arr[i] = 0 # <<<<<<<<<<<<<< @@ -36688,7 +36688,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o (__pyx_v_word_count->arr[__pyx_v_i]) = 0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":52 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":52 * word_count.arr[i] = 0 * * for i from 0 <= i < N: # <<<<<<<<<<<<<< @@ -36698,7 +36698,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o __pyx_t_5 = __pyx_v_N; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_5; __pyx_v_i++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":53 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":53 * * for i from 0 <= i < N: * a_i = self.darray.data.arr[i] # <<<<<<<<<<<<<< @@ -36707,7 +36707,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o */ __pyx_v_a_i = (__pyx_v_self->darray->data->arr[__pyx_v_i]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":54 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":54 * for i from 0 <= i < N: * a_i = self.darray.data.arr[i] * self.sa.arr[self.ha.arr[a_i] + word_count.arr[a_i]] = i # <<<<<<<<<<<<<< @@ -36716,7 +36716,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o */ (__pyx_v_self->sa->arr[((__pyx_v_self->ha->arr[__pyx_v_a_i]) + (__pyx_v_word_count->arr[__pyx_v_a_i]))]) = __pyx_v_i; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":55 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":55 * a_i = self.darray.data.arr[i] * self.sa.arr[self.ha.arr[a_i] + word_count.arr[a_i]] = i * isa.arr[i] = self.ha.arr[a_i + 1] - 1 # bucket pointer is last index in bucket # <<<<<<<<<<<<<< @@ -36725,7 +36725,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o */ (__pyx_v_isa->arr[__pyx_v_i]) = ((__pyx_v_self->ha->arr[(__pyx_v_a_i + 1)]) - 1); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":56 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":56 * self.sa.arr[self.ha.arr[a_i] + word_count.arr[a_i]] = i * isa.arr[i] = self.ha.arr[a_i + 1] - 1 # bucket pointer is last index in bucket * word_count.arr[a_i] = word_count.arr[a_i] + 1 # <<<<<<<<<<<<<< @@ -36735,7 +36735,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o (__pyx_v_word_count->arr[__pyx_v_a_i]) = ((__pyx_v_word_count->arr[__pyx_v_a_i]) + 1); } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":59 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":59 * * '''Determine size of initial runs''' * current_run = 0 # <<<<<<<<<<<<<< @@ -36744,7 +36744,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o */ __pyx_v_current_run = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":60 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":60 * '''Determine size of initial runs''' * current_run = 0 * for i from 0 <= i < V+1: # <<<<<<<<<<<<<< @@ -36754,7 +36754,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o __pyx_t_6 = (__pyx_v_V + 1); for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_6; __pyx_v_i++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":61 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":61 * current_run = 0 * for i from 0 <= i < V+1: * if i < V and self.ha.arr[i+1] - self.ha.arr[i] == 1: # <<<<<<<<<<<<<< @@ -36770,7 +36770,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o } if (__pyx_t_9) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":62 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":62 * for i from 0 <= i < V+1: * if i < V and self.ha.arr[i+1] - self.ha.arr[i] == 1: * current_run = current_run + 1 # <<<<<<<<<<<<<< @@ -36782,7 +36782,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":64 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":64 * current_run = current_run + 1 * else: * if current_run > 0: # <<<<<<<<<<<<<< @@ -36792,7 +36792,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o __pyx_t_9 = ((__pyx_v_current_run > 0) != 0); if (__pyx_t_9) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":65 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":65 * else: * if current_run > 0: * self.sa.arr[self.ha.arr[i] - current_run] = -current_run # <<<<<<<<<<<<<< @@ -36801,7 +36801,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o */ (__pyx_v_self->sa->arr[((__pyx_v_self->ha->arr[__pyx_v_i]) - __pyx_v_current_run)]) = (-__pyx_v_current_run); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":66 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":66 * if current_run > 0: * self.sa.arr[self.ha.arr[i] - current_run] = -current_run * current_run = 0 # <<<<<<<<<<<<<< @@ -36816,7 +36816,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o __pyx_L11:; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":68 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":68 * current_run = 0 * * logger.info(" Bucket sort took %f seconds", (monitor_cpu() - sort_start_time)) # <<<<<<<<<<<<<< @@ -36853,7 +36853,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":71 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":71 * * '''Step 2: prefix-doubling sort''' * h = 1 # <<<<<<<<<<<<<< @@ -36862,7 +36862,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o */ __pyx_v_h = 1; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":72 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":72 * '''Step 2: prefix-doubling sort''' * h = 1 * while self.sa.arr[0] != -N: # <<<<<<<<<<<<<< @@ -36873,7 +36873,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o __pyx_t_9 = (((__pyx_v_self->sa->arr[0]) != (-__pyx_v_N)) != 0); if (!__pyx_t_9) break; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":73 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":73 * h = 1 * while self.sa.arr[0] != -N: * sort_start_time = monitor_cpu() # <<<<<<<<<<<<<< @@ -36889,7 +36889,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_sort_start_time = __pyx_t_4; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":74 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":74 * while self.sa.arr[0] != -N: * sort_start_time = monitor_cpu() * logger.debug(" Refining, sort depth = %d", h) # <<<<<<<<<<<<<< @@ -36917,7 +36917,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":75 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":75 * sort_start_time = monitor_cpu() * logger.debug(" Refining, sort depth = %d", h) * i = 0 # <<<<<<<<<<<<<< @@ -36926,7 +36926,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o */ __pyx_v_i = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":76 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":76 * logger.debug(" Refining, sort depth = %d", h) * i = 0 * skip = 0 # <<<<<<<<<<<<<< @@ -36935,7 +36935,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o */ __pyx_v_skip = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":77 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":77 * i = 0 * skip = 0 * while i < N: # <<<<<<<<<<<<<< @@ -36946,7 +36946,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o __pyx_t_9 = ((__pyx_v_i < __pyx_v_N) != 0); if (!__pyx_t_9) break; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":78 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":78 * skip = 0 * while i < N: * if self.sa.arr[i] < 0: # <<<<<<<<<<<<<< @@ -36956,7 +36956,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o __pyx_t_9 = (((__pyx_v_self->sa->arr[__pyx_v_i]) < 0) != 0); if (__pyx_t_9) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":79 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":79 * while i < N: * if self.sa.arr[i] < 0: * skip = skip + self.sa.arr[i] # <<<<<<<<<<<<<< @@ -36965,7 +36965,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o */ __pyx_v_skip = (__pyx_v_skip + (__pyx_v_self->sa->arr[__pyx_v_i])); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":80 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":80 * if self.sa.arr[i] < 0: * skip = skip + self.sa.arr[i] * i = i - self.sa.arr[i] # <<<<<<<<<<<<<< @@ -36977,7 +36977,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":82 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":82 * i = i - self.sa.arr[i] * else: * if skip < 0: # <<<<<<<<<<<<<< @@ -36987,7 +36987,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o __pyx_t_9 = ((__pyx_v_skip < 0) != 0); if (__pyx_t_9) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":83 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":83 * else: * if skip < 0: * self.sa.arr[i+skip] = skip # <<<<<<<<<<<<<< @@ -36996,7 +36996,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o */ (__pyx_v_self->sa->arr[(__pyx_v_i + __pyx_v_skip)]) = __pyx_v_skip; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":84 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":84 * if skip < 0: * self.sa.arr[i+skip] = skip * skip = 0 # <<<<<<<<<<<<<< @@ -37008,7 +37008,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o } __pyx_L18:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":85 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":85 * self.sa.arr[i+skip] = skip * skip = 0 * j = isa.arr[self.sa.arr[i]] # <<<<<<<<<<<<<< @@ -37017,7 +37017,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o */ __pyx_v_j = (__pyx_v_isa->arr[(__pyx_v_self->sa->arr[__pyx_v_i])]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":86 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":86 * skip = 0 * j = isa.arr[self.sa.arr[i]] * self.q3sort(i, j, h, isa) # <<<<<<<<<<<<<< @@ -37052,7 +37052,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":87 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":87 * j = isa.arr[self.sa.arr[i]] * self.q3sort(i, j, h, isa) * i = j+1 # <<<<<<<<<<<<<< @@ -37064,7 +37064,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o __pyx_L17:; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":88 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":88 * self.q3sort(i, j, h, isa) * i = j+1 * if skip < 0: # <<<<<<<<<<<<<< @@ -37074,7 +37074,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o __pyx_t_9 = ((__pyx_v_skip < 0) != 0); if (__pyx_t_9) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":89 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":89 * i = j+1 * if skip < 0: * self.sa.arr[i+skip] = skip # <<<<<<<<<<<<<< @@ -37086,7 +37086,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o } __pyx_L19:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":90 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":90 * if skip < 0: * self.sa.arr[i+skip] = skip * h = h * 2 # <<<<<<<<<<<<<< @@ -37095,7 +37095,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o */ __pyx_v_h = (__pyx_v_h * 2); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":91 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":91 * self.sa.arr[i+skip] = skip * h = h * 2 * logger.debug(" Refinement took %f seconds", (monitor_cpu() - sort_start_time)) # <<<<<<<<<<<<<< @@ -37133,7 +37133,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":94 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":94 * * '''Step 3: read off suffix array from inverse suffix array''' * logger.info(" Finalizing sort...") # <<<<<<<<<<<<<< @@ -37150,7 +37150,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":95 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":95 * '''Step 3: read off suffix array from inverse suffix array''' * logger.info(" Finalizing sort...") * for i from 0 <= i < N: # <<<<<<<<<<<<<< @@ -37160,7 +37160,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o __pyx_t_5 = __pyx_v_N; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_5; __pyx_v_i++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":96 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":96 * logger.info(" Finalizing sort...") * for i from 0 <= i < N: * j = isa.arr[i] # <<<<<<<<<<<<<< @@ -37169,7 +37169,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o */ __pyx_v_j = (__pyx_v_isa->arr[__pyx_v_i]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":97 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":97 * for i from 0 <= i < N: * j = isa.arr[i] * self.sa.arr[j] = i # <<<<<<<<<<<<<< @@ -37179,7 +37179,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o (__pyx_v_self->sa->arr[__pyx_v_j]) = __pyx_v_i; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":98 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":98 * j = isa.arr[i] * self.sa.arr[j] = i * logger.info("Suffix array construction took %f seconds", (monitor_cpu() - start_time)) # <<<<<<<<<<<<<< @@ -37216,7 +37216,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":23 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":23 * return self.sa.arr[i] * * def read_text(self, filename, side): # <<<<<<<<<<<<<< @@ -37243,7 +37243,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":100 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":100 * logger.info("Suffix array construction took %f seconds", (monitor_cpu() - start_time)) * * def q3sort(self, int i, int j, int h, IntList isa, pad=""): # <<<<<<<<<<<<<< @@ -37370,7 +37370,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("q3sort", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":107 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":107 * cdef int k, midpoint, pval, phead, ptail, tmp * * if j-i < -1: # <<<<<<<<<<<<<< @@ -37380,7 +37380,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ __pyx_t_1 = (((__pyx_v_j - __pyx_v_i) < -1) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":108 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":108 * * if j-i < -1: * raise Exception("Unexpected condition found in q3sort: sort from %d to %d" % (i,j)) # <<<<<<<<<<<<<< @@ -37415,7 +37415,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ {__pyx_filename = __pyx_f[12]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":109 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":109 * if j-i < -1: * raise Exception("Unexpected condition found in q3sort: sort from %d to %d" % (i,j)) * if j-i == -1: # recursive base case -- empty interval # <<<<<<<<<<<<<< @@ -37425,7 +37425,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ __pyx_t_1 = (((__pyx_v_j - __pyx_v_i) == -1) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":110 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":110 * raise Exception("Unexpected condition found in q3sort: sort from %d to %d" % (i,j)) * if j-i == -1: # recursive base case -- empty interval * return # <<<<<<<<<<<<<< @@ -37437,7 +37437,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":111 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":111 * if j-i == -1: # recursive base case -- empty interval * return * if (j-i == 0): # recursive base case -- singleton interval # <<<<<<<<<<<<<< @@ -37447,7 +37447,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ __pyx_t_1 = (((__pyx_v_j - __pyx_v_i) == 0) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":112 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":112 * return * if (j-i == 0): # recursive base case -- singleton interval * isa.arr[self.sa.arr[i]] = i # <<<<<<<<<<<<<< @@ -37456,7 +37456,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ */ (__pyx_v_isa->arr[(__pyx_v_self->sa->arr[__pyx_v_i])]) = __pyx_v_i; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":113 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":113 * if (j-i == 0): # recursive base case -- singleton interval * isa.arr[self.sa.arr[i]] = i * self.sa.arr[i] = -1 # <<<<<<<<<<<<<< @@ -37465,7 +37465,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ */ (__pyx_v_self->sa->arr[__pyx_v_i]) = -1; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":114 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":114 * isa.arr[self.sa.arr[i]] = i * self.sa.arr[i] = -1 * return # <<<<<<<<<<<<<< @@ -37477,7 +37477,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":123 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":123 * # If the method of assigning word_id's is changed, this method * # may need to be reconsidered as well. * midpoint = (i+j)/2 # <<<<<<<<<<<<<< @@ -37486,7 +37486,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ */ __pyx_v_midpoint = __Pyx_div_long((__pyx_v_i + __pyx_v_j), 2); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":124 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":124 * # may need to be reconsidered as well. * midpoint = (i+j)/2 * pval = isa.arr[self.sa.arr[midpoint] + h] # <<<<<<<<<<<<<< @@ -37495,7 +37495,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ */ __pyx_v_pval = (__pyx_v_isa->arr[((__pyx_v_self->sa->arr[__pyx_v_midpoint]) + __pyx_v_h)]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":125 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":125 * midpoint = (i+j)/2 * pval = isa.arr[self.sa.arr[midpoint] + h] * if i != midpoint: # <<<<<<<<<<<<<< @@ -37505,7 +37505,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ __pyx_t_1 = ((__pyx_v_i != __pyx_v_midpoint) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":126 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":126 * pval = isa.arr[self.sa.arr[midpoint] + h] * if i != midpoint: * tmp = self.sa.arr[midpoint] # <<<<<<<<<<<<<< @@ -37514,7 +37514,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ */ __pyx_v_tmp = (__pyx_v_self->sa->arr[__pyx_v_midpoint]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":127 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":127 * if i != midpoint: * tmp = self.sa.arr[midpoint] * self.sa.arr[midpoint] = self.sa.arr[i] # <<<<<<<<<<<<<< @@ -37523,7 +37523,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ */ (__pyx_v_self->sa->arr[__pyx_v_midpoint]) = (__pyx_v_self->sa->arr[__pyx_v_i]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":128 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":128 * tmp = self.sa.arr[midpoint] * self.sa.arr[midpoint] = self.sa.arr[i] * self.sa.arr[i] = tmp # <<<<<<<<<<<<<< @@ -37535,7 +37535,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ } __pyx_L6:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":129 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":129 * self.sa.arr[midpoint] = self.sa.arr[i] * self.sa.arr[i] = tmp * phead = i # <<<<<<<<<<<<<< @@ -37544,7 +37544,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ */ __pyx_v_phead = __pyx_v_i; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":130 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":130 * self.sa.arr[i] = tmp * phead = i * ptail = i # <<<<<<<<<<<<<< @@ -37553,7 +37553,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ */ __pyx_v_ptail = __pyx_v_i; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":134 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":134 * # find the three partitions. phead marks the first element * # of the middle partition, and ptail marks the last element * for k from i+1 <= k < j+1: # <<<<<<<<<<<<<< @@ -37563,7 +37563,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ __pyx_t_5 = (__pyx_v_j + 1); for (__pyx_v_k = (__pyx_v_i + 1); __pyx_v_k < __pyx_t_5; __pyx_v_k++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":135 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":135 * # of the middle partition, and ptail marks the last element * for k from i+1 <= k < j+1: * if isa.arr[self.sa.arr[k] + h] < pval: # <<<<<<<<<<<<<< @@ -37573,7 +37573,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ __pyx_t_1 = (((__pyx_v_isa->arr[((__pyx_v_self->sa->arr[__pyx_v_k]) + __pyx_v_h)]) < __pyx_v_pval) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":136 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":136 * for k from i+1 <= k < j+1: * if isa.arr[self.sa.arr[k] + h] < pval: * if k > ptail+1: # <<<<<<<<<<<<<< @@ -37583,7 +37583,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ __pyx_t_1 = ((__pyx_v_k > (__pyx_v_ptail + 1)) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":137 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":137 * if isa.arr[self.sa.arr[k] + h] < pval: * if k > ptail+1: * tmp = self.sa.arr[phead] # <<<<<<<<<<<<<< @@ -37592,7 +37592,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ */ __pyx_v_tmp = (__pyx_v_self->sa->arr[__pyx_v_phead]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":138 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":138 * if k > ptail+1: * tmp = self.sa.arr[phead] * self.sa.arr[phead] = self.sa.arr[k] # <<<<<<<<<<<<<< @@ -37601,7 +37601,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ */ (__pyx_v_self->sa->arr[__pyx_v_phead]) = (__pyx_v_self->sa->arr[__pyx_v_k]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":139 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":139 * tmp = self.sa.arr[phead] * self.sa.arr[phead] = self.sa.arr[k] * self.sa.arr[k] = self.sa.arr[ptail+1] # <<<<<<<<<<<<<< @@ -37610,7 +37610,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ */ (__pyx_v_self->sa->arr[__pyx_v_k]) = (__pyx_v_self->sa->arr[(__pyx_v_ptail + 1)]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":140 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":140 * self.sa.arr[phead] = self.sa.arr[k] * self.sa.arr[k] = self.sa.arr[ptail+1] * self.sa.arr[ptail+1] = tmp # <<<<<<<<<<<<<< @@ -37622,7 +37622,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":142 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":142 * self.sa.arr[ptail+1] = tmp * else: # k == ptail+1 * tmp = self.sa.arr[phead] # <<<<<<<<<<<<<< @@ -37631,7 +37631,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ */ __pyx_v_tmp = (__pyx_v_self->sa->arr[__pyx_v_phead]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":143 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":143 * else: # k == ptail+1 * tmp = self.sa.arr[phead] * self.sa.arr[phead] = self.sa.arr[k] # <<<<<<<<<<<<<< @@ -37640,7 +37640,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ */ (__pyx_v_self->sa->arr[__pyx_v_phead]) = (__pyx_v_self->sa->arr[__pyx_v_k]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":144 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":144 * tmp = self.sa.arr[phead] * self.sa.arr[phead] = self.sa.arr[k] * self.sa.arr[k] = tmp # <<<<<<<<<<<<<< @@ -37651,7 +37651,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ } __pyx_L10:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":145 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":145 * self.sa.arr[phead] = self.sa.arr[k] * self.sa.arr[k] = tmp * phead = phead + 1 # <<<<<<<<<<<<<< @@ -37660,7 +37660,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ */ __pyx_v_phead = (__pyx_v_phead + 1); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":146 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":146 * self.sa.arr[k] = tmp * phead = phead + 1 * ptail = ptail + 1 # <<<<<<<<<<<<<< @@ -37672,7 +37672,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":148 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":148 * ptail = ptail + 1 * else: * if isa.arr[self.sa.arr[k] + h] == pval: # <<<<<<<<<<<<<< @@ -37682,7 +37682,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ __pyx_t_1 = (((__pyx_v_isa->arr[((__pyx_v_self->sa->arr[__pyx_v_k]) + __pyx_v_h)]) == __pyx_v_pval) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":149 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":149 * else: * if isa.arr[self.sa.arr[k] + h] == pval: * if k > ptail+1: # <<<<<<<<<<<<<< @@ -37692,7 +37692,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ __pyx_t_1 = ((__pyx_v_k > (__pyx_v_ptail + 1)) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":150 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":150 * if isa.arr[self.sa.arr[k] + h] == pval: * if k > ptail+1: * tmp = self.sa.arr[ptail+1] # <<<<<<<<<<<<<< @@ -37701,7 +37701,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ */ __pyx_v_tmp = (__pyx_v_self->sa->arr[(__pyx_v_ptail + 1)]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":151 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":151 * if k > ptail+1: * tmp = self.sa.arr[ptail+1] * self.sa.arr[ptail+1] = self.sa.arr[k] # <<<<<<<<<<<<<< @@ -37710,7 +37710,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ */ (__pyx_v_self->sa->arr[(__pyx_v_ptail + 1)]) = (__pyx_v_self->sa->arr[__pyx_v_k]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":152 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":152 * tmp = self.sa.arr[ptail+1] * self.sa.arr[ptail+1] = self.sa.arr[k] * self.sa.arr[k] = tmp # <<<<<<<<<<<<<< @@ -37722,7 +37722,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ } __pyx_L12:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":153 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":153 * self.sa.arr[ptail+1] = self.sa.arr[k] * self.sa.arr[k] = tmp * ptail = ptail + 1 # <<<<<<<<<<<<<< @@ -37737,7 +37737,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ __pyx_L9:; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":156 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":156 * * # recursively sort smaller suffixes * self.q3sort(i, phead-1, h, isa, pad+" ") # <<<<<<<<<<<<<< @@ -37777,7 +37777,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":160 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":160 * # update suffixes with pivot value * # corresponds to update_group function in Larsson & Sadakane * for k from phead <= k < ptail+1: # <<<<<<<<<<<<<< @@ -37787,7 +37787,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ __pyx_t_5 = (__pyx_v_ptail + 1); for (__pyx_v_k = __pyx_v_phead; __pyx_v_k < __pyx_t_5; __pyx_v_k++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":161 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":161 * # corresponds to update_group function in Larsson & Sadakane * for k from phead <= k < ptail+1: * isa.arr[self.sa.arr[k]] = ptail # <<<<<<<<<<<<<< @@ -37797,7 +37797,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ (__pyx_v_isa->arr[(__pyx_v_self->sa->arr[__pyx_v_k])]) = __pyx_v_ptail; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":162 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":162 * for k from phead <= k < ptail+1: * isa.arr[self.sa.arr[k]] = ptail * if phead == ptail: # <<<<<<<<<<<<<< @@ -37807,7 +37807,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ __pyx_t_1 = ((__pyx_v_phead == __pyx_v_ptail) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":163 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":163 * isa.arr[self.sa.arr[k]] = ptail * if phead == ptail: * self.sa.arr[phead] = -1 # <<<<<<<<<<<<<< @@ -37819,7 +37819,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ } __pyx_L15:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":166 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":166 * * # recursively sort larger suffixes * self.q3sort(ptail+1, j, h, isa, pad+" ") # <<<<<<<<<<<<<< @@ -37859,7 +37859,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":100 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":100 * logger.info("Suffix array construction took %f seconds", (monitor_cpu() - start_time)) * * def q3sort(self, int i, int j, int h, IntList isa, pad=""): # <<<<<<<<<<<<<< @@ -37885,7 +37885,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":169 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":169 * * * def write_text(self, char* filename): # <<<<<<<<<<<<<< @@ -37930,7 +37930,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_8write_text(struct __pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("write_text", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":170 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":170 * * def write_text(self, char* filename): * self.darray.write_text(filename) # <<<<<<<<<<<<<< @@ -37952,7 +37952,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_8write_text(struct __pyx_ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":169 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":169 * * * def write_text(self, char* filename): # <<<<<<<<<<<<<< @@ -37975,7 +37975,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_8write_text(struct __pyx_ return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":172 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":172 * self.darray.write_text(filename) * * def read_binary(self, char* filename): # <<<<<<<<<<<<<< @@ -38015,7 +38015,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_10read_binary(struct __py __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("read_binary", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":174 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":174 * def read_binary(self, char* filename): * cdef FILE *f * f = fopen(filename, "r") # <<<<<<<<<<<<<< @@ -38024,7 +38024,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_10read_binary(struct __py */ __pyx_v_f = fopen(__pyx_v_filename, __pyx_k_r); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":175 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":175 * cdef FILE *f * f = fopen(filename, "r") * self.darray.read_handle(f) # <<<<<<<<<<<<<< @@ -38033,7 +38033,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_10read_binary(struct __py */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_DataArray *)__pyx_v_self->darray->__pyx_vtab)->read_handle(__pyx_v_self->darray, __pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":176 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":176 * f = fopen(filename, "r") * self.darray.read_handle(f) * self.sa.read_handle(f) # <<<<<<<<<<<<<< @@ -38042,7 +38042,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_10read_binary(struct __py */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->sa->__pyx_vtab)->read_handle(__pyx_v_self->sa, __pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":177 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":177 * self.darray.read_handle(f) * self.sa.read_handle(f) * self.ha.read_handle(f) # <<<<<<<<<<<<<< @@ -38051,7 +38051,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_10read_binary(struct __py */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->ha->__pyx_vtab)->read_handle(__pyx_v_self->ha, __pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":178 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":178 * self.sa.read_handle(f) * self.ha.read_handle(f) * fclose(f) # <<<<<<<<<<<<<< @@ -38060,7 +38060,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_10read_binary(struct __py */ fclose(__pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":172 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":172 * self.darray.write_text(filename) * * def read_binary(self, char* filename): # <<<<<<<<<<<<<< @@ -38075,7 +38075,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_10read_binary(struct __py return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":180 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":180 * fclose(f) * * def write_binary(self, char* filename): # <<<<<<<<<<<<<< @@ -38115,7 +38115,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_12write_binary(struct __p __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("write_binary", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":182 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":182 * def write_binary(self, char* filename): * cdef FILE* f * f = fopen(filename, "w") # <<<<<<<<<<<<<< @@ -38124,7 +38124,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_12write_binary(struct __p */ __pyx_v_f = fopen(__pyx_v_filename, __pyx_k_w); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":183 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":183 * cdef FILE* f * f = fopen(filename, "w") * self.darray.write_handle(f) # <<<<<<<<<<<<<< @@ -38133,7 +38133,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_12write_binary(struct __p */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_DataArray *)__pyx_v_self->darray->__pyx_vtab)->write_handle(__pyx_v_self->darray, __pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":184 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":184 * f = fopen(filename, "w") * self.darray.write_handle(f) * self.sa.write_handle(f) # <<<<<<<<<<<<<< @@ -38142,7 +38142,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_12write_binary(struct __p */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->sa->__pyx_vtab)->write_handle(__pyx_v_self->sa, __pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":185 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":185 * self.darray.write_handle(f) * self.sa.write_handle(f) * self.ha.write_handle(f) # <<<<<<<<<<<<<< @@ -38151,7 +38151,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_12write_binary(struct __p */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->ha->__pyx_vtab)->write_handle(__pyx_v_self->ha, __pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":186 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":186 * self.sa.write_handle(f) * self.ha.write_handle(f) * fclose(f) # <<<<<<<<<<<<<< @@ -38160,7 +38160,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_12write_binary(struct __p */ fclose(__pyx_v_f); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":180 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":180 * fclose(f) * * def write_binary(self, char* filename): # <<<<<<<<<<<<<< @@ -38175,7 +38175,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_12write_binary(struct __p return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":188 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":188 * fclose(f) * * def write_enhanced(self, char* filename): # <<<<<<<<<<<<<< @@ -38233,7 +38233,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_14write_enhanced(struct _ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("write_enhanced", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":189 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":189 * * def write_enhanced(self, char* filename): * with open(filename, "w") as f: # <<<<<<<<<<<<<< @@ -38273,7 +38273,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_14write_enhanced(struct _ __pyx_v_f = __pyx_t_4; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":190 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":190 * def write_enhanced(self, char* filename): * with open(filename, "w") as f: * self.darray.write_enhanced_handle(f) # <<<<<<<<<<<<<< @@ -38293,7 +38293,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_14write_enhanced(struct _ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":191 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":191 * with open(filename, "w") as f: * self.darray.write_enhanced_handle(f) * for a_i in self.sa: # <<<<<<<<<<<<<< @@ -38338,7 +38338,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_14write_enhanced(struct _ __Pyx_XDECREF_SET(__pyx_v_a_i, __pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":192 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":192 * self.darray.write_enhanced_handle(f) * for a_i in self.sa: * f.write("%d " % a_i) # <<<<<<<<<<<<<< @@ -38362,7 +38362,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_14write_enhanced(struct _ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":193 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":193 * for a_i in self.sa: * f.write("%d " % a_i) * f.write("\n") # <<<<<<<<<<<<<< @@ -38376,7 +38376,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_14write_enhanced(struct _ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":194 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":194 * f.write("%d " % a_i) * f.write("\n") * for w_i in self.ha: # <<<<<<<<<<<<<< @@ -38421,7 +38421,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_14write_enhanced(struct _ __Pyx_XDECREF_SET(__pyx_v_w_i, __pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":195 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":195 * f.write("\n") * for w_i in self.ha: * f.write("%d " % w_i) # <<<<<<<<<<<<<< @@ -38445,7 +38445,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_14write_enhanced(struct _ } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":196 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":196 * for w_i in self.ha: * f.write("%d " % w_i) * f.write("\n") # <<<<<<<<<<<<<< @@ -38469,7 +38469,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_14write_enhanced(struct _ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":189 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":189 * * def write_enhanced(self, char* filename): * with open(filename, "w") as f: # <<<<<<<<<<<<<< @@ -38540,7 +38540,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_14write_enhanced(struct _ __pyx_L23:; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":188 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":188 * fclose(f) * * def write_enhanced(self, char* filename): # <<<<<<<<<<<<<< @@ -38567,7 +38567,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_14write_enhanced(struct _ return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":198 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":198 * f.write("\n") * * cdef int __search_high(self, int word_id, int offset, int low, int high): # <<<<<<<<<<<<<< @@ -38582,7 +38582,7 @@ static int __pyx_f_4cdec_2sa_3_sa_11SuffixArray___search_high(struct __pyx_obj_4 int __pyx_t_1; __Pyx_RefNannySetupContext("__search_high", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":201 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":201 * cdef int midpoint * * if low >= high: # <<<<<<<<<<<<<< @@ -38592,7 +38592,7 @@ static int __pyx_f_4cdec_2sa_3_sa_11SuffixArray___search_high(struct __pyx_obj_4 __pyx_t_1 = ((__pyx_v_low >= __pyx_v_high) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":202 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":202 * * if low >= high: * return high # <<<<<<<<<<<<<< @@ -38603,7 +38603,7 @@ static int __pyx_f_4cdec_2sa_3_sa_11SuffixArray___search_high(struct __pyx_obj_4 goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":203 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":203 * if low >= high: * return high * midpoint = (high + low) / 2 # <<<<<<<<<<<<<< @@ -38612,7 +38612,7 @@ static int __pyx_f_4cdec_2sa_3_sa_11SuffixArray___search_high(struct __pyx_obj_4 */ __pyx_v_midpoint = __Pyx_div_long((__pyx_v_high + __pyx_v_low), 2); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":204 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":204 * return high * midpoint = (high + low) / 2 * if self.darray.data.arr[self.sa.arr[midpoint] + offset] == word_id: # <<<<<<<<<<<<<< @@ -38622,7 +38622,7 @@ static int __pyx_f_4cdec_2sa_3_sa_11SuffixArray___search_high(struct __pyx_obj_4 __pyx_t_1 = (((__pyx_v_self->darray->data->arr[((__pyx_v_self->sa->arr[__pyx_v_midpoint]) + __pyx_v_offset)]) == __pyx_v_word_id) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":205 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":205 * midpoint = (high + low) / 2 * if self.darray.data.arr[self.sa.arr[midpoint] + offset] == word_id: * return self.__search_high(word_id, offset, midpoint+1, high) # <<<<<<<<<<<<<< @@ -38634,7 +38634,7 @@ static int __pyx_f_4cdec_2sa_3_sa_11SuffixArray___search_high(struct __pyx_obj_4 } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":207 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":207 * return self.__search_high(word_id, offset, midpoint+1, high) * else: * return self.__search_high(word_id, offset, low, midpoint) # <<<<<<<<<<<<<< @@ -38645,7 +38645,7 @@ static int __pyx_f_4cdec_2sa_3_sa_11SuffixArray___search_high(struct __pyx_obj_4 goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":198 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":198 * f.write("\n") * * cdef int __search_high(self, int word_id, int offset, int low, int high): # <<<<<<<<<<<<<< @@ -38659,7 +38659,7 @@ static int __pyx_f_4cdec_2sa_3_sa_11SuffixArray___search_high(struct __pyx_obj_4 return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":209 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":209 * return self.__search_high(word_id, offset, low, midpoint) * * cdef int __search_low(self, int word_id, int offset, int low, int high): # <<<<<<<<<<<<<< @@ -38674,7 +38674,7 @@ static int __pyx_f_4cdec_2sa_3_sa_11SuffixArray___search_low(struct __pyx_obj_4c int __pyx_t_1; __Pyx_RefNannySetupContext("__search_low", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":212 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":212 * cdef int midpoint * * if low >= high: # <<<<<<<<<<<<<< @@ -38684,7 +38684,7 @@ static int __pyx_f_4cdec_2sa_3_sa_11SuffixArray___search_low(struct __pyx_obj_4c __pyx_t_1 = ((__pyx_v_low >= __pyx_v_high) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":213 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":213 * * if low >= high: * return high # <<<<<<<<<<<<<< @@ -38695,7 +38695,7 @@ static int __pyx_f_4cdec_2sa_3_sa_11SuffixArray___search_low(struct __pyx_obj_4c goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":214 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":214 * if low >= high: * return high * midpoint = (high + low) / 2 # <<<<<<<<<<<<<< @@ -38704,7 +38704,7 @@ static int __pyx_f_4cdec_2sa_3_sa_11SuffixArray___search_low(struct __pyx_obj_4c */ __pyx_v_midpoint = __Pyx_div_long((__pyx_v_high + __pyx_v_low), 2); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":215 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":215 * return high * midpoint = (high + low) / 2 * if self.darray.data.arr[self.sa.arr[midpoint] + offset] == word_id: # <<<<<<<<<<<<<< @@ -38714,7 +38714,7 @@ static int __pyx_f_4cdec_2sa_3_sa_11SuffixArray___search_low(struct __pyx_obj_4c __pyx_t_1 = (((__pyx_v_self->darray->data->arr[((__pyx_v_self->sa->arr[__pyx_v_midpoint]) + __pyx_v_offset)]) == __pyx_v_word_id) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":216 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":216 * midpoint = (high + low) / 2 * if self.darray.data.arr[self.sa.arr[midpoint] + offset] == word_id: * return self.__search_low(word_id, offset, low, midpoint) # <<<<<<<<<<<<<< @@ -38726,7 +38726,7 @@ static int __pyx_f_4cdec_2sa_3_sa_11SuffixArray___search_low(struct __pyx_obj_4c } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":218 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":218 * return self.__search_low(word_id, offset, low, midpoint) * else: * return self.__search_low(word_id, offset, midpoint+1, high) # <<<<<<<<<<<<<< @@ -38737,7 +38737,7 @@ static int __pyx_f_4cdec_2sa_3_sa_11SuffixArray___search_low(struct __pyx_obj_4c goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":209 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":209 * return self.__search_high(word_id, offset, low, midpoint) * * cdef int __search_low(self, int word_id, int offset, int low, int high): # <<<<<<<<<<<<<< @@ -38751,7 +38751,7 @@ static int __pyx_f_4cdec_2sa_3_sa_11SuffixArray___search_low(struct __pyx_obj_4c return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":220 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":220 * return self.__search_low(word_id, offset, midpoint+1, high) * * cdef __get_range(self, int word_id, int offset, int low, int high, int midpoint): # <<<<<<<<<<<<<< @@ -38770,7 +38770,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_11SuffixArray___get_range(struct __pyx_o int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get_range", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":221 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":221 * * cdef __get_range(self, int word_id, int offset, int low, int high, int midpoint): * return (self.__search_low(word_id, offset, low, midpoint), # <<<<<<<<<<<<<< @@ -38781,7 +38781,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_11SuffixArray___get_range(struct __pyx_o __pyx_t_1 = __Pyx_PyInt_From_int(((struct __pyx_vtabstruct_4cdec_2sa_3_sa_SuffixArray *)__pyx_v_self->__pyx_vtab)->__pyx___search_low(__pyx_v_self, __pyx_v_word_id, __pyx_v_offset, __pyx_v_low, __pyx_v_midpoint)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":222 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":222 * cdef __get_range(self, int word_id, int offset, int low, int high, int midpoint): * return (self.__search_low(word_id, offset, low, midpoint), * self.__search_high(word_id, offset, midpoint, high)) # <<<<<<<<<<<<<< @@ -38791,7 +38791,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_11SuffixArray___get_range(struct __pyx_o __pyx_t_2 = __Pyx_PyInt_From_int(((struct __pyx_vtabstruct_4cdec_2sa_3_sa_SuffixArray *)__pyx_v_self->__pyx_vtab)->__pyx___search_high(__pyx_v_self, __pyx_v_word_id, __pyx_v_offset, __pyx_v_midpoint, __pyx_v_high)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":221 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":221 * * cdef __get_range(self, int word_id, int offset, int low, int high, int midpoint): * return (self.__search_low(word_id, offset, low, midpoint), # <<<<<<<<<<<<<< @@ -38810,7 +38810,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_11SuffixArray___get_range(struct __pyx_o __pyx_t_3 = 0; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":220 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":220 * return self.__search_low(word_id, offset, midpoint+1, high) * * cdef __get_range(self, int word_id, int offset, int low, int high, int midpoint): # <<<<<<<<<<<<<< @@ -38831,7 +38831,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_11SuffixArray___get_range(struct __pyx_o return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":224 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":224 * self.__search_high(word_id, offset, midpoint, high)) * * cdef __lookup_helper(self, int word_id, int offset, int low, int high): # <<<<<<<<<<<<<< @@ -38852,7 +38852,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_11SuffixArray___lookup_helper(struct __p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__lookup_helper", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":227 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":227 * cdef int midpoint * * if offset == 0: # <<<<<<<<<<<<<< @@ -38862,7 +38862,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_11SuffixArray___lookup_helper(struct __p __pyx_t_1 = ((__pyx_v_offset == 0) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":228 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":228 * * if offset == 0: * return (self.ha.arr[word_id], self.ha.arr[word_id+1]) # <<<<<<<<<<<<<< @@ -38887,7 +38887,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_11SuffixArray___lookup_helper(struct __p goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":229 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":229 * if offset == 0: * return (self.ha.arr[word_id], self.ha.arr[word_id+1]) * if low >= high: # <<<<<<<<<<<<<< @@ -38897,7 +38897,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_11SuffixArray___lookup_helper(struct __p __pyx_t_1 = ((__pyx_v_low >= __pyx_v_high) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":230 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":230 * return (self.ha.arr[word_id], self.ha.arr[word_id+1]) * if low >= high: * return None # <<<<<<<<<<<<<< @@ -38910,7 +38910,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_11SuffixArray___lookup_helper(struct __p goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":232 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":232 * return None * * midpoint = (high + low) / 2 # <<<<<<<<<<<<<< @@ -38919,7 +38919,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_11SuffixArray___lookup_helper(struct __p */ __pyx_v_midpoint = __Pyx_div_long((__pyx_v_high + __pyx_v_low), 2); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":233 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":233 * * midpoint = (high + low) / 2 * if self.darray.data.arr[self.sa.arr[midpoint] + offset] == word_id: # <<<<<<<<<<<<<< @@ -38929,7 +38929,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_11SuffixArray___lookup_helper(struct __p __pyx_t_1 = (((__pyx_v_self->darray->data->arr[((__pyx_v_self->sa->arr[__pyx_v_midpoint]) + __pyx_v_offset)]) == __pyx_v_word_id) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":234 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":234 * midpoint = (high + low) / 2 * if self.darray.data.arr[self.sa.arr[midpoint] + offset] == word_id: * return self.__get_range(word_id, offset, low, high, midpoint) # <<<<<<<<<<<<<< @@ -38944,7 +38944,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_11SuffixArray___lookup_helper(struct __p goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":235 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":235 * if self.darray.data.arr[self.sa.arr[midpoint] + offset] == word_id: * return self.__get_range(word_id, offset, low, high, midpoint) * if self.darray.data.arr[self.sa.arr[midpoint] + offset] > word_id: # <<<<<<<<<<<<<< @@ -38954,7 +38954,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_11SuffixArray___lookup_helper(struct __p __pyx_t_1 = (((__pyx_v_self->darray->data->arr[((__pyx_v_self->sa->arr[__pyx_v_midpoint]) + __pyx_v_offset)]) > __pyx_v_word_id) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":236 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":236 * return self.__get_range(word_id, offset, low, high, midpoint) * if self.darray.data.arr[self.sa.arr[midpoint] + offset] > word_id: * return self.__lookup_helper(word_id, offset, low, midpoint) # <<<<<<<<<<<<<< @@ -38970,7 +38970,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_11SuffixArray___lookup_helper(struct __p } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":238 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":238 * return self.__lookup_helper(word_id, offset, low, midpoint) * else: * return self.__lookup_helper(word_id, offset, midpoint+1, high) # <<<<<<<<<<<<<< @@ -38985,7 +38985,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_11SuffixArray___lookup_helper(struct __p goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":224 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":224 * self.__search_high(word_id, offset, midpoint, high)) * * cdef __lookup_helper(self, int word_id, int offset, int low, int high): # <<<<<<<<<<<<<< @@ -39006,7 +39006,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_11SuffixArray___lookup_helper(struct __p return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":240 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":240 * return self.__lookup_helper(word_id, offset, midpoint+1, high) * * def lookup(self, word, int offset, int low, int high): # <<<<<<<<<<<<<< @@ -39107,7 +39107,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_16lookup(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("lookup", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":242 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":242 * def lookup(self, word, int offset, int low, int high): * cdef int wordid * if low == -1: # <<<<<<<<<<<<<< @@ -39117,7 +39117,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_16lookup(struct __pyx_obj __pyx_t_1 = ((__pyx_v_low == -1) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":243 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":243 * cdef int wordid * if low == -1: * low = 0 # <<<<<<<<<<<<<< @@ -39129,7 +39129,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_16lookup(struct __pyx_obj } __pyx_L3:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":244 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":244 * if low == -1: * low = 0 * if high == -1: # <<<<<<<<<<<<<< @@ -39139,7 +39139,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_16lookup(struct __pyx_obj __pyx_t_1 = ((__pyx_v_high == -1) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":245 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":245 * low = 0 * if high == -1: * high = len(self.sa) # <<<<<<<<<<<<<< @@ -39155,7 +39155,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_16lookup(struct __pyx_obj } __pyx_L4:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":246 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":246 * if high == -1: * high = len(self.sa) * if word in self.darray.word2id: # <<<<<<<<<<<<<< @@ -39166,7 +39166,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_16lookup(struct __pyx_obj __pyx_t_4 = (__pyx_t_1 != 0); if (__pyx_t_4) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":247 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":247 * high = len(self.sa) * if word in self.darray.word2id: * word_id = self.darray.word2id[word] # <<<<<<<<<<<<<< @@ -39178,7 +39178,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_16lookup(struct __pyx_obj __pyx_v_word_id = __pyx_t_2; __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":248 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":248 * if word in self.darray.word2id: * word_id = self.darray.word2id[word] * return self.__lookup_helper(word_id, offset, low, high) # <<<<<<<<<<<<<< @@ -39195,7 +39195,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_16lookup(struct __pyx_obj } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":250 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":250 * return self.__lookup_helper(word_id, offset, low, high) * else: * return None # <<<<<<<<<<<<<< @@ -39206,7 +39206,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_16lookup(struct __pyx_obj goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":240 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":240 * return self.__lookup_helper(word_id, offset, midpoint+1, high) * * def lookup(self, word, int offset, int low, int high): # <<<<<<<<<<<<<< @@ -39226,7 +39226,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_16lookup(struct __pyx_obj return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":43 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":43 * cdef public phrases_al * * def __cinit__(self): # <<<<<<<<<<<<<< @@ -39250,7 +39250,7 @@ static int __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_1__cinit__(PyObject *__pyx_v_se return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":50 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":50 * self.phrases_f = defaultdict(int) * self.phrases_e = defaultdict(int) * self.phrases_fe = defaultdict(lambda: defaultdict(int)) # <<<<<<<<<<<<<< @@ -39311,7 +39311,7 @@ static PyObject *__pyx_lambda_funcdef_lambda1(CYTHON_UNUSED PyObject *__pyx_self return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":51 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":51 * self.phrases_e = defaultdict(int) * self.phrases_fe = defaultdict(lambda: defaultdict(int)) * self.phrases_al = defaultdict(lambda: defaultdict(tuple)) # <<<<<<<<<<<<<< @@ -39372,7 +39372,7 @@ static PyObject *__pyx_lambda_funcdef_lambda2(CYTHON_UNUSED PyObject *__pyx_self return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":43 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":43 * cdef public phrases_al * * def __cinit__(self): # <<<<<<<<<<<<<< @@ -39391,7 +39391,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_11OnlineStats___cinit__(struct __pyx_obj_4cde int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":45 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":45 * def __cinit__(self): * # Keep track of everything that can be sampled: * self.samples_f = defaultdict(int) # <<<<<<<<<<<<<< @@ -39415,7 +39415,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_11OnlineStats___cinit__(struct __pyx_obj_4cde __pyx_v_self->samples_f = __pyx_t_3; __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":48 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":48 * * # Phrase counts * self.phrases_f = defaultdict(int) # <<<<<<<<<<<<<< @@ -39439,7 +39439,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_11OnlineStats___cinit__(struct __pyx_obj_4cde __pyx_v_self->phrases_f = __pyx_t_1; __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":49 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":49 * # Phrase counts * self.phrases_f = defaultdict(int) * self.phrases_e = defaultdict(int) # <<<<<<<<<<<<<< @@ -39463,7 +39463,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_11OnlineStats___cinit__(struct __pyx_obj_4cde __pyx_v_self->phrases_e = __pyx_t_3; __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":50 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":50 * self.phrases_f = defaultdict(int) * self.phrases_e = defaultdict(int) * self.phrases_fe = defaultdict(lambda: defaultdict(int)) # <<<<<<<<<<<<<< @@ -39489,7 +39489,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_11OnlineStats___cinit__(struct __pyx_obj_4cde __pyx_v_self->phrases_fe = __pyx_t_2; __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":51 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":51 * self.phrases_e = defaultdict(int) * self.phrases_fe = defaultdict(lambda: defaultdict(int)) * self.phrases_al = defaultdict(lambda: defaultdict(tuple)) # <<<<<<<<<<<<<< @@ -39515,7 +39515,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_11OnlineStats___cinit__(struct __pyx_obj_4cde __pyx_v_self->phrases_al = __pyx_t_1; __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":43 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":43 * cdef public phrases_al * * def __cinit__(self): # <<<<<<<<<<<<<< @@ -39537,7 +39537,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_11OnlineStats___cinit__(struct __pyx_obj_4cde return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":37 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":37 * * cdef class OnlineStats: * cdef public samples_f # <<<<<<<<<<<<<< @@ -39632,7 +39632,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_9samples_f_4__del__(struct __py return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":38 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":38 * cdef class OnlineStats: * cdef public samples_f * cdef public phrases_f # <<<<<<<<<<<<<< @@ -39727,7 +39727,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_9phrases_f_4__del__(struct __py return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":39 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":39 * cdef public samples_f * cdef public phrases_f * cdef public phrases_e # <<<<<<<<<<<<<< @@ -39822,7 +39822,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_9phrases_e_4__del__(struct __py return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":40 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":40 * cdef public phrases_f * cdef public phrases_e * cdef public phrases_fe # <<<<<<<<<<<<<< @@ -39917,7 +39917,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_10phrases_fe_4__del__(struct __ return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":41 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":41 * cdef public phrases_e * cdef public phrases_fe * cdef public phrases_al # <<<<<<<<<<<<<< @@ -40012,7 +40012,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_10phrases_al_4__del__(struct __ return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":63 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":63 * cdef public children * * def __cinit__(self): # <<<<<<<<<<<<<< @@ -40045,7 +40045,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_8TrieNode___cinit__(struct __pyx_obj_4cdec_2s int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":64 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":64 * * def __cinit__(self): * self.children = {} # <<<<<<<<<<<<<< @@ -40060,7 +40060,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_8TrieNode___cinit__(struct __pyx_obj_4cdec_2s __pyx_v_self->children = __pyx_t_1; __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":63 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":63 * cdef public children * * def __cinit__(self): # <<<<<<<<<<<<<< @@ -40080,7 +40080,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_8TrieNode___cinit__(struct __pyx_obj_4cdec_2s return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":61 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":61 * * cdef class TrieNode: * cdef public children # <<<<<<<<<<<<<< @@ -40175,7 +40175,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_8TrieNode_8children_4__del__(struct __pyx_obj return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":71 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":71 * cdef public suffix_link * * def __cinit__(self, phrase=None, phrase_location=None, suffix_link=None): # <<<<<<<<<<<<<< @@ -40265,7 +40265,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_16ExtendedTrieNode___cinit__(struct __pyx_obj __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":72 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":72 * * def __cinit__(self, phrase=None, phrase_location=None, suffix_link=None): * self.phrase = phrase # <<<<<<<<<<<<<< @@ -40278,7 +40278,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_16ExtendedTrieNode___cinit__(struct __pyx_obj __Pyx_DECREF(__pyx_v_self->phrase); __pyx_v_self->phrase = __pyx_v_phrase; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":73 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":73 * def __cinit__(self, phrase=None, phrase_location=None, suffix_link=None): * self.phrase = phrase * self.phrase_location = phrase_location # <<<<<<<<<<<<<< @@ -40291,7 +40291,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_16ExtendedTrieNode___cinit__(struct __pyx_obj __Pyx_DECREF(__pyx_v_self->phrase_location); __pyx_v_self->phrase_location = __pyx_v_phrase_location; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":74 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":74 * self.phrase = phrase * self.phrase_location = phrase_location * self.suffix_link = suffix_link # <<<<<<<<<<<<<< @@ -40304,7 +40304,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_16ExtendedTrieNode___cinit__(struct __pyx_obj __Pyx_DECREF(__pyx_v_self->suffix_link); __pyx_v_self->suffix_link = __pyx_v_suffix_link; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":71 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":71 * cdef public suffix_link * * def __cinit__(self, phrase=None, phrase_location=None, suffix_link=None): # <<<<<<<<<<<<<< @@ -40318,7 +40318,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_16ExtendedTrieNode___cinit__(struct __pyx_obj return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":67 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":67 * * cdef class ExtendedTrieNode(TrieNode): * cdef public phrase # <<<<<<<<<<<<<< @@ -40413,7 +40413,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_16ExtendedTrieNode_6phrase_4__del__(struct __ return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":68 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":68 * cdef class ExtendedTrieNode(TrieNode): * cdef public phrase * cdef public phrase_location # <<<<<<<<<<<<<< @@ -40508,7 +40508,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_16ExtendedTrieNode_15phrase_location_4__del__ return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":69 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":69 * cdef public phrase * cdef public phrase_location * cdef public suffix_link # <<<<<<<<<<<<<< @@ -40603,7 +40603,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_16ExtendedTrieNode_11suffix_link_4__del__(str return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":81 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":81 * cdef public int count * cdef public root * def __cinit__(self, extended=False): # <<<<<<<<<<<<<< @@ -40679,7 +40679,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9TrieTable___cinit__(struct __pyx_obj_4cdec_2 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":82 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":82 * cdef public root * def __cinit__(self, extended=False): * self.count = 0 # <<<<<<<<<<<<<< @@ -40688,7 +40688,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9TrieTable___cinit__(struct __pyx_obj_4cdec_2 */ __pyx_v_self->count = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":83 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":83 * def __cinit__(self, extended=False): * self.count = 0 * self.extended = extended # <<<<<<<<<<<<<< @@ -40698,7 +40698,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9TrieTable___cinit__(struct __pyx_obj_4cdec_2 __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_extended); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->extended = __pyx_t_1; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":84 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":84 * self.count = 0 * self.extended = extended * if extended: # <<<<<<<<<<<<<< @@ -40708,7 +40708,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9TrieTable___cinit__(struct __pyx_obj_4cdec_2 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_extended); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_2) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":85 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":85 * self.extended = extended * if extended: * self.root = ExtendedTrieNode() # <<<<<<<<<<<<<< @@ -40726,7 +40726,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9TrieTable___cinit__(struct __pyx_obj_4cdec_2 } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":87 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":87 * self.root = ExtendedTrieNode() * else: * self.root = TrieNode() # <<<<<<<<<<<<<< @@ -40743,7 +40743,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9TrieTable___cinit__(struct __pyx_obj_4cdec_2 } __pyx_L3:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":81 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":81 * cdef public int count * cdef public root * def __cinit__(self, extended=False): # <<<<<<<<<<<<<< @@ -40763,7 +40763,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9TrieTable___cinit__(struct __pyx_obj_4cdec_2 return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":78 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":78 * * cdef class TrieTable: * cdef public int extended # <<<<<<<<<<<<<< @@ -40845,7 +40845,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9TrieTable_8extended_2__set__(struct __pyx_ob return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":79 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":79 * cdef class TrieTable: * cdef public int extended * cdef public int count # <<<<<<<<<<<<<< @@ -40927,7 +40927,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9TrieTable_5count_2__set__(struct __pyx_obj_4 return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":80 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":80 * cdef public int extended * cdef public int count * cdef public root # <<<<<<<<<<<<<< @@ -41022,7 +41022,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9TrieTable_4root_4__del__(struct __pyx_obj_4c return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":107 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":107 * * # returns true if sent_id is contained * cdef int contains(self, int sent_id): # <<<<<<<<<<<<<< @@ -41035,7 +41035,7 @@ static int __pyx_f_4cdec_2sa_3_sa_14PhraseLocation_contains(CYTHON_UNUSED struct __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("contains", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":108 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":108 * # returns true if sent_id is contained * cdef int contains(self, int sent_id): * return 1 # <<<<<<<<<<<<<< @@ -41045,7 +41045,7 @@ static int __pyx_f_4cdec_2sa_3_sa_14PhraseLocation_contains(CYTHON_UNUSED struct __pyx_r = 1; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":107 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":107 * * # returns true if sent_id is contained * cdef int contains(self, int sent_id): # <<<<<<<<<<<<<< @@ -41059,7 +41059,7 @@ static int __pyx_f_4cdec_2sa_3_sa_14PhraseLocation_contains(CYTHON_UNUSED struct return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":110 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":110 * return 1 * * def __cinit__(self, int sa_low=-1, int sa_high=-1, int arr_low=-1, int arr_high=-1, # <<<<<<<<<<<<<< @@ -41086,7 +41086,7 @@ static int __pyx_pw_4cdec_2sa_3_sa_14PhraseLocation_1__cinit__(PyObject *__pyx_v static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sa_low,&__pyx_n_s_sa_high,&__pyx_n_s_arr_low,&__pyx_n_s_arr_high,&__pyx_n_s_arr,&__pyx_n_s_num_subpatterns,0}; PyObject* values[6] = {0,0,0,0,0,0}; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":111 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":111 * * def __cinit__(self, int sa_low=-1, int sa_high=-1, int arr_low=-1, int arr_high=-1, * arr=None, int num_subpatterns=1): # <<<<<<<<<<<<<< @@ -41192,7 +41192,7 @@ static int __pyx_pw_4cdec_2sa_3_sa_14PhraseLocation_1__cinit__(PyObject *__pyx_v __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4cdec_2sa_3_sa_14PhraseLocation___cinit__(((struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *)__pyx_v_self), __pyx_v_sa_low, __pyx_v_sa_high, __pyx_v_arr_low, __pyx_v_arr_high, __pyx_v_arr, __pyx_v_num_subpatterns); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":110 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":110 * return 1 * * def __cinit__(self, int sa_low=-1, int sa_high=-1, int arr_low=-1, int arr_high=-1, # <<<<<<<<<<<<<< @@ -41214,7 +41214,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_14PhraseLocation___cinit__(struct __pyx_obj_4 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":112 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":112 * def __cinit__(self, int sa_low=-1, int sa_high=-1, int arr_low=-1, int arr_high=-1, * arr=None, int num_subpatterns=1): * self.sa_low = sa_low # <<<<<<<<<<<<<< @@ -41223,7 +41223,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_14PhraseLocation___cinit__(struct __pyx_obj_4 */ __pyx_v_self->sa_low = __pyx_v_sa_low; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":113 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":113 * arr=None, int num_subpatterns=1): * self.sa_low = sa_low * self.sa_high = sa_high # <<<<<<<<<<<<<< @@ -41232,7 +41232,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_14PhraseLocation___cinit__(struct __pyx_obj_4 */ __pyx_v_self->sa_high = __pyx_v_sa_high; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":114 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":114 * self.sa_low = sa_low * self.sa_high = sa_high * self.arr_low = arr_low # <<<<<<<<<<<<<< @@ -41241,7 +41241,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_14PhraseLocation___cinit__(struct __pyx_obj_4 */ __pyx_v_self->arr_low = __pyx_v_arr_low; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":115 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":115 * self.sa_high = sa_high * self.arr_low = arr_low * self.arr_high = arr_high # <<<<<<<<<<<<<< @@ -41250,7 +41250,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_14PhraseLocation___cinit__(struct __pyx_obj_4 */ __pyx_v_self->arr_high = __pyx_v_arr_high; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":116 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":116 * self.arr_low = arr_low * self.arr_high = arr_high * self.arr = arr # <<<<<<<<<<<<<< @@ -41266,7 +41266,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_14PhraseLocation___cinit__(struct __pyx_obj_4 __pyx_v_self->arr = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":117 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":117 * self.arr_high = arr_high * self.arr = arr * self.num_subpatterns = num_subpatterns # <<<<<<<<<<<<<< @@ -41275,7 +41275,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_14PhraseLocation___cinit__(struct __pyx_obj_4 */ __pyx_v_self->num_subpatterns = __pyx_v_num_subpatterns; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":110 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":110 * return 1 * * def __cinit__(self, int sa_low=-1, int sa_high=-1, int arr_low=-1, int arr_high=-1, # <<<<<<<<<<<<<< @@ -41295,7 +41295,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_14PhraseLocation___cinit__(struct __pyx_obj_4 return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":127 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":127 * cdef IntList sa * * def __cinit__(self, int sample_size, SuffixArray fsarray): # <<<<<<<<<<<<<< @@ -41381,7 +41381,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_7Sampler___cinit__(struct __pyx_obj_4cdec_2sa int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":128 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":128 * * def __cinit__(self, int sample_size, SuffixArray fsarray): * self.sample_size = sample_size # <<<<<<<<<<<<<< @@ -41390,7 +41390,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_7Sampler___cinit__(struct __pyx_obj_4cdec_2sa */ __pyx_v_self->sample_size = __pyx_v_sample_size; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":129 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":129 * def __cinit__(self, int sample_size, SuffixArray fsarray): * self.sample_size = sample_size * self.sa = fsarray.sa # <<<<<<<<<<<<<< @@ -41405,7 +41405,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_7Sampler___cinit__(struct __pyx_obj_4cdec_2sa __pyx_v_self->sa = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":130 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":130 * self.sample_size = sample_size * self.sa = fsarray.sa * if sample_size > 0: # <<<<<<<<<<<<<< @@ -41415,7 +41415,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_7Sampler___cinit__(struct __pyx_obj_4cdec_2sa __pyx_t_2 = ((__pyx_v_sample_size > 0) != 0); if (__pyx_t_2) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":131 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":131 * self.sa = fsarray.sa * if sample_size > 0: * logger.info("Sampling strategy: uniform, max sample size = %d", sample_size) # <<<<<<<<<<<<<< @@ -41446,7 +41446,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_7Sampler___cinit__(struct __pyx_obj_4cdec_2sa } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":133 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":133 * logger.info("Sampling strategy: uniform, max sample size = %d", sample_size) * else: * logger.info("Sampling strategy: no sampling") # <<<<<<<<<<<<<< @@ -41465,7 +41465,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_7Sampler___cinit__(struct __pyx_obj_4cdec_2sa } __pyx_L3:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":127 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":127 * cdef IntList sa * * def __cinit__(self, int sample_size, SuffixArray fsarray): # <<<<<<<<<<<<<< @@ -41487,7 +41487,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_7Sampler___cinit__(struct __pyx_obj_4cdec_2sa return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":135 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":135 * logger.info("Sampling strategy: no sampling") * * def sample(self, PhraseLocation phrase_location): # <<<<<<<<<<<<<< @@ -41536,7 +41536,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7Sampler_2sample(struct __pyx_obj_4cdec int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sample", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":148 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":148 * cdef int num_locations, val, j * * sample = IntList() # <<<<<<<<<<<<<< @@ -41548,7 +41548,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7Sampler_2sample(struct __pyx_obj_4cdec __pyx_v_sample = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":149 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":149 * * sample = IntList() * if phrase_location.arr is None: # <<<<<<<<<<<<<< @@ -41559,7 +41559,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7Sampler_2sample(struct __pyx_obj_4cdec __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":150 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":150 * sample = IntList() * if phrase_location.arr is None: * num_locations = phrase_location.sa_high - phrase_location.sa_low # <<<<<<<<<<<<<< @@ -41568,7 +41568,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7Sampler_2sample(struct __pyx_obj_4cdec */ __pyx_v_num_locations = (__pyx_v_phrase_location->sa_high - __pyx_v_phrase_location->sa_low); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":151 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":151 * if phrase_location.arr is None: * num_locations = phrase_location.sa_high - phrase_location.sa_low * if self.sample_size == -1 or num_locations <= self.sample_size: # <<<<<<<<<<<<<< @@ -41584,7 +41584,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7Sampler_2sample(struct __pyx_obj_4cdec } if (__pyx_t_4) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":152 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":152 * num_locations = phrase_location.sa_high - phrase_location.sa_low * if self.sample_size == -1 or num_locations <= self.sample_size: * sample._extend_arr(self.sa.arr + phrase_location.sa_low, num_locations) # <<<<<<<<<<<<<< @@ -41596,7 +41596,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7Sampler_2sample(struct __pyx_obj_4cdec } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":154 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":154 * sample._extend_arr(self.sa.arr + phrase_location.sa_low, num_locations) * else: * stepsize = float(num_locations)/float(self.sample_size) # <<<<<<<<<<<<<< @@ -41615,7 +41615,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7Sampler_2sample(struct __pyx_obj_4cdec } __pyx_v_stepsize = (((double)__pyx_v_num_locations) / ((double)__pyx_v_self->sample_size)); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":155 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":155 * else: * stepsize = float(num_locations)/float(self.sample_size) * i = phrase_location.sa_low # <<<<<<<<<<<<<< @@ -41625,7 +41625,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7Sampler_2sample(struct __pyx_obj_4cdec __pyx_t_5 = __pyx_v_phrase_location->sa_low; __pyx_v_i = __pyx_t_5; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":156 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":156 * stepsize = float(num_locations)/float(self.sample_size) * i = phrase_location.sa_low * while i < phrase_location.sa_high and sample.len < self.sample_size: # <<<<<<<<<<<<<< @@ -41642,7 +41642,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7Sampler_2sample(struct __pyx_obj_4cdec } if (!__pyx_t_2) break; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":159 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":159 * '''Note: int(i) not guaranteed to have the desired * effect, according to the python documentation''' * if fmod(i,1.0) > 0.5: # <<<<<<<<<<<<<< @@ -41652,7 +41652,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7Sampler_2sample(struct __pyx_obj_4cdec __pyx_t_2 = ((fmod(__pyx_v_i, 1.0) > 0.5) != 0); if (__pyx_t_2) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":160 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":160 * effect, according to the python documentation''' * if fmod(i,1.0) > 0.5: * val = int(ceil(i)) # <<<<<<<<<<<<<< @@ -41664,7 +41664,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7Sampler_2sample(struct __pyx_obj_4cdec } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":162 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":162 * val = int(ceil(i)) * else: * val = int(floor(i)) # <<<<<<<<<<<<<< @@ -41675,7 +41675,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7Sampler_2sample(struct __pyx_obj_4cdec } __pyx_L7:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":163 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":163 * else: * val = int(floor(i)) * sample._append(self.sa.arr[val]) # <<<<<<<<<<<<<< @@ -41684,7 +41684,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7Sampler_2sample(struct __pyx_obj_4cdec */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_sample->__pyx_vtab)->_append(__pyx_v_sample, (__pyx_v_self->sa->arr[__pyx_v_val])); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":164 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":164 * val = int(floor(i)) * sample._append(self.sa.arr[val]) * i = i + stepsize # <<<<<<<<<<<<<< @@ -41699,7 +41699,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7Sampler_2sample(struct __pyx_obj_4cdec } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":166 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":166 * i = i + stepsize * else: * num_locations = (phrase_location.arr_high - phrase_location.arr_low) / phrase_location.num_subpatterns # <<<<<<<<<<<<<< @@ -41729,7 +41729,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7Sampler_2sample(struct __pyx_obj_4cdec } __pyx_v_num_locations = __Pyx_div_int(__pyx_t_5, __pyx_v_phrase_location->num_subpatterns); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":167 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":167 * else: * num_locations = (phrase_location.arr_high - phrase_location.arr_low) / phrase_location.num_subpatterns * if self.sample_size == -1 or num_locations <= self.sample_size: # <<<<<<<<<<<<<< @@ -41745,7 +41745,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7Sampler_2sample(struct __pyx_obj_4cdec } if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":168 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":168 * num_locations = (phrase_location.arr_high - phrase_location.arr_low) / phrase_location.num_subpatterns * if self.sample_size == -1 or num_locations <= self.sample_size: * sample = phrase_location.arr # <<<<<<<<<<<<<< @@ -41760,7 +41760,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7Sampler_2sample(struct __pyx_obj_4cdec } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":170 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":170 * sample = phrase_location.arr * else: * stepsize = float(num_locations)/float(self.sample_size) # <<<<<<<<<<<<<< @@ -41779,7 +41779,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7Sampler_2sample(struct __pyx_obj_4cdec } __pyx_v_stepsize = (((double)__pyx_v_num_locations) / ((double)__pyx_v_self->sample_size)); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":171 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":171 * else: * stepsize = float(num_locations)/float(self.sample_size) * i = phrase_location.arr_low # <<<<<<<<<<<<<< @@ -41789,7 +41789,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7Sampler_2sample(struct __pyx_obj_4cdec __pyx_t_5 = __pyx_v_phrase_location->arr_low; __pyx_v_i = __pyx_t_5; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":172 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":172 * stepsize = float(num_locations)/float(self.sample_size) * i = phrase_location.arr_low * while i < num_locations and sample.len < self.sample_size * phrase_location.num_subpatterns: # <<<<<<<<<<<<<< @@ -41806,7 +41806,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7Sampler_2sample(struct __pyx_obj_4cdec } if (!__pyx_t_4) break; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":175 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":175 * '''Note: int(i) not guaranteed to have the desired * effect, according to the python documentation''' * if fmod(i,1.0) > 0.5: # <<<<<<<<<<<<<< @@ -41816,7 +41816,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7Sampler_2sample(struct __pyx_obj_4cdec __pyx_t_4 = ((fmod(__pyx_v_i, 1.0) > 0.5) != 0); if (__pyx_t_4) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":176 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":176 * effect, according to the python documentation''' * if fmod(i,1.0) > 0.5: * val = int(ceil(i)) # <<<<<<<<<<<<<< @@ -41828,7 +41828,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7Sampler_2sample(struct __pyx_obj_4cdec } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":178 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":178 * val = int(ceil(i)) * else: * val = int(floor(i)) # <<<<<<<<<<<<<< @@ -41839,7 +41839,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7Sampler_2sample(struct __pyx_obj_4cdec } __pyx_L11:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":179 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":179 * else: * val = int(floor(i)) * j = phrase_location.arr_low + (val*phrase_location.num_subpatterns) # <<<<<<<<<<<<<< @@ -41848,7 +41848,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7Sampler_2sample(struct __pyx_obj_4cdec */ __pyx_v_j = (__pyx_v_phrase_location->arr_low + (__pyx_v_val * __pyx_v_phrase_location->num_subpatterns)); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":180 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":180 * val = int(floor(i)) * j = phrase_location.arr_low + (val*phrase_location.num_subpatterns) * sample._extend_arr(phrase_location.arr.arr + j, phrase_location.num_subpatterns) # <<<<<<<<<<<<<< @@ -41857,7 +41857,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7Sampler_2sample(struct __pyx_obj_4cdec */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_sample->__pyx_vtab)->_extend_arr(__pyx_v_sample, (__pyx_v_phrase_location->arr->arr + __pyx_v_j), __pyx_v_phrase_location->num_subpatterns); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":181 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":181 * j = phrase_location.arr_low + (val*phrase_location.num_subpatterns) * sample._extend_arr(phrase_location.arr.arr + j, phrase_location.num_subpatterns) * i = i + stepsize # <<<<<<<<<<<<<< @@ -41871,7 +41871,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7Sampler_2sample(struct __pyx_obj_4cdec } __pyx_L3:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":182 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":182 * sample._extend_arr(phrase_location.arr.arr + j, phrase_location.num_subpatterns) * i = i + stepsize * return sample # <<<<<<<<<<<<<< @@ -41883,7 +41883,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7Sampler_2sample(struct __pyx_obj_4cdec __pyx_r = ((PyObject *)__pyx_v_sample); goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":135 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":135 * logger.info("Sampling strategy: no sampling") * * def sample(self, PhraseLocation phrase_location): # <<<<<<<<<<<<<< @@ -41903,7 +41903,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7Sampler_2sample(struct __pyx_obj_4cdec return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":194 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":194 * * * cdef void assign_matching(Matching* m, int* arr, int start, int step, int* sent_id_arr): # <<<<<<<<<<<<<< @@ -41915,7 +41915,7 @@ static void __pyx_f_4cdec_2sa_3_sa_assign_matching(struct __pyx_t_4cdec_2sa_3_sa __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("assign_matching", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":195 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":195 * * cdef void assign_matching(Matching* m, int* arr, int start, int step, int* sent_id_arr): * m.arr = arr # <<<<<<<<<<<<<< @@ -41924,7 +41924,7 @@ static void __pyx_f_4cdec_2sa_3_sa_assign_matching(struct __pyx_t_4cdec_2sa_3_sa */ __pyx_v_m->arr = __pyx_v_arr; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":196 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":196 * cdef void assign_matching(Matching* m, int* arr, int start, int step, int* sent_id_arr): * m.arr = arr * m.start = start # <<<<<<<<<<<<<< @@ -41933,7 +41933,7 @@ static void __pyx_f_4cdec_2sa_3_sa_assign_matching(struct __pyx_t_4cdec_2sa_3_sa */ __pyx_v_m->start = __pyx_v_start; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":197 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":197 * m.arr = arr * m.start = start * m.end = start + step # <<<<<<<<<<<<<< @@ -41942,7 +41942,7 @@ static void __pyx_f_4cdec_2sa_3_sa_assign_matching(struct __pyx_t_4cdec_2sa_3_sa */ __pyx_v_m->end = (__pyx_v_start + __pyx_v_step); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":198 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":198 * m.start = start * m.end = start + step * m.sent_id = sent_id_arr[arr[start]] # <<<<<<<<<<<<<< @@ -41951,7 +41951,7 @@ static void __pyx_f_4cdec_2sa_3_sa_assign_matching(struct __pyx_t_4cdec_2sa_3_sa */ __pyx_v_m->sent_id = (__pyx_v_sent_id_arr[(__pyx_v_arr[__pyx_v_start])]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":199 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":199 * m.end = start + step * m.sent_id = sent_id_arr[arr[start]] * m.size = step # <<<<<<<<<<<<<< @@ -41960,7 +41960,7 @@ static void __pyx_f_4cdec_2sa_3_sa_assign_matching(struct __pyx_t_4cdec_2sa_3_sa */ __pyx_v_m->size = __pyx_v_step; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":194 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":194 * * * cdef void assign_matching(Matching* m, int* arr, int start, int step, int* sent_id_arr): # <<<<<<<<<<<<<< @@ -41972,7 +41972,7 @@ static void __pyx_f_4cdec_2sa_3_sa_assign_matching(struct __pyx_t_4cdec_2sa_3_sa __Pyx_RefNannyFinishContext(); } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":202 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":202 * * * cdef int* append_combined_matching(int* arr, Matching* loc1, Matching* loc2, # <<<<<<<<<<<<<< @@ -41989,7 +41989,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_append_combined_matching(int *__pyx_v_arr, st int __pyx_t_2; __Pyx_RefNannySetupContext("append_combined_matching", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":206 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":206 * cdef int i, new_len * * new_len = result_len[0] + num_subpatterns # <<<<<<<<<<<<<< @@ -41998,7 +41998,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_append_combined_matching(int *__pyx_v_arr, st */ __pyx_v_new_len = ((__pyx_v_result_len[0]) + __pyx_v_num_subpatterns); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":207 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":207 * * new_len = result_len[0] + num_subpatterns * arr = realloc(arr, new_len*sizeof(int)) # <<<<<<<<<<<<<< @@ -42007,7 +42007,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_append_combined_matching(int *__pyx_v_arr, st */ __pyx_v_arr = ((int *)realloc(__pyx_v_arr, (__pyx_v_new_len * (sizeof(int))))); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":209 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":209 * arr = realloc(arr, new_len*sizeof(int)) * * for i from 0 <= i < loc1.size: # <<<<<<<<<<<<<< @@ -42017,7 +42017,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_append_combined_matching(int *__pyx_v_arr, st __pyx_t_1 = __pyx_v_loc1->size; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":210 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":210 * * for i from 0 <= i < loc1.size: * arr[result_len[0]+i] = loc1.arr[loc1.start+i] # <<<<<<<<<<<<<< @@ -42027,7 +42027,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_append_combined_matching(int *__pyx_v_arr, st (__pyx_v_arr[((__pyx_v_result_len[0]) + __pyx_v_i)]) = (__pyx_v_loc1->arr[(__pyx_v_loc1->start + __pyx_v_i)]); } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":211 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":211 * for i from 0 <= i < loc1.size: * arr[result_len[0]+i] = loc1.arr[loc1.start+i] * if num_subpatterns > loc1.size: # <<<<<<<<<<<<<< @@ -42037,7 +42037,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_append_combined_matching(int *__pyx_v_arr, st __pyx_t_2 = ((__pyx_v_num_subpatterns > __pyx_v_loc1->size) != 0); if (__pyx_t_2) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":212 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":212 * arr[result_len[0]+i] = loc1.arr[loc1.start+i] * if num_subpatterns > loc1.size: * arr[new_len-1] = loc2.arr[loc2.end-1] # <<<<<<<<<<<<<< @@ -42049,7 +42049,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_append_combined_matching(int *__pyx_v_arr, st } __pyx_L5:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":213 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":213 * if num_subpatterns > loc1.size: * arr[new_len-1] = loc2.arr[loc2.end-1] * result_len[0] = new_len # <<<<<<<<<<<<<< @@ -42058,7 +42058,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_append_combined_matching(int *__pyx_v_arr, st */ (__pyx_v_result_len[0]) = __pyx_v_new_len; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":214 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":214 * arr[new_len-1] = loc2.arr[loc2.end-1] * result_len[0] = new_len * return arr # <<<<<<<<<<<<<< @@ -42068,7 +42068,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_append_combined_matching(int *__pyx_v_arr, st __pyx_r = __pyx_v_arr; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":202 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":202 * * * cdef int* append_combined_matching(int* arr, Matching* loc1, Matching* loc2, # <<<<<<<<<<<<<< @@ -42082,7 +42082,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_append_combined_matching(int *__pyx_v_arr, st return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":217 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":217 * * * cdef int* extend_arr(int* arr, int* arr_len, int* appendix, int appendix_len): # <<<<<<<<<<<<<< @@ -42096,7 +42096,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_extend_arr(int *__pyx_v_arr, int *__pyx_v_arr __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("extend_arr", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":220 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":220 * cdef int new_len * * new_len = arr_len[0] + appendix_len # <<<<<<<<<<<<<< @@ -42105,7 +42105,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_extend_arr(int *__pyx_v_arr, int *__pyx_v_arr */ __pyx_v_new_len = ((__pyx_v_arr_len[0]) + __pyx_v_appendix_len); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":221 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":221 * * new_len = arr_len[0] + appendix_len * arr = realloc(arr, new_len*sizeof(int)) # <<<<<<<<<<<<<< @@ -42114,7 +42114,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_extend_arr(int *__pyx_v_arr, int *__pyx_v_arr */ __pyx_v_arr = ((int *)realloc(__pyx_v_arr, (__pyx_v_new_len * (sizeof(int))))); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":222 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":222 * new_len = arr_len[0] + appendix_len * arr = realloc(arr, new_len*sizeof(int)) * memcpy(arr+arr_len[0], appendix, appendix_len*sizeof(int)) # <<<<<<<<<<<<<< @@ -42123,7 +42123,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_extend_arr(int *__pyx_v_arr, int *__pyx_v_arr */ memcpy((__pyx_v_arr + (__pyx_v_arr_len[0])), __pyx_v_appendix, (__pyx_v_appendix_len * (sizeof(int)))); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":223 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":223 * arr = realloc(arr, new_len*sizeof(int)) * memcpy(arr+arr_len[0], appendix, appendix_len*sizeof(int)) * arr_len[0] = new_len # <<<<<<<<<<<<<< @@ -42132,7 +42132,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_extend_arr(int *__pyx_v_arr, int *__pyx_v_arr */ (__pyx_v_arr_len[0]) = __pyx_v_new_len; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":224 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":224 * memcpy(arr+arr_len[0], appendix, appendix_len*sizeof(int)) * arr_len[0] = new_len * return arr # <<<<<<<<<<<<<< @@ -42142,7 +42142,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_extend_arr(int *__pyx_v_arr, int *__pyx_v_arr __pyx_r = __pyx_v_arr; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":217 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":217 * * * cdef int* extend_arr(int* arr, int* arr_len, int* appendix, int appendix_len): # <<<<<<<<<<<<<< @@ -42156,7 +42156,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_extend_arr(int *__pyx_v_arr, int *__pyx_v_arr return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":226 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":226 * return arr * * cdef int median(int low, int high, int step): # <<<<<<<<<<<<<< @@ -42173,7 +42173,7 @@ static int __pyx_f_4cdec_2sa_3_sa_median(int __pyx_v_low, int __pyx_v_high, int int __pyx_clineno = 0; __Pyx_RefNannySetupContext("median", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":227 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":227 * * cdef int median(int low, int high, int step): * return low + (((high - low)/step)/2)*step # <<<<<<<<<<<<<< @@ -42204,7 +42204,7 @@ static int __pyx_f_4cdec_2sa_3_sa_median(int __pyx_v_low, int __pyx_v_high, int __pyx_r = (__pyx_v_low + (__Pyx_div_long(__Pyx_div_int(__pyx_t_1, __pyx_v_step), 2) * __pyx_v_step)); goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":226 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":226 * return arr * * cdef int median(int low, int high, int step): # <<<<<<<<<<<<<< @@ -42221,7 +42221,7 @@ static int __pyx_f_4cdec_2sa_3_sa_median(int __pyx_v_low, int __pyx_v_high, int return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":230 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":230 * * * cdef void find_comparable_matchings(int low, int high, int* arr, int step, int loc, int* loc_minus, int* loc_plus): # <<<<<<<<<<<<<< @@ -42236,7 +42236,7 @@ static void __pyx_f_4cdec_2sa_3_sa_find_comparable_matchings(int __pyx_v_low, in int __pyx_t_3; __Pyx_RefNannySetupContext("find_comparable_matchings", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":234 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":234 * # in which all matchings have the same first index as the one * # starting at loc * loc_plus[0] = loc + step # <<<<<<<<<<<<<< @@ -42245,7 +42245,7 @@ static void __pyx_f_4cdec_2sa_3_sa_find_comparable_matchings(int __pyx_v_low, in */ (__pyx_v_loc_plus[0]) = (__pyx_v_loc + __pyx_v_step); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":235 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":235 * # starting at loc * loc_plus[0] = loc + step * while loc_plus[0] < high and arr[loc_plus[0]] == arr[loc]: # <<<<<<<<<<<<<< @@ -42262,7 +42262,7 @@ static void __pyx_f_4cdec_2sa_3_sa_find_comparable_matchings(int __pyx_v_low, in } if (!__pyx_t_3) break; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":236 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":236 * loc_plus[0] = loc + step * while loc_plus[0] < high and arr[loc_plus[0]] == arr[loc]: * loc_plus[0] = loc_plus[0] + step # <<<<<<<<<<<<<< @@ -42272,7 +42272,7 @@ static void __pyx_f_4cdec_2sa_3_sa_find_comparable_matchings(int __pyx_v_low, in (__pyx_v_loc_plus[0]) = ((__pyx_v_loc_plus[0]) + __pyx_v_step); } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":237 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":237 * while loc_plus[0] < high and arr[loc_plus[0]] == arr[loc]: * loc_plus[0] = loc_plus[0] + step * loc_minus[0] = loc # <<<<<<<<<<<<<< @@ -42281,7 +42281,7 @@ static void __pyx_f_4cdec_2sa_3_sa_find_comparable_matchings(int __pyx_v_low, in */ (__pyx_v_loc_minus[0]) = __pyx_v_loc; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":238 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":238 * loc_plus[0] = loc_plus[0] + step * loc_minus[0] = loc * while loc_minus[0]-step >= low and arr[loc_minus[0]-step] == arr[loc]: # <<<<<<<<<<<<<< @@ -42298,7 +42298,7 @@ static void __pyx_f_4cdec_2sa_3_sa_find_comparable_matchings(int __pyx_v_low, in } if (!__pyx_t_2) break; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":239 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":239 * loc_minus[0] = loc * while loc_minus[0]-step >= low and arr[loc_minus[0]-step] == arr[loc]: * loc_minus[0] = loc_minus[0] - step # <<<<<<<<<<<<<< @@ -42308,7 +42308,7 @@ static void __pyx_f_4cdec_2sa_3_sa_find_comparable_matchings(int __pyx_v_low, in (__pyx_v_loc_minus[0]) = ((__pyx_v_loc_minus[0]) - __pyx_v_step); } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":230 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":230 * * * cdef void find_comparable_matchings(int low, int high, int* arr, int step, int loc, int* loc_minus, int* loc_plus): # <<<<<<<<<<<<<< @@ -42320,7 +42320,7 @@ static void __pyx_f_4cdec_2sa_3_sa_find_comparable_matchings(int __pyx_v_low, in __Pyx_RefNannyFinishContext(); } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":296 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":296 * cdef bilex * * def __cinit__(self, # <<<<<<<<<<<<<< @@ -42363,7 +42363,7 @@ static int __pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_1__cinit__(PyObject static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_alignment,&__pyx_n_s_bilex,&__pyx_n_s_by_slack_factor,&__pyx_n_s_category,&__pyx_n_s_max_chunks,&__pyx_n_s_max_initial_size,&__pyx_n_s_max_length,&__pyx_n_s_max_nonterminals,&__pyx_n_s_max_target_chunks,&__pyx_n_s_max_target_length,&__pyx_n_s_min_gap_size,&__pyx_n_s_precompute_file,&__pyx_n_s_precompute_secondary_rank,&__pyx_n_s_precompute_rank,&__pyx_n_s_require_aligned_terminal,&__pyx_n_s_require_aligned_chunks,&__pyx_n_s_train_max_initial_size,&__pyx_n_s_train_min_gap_size,&__pyx_n_s_tight_phrases,&__pyx_n_s_use_baeza_yates,&__pyx_n_s_use_collocations,&__pyx_n_s_use_index,0}; PyObject* values[22] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":300 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":300 * Alignment alignment, * # bilexical dictionary if online * bilex=None, # <<<<<<<<<<<<<< @@ -42372,7 +42372,7 @@ static int __pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_1__cinit__(PyObject */ values[1] = ((PyObject *)Py_None); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":306 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":306 * char* category="[X]", * # maximum number of contiguous chunks of terminal symbols in RHS of a rule. If None, defaults to max_nonterminals+1 * max_chunks=None, # <<<<<<<<<<<<<< @@ -42381,7 +42381,7 @@ static int __pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_1__cinit__(PyObject */ values[4] = ((PyObject *)Py_None); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":314 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":314 * unsigned max_nonterminals=2, * # maximum number of contiguous chunks of terminal symbols in target-side RHS of a rule. If None, defaults to max_nonterminals+1 * max_target_chunks=None, # <<<<<<<<<<<<<< @@ -42390,7 +42390,7 @@ static int __pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_1__cinit__(PyObject */ values[8] = ((PyObject *)Py_None); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":316 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":316 * max_target_chunks=None, * # maximum number of target side symbols (both T and NT) allowed in a rule. If None, defaults to max_initial_size * max_target_length=None, # <<<<<<<<<<<<<< @@ -42399,7 +42399,7 @@ static int __pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_1__cinit__(PyObject */ values[9] = ((PyObject *)Py_None); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":320 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":320 * unsigned min_gap_size=2, * # filename of file containing precomputed collocations * precompute_file=None, # <<<<<<<<<<<<<< @@ -42628,7 +42628,7 @@ static int __pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_1__cinit__(PyObject __pyx_v_require_aligned_terminal = __Pyx_PyObject_IsTrue(values[14]); if (unlikely((__pyx_v_require_aligned_terminal == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":326 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":326 * unsigned precompute_rank=100, * # require extracted rules to have at least one aligned word * bint require_aligned_terminal=True, # <<<<<<<<<<<<<< @@ -42641,7 +42641,7 @@ static int __pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_1__cinit__(PyObject __pyx_v_require_aligned_chunks = __Pyx_PyObject_IsTrue(values[15]); if (unlikely((__pyx_v_require_aligned_chunks == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":328 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":328 * bint require_aligned_terminal=True, * # require each contiguous chunk of extracted rules to have at least one aligned word * bint require_aligned_chunks=False, # <<<<<<<<<<<<<< @@ -42664,7 +42664,7 @@ static int __pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_1__cinit__(PyObject __pyx_v_tight_phrases = __Pyx_PyObject_IsTrue(values[18]); if (unlikely((__pyx_v_tight_phrases == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":334 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":334 * unsigned train_min_gap_size=2, * # False if phrases should be loose (better but slower), True otherwise * bint tight_phrases=True, # <<<<<<<<<<<<<< @@ -42677,7 +42677,7 @@ static int __pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_1__cinit__(PyObject __pyx_v_use_baeza_yates = __Pyx_PyObject_IsTrue(values[19]); if (unlikely((__pyx_v_use_baeza_yates == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":336 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":336 * bint tight_phrases=True, * # True to require use of double-binary alg, false otherwise * bint use_baeza_yates=True, # <<<<<<<<<<<<<< @@ -42690,7 +42690,7 @@ static int __pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_1__cinit__(PyObject __pyx_v_use_collocations = __Pyx_PyObject_IsTrue(values[20]); if (unlikely((__pyx_v_use_collocations == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":338 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":338 * bint use_baeza_yates=True, * # True to enable used of precomputed collocations * bint use_collocations=True, # <<<<<<<<<<<<<< @@ -42703,7 +42703,7 @@ static int __pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_1__cinit__(PyObject __pyx_v_use_index = __Pyx_PyObject_IsTrue(values[21]); if (unlikely((__pyx_v_use_index == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":340 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":340 * bint use_collocations=True, * # True to enable use of precomputed inverted indices * bint use_index=True): # <<<<<<<<<<<<<< @@ -42724,7 +42724,7 @@ static int __pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_1__cinit__(PyObject if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_alignment), __pyx_ptype_4cdec_2sa_3_sa_Alignment, 1, "alignment", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(((struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self), __pyx_v_alignment, __pyx_v_bilex, __pyx_v_by_slack_factor, __pyx_v_category, __pyx_v_max_chunks, __pyx_v_max_initial_size, __pyx_v_max_length, __pyx_v_max_nonterminals, __pyx_v_max_target_chunks, __pyx_v_max_target_length, __pyx_v_min_gap_size, __pyx_v_precompute_file, __pyx_v_precompute_secondary_rank, __pyx_v_precompute_rank, __pyx_v_require_aligned_terminal, __pyx_v_require_aligned_chunks, __pyx_v_train_max_initial_size, __pyx_v_train_min_gap_size, __pyx_v_tight_phrases, __pyx_v_use_baeza_yates, __pyx_v_use_collocations, __pyx_v_use_index); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":296 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":296 * cdef bilex * * def __cinit__(self, # <<<<<<<<<<<<<< @@ -42755,7 +42755,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":346 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":346 * respectively. This is because Chiang's model does not require * them to be the same, therefore we don't either.''' * self.rules = TrieTable(True) # cache # <<<<<<<<<<<<<< @@ -42770,7 +42770,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ __pyx_v_self->rules = ((struct __pyx_obj_4cdec_2sa_3_sa_TrieTable *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":347 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":347 * them to be the same, therefore we don't either.''' * self.rules = TrieTable(True) # cache * self.rules.root = ExtendedTrieNode(phrase_location=PhraseLocation()) # <<<<<<<<<<<<<< @@ -42792,7 +42792,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ __pyx_v_self->rules->root = __pyx_t_2; __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":348 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":348 * self.rules = TrieTable(True) # cache * self.rules.root = ExtendedTrieNode(phrase_location=PhraseLocation()) * if alignment is None: # <<<<<<<<<<<<<< @@ -42803,7 +42803,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":349 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":349 * self.rules.root = ExtendedTrieNode(phrase_location=PhraseLocation()) * if alignment is None: * raise Exception("Must specify an alignment object") # <<<<<<<<<<<<<< @@ -42817,7 +42817,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ {__pyx_filename = __pyx_f[8]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":350 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":350 * if alignment is None: * raise Exception("Must specify an alignment object") * self.alignment = alignment # <<<<<<<<<<<<<< @@ -42830,7 +42830,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ __Pyx_DECREF(((PyObject *)__pyx_v_self->alignment)); __pyx_v_self->alignment = __pyx_v_alignment; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":354 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":354 * # grammar parameters and settings * # NOTE: setting max_nonterminals > 2 is not currently supported in Hiero * self.max_length = max_length # <<<<<<<<<<<<<< @@ -42839,7 +42839,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ */ __pyx_v_self->max_length = __pyx_v_max_length; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":355 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":355 * # NOTE: setting max_nonterminals > 2 is not currently supported in Hiero * self.max_length = max_length * self.max_nonterminals = max_nonterminals # <<<<<<<<<<<<<< @@ -42848,7 +42848,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ */ __pyx_v_self->max_nonterminals = __pyx_v_max_nonterminals; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":356 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":356 * self.max_length = max_length * self.max_nonterminals = max_nonterminals * self.max_initial_size = max_initial_size # <<<<<<<<<<<<<< @@ -42857,7 +42857,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ */ __pyx_v_self->max_initial_size = __pyx_v_max_initial_size; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":357 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":357 * self.max_nonterminals = max_nonterminals * self.max_initial_size = max_initial_size * self.train_max_initial_size = train_max_initial_size # <<<<<<<<<<<<<< @@ -42866,7 +42866,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ */ __pyx_v_self->train_max_initial_size = __pyx_v_train_max_initial_size; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":358 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":358 * self.max_initial_size = max_initial_size * self.train_max_initial_size = train_max_initial_size * self.min_gap_size = min_gap_size # <<<<<<<<<<<<<< @@ -42875,7 +42875,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ */ __pyx_v_self->min_gap_size = __pyx_v_min_gap_size; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":359 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":359 * self.train_max_initial_size = train_max_initial_size * self.min_gap_size = min_gap_size * self.train_min_gap_size = train_min_gap_size # <<<<<<<<<<<<<< @@ -42884,7 +42884,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ */ __pyx_v_self->train_min_gap_size = __pyx_v_train_min_gap_size; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":360 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":360 * self.min_gap_size = min_gap_size * self.train_min_gap_size = train_min_gap_size * self.category = sym_fromstring(category, False) # <<<<<<<<<<<<<< @@ -42893,7 +42893,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ */ __pyx_v_self->category = __pyx_f_4cdec_2sa_3_sa_sym_fromstring(__pyx_v_category, 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":362 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":362 * self.category = sym_fromstring(category, False) * * if max_chunks is None: # <<<<<<<<<<<<<< @@ -42904,7 +42904,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ __pyx_t_3 = (__pyx_t_4 != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":363 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":363 * * if max_chunks is None: * self.max_chunks = self.max_nonterminals + 1 # <<<<<<<<<<<<<< @@ -42916,7 +42916,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":365 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":365 * self.max_chunks = self.max_nonterminals + 1 * else: * self.max_chunks = max_chunks # <<<<<<<<<<<<<< @@ -42928,7 +42928,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ } __pyx_L4:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":367 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":367 * self.max_chunks = max_chunks * * if max_target_chunks is None: # <<<<<<<<<<<<<< @@ -42939,7 +42939,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":368 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":368 * * if max_target_chunks is None: * self.max_target_chunks = self.max_nonterminals + 1 # <<<<<<<<<<<<<< @@ -42951,7 +42951,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":370 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":370 * self.max_target_chunks = self.max_nonterminals + 1 * else: * self.max_target_chunks = max_target_chunks # <<<<<<<<<<<<<< @@ -42963,7 +42963,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ } __pyx_L5:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":372 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":372 * self.max_target_chunks = max_target_chunks * * if max_target_length is None: # <<<<<<<<<<<<<< @@ -42974,7 +42974,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ __pyx_t_3 = (__pyx_t_4 != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":373 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":373 * * if max_target_length is None: * self.max_target_length = max_initial_size # <<<<<<<<<<<<<< @@ -42986,7 +42986,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":375 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":375 * self.max_target_length = max_initial_size * else: * self.max_target_length = max_target_length # <<<<<<<<<<<<<< @@ -42998,7 +42998,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ } __pyx_L6:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":378 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":378 * * # algorithmic parameters and settings * self.precomputed_collocations = {} # <<<<<<<<<<<<<< @@ -43013,7 +43013,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ __pyx_v_self->precomputed_collocations = __pyx_t_2; __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":379 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":379 * # algorithmic parameters and settings * self.precomputed_collocations = {} * self.precomputed_index = {} # <<<<<<<<<<<<<< @@ -43028,7 +43028,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ __pyx_v_self->precomputed_index = __pyx_t_2; __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":380 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":380 * self.precomputed_collocations = {} * self.precomputed_index = {} * self.use_index = use_index # <<<<<<<<<<<<<< @@ -43037,7 +43037,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ */ __pyx_v_self->use_index = __pyx_v_use_index; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":381 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":381 * self.precomputed_index = {} * self.use_index = use_index * self.use_collocations = use_collocations # <<<<<<<<<<<<<< @@ -43046,7 +43046,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ */ __pyx_v_self->use_collocations = __pyx_v_use_collocations; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":382 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":382 * self.use_index = use_index * self.use_collocations = use_collocations * self.max_rank = {} # <<<<<<<<<<<<<< @@ -43061,7 +43061,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ __pyx_v_self->max_rank = __pyx_t_2; __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":383 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":383 * self.use_collocations = use_collocations * self.max_rank = {} * self.precompute_file = precompute_file # <<<<<<<<<<<<<< @@ -43074,7 +43074,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ __Pyx_DECREF(__pyx_v_self->precompute_file); __pyx_v_self->precompute_file = __pyx_v_precompute_file; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":384 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":384 * self.max_rank = {} * self.precompute_file = precompute_file * self.precompute_rank = precompute_rank # <<<<<<<<<<<<<< @@ -43083,7 +43083,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ */ __pyx_v_self->precompute_rank = __pyx_v_precompute_rank; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":385 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":385 * self.precompute_file = precompute_file * self.precompute_rank = precompute_rank * self.precompute_secondary_rank = precompute_secondary_rank # <<<<<<<<<<<<<< @@ -43092,7 +43092,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ */ __pyx_v_self->precompute_secondary_rank = __pyx_v_precompute_secondary_rank; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":386 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":386 * self.precompute_rank = precompute_rank * self.precompute_secondary_rank = precompute_secondary_rank * self.use_baeza_yates = use_baeza_yates # <<<<<<<<<<<<<< @@ -43101,7 +43101,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ */ __pyx_v_self->use_baeza_yates = __pyx_v_use_baeza_yates; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":387 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":387 * self.precompute_secondary_rank = precompute_secondary_rank * self.use_baeza_yates = use_baeza_yates * self.by_slack_factor = by_slack_factor # <<<<<<<<<<<<<< @@ -43110,7 +43110,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ */ __pyx_v_self->by_slack_factor = __pyx_v_by_slack_factor; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":388 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":388 * self.use_baeza_yates = use_baeza_yates * self.by_slack_factor = by_slack_factor * self.tight_phrases = tight_phrases # <<<<<<<<<<<<<< @@ -43119,7 +43119,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ */ __pyx_v_self->tight_phrases = __pyx_v_tight_phrases; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":390 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":390 * self.tight_phrases = tight_phrases * * if require_aligned_chunks: # <<<<<<<<<<<<<< @@ -43129,7 +43129,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ __pyx_t_3 = (__pyx_v_require_aligned_chunks != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":392 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":392 * if require_aligned_chunks: * # one condition is a stronger version of the other. * self.require_aligned_chunks = self.require_aligned_terminal = True # <<<<<<<<<<<<<< @@ -43141,7 +43141,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ goto __pyx_L7; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":393 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":393 * # one condition is a stronger version of the other. * self.require_aligned_chunks = self.require_aligned_terminal = True * elif require_aligned_terminal: # <<<<<<<<<<<<<< @@ -43151,7 +43151,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ __pyx_t_3 = (__pyx_v_require_aligned_terminal != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":394 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":394 * self.require_aligned_chunks = self.require_aligned_terminal = True * elif require_aligned_terminal: * self.require_aligned_chunks = False # <<<<<<<<<<<<<< @@ -43160,7 +43160,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ */ __pyx_v_self->require_aligned_chunks = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":395 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":395 * elif require_aligned_terminal: * self.require_aligned_chunks = False * self.require_aligned_terminal = True # <<<<<<<<<<<<<< @@ -43172,7 +43172,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":397 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":397 * self.require_aligned_terminal = True * else: * self.require_aligned_chunks = self.require_aligned_terminal = False # <<<<<<<<<<<<<< @@ -43184,7 +43184,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ } __pyx_L7:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":400 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":400 * * # diagnostics * self.prev_norm_prefix = () # <<<<<<<<<<<<<< @@ -43197,7 +43197,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ __Pyx_DECREF(__pyx_v_self->prev_norm_prefix); __pyx_v_self->prev_norm_prefix = __pyx_empty_tuple; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":402 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":402 * self.prev_norm_prefix = () * * self.findexes = IntList(initial_len=10) # <<<<<<<<<<<<<< @@ -43216,7 +43216,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ __pyx_v_self->findexes = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":403 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":403 * * self.findexes = IntList(initial_len=10) * self.findexes1 = IntList(initial_len=10) # <<<<<<<<<<<<<< @@ -43235,7 +43235,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ __pyx_v_self->findexes1 = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":408 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":408 * * # None if not online * self.bilex = bilex # <<<<<<<<<<<<<< @@ -43248,7 +43248,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ __Pyx_DECREF(__pyx_v_self->bilex); __pyx_v_self->bilex = __pyx_v_bilex; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":411 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":411 * * # True after data is added * self.online = False # <<<<<<<<<<<<<< @@ -43257,7 +43257,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ */ __pyx_v_self->online = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":412 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":412 * # True after data is added * self.online = False * self.online_stats = defaultdict(OnlineStats) # <<<<<<<<<<<<<< @@ -43281,7 +43281,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ __pyx_v_self->online_stats = __pyx_t_6; __pyx_t_6 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":296 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":296 * cdef bilex * * def __cinit__(self, # <<<<<<<<<<<<<< @@ -43303,7 +43303,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":414 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":414 * self.online_stats = defaultdict(OnlineStats) * * def configure(self, SuffixArray fsarray, DataArray edarray, # <<<<<<<<<<<<<< @@ -43409,7 +43409,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_2configure(st int __pyx_clineno = 0; __Pyx_RefNannySetupContext("configure", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":419 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":419 * Here we also use it to precompute the most expensive intersections * in the corpus quickly.''' * self.fsa = fsarray # <<<<<<<<<<<<<< @@ -43422,7 +43422,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_2configure(st __Pyx_DECREF(((PyObject *)__pyx_v_self->fsa)); __pyx_v_self->fsa = __pyx_v_fsarray; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":420 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":420 * in the corpus quickly.''' * self.fsa = fsarray * self.fda = fsarray.darray # <<<<<<<<<<<<<< @@ -43437,7 +43437,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_2configure(st __pyx_v_self->fda = ((struct __pyx_obj_4cdec_2sa_3_sa_DataArray *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":421 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":421 * self.fsa = fsarray * self.fda = fsarray.darray * self.eda = edarray # <<<<<<<<<<<<<< @@ -43450,7 +43450,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_2configure(st __Pyx_DECREF(((PyObject *)__pyx_v_self->eda)); __pyx_v_self->eda = __pyx_v_edarray; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":422 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":422 * self.fda = fsarray.darray * self.eda = edarray * self.fid2symid = self.set_idmap(self.fda) # <<<<<<<<<<<<<< @@ -43469,7 +43469,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_2configure(st __pyx_v_self->fid2symid = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":423 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":423 * self.eda = edarray * self.fid2symid = self.set_idmap(self.fda) * self.eid2symid = self.set_idmap(self.eda) # <<<<<<<<<<<<<< @@ -43488,7 +43488,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_2configure(st __pyx_v_self->eid2symid = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":424 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":424 * self.fid2symid = self.set_idmap(self.fda) * self.eid2symid = self.set_idmap(self.eda) * self.precompute() # <<<<<<<<<<<<<< @@ -43502,7 +43502,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_2configure(st __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":425 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":425 * self.eid2symid = self.set_idmap(self.eda) * self.precompute() * self.sampler = sampler # <<<<<<<<<<<<<< @@ -43515,7 +43515,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_2configure(st __Pyx_DECREF(((PyObject *)__pyx_v_self->sampler)); __pyx_v_self->sampler = __pyx_v_sampler; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":426 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":426 * self.precompute() * self.sampler = sampler * self.scorer = scorer # <<<<<<<<<<<<<< @@ -43528,7 +43528,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_2configure(st __Pyx_DECREF(((PyObject *)__pyx_v_self->scorer)); __pyx_v_self->scorer = __pyx_v_scorer; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":414 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":414 * self.online_stats = defaultdict(OnlineStats) * * def configure(self, SuffixArray fsarray, DataArray edarray, # <<<<<<<<<<<<<< @@ -43550,7 +43550,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_2configure(st return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":428 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":428 * self.scorer = scorer * * cdef set_idmap(self, DataArray darray): # <<<<<<<<<<<<<< @@ -43575,7 +43575,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_set_idmap(CYTH int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_idmap", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":432 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":432 * cdef IntList idmap * * N = len(darray.id2word) # <<<<<<<<<<<<<< @@ -43588,7 +43588,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_set_idmap(CYTH __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_N = __pyx_t_2; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":433 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":433 * * N = len(darray.id2word) * idmap = IntList(initial_len=N) # <<<<<<<<<<<<<< @@ -43607,7 +43607,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_set_idmap(CYTH __pyx_v_idmap = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":434 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":434 * N = len(darray.id2word) * idmap = IntList(initial_len=N) * for word_id from 0 <= word_id < N: # <<<<<<<<<<<<<< @@ -43617,7 +43617,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_set_idmap(CYTH __pyx_t_4 = __pyx_v_N; for (__pyx_v_word_id = 0; __pyx_v_word_id < __pyx_t_4; __pyx_v_word_id++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":435 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":435 * idmap = IntList(initial_len=N) * for word_id from 0 <= word_id < N: * new_word_id = sym_fromstring(darray.id2word[word_id], True) # <<<<<<<<<<<<<< @@ -43630,7 +43630,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_set_idmap(CYTH __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_new_word_id = __pyx_f_4cdec_2sa_3_sa_sym_fromstring(__pyx_t_5, 1); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":436 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":436 * for word_id from 0 <= word_id < N: * new_word_id = sym_fromstring(darray.id2word[word_id], True) * idmap.arr[word_id] = new_word_id # <<<<<<<<<<<<<< @@ -43640,7 +43640,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_set_idmap(CYTH (__pyx_v_idmap->arr[__pyx_v_word_id]) = __pyx_v_new_word_id; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":437 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":437 * new_word_id = sym_fromstring(darray.id2word[word_id], True) * idmap.arr[word_id] = new_word_id * return idmap # <<<<<<<<<<<<<< @@ -43652,7 +43652,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_set_idmap(CYTH __pyx_r = ((PyObject *)__pyx_v_idmap); goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":428 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":428 * self.scorer = scorer * * cdef set_idmap(self, DataArray darray): # <<<<<<<<<<<<<< @@ -43673,7 +43673,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_set_idmap(CYTH return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":440 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":440 * * * def pattern2phrase(self, pattern): # <<<<<<<<<<<<<< @@ -43714,7 +43714,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_4pattern2phra int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pattern2phrase", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":442 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":442 * def pattern2phrase(self, pattern): * # pattern is a tuple, which we must convert to a hiero Phrase * result = () # <<<<<<<<<<<<<< @@ -43724,7 +43724,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_4pattern2phra __Pyx_INCREF(__pyx_empty_tuple); __pyx_v_result = __pyx_empty_tuple; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":443 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":443 * # pattern is a tuple, which we must convert to a hiero Phrase * result = () * arity = 0 # <<<<<<<<<<<<<< @@ -43734,7 +43734,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_4pattern2phra __Pyx_INCREF(__pyx_int_0); __pyx_v_arity = __pyx_int_0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":444 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":444 * result = () * arity = 0 * for word_id in pattern: # <<<<<<<<<<<<<< @@ -43779,7 +43779,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_4pattern2phra __Pyx_XDECREF_SET(__pyx_v_word_id, __pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":445 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":445 * arity = 0 * for word_id in pattern: * if word_id == -1: # <<<<<<<<<<<<<< @@ -43791,7 +43791,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_4pattern2phra __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_5) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":446 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":446 * for word_id in pattern: * if word_id == -1: * arity = arity + 1 # <<<<<<<<<<<<<< @@ -43803,7 +43803,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_4pattern2phra __Pyx_DECREF_SET(__pyx_v_arity, __pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":447 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":447 * if word_id == -1: * arity = arity + 1 * new_id = sym_setindex(self.category, arity) # <<<<<<<<<<<<<< @@ -43816,7 +43816,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_4pattern2phra } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":449 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":449 * new_id = sym_setindex(self.category, arity) * else: * new_id = sym_fromstring(self.fda.id2word[word_id], True) # <<<<<<<<<<<<<< @@ -43831,7 +43831,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_4pattern2phra } __pyx_L5:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":450 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":450 * else: * new_id = sym_fromstring(self.fda.id2word[word_id], True) * result = result + (new_id,) # <<<<<<<<<<<<<< @@ -43853,7 +43853,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_4pattern2phra } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":451 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":451 * new_id = sym_fromstring(self.fda.id2word[word_id], True) * result = result + (new_id,) * return Phrase(result) # <<<<<<<<<<<<<< @@ -43873,7 +43873,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_4pattern2phra __pyx_t_4 = 0; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":440 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":440 * * * def pattern2phrase(self, pattern): # <<<<<<<<<<<<<< @@ -43897,7 +43897,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_4pattern2phra return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":453 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":453 * return Phrase(result) * * def pattern2phrase_plus(self, pattern): # <<<<<<<<<<<<<< @@ -43940,7 +43940,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_6pattern2phra int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pattern2phrase_plus", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":456 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":456 * # returns a list containing both the pattern, and pattern * # suffixed/prefixed with the NT category. * patterns = [] # <<<<<<<<<<<<<< @@ -43952,7 +43952,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_6pattern2phra __pyx_v_patterns = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":457 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":457 * # suffixed/prefixed with the NT category. * patterns = [] * result = () # <<<<<<<<<<<<<< @@ -43962,7 +43962,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_6pattern2phra __Pyx_INCREF(__pyx_empty_tuple); __pyx_v_result = __pyx_empty_tuple; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":458 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":458 * patterns = [] * result = () * arity = 0 # <<<<<<<<<<<<<< @@ -43972,7 +43972,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_6pattern2phra __Pyx_INCREF(__pyx_int_0); __pyx_v_arity = __pyx_int_0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":459 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":459 * result = () * arity = 0 * for word_id in pattern: # <<<<<<<<<<<<<< @@ -44017,7 +44017,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_6pattern2phra __Pyx_XDECREF_SET(__pyx_v_word_id, __pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":460 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":460 * arity = 0 * for word_id in pattern: * if word_id == -1: # <<<<<<<<<<<<<< @@ -44029,7 +44029,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_6pattern2phra __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_5) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":461 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":461 * for word_id in pattern: * if word_id == -1: * arity = arity + 1 # <<<<<<<<<<<<<< @@ -44041,7 +44041,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_6pattern2phra __Pyx_DECREF_SET(__pyx_v_arity, __pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":462 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":462 * if word_id == -1: * arity = arity + 1 * new_id = sym_setindex(self.category, arity) # <<<<<<<<<<<<<< @@ -44054,7 +44054,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_6pattern2phra } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":464 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":464 * new_id = sym_setindex(self.category, arity) * else: * new_id = sym_fromstring(self.fda.id2word[word_id], True) # <<<<<<<<<<<<<< @@ -44069,7 +44069,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_6pattern2phra } __pyx_L5:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":465 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":465 * else: * new_id = sym_fromstring(self.fda.id2word[word_id], True) * result = result + (new_id,) # <<<<<<<<<<<<<< @@ -44091,7 +44091,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_6pattern2phra } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":466 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":466 * new_id = sym_fromstring(self.fda.id2word[word_id], True) * result = result + (new_id,) * patterns.append(Phrase(result)) # <<<<<<<<<<<<<< @@ -44109,7 +44109,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_6pattern2phra __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_patterns, __pyx_t_4); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":467 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":467 * result = result + (new_id,) * patterns.append(Phrase(result)) * patterns.append(Phrase(result + (sym_setindex(self.category, 1),))) # <<<<<<<<<<<<<< @@ -44137,7 +44137,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_6pattern2phra __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_patterns, __pyx_t_4); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":468 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":468 * patterns.append(Phrase(result)) * patterns.append(Phrase(result + (sym_setindex(self.category, 1),))) * patterns.append(Phrase((sym_setindex(self.category, 1),) + result)) # <<<<<<<<<<<<<< @@ -44165,7 +44165,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_6pattern2phra __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_patterns, __pyx_t_4); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":469 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":469 * patterns.append(Phrase(result + (sym_setindex(self.category, 1),))) * patterns.append(Phrase((sym_setindex(self.category, 1),) + result)) * return patterns # <<<<<<<<<<<<<< @@ -44177,7 +44177,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_6pattern2phra __pyx_r = __pyx_v_patterns; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":453 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":453 * return Phrase(result) * * def pattern2phrase_plus(self, pattern): # <<<<<<<<<<<<<< @@ -44202,7 +44202,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_6pattern2phra return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":471 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":471 * return patterns * * def precompute(self): # <<<<<<<<<<<<<< @@ -44250,7 +44250,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8precompute(s int __pyx_clineno = 0; __Pyx_RefNannySetupContext("precompute", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":474 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":474 * cdef Precomputation pre * * if self.precompute_file is not None: # <<<<<<<<<<<<<< @@ -44261,7 +44261,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8precompute(s __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":475 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":475 * * if self.precompute_file is not None: * start_time = monitor_cpu() # <<<<<<<<<<<<<< @@ -44276,7 +44276,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8precompute(s __pyx_v_start_time = __pyx_t_4; __pyx_t_4 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":476 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":476 * if self.precompute_file is not None: * start_time = monitor_cpu() * logger.info("Reading precomputed data from file %s... ", self.precompute_file) # <<<<<<<<<<<<<< @@ -44302,7 +44302,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8precompute(s __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":477 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":477 * start_time = monitor_cpu() * logger.info("Reading precomputed data from file %s... ", self.precompute_file) * pre = Precomputation(from_binary=self.precompute_file) # <<<<<<<<<<<<<< @@ -44318,7 +44318,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8precompute(s __pyx_v_pre = ((struct __pyx_obj_4cdec_2sa_3_sa_Precomputation *)__pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":479 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":479 * pre = Precomputation(from_binary=self.precompute_file) * # check parameters of precomputation -- some are critical and some are not * if pre.max_nonterminals != self.max_nonterminals: # <<<<<<<<<<<<<< @@ -44328,7 +44328,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8precompute(s __pyx_t_2 = ((__pyx_v_pre->max_nonterminals != __pyx_v_self->max_nonterminals) != 0); if (__pyx_t_2) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":480 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":480 * # check parameters of precomputation -- some are critical and some are not * if pre.max_nonterminals != self.max_nonterminals: * logger.warn("Precomputation done with max nonterminals %d, decoder uses %d", pre.max_nonterminals, self.max_nonterminals) # <<<<<<<<<<<<<< @@ -44364,7 +44364,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8precompute(s } __pyx_L4:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":481 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":481 * if pre.max_nonterminals != self.max_nonterminals: * logger.warn("Precomputation done with max nonterminals %d, decoder uses %d", pre.max_nonterminals, self.max_nonterminals) * if pre.max_length != self.max_length: # <<<<<<<<<<<<<< @@ -44374,7 +44374,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8precompute(s __pyx_t_2 = ((__pyx_v_pre->max_length != __pyx_v_self->max_length) != 0); if (__pyx_t_2) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":482 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":482 * logger.warn("Precomputation done with max nonterminals %d, decoder uses %d", pre.max_nonterminals, self.max_nonterminals) * if pre.max_length != self.max_length: * logger.warn("Precomputation done with max terminals %d, decoder uses %d", pre.max_length, self.max_length) # <<<<<<<<<<<<<< @@ -44410,7 +44410,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8precompute(s } __pyx_L5:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":483 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":483 * if pre.max_length != self.max_length: * logger.warn("Precomputation done with max terminals %d, decoder uses %d", pre.max_length, self.max_length) * if pre.train_max_initial_size != self.train_max_initial_size: # <<<<<<<<<<<<<< @@ -44420,7 +44420,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8precompute(s __pyx_t_2 = ((__pyx_v_pre->train_max_initial_size != __pyx_v_self->train_max_initial_size) != 0); if (__pyx_t_2) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":484 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":484 * logger.warn("Precomputation done with max terminals %d, decoder uses %d", pre.max_length, self.max_length) * if pre.train_max_initial_size != self.train_max_initial_size: * raise Exception("Precomputation done with max initial size %d, decoder uses %d" % (pre.train_max_initial_size, self.train_max_initial_size)) # <<<<<<<<<<<<<< @@ -44455,7 +44455,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8precompute(s {__pyx_filename = __pyx_f[8]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":485 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":485 * if pre.train_max_initial_size != self.train_max_initial_size: * raise Exception("Precomputation done with max initial size %d, decoder uses %d" % (pre.train_max_initial_size, self.train_max_initial_size)) * if pre.train_min_gap_size != self.train_min_gap_size: # <<<<<<<<<<<<<< @@ -44465,7 +44465,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8precompute(s __pyx_t_2 = ((__pyx_v_pre->train_min_gap_size != __pyx_v_self->train_min_gap_size) != 0); if (__pyx_t_2) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":486 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":486 * raise Exception("Precomputation done with max initial size %d, decoder uses %d" % (pre.train_max_initial_size, self.train_max_initial_size)) * if pre.train_min_gap_size != self.train_min_gap_size: * raise Exception("Precomputation done with min gap size %d, decoder uses %d" % (pre.train_min_gap_size, self.train_min_gap_size)) # <<<<<<<<<<<<<< @@ -44500,7 +44500,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8precompute(s {__pyx_filename = __pyx_f[8]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":487 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":487 * if pre.train_min_gap_size != self.train_min_gap_size: * raise Exception("Precomputation done with min gap size %d, decoder uses %d" % (pre.train_min_gap_size, self.train_min_gap_size)) * if self.use_index: # <<<<<<<<<<<<<< @@ -44510,7 +44510,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8precompute(s __pyx_t_2 = (__pyx_v_self->use_index != 0); if (__pyx_t_2) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":488 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":488 * raise Exception("Precomputation done with min gap size %d, decoder uses %d" % (pre.train_min_gap_size, self.train_min_gap_size)) * if self.use_index: * logger.info("Converting %d hash keys on precomputed inverted index... ", len(pre.precomputed_index)) # <<<<<<<<<<<<<< @@ -44542,7 +44542,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8precompute(s __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":489 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":489 * if self.use_index: * logger.info("Converting %d hash keys on precomputed inverted index... ", len(pre.precomputed_index)) * for pattern, arr in pre.precomputed_index.iteritems(): # <<<<<<<<<<<<<< @@ -44570,7 +44570,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8precompute(s __Pyx_XDECREF_SET(__pyx_v_arr, __pyx_t_5); __pyx_t_5 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":490 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":490 * logger.info("Converting %d hash keys on precomputed inverted index... ", len(pre.precomputed_index)) * for pattern, arr in pre.precomputed_index.iteritems(): * phrases = self.pattern2phrase_plus(pattern) # <<<<<<<<<<<<<< @@ -44591,7 +44591,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8precompute(s __Pyx_XDECREF_SET(__pyx_v_phrases, __pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":491 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":491 * for pattern, arr in pre.precomputed_index.iteritems(): * phrases = self.pattern2phrase_plus(pattern) * for phrase in phrases: # <<<<<<<<<<<<<< @@ -44636,7 +44636,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8precompute(s __Pyx_XDECREF_SET(__pyx_v_phrase, __pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":492 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":492 * phrases = self.pattern2phrase_plus(pattern) * for phrase in phrases: * self.precomputed_index[phrase] = arr # <<<<<<<<<<<<<< @@ -44652,7 +44652,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8precompute(s } __pyx_L8:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":493 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":493 * for phrase in phrases: * self.precomputed_index[phrase] = arr * if self.use_collocations: # <<<<<<<<<<<<<< @@ -44662,7 +44662,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8precompute(s __pyx_t_2 = (__pyx_v_self->use_collocations != 0); if (__pyx_t_2) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":494 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":494 * self.precomputed_index[phrase] = arr * if self.use_collocations: * logger.info("Converting %d hash keys on precomputed collocations... ", len(pre.precomputed_collocations)) # <<<<<<<<<<<<<< @@ -44694,7 +44694,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8precompute(s __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":495 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":495 * if self.use_collocations: * logger.info("Converting %d hash keys on precomputed collocations... ", len(pre.precomputed_collocations)) * for pattern, arr in pre.precomputed_collocations.iteritems(): # <<<<<<<<<<<<<< @@ -44722,7 +44722,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8precompute(s __Pyx_XDECREF_SET(__pyx_v_arr, __pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":496 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":496 * logger.info("Converting %d hash keys on precomputed collocations... ", len(pre.precomputed_collocations)) * for pattern, arr in pre.precomputed_collocations.iteritems(): * phrase = self.pattern2phrase(pattern) # <<<<<<<<<<<<<< @@ -44743,7 +44743,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8precompute(s __Pyx_XDECREF_SET(__pyx_v_phrase, __pyx_t_5); __pyx_t_5 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":497 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":497 * for pattern, arr in pre.precomputed_collocations.iteritems(): * phrase = self.pattern2phrase(pattern) * self.precomputed_collocations[phrase] = arr # <<<<<<<<<<<<<< @@ -44757,7 +44757,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8precompute(s } __pyx_L13:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":498 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":498 * phrase = self.pattern2phrase(pattern) * self.precomputed_collocations[phrase] = arr * stop_time = monitor_cpu() # <<<<<<<<<<<<<< @@ -44772,7 +44772,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8precompute(s __pyx_v_stop_time = __pyx_t_5; __pyx_t_5 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":499 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":499 * self.precomputed_collocations[phrase] = arr * stop_time = monitor_cpu() * logger.info("Processing precomputations took %f seconds", stop_time - start_time) # <<<<<<<<<<<<<< @@ -44803,7 +44803,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8precompute(s } __pyx_L3:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":471 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":471 * return patterns * * def precompute(self): # <<<<<<<<<<<<<< @@ -44834,7 +44834,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8precompute(s return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":502 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":502 * * * def get_precomputed_collocation(self, phrase): # <<<<<<<<<<<<<< @@ -44870,7 +44870,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_10get_precomp int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_precomputed_collocation", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":503 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":503 * * def get_precomputed_collocation(self, phrase): * if phrase in self.precomputed_collocations: # <<<<<<<<<<<<<< @@ -44881,7 +44881,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_10get_precomp __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":504 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":504 * def get_precomputed_collocation(self, phrase): * if phrase in self.precomputed_collocations: * arr = self.precomputed_collocations[phrase] # <<<<<<<<<<<<<< @@ -44893,7 +44893,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_10get_precomp __pyx_v_arr = __pyx_t_3; __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":505 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":505 * if phrase in self.precomputed_collocations: * arr = self.precomputed_collocations[phrase] * return PhraseLocation(arr=arr, arr_low=0, arr_high=len(arr), num_subpatterns=phrase.arity()+1) # <<<<<<<<<<<<<< @@ -44928,7 +44928,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_10get_precomp goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":506 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":506 * arr = self.precomputed_collocations[phrase] * return PhraseLocation(arr=arr, arr_low=0, arr_high=len(arr), num_subpatterns=phrase.arity()+1) * return None # <<<<<<<<<<<<<< @@ -44940,7 +44940,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_10get_precomp __pyx_r = Py_None; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":502 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":502 * * * def get_precomputed_collocation(self, phrase): # <<<<<<<<<<<<<< @@ -44962,7 +44962,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_10get_precomp return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":509 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":509 * * * cdef int* baeza_yates_helper(self, int low1, int high1, int* arr1, int step1, # <<<<<<<<<<<<<< @@ -45008,7 +45008,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( int __pyx_clineno = 0; __Pyx_RefNannySetupContext("baeza_yates_helper", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":522 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":522 * cdef Matching loc1, loc2 * * result = malloc(0*sizeof(int*)) # <<<<<<<<<<<<<< @@ -45017,7 +45017,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_result = ((int *)malloc((0 * (sizeof(int *))))); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":524 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":524 * result = malloc(0*sizeof(int*)) * * d_first = 0 # <<<<<<<<<<<<<< @@ -45026,7 +45026,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_d_first = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":525 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":525 * * d_first = 0 * if high1 - low1 > high2 - low2: # <<<<<<<<<<<<<< @@ -45036,7 +45036,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( __pyx_t_1 = (((__pyx_v_high1 - __pyx_v_low1) > (__pyx_v_high2 - __pyx_v_low2)) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":526 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":526 * d_first = 0 * if high1 - low1 > high2 - low2: * d_first = 1 # <<<<<<<<<<<<<< @@ -45048,7 +45048,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( } __pyx_L3:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":530 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":530 * # First, check to see if we are at any of the recursive base cases * # Case 1: one of the sets is empty * if low1 >= high1 or low2 >= high2: # <<<<<<<<<<<<<< @@ -45064,7 +45064,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( } if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":531 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":531 * # Case 1: one of the sets is empty * if low1 >= high1 or low2 >= high2: * return result # <<<<<<<<<<<<<< @@ -45075,7 +45075,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":534 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":534 * * # Case 2: sets are non-overlapping * assign_matching(&loc1, arr1, high1-step1, step1, self.fda.sent_id.arr) # <<<<<<<<<<<<<< @@ -45084,7 +45084,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_f_4cdec_2sa_3_sa_assign_matching((&__pyx_v_loc1), __pyx_v_arr1, (__pyx_v_high1 - __pyx_v_step1), __pyx_v_step1, __pyx_v_self->fda->sent_id->arr); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":535 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":535 * # Case 2: sets are non-overlapping * assign_matching(&loc1, arr1, high1-step1, step1, self.fda.sent_id.arr) * assign_matching(&loc2, arr2, low2, step2, self.fda.sent_id.arr) # <<<<<<<<<<<<<< @@ -45093,7 +45093,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_f_4cdec_2sa_3_sa_assign_matching((&__pyx_v_loc2), __pyx_v_arr2, __pyx_v_low2, __pyx_v_step2, __pyx_v_self->fda->sent_id->arr); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":536 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":536 * assign_matching(&loc1, arr1, high1-step1, step1, self.fda.sent_id.arr) * assign_matching(&loc2, arr2, low2, step2, self.fda.sent_id.arr) * if self.compare_matchings(&loc1, &loc2, offset_by_one, len_last) == -1: # <<<<<<<<<<<<<< @@ -45103,7 +45103,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( __pyx_t_3 = ((((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->compare_matchings(__pyx_v_self, (&__pyx_v_loc1), (&__pyx_v_loc2), __pyx_v_offset_by_one, __pyx_v_len_last) == -1) != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":537 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":537 * assign_matching(&loc2, arr2, low2, step2, self.fda.sent_id.arr) * if self.compare_matchings(&loc1, &loc2, offset_by_one, len_last) == -1: * return result # <<<<<<<<<<<<<< @@ -45114,7 +45114,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":539 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":539 * return result * * assign_matching(&loc1, arr1, low1, step1, self.fda.sent_id.arr) # <<<<<<<<<<<<<< @@ -45123,7 +45123,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_f_4cdec_2sa_3_sa_assign_matching((&__pyx_v_loc1), __pyx_v_arr1, __pyx_v_low1, __pyx_v_step1, __pyx_v_self->fda->sent_id->arr); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":540 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":540 * * assign_matching(&loc1, arr1, low1, step1, self.fda.sent_id.arr) * assign_matching(&loc2, arr2, high2-step2, step2, self.fda.sent_id.arr) # <<<<<<<<<<<<<< @@ -45132,7 +45132,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_f_4cdec_2sa_3_sa_assign_matching((&__pyx_v_loc2), __pyx_v_arr2, (__pyx_v_high2 - __pyx_v_step2), __pyx_v_step2, __pyx_v_self->fda->sent_id->arr); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":541 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":541 * assign_matching(&loc1, arr1, low1, step1, self.fda.sent_id.arr) * assign_matching(&loc2, arr2, high2-step2, step2, self.fda.sent_id.arr) * if self.compare_matchings(&loc1, &loc2, offset_by_one, len_last) == 1: # <<<<<<<<<<<<<< @@ -45142,7 +45142,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( __pyx_t_3 = ((((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->compare_matchings(__pyx_v_self, (&__pyx_v_loc1), (&__pyx_v_loc2), __pyx_v_offset_by_one, __pyx_v_len_last) == 1) != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":542 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":542 * assign_matching(&loc2, arr2, high2-step2, step2, self.fda.sent_id.arr) * if self.compare_matchings(&loc1, &loc2, offset_by_one, len_last) == 1: * return result # <<<<<<<<<<<<<< @@ -45153,7 +45153,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":546 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":546 * # Case 3: query set and data set do not meet size mismatch constraints; * # We use mergesort instead in this case * qsetsize = (high1-low1) / step1 # <<<<<<<<<<<<<< @@ -45183,7 +45183,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( } __pyx_v_qsetsize = __Pyx_div_int(__pyx_t_4, __pyx_v_step1); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":547 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":547 * # We use mergesort instead in this case * qsetsize = (high1-low1) / step1 * dsetsize = (high2-low2) / step2 # <<<<<<<<<<<<<< @@ -45213,7 +45213,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( } __pyx_v_dsetsize = __Pyx_div_int(__pyx_t_4, __pyx_v_step2); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":548 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":548 * qsetsize = (high1-low1) / step1 * dsetsize = (high2-low2) / step2 * if d_first: # <<<<<<<<<<<<<< @@ -45223,7 +45223,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( __pyx_t_3 = (__pyx_v_d_first != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":549 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":549 * dsetsize = (high2-low2) / step2 * if d_first: * tmp = qsetsize # <<<<<<<<<<<<<< @@ -45232,7 +45232,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_tmp = __pyx_v_qsetsize; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":550 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":550 * if d_first: * tmp = qsetsize * qsetsize = dsetsize # <<<<<<<<<<<<<< @@ -45241,7 +45241,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_qsetsize = __pyx_v_dsetsize; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":551 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":551 * tmp = qsetsize * qsetsize = dsetsize * dsetsize = tmp # <<<<<<<<<<<<<< @@ -45253,7 +45253,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( } __pyx_L7:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":553 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":553 * dsetsize = tmp * * if self.by_slack_factor * qsetsize * log(dsetsize) / log(2) > dsetsize: # <<<<<<<<<<<<<< @@ -45275,7 +45275,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( __pyx_t_3 = (((__pyx_t_5 / __pyx_t_6) > __pyx_v_dsetsize) != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":554 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":554 * * if self.by_slack_factor * qsetsize * log(dsetsize) / log(2) > dsetsize: * free(result) # <<<<<<<<<<<<<< @@ -45284,7 +45284,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ free(__pyx_v_result); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":555 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":555 * if self.by_slack_factor * qsetsize * log(dsetsize) / log(2) > dsetsize: * free(result) * return self.merge_helper(low1, high1, arr1, step1, low2, high2, arr2, step2, offset_by_one, len_last, num_subpatterns, result_len) # <<<<<<<<<<<<<< @@ -45295,7 +45295,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":559 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":559 * # binary search. There are two flavors, depending on * # whether the queryset or dataset is first * if d_first: # <<<<<<<<<<<<<< @@ -45305,7 +45305,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( __pyx_t_3 = (__pyx_v_d_first != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":560 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":560 * # whether the queryset or dataset is first * if d_first: * med2 = median(low2, high2, step2) # <<<<<<<<<<<<<< @@ -45314,7 +45314,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_med2 = __pyx_f_4cdec_2sa_3_sa_median(__pyx_v_low2, __pyx_v_high2, __pyx_v_step2); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":561 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":561 * if d_first: * med2 = median(low2, high2, step2) * assign_matching(&loc2, arr2, med2, step2, self.fda.sent_id.arr) # <<<<<<<<<<<<<< @@ -45323,7 +45323,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_f_4cdec_2sa_3_sa_assign_matching((&__pyx_v_loc2), __pyx_v_arr2, __pyx_v_med2, __pyx_v_step2, __pyx_v_self->fda->sent_id->arr); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":563 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":563 * assign_matching(&loc2, arr2, med2, step2, self.fda.sent_id.arr) * * search_low = low1 # <<<<<<<<<<<<<< @@ -45332,7 +45332,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_search_low = __pyx_v_low1; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":564 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":564 * * search_low = low1 * search_high = high1 # <<<<<<<<<<<<<< @@ -45341,7 +45341,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_search_high = __pyx_v_high1; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":565 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":565 * search_low = low1 * search_high = high1 * while search_low < search_high: # <<<<<<<<<<<<<< @@ -45352,7 +45352,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( __pyx_t_3 = ((__pyx_v_search_low < __pyx_v_search_high) != 0); if (!__pyx_t_3) break; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":566 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":566 * search_high = high1 * while search_low < search_high: * med1 = median(search_low, search_high, step1) # <<<<<<<<<<<<<< @@ -45361,7 +45361,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_med1 = __pyx_f_4cdec_2sa_3_sa_median(__pyx_v_search_low, __pyx_v_search_high, __pyx_v_step1); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":567 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":567 * while search_low < search_high: * med1 = median(search_low, search_high, step1) * find_comparable_matchings(low1, high1, arr1, step1, med1, &med1_minus, &med1_plus) # <<<<<<<<<<<<<< @@ -45370,7 +45370,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_f_4cdec_2sa_3_sa_find_comparable_matchings(__pyx_v_low1, __pyx_v_high1, __pyx_v_arr1, __pyx_v_step1, __pyx_v_med1, (&__pyx_v_med1_minus), (&__pyx_v_med1_plus)); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":568 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":568 * med1 = median(search_low, search_high, step1) * find_comparable_matchings(low1, high1, arr1, step1, med1, &med1_minus, &med1_plus) * comparison = self.compare_matchings_set(med1_minus, med1_plus, arr1, step1, &loc2, offset_by_one, len_last) # <<<<<<<<<<<<<< @@ -45379,7 +45379,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_comparison = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->compare_matchings_set(__pyx_v_self, __pyx_v_med1_minus, __pyx_v_med1_plus, __pyx_v_arr1, __pyx_v_step1, (&__pyx_v_loc2), __pyx_v_offset_by_one, __pyx_v_len_last); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":571 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":571 * if comparison == -1: * search_low = med1_plus * elif comparison == 1: # <<<<<<<<<<<<<< @@ -45388,7 +45388,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ switch (__pyx_v_comparison) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":569 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":569 * find_comparable_matchings(low1, high1, arr1, step1, med1, &med1_minus, &med1_plus) * comparison = self.compare_matchings_set(med1_minus, med1_plus, arr1, step1, &loc2, offset_by_one, len_last) * if comparison == -1: # <<<<<<<<<<<<<< @@ -45397,7 +45397,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ case -1: - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":570 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":570 * comparison = self.compare_matchings_set(med1_minus, med1_plus, arr1, step1, &loc2, offset_by_one, len_last) * if comparison == -1: * search_low = med1_plus # <<<<<<<<<<<<<< @@ -45407,7 +45407,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( __pyx_v_search_low = __pyx_v_med1_plus; break; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":571 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":571 * if comparison == -1: * search_low = med1_plus * elif comparison == 1: # <<<<<<<<<<<<<< @@ -45416,7 +45416,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ case 1: - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":572 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":572 * search_low = med1_plus * elif comparison == 1: * search_high = med1_minus # <<<<<<<<<<<<<< @@ -45427,7 +45427,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( break; default: - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":574 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":574 * search_high = med1_minus * else: * break # <<<<<<<<<<<<<< @@ -45443,7 +45443,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":576 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":576 * break * else: * med1 = median(low1, high1, step1) # <<<<<<<<<<<<<< @@ -45452,7 +45452,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_med1 = __pyx_f_4cdec_2sa_3_sa_median(__pyx_v_low1, __pyx_v_high1, __pyx_v_step1); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":577 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":577 * else: * med1 = median(low1, high1, step1) * find_comparable_matchings(low1, high1, arr1, step1, med1, &med1_minus, &med1_plus) # <<<<<<<<<<<<<< @@ -45461,7 +45461,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_f_4cdec_2sa_3_sa_find_comparable_matchings(__pyx_v_low1, __pyx_v_high1, __pyx_v_arr1, __pyx_v_step1, __pyx_v_med1, (&__pyx_v_med1_minus), (&__pyx_v_med1_plus)); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":579 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":579 * find_comparable_matchings(low1, high1, arr1, step1, med1, &med1_minus, &med1_plus) * * search_low = low2 # <<<<<<<<<<<<<< @@ -45470,7 +45470,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_search_low = __pyx_v_low2; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":580 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":580 * * search_low = low2 * search_high = high2 # <<<<<<<<<<<<<< @@ -45479,7 +45479,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_search_high = __pyx_v_high2; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":581 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":581 * search_low = low2 * search_high = high2 * while search_low < search_high: # <<<<<<<<<<<<<< @@ -45490,7 +45490,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( __pyx_t_3 = ((__pyx_v_search_low < __pyx_v_search_high) != 0); if (!__pyx_t_3) break; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":582 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":582 * search_high = high2 * while search_low < search_high: * med2 = median(search_low, search_high, step2) # <<<<<<<<<<<<<< @@ -45499,7 +45499,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_med2 = __pyx_f_4cdec_2sa_3_sa_median(__pyx_v_search_low, __pyx_v_search_high, __pyx_v_step2); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":583 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":583 * while search_low < search_high: * med2 = median(search_low, search_high, step2) * assign_matching(&loc2, arr2, med2, step2, self.fda.sent_id.arr) # <<<<<<<<<<<<<< @@ -45508,7 +45508,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_f_4cdec_2sa_3_sa_assign_matching((&__pyx_v_loc2), __pyx_v_arr2, __pyx_v_med2, __pyx_v_step2, __pyx_v_self->fda->sent_id->arr); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":584 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":584 * med2 = median(search_low, search_high, step2) * assign_matching(&loc2, arr2, med2, step2, self.fda.sent_id.arr) * comparison = self.compare_matchings_set(med1_minus, med1_plus, arr1, step1, &loc2, offset_by_one, len_last) # <<<<<<<<<<<<<< @@ -45517,7 +45517,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_comparison = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->compare_matchings_set(__pyx_v_self, __pyx_v_med1_minus, __pyx_v_med1_plus, __pyx_v_arr1, __pyx_v_step1, (&__pyx_v_loc2), __pyx_v_offset_by_one, __pyx_v_len_last); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":587 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":587 * if comparison == -1: * search_high = med2 * elif comparison == 1: # <<<<<<<<<<<<<< @@ -45526,7 +45526,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ switch (__pyx_v_comparison) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":585 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":585 * assign_matching(&loc2, arr2, med2, step2, self.fda.sent_id.arr) * comparison = self.compare_matchings_set(med1_minus, med1_plus, arr1, step1, &loc2, offset_by_one, len_last) * if comparison == -1: # <<<<<<<<<<<<<< @@ -45535,7 +45535,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ case -1: - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":586 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":586 * comparison = self.compare_matchings_set(med1_minus, med1_plus, arr1, step1, &loc2, offset_by_one, len_last) * if comparison == -1: * search_high = med2 # <<<<<<<<<<<<<< @@ -45545,7 +45545,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( __pyx_v_search_high = __pyx_v_med2; break; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":587 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":587 * if comparison == -1: * search_high = med2 * elif comparison == 1: # <<<<<<<<<<<<<< @@ -45554,7 +45554,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ case 1: - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":588 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":588 * search_high = med2 * elif comparison == 1: * search_low = med2 + step2 # <<<<<<<<<<<<<< @@ -45565,7 +45565,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( break; default: - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":590 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":590 * search_low = med2 + step2 * else: * break # <<<<<<<<<<<<<< @@ -45580,7 +45580,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( } __pyx_L9:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":592 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":592 * break * * med_result_len = 0 # <<<<<<<<<<<<<< @@ -45589,7 +45589,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_med_result_len = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":593 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":593 * * med_result_len = 0 * med_result = malloc(0*sizeof(int*)) # <<<<<<<<<<<<<< @@ -45598,7 +45598,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_med_result = ((int *)malloc((0 * (sizeof(int *))))); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":594 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":594 * med_result_len = 0 * med_result = malloc(0*sizeof(int*)) * if search_high > search_low: # <<<<<<<<<<<<<< @@ -45608,7 +45608,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( __pyx_t_3 = ((__pyx_v_search_high > __pyx_v_search_low) != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":600 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":600 * # want to store the bindings for all of those elements. We can * # subsequently throw all of them away. * med2_minus = med2 # <<<<<<<<<<<<<< @@ -45617,7 +45617,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_med2_minus = __pyx_v_med2; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":601 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":601 * # subsequently throw all of them away. * med2_minus = med2 * med2_plus = med2 + step2 # <<<<<<<<<<<<<< @@ -45626,7 +45626,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_med2_plus = (__pyx_v_med2 + __pyx_v_step2); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":602 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":602 * med2_minus = med2 * med2_plus = med2 + step2 * i1 = med1_minus # <<<<<<<<<<<<<< @@ -45635,7 +45635,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_i1 = __pyx_v_med1_minus; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":603 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":603 * med2_plus = med2 + step2 * i1 = med1_minus * while i1 < med1_plus: # <<<<<<<<<<<<<< @@ -45646,7 +45646,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( __pyx_t_3 = ((__pyx_v_i1 < __pyx_v_med1_plus) != 0); if (!__pyx_t_3) break; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":604 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":604 * i1 = med1_minus * while i1 < med1_plus: * assign_matching(&loc1, arr1, i1, step1, self.fda.sent_id.arr) # <<<<<<<<<<<<<< @@ -45655,7 +45655,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_f_4cdec_2sa_3_sa_assign_matching((&__pyx_v_loc1), __pyx_v_arr1, __pyx_v_i1, __pyx_v_step1, __pyx_v_self->fda->sent_id->arr); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":605 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":605 * while i1 < med1_plus: * assign_matching(&loc1, arr1, i1, step1, self.fda.sent_id.arr) * while med2_minus-step2 >= low2: # <<<<<<<<<<<<<< @@ -45666,7 +45666,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( __pyx_t_3 = (((__pyx_v_med2_minus - __pyx_v_step2) >= __pyx_v_low2) != 0); if (!__pyx_t_3) break; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":606 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":606 * assign_matching(&loc1, arr1, i1, step1, self.fda.sent_id.arr) * while med2_minus-step2 >= low2: * assign_matching(&loc2, arr2, med2_minus-step2, step2, self.fda.sent_id.arr) # <<<<<<<<<<<<<< @@ -45675,7 +45675,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_f_4cdec_2sa_3_sa_assign_matching((&__pyx_v_loc2), __pyx_v_arr2, (__pyx_v_med2_minus - __pyx_v_step2), __pyx_v_step2, __pyx_v_self->fda->sent_id->arr); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":607 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":607 * while med2_minus-step2 >= low2: * assign_matching(&loc2, arr2, med2_minus-step2, step2, self.fda.sent_id.arr) * if self.compare_matchings(&loc1, &loc2, offset_by_one, len_last) < 1: # <<<<<<<<<<<<<< @@ -45685,7 +45685,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( __pyx_t_3 = ((((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->compare_matchings(__pyx_v_self, (&__pyx_v_loc1), (&__pyx_v_loc2), __pyx_v_offset_by_one, __pyx_v_len_last) < 1) != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":608 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":608 * assign_matching(&loc2, arr2, med2_minus-step2, step2, self.fda.sent_id.arr) * if self.compare_matchings(&loc1, &loc2, offset_by_one, len_last) < 1: * med2_minus = med2_minus - step2 # <<<<<<<<<<<<<< @@ -45697,7 +45697,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":610 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":610 * med2_minus = med2_minus - step2 * else: * break # <<<<<<<<<<<<<< @@ -45710,7 +45710,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( } __pyx_L18_break:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":611 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":611 * else: * break * i2 = med2_minus # <<<<<<<<<<<<<< @@ -45719,7 +45719,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_i2 = __pyx_v_med2_minus; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":612 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":612 * break * i2 = med2_minus * while i2 < high2: # <<<<<<<<<<<<<< @@ -45730,7 +45730,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( __pyx_t_3 = ((__pyx_v_i2 < __pyx_v_high2) != 0); if (!__pyx_t_3) break; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":613 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":613 * i2 = med2_minus * while i2 < high2: * assign_matching(&loc2, arr2, i2, step2, self.fda.sent_id.arr) # <<<<<<<<<<<<<< @@ -45739,7 +45739,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_f_4cdec_2sa_3_sa_assign_matching((&__pyx_v_loc2), __pyx_v_arr2, __pyx_v_i2, __pyx_v_step2, __pyx_v_self->fda->sent_id->arr); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":614 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":614 * while i2 < high2: * assign_matching(&loc2, arr2, i2, step2, self.fda.sent_id.arr) * comparison = self.compare_matchings(&loc1, &loc2, offset_by_one, len_last) # <<<<<<<<<<<<<< @@ -45748,7 +45748,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_comparison = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->compare_matchings(__pyx_v_self, (&__pyx_v_loc1), (&__pyx_v_loc2), __pyx_v_offset_by_one, __pyx_v_len_last); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":615 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":615 * assign_matching(&loc2, arr2, i2, step2, self.fda.sent_id.arr) * comparison = self.compare_matchings(&loc1, &loc2, offset_by_one, len_last) * if comparison == 0: # <<<<<<<<<<<<<< @@ -45758,7 +45758,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( __pyx_t_3 = ((__pyx_v_comparison == 0) != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":617 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":617 * if comparison == 0: * pass * med_result = append_combined_matching(med_result, &loc1, &loc2, offset_by_one, num_subpatterns, &med_result_len) # <<<<<<<<<<<<<< @@ -45770,7 +45770,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( } __pyx_L22:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":618 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":618 * pass * med_result = append_combined_matching(med_result, &loc1, &loc2, offset_by_one, num_subpatterns, &med_result_len) * if comparison == -1: # <<<<<<<<<<<<<< @@ -45780,7 +45780,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( __pyx_t_3 = ((__pyx_v_comparison == -1) != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":619 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":619 * med_result = append_combined_matching(med_result, &loc1, &loc2, offset_by_one, num_subpatterns, &med_result_len) * if comparison == -1: * break # <<<<<<<<<<<<<< @@ -45790,7 +45790,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( goto __pyx_L21_break; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":620 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":620 * if comparison == -1: * break * i2 = i2 + step2 # <<<<<<<<<<<<<< @@ -45801,7 +45801,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( } __pyx_L21_break:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":621 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":621 * break * i2 = i2 + step2 * if i2 > med2_plus: # <<<<<<<<<<<<<< @@ -45811,7 +45811,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( __pyx_t_3 = ((__pyx_v_i2 > __pyx_v_med2_plus) != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":622 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":622 * i2 = i2 + step2 * if i2 > med2_plus: * med2_plus = i2 # <<<<<<<<<<<<<< @@ -45823,7 +45823,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( } __pyx_L24:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":623 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":623 * if i2 > med2_plus: * med2_plus = i2 * i1 = i1 + step1 # <<<<<<<<<<<<<< @@ -45833,7 +45833,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( __pyx_v_i1 = (__pyx_v_i1 + __pyx_v_step1); } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":625 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":625 * i1 = i1 + step1 * * tmp = med1_minus # <<<<<<<<<<<<<< @@ -45842,7 +45842,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_tmp = __pyx_v_med1_minus; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":626 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":626 * * tmp = med1_minus * med1_minus = med1_plus # <<<<<<<<<<<<<< @@ -45851,7 +45851,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_med1_minus = __pyx_v_med1_plus; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":627 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":627 * tmp = med1_minus * med1_minus = med1_plus * med1_plus = tmp # <<<<<<<<<<<<<< @@ -45863,7 +45863,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":630 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":630 * else: * # No match; need to figure out the point of division in D and Q * med2_minus = med2 # <<<<<<<<<<<<<< @@ -45872,7 +45872,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_med2_minus = __pyx_v_med2; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":631 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":631 * # No match; need to figure out the point of division in D and Q * med2_minus = med2 * med2_plus = med2 # <<<<<<<<<<<<<< @@ -45881,7 +45881,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_med2_plus = __pyx_v_med2; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":632 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":632 * med2_minus = med2 * med2_plus = med2 * if d_first: # <<<<<<<<<<<<<< @@ -45891,7 +45891,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( __pyx_t_3 = (__pyx_v_d_first != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":633 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":633 * med2_plus = med2 * if d_first: * med2_minus = med2_minus + step2 # <<<<<<<<<<<<<< @@ -45900,7 +45900,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_med2_minus = (__pyx_v_med2_minus + __pyx_v_step2); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":634 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":634 * if d_first: * med2_minus = med2_minus + step2 * if comparison == -1: # <<<<<<<<<<<<<< @@ -45910,7 +45910,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( __pyx_t_3 = ((__pyx_v_comparison == -1) != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":635 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":635 * med2_minus = med2_minus + step2 * if comparison == -1: * med1_minus = med1_plus # <<<<<<<<<<<<<< @@ -45922,7 +45922,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( } __pyx_L26:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":636 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":636 * if comparison == -1: * med1_minus = med1_plus * if comparison == 1: # <<<<<<<<<<<<<< @@ -45932,7 +45932,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( __pyx_t_3 = ((__pyx_v_comparison == 1) != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":637 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":637 * med1_minus = med1_plus * if comparison == 1: * med1_plus = med1_minus # <<<<<<<<<<<<<< @@ -45947,7 +45947,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":639 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":639 * med1_plus = med1_minus * else: * tmp = med1_minus # <<<<<<<<<<<<<< @@ -45956,7 +45956,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_tmp = __pyx_v_med1_minus; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":640 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":640 * else: * tmp = med1_minus * med1_minus = med1_plus # <<<<<<<<<<<<<< @@ -45965,7 +45965,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_med1_minus = __pyx_v_med1_plus; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":641 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":641 * tmp = med1_minus * med1_minus = med1_plus * med1_plus = tmp # <<<<<<<<<<<<<< @@ -45974,7 +45974,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_med1_plus = __pyx_v_tmp; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":642 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":642 * med1_minus = med1_plus * med1_plus = tmp * if comparison == 1: # <<<<<<<<<<<<<< @@ -45984,7 +45984,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( __pyx_t_3 = ((__pyx_v_comparison == 1) != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":643 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":643 * med1_plus = tmp * if comparison == 1: * med2_minus = med2_minus + step2 # <<<<<<<<<<<<<< @@ -45993,7 +45993,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_med2_minus = (__pyx_v_med2_minus + __pyx_v_step2); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":644 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":644 * if comparison == 1: * med2_minus = med2_minus + step2 * med2_plus = med2_plus + step2 # <<<<<<<<<<<<<< @@ -46009,7 +46009,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( } __pyx_L14:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":646 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":646 * med2_plus = med2_plus + step2 * * low_result_len = 0 # <<<<<<<<<<<<<< @@ -46018,7 +46018,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_low_result_len = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":647 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":647 * * low_result_len = 0 * low_result = self.baeza_yates_helper(low1, med1_plus, arr1, step1, low2, med2_plus, arr2, step2, offset_by_one, len_last, num_subpatterns, &low_result_len) # <<<<<<<<<<<<<< @@ -46027,7 +46027,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_low_result = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->baeza_yates_helper(__pyx_v_self, __pyx_v_low1, __pyx_v_med1_plus, __pyx_v_arr1, __pyx_v_step1, __pyx_v_low2, __pyx_v_med2_plus, __pyx_v_arr2, __pyx_v_step2, __pyx_v_offset_by_one, __pyx_v_len_last, __pyx_v_num_subpatterns, (&__pyx_v_low_result_len)); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":648 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":648 * low_result_len = 0 * low_result = self.baeza_yates_helper(low1, med1_plus, arr1, step1, low2, med2_plus, arr2, step2, offset_by_one, len_last, num_subpatterns, &low_result_len) * high_result_len = 0 # <<<<<<<<<<<<<< @@ -46036,7 +46036,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_high_result_len = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":649 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":649 * low_result = self.baeza_yates_helper(low1, med1_plus, arr1, step1, low2, med2_plus, arr2, step2, offset_by_one, len_last, num_subpatterns, &low_result_len) * high_result_len = 0 * high_result = self.baeza_yates_helper(med1_minus, high1, arr1, step1, med2_minus, high2, arr2, step2, offset_by_one, len_last, num_subpatterns, &high_result_len) # <<<<<<<<<<<<<< @@ -46045,7 +46045,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_high_result = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->baeza_yates_helper(__pyx_v_self, __pyx_v_med1_minus, __pyx_v_high1, __pyx_v_arr1, __pyx_v_step1, __pyx_v_med2_minus, __pyx_v_high2, __pyx_v_arr2, __pyx_v_step2, __pyx_v_offset_by_one, __pyx_v_len_last, __pyx_v_num_subpatterns, (&__pyx_v_high_result_len)); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":651 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":651 * high_result = self.baeza_yates_helper(med1_minus, high1, arr1, step1, med2_minus, high2, arr2, step2, offset_by_one, len_last, num_subpatterns, &high_result_len) * * result = extend_arr(result, result_len, low_result, low_result_len) # <<<<<<<<<<<<<< @@ -46054,7 +46054,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_result = __pyx_f_4cdec_2sa_3_sa_extend_arr(__pyx_v_result, __pyx_v_result_len, __pyx_v_low_result, __pyx_v_low_result_len); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":652 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":652 * * result = extend_arr(result, result_len, low_result, low_result_len) * result = extend_arr(result, result_len, med_result, med_result_len) # <<<<<<<<<<<<<< @@ -46063,7 +46063,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_result = __pyx_f_4cdec_2sa_3_sa_extend_arr(__pyx_v_result, __pyx_v_result_len, __pyx_v_med_result, __pyx_v_med_result_len); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":653 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":653 * result = extend_arr(result, result_len, low_result, low_result_len) * result = extend_arr(result, result_len, med_result, med_result_len) * result = extend_arr(result, result_len, high_result, high_result_len) # <<<<<<<<<<<<<< @@ -46072,7 +46072,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_result = __pyx_f_4cdec_2sa_3_sa_extend_arr(__pyx_v_result, __pyx_v_result_len, __pyx_v_high_result, __pyx_v_high_result_len); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":654 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":654 * result = extend_arr(result, result_len, med_result, med_result_len) * result = extend_arr(result, result_len, high_result, high_result_len) * free(low_result) # <<<<<<<<<<<<<< @@ -46081,7 +46081,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ free(__pyx_v_low_result); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":655 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":655 * result = extend_arr(result, result_len, high_result, high_result_len) * free(low_result) * free(med_result) # <<<<<<<<<<<<<< @@ -46090,7 +46090,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ free(__pyx_v_med_result); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":656 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":656 * free(low_result) * free(med_result) * free(high_result) # <<<<<<<<<<<<<< @@ -46099,7 +46099,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ free(__pyx_v_high_result); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":658 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":658 * free(high_result) * * return result # <<<<<<<<<<<<<< @@ -46109,7 +46109,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":509 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":509 * * * cdef int* baeza_yates_helper(self, int low1, int high1, int* arr1, int step1, # <<<<<<<<<<<<<< @@ -46126,7 +46126,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":662 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":662 * * * cdef long compare_matchings_set(self, int i1_minus, int i1_plus, int* arr1, int step1, # <<<<<<<<<<<<<< @@ -46145,7 +46145,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings_s int __pyx_t_1; __Pyx_RefNannySetupContext("compare_matchings_set", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":673 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":673 * cdef Matching* loc1 * * loc1 = &l1_stack # <<<<<<<<<<<<<< @@ -46154,7 +46154,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings_s */ __pyx_v_loc1 = (&__pyx_v_l1_stack); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":675 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":675 * loc1 = &l1_stack * * i1 = i1_minus # <<<<<<<<<<<<<< @@ -46163,7 +46163,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings_s */ __pyx_v_i1 = __pyx_v_i1_minus; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":676 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":676 * * i1 = i1_minus * while i1 < i1_plus: # <<<<<<<<<<<<<< @@ -46174,7 +46174,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings_s __pyx_t_1 = ((__pyx_v_i1 < __pyx_v_i1_plus) != 0); if (!__pyx_t_1) break; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":677 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":677 * i1 = i1_minus * while i1 < i1_plus: * assign_matching(loc1, arr1, i1, step1, self.fda.sent_id.arr) # <<<<<<<<<<<<<< @@ -46183,7 +46183,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings_s */ __pyx_f_4cdec_2sa_3_sa_assign_matching(__pyx_v_loc1, __pyx_v_arr1, __pyx_v_i1, __pyx_v_step1, __pyx_v_self->fda->sent_id->arr); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":678 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":678 * while i1 < i1_plus: * assign_matching(loc1, arr1, i1, step1, self.fda.sent_id.arr) * comparison = self.compare_matchings(loc1, loc2, offset_by_one, len_last) # <<<<<<<<<<<<<< @@ -46192,7 +46192,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings_s */ __pyx_v_comparison = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->compare_matchings(__pyx_v_self, __pyx_v_loc1, __pyx_v_loc2, __pyx_v_offset_by_one, __pyx_v_len_last); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":679 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":679 * assign_matching(loc1, arr1, i1, step1, self.fda.sent_id.arr) * comparison = self.compare_matchings(loc1, loc2, offset_by_one, len_last) * if comparison == 0: # <<<<<<<<<<<<<< @@ -46202,7 +46202,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings_s __pyx_t_1 = ((__pyx_v_comparison == 0) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":680 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":680 * comparison = self.compare_matchings(loc1, loc2, offset_by_one, len_last) * if comparison == 0: * prev_comparison = 0 # <<<<<<<<<<<<<< @@ -46211,7 +46211,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings_s */ __pyx_v_prev_comparison = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":681 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":681 * if comparison == 0: * prev_comparison = 0 * break # <<<<<<<<<<<<<< @@ -46221,7 +46221,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings_s goto __pyx_L4_break; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":682 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":682 * prev_comparison = 0 * break * elif i1 == i1_minus: # <<<<<<<<<<<<<< @@ -46231,7 +46231,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings_s __pyx_t_1 = ((__pyx_v_i1 == __pyx_v_i1_minus) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":683 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":683 * break * elif i1 == i1_minus: * prev_comparison = comparison # <<<<<<<<<<<<<< @@ -46243,7 +46243,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings_s } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":685 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":685 * prev_comparison = comparison * else: * if comparison != prev_comparison: # <<<<<<<<<<<<<< @@ -46253,7 +46253,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings_s __pyx_t_1 = ((__pyx_v_comparison != __pyx_v_prev_comparison) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":686 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":686 * else: * if comparison != prev_comparison: * prev_comparison = 0 # <<<<<<<<<<<<<< @@ -46262,7 +46262,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings_s */ __pyx_v_prev_comparison = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":687 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":687 * if comparison != prev_comparison: * prev_comparison = 0 * break # <<<<<<<<<<<<<< @@ -46274,7 +46274,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings_s } __pyx_L5:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":688 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":688 * prev_comparison = 0 * break * i1 = i1 + step1 # <<<<<<<<<<<<<< @@ -46285,7 +46285,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings_s } __pyx_L4_break:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":689 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":689 * break * i1 = i1 + step1 * return prev_comparison # <<<<<<<<<<<<<< @@ -46295,7 +46295,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings_s __pyx_r = __pyx_v_prev_comparison; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":662 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":662 * * * cdef long compare_matchings_set(self, int i1_minus, int i1_plus, int* arr1, int step1, # <<<<<<<<<<<<<< @@ -46309,7 +46309,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings_s return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":692 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":692 * * * cdef long compare_matchings(self, Matching* loc1, Matching* loc2, int offset_by_one, int len_last): # <<<<<<<<<<<<<< @@ -46327,7 +46327,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings(s int __pyx_t_4; __Pyx_RefNannySetupContext("compare_matchings", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":695 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":695 * cdef int i * * if loc1.sent_id > loc2.sent_id: # <<<<<<<<<<<<<< @@ -46337,7 +46337,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings(s __pyx_t_1 = ((__pyx_v_loc1->sent_id > __pyx_v_loc2->sent_id) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":696 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":696 * * if loc1.sent_id > loc2.sent_id: * return 1 # <<<<<<<<<<<<<< @@ -46348,7 +46348,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings(s goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":697 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":697 * if loc1.sent_id > loc2.sent_id: * return 1 * if loc2.sent_id > loc1.sent_id: # <<<<<<<<<<<<<< @@ -46358,7 +46358,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings(s __pyx_t_1 = ((__pyx_v_loc2->sent_id > __pyx_v_loc1->sent_id) != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":698 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":698 * return 1 * if loc2.sent_id > loc1.sent_id: * return -1 # <<<<<<<<<<<<<< @@ -46369,7 +46369,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings(s goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":700 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":700 * return -1 * * if loc1.size == 1 and loc2.size == 1: # <<<<<<<<<<<<<< @@ -46385,7 +46385,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings(s } if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":701 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":701 * * if loc1.size == 1 and loc2.size == 1: * if loc2.arr[loc2.start] - loc1.arr[loc1.start] <= self.train_min_gap_size: # <<<<<<<<<<<<<< @@ -46395,7 +46395,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings(s __pyx_t_3 = ((((__pyx_v_loc2->arr[__pyx_v_loc2->start]) - (__pyx_v_loc1->arr[__pyx_v_loc1->start])) <= __pyx_v_self->train_min_gap_size) != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":702 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":702 * if loc1.size == 1 and loc2.size == 1: * if loc2.arr[loc2.start] - loc1.arr[loc1.start] <= self.train_min_gap_size: * return 1 # <<<<<<<<<<<<<< @@ -46408,7 +46408,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings(s goto __pyx_L5; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":704 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":704 * return 1 * * elif offset_by_one: # <<<<<<<<<<<<<< @@ -46418,7 +46418,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings(s __pyx_t_3 = (__pyx_v_offset_by_one != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":705 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":705 * * elif offset_by_one: * for i from 1 <= i < loc1.size: # <<<<<<<<<<<<<< @@ -46428,7 +46428,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings(s __pyx_t_4 = __pyx_v_loc1->size; for (__pyx_v_i = 1; __pyx_v_i < __pyx_t_4; __pyx_v_i++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":706 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":706 * elif offset_by_one: * for i from 1 <= i < loc1.size: * if loc1.arr[loc1.start+i] > loc2.arr[loc2.start+i-1]: # <<<<<<<<<<<<<< @@ -46438,7 +46438,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings(s __pyx_t_3 = (((__pyx_v_loc1->arr[(__pyx_v_loc1->start + __pyx_v_i)]) > (__pyx_v_loc2->arr[((__pyx_v_loc2->start + __pyx_v_i) - 1)])) != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":707 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":707 * for i from 1 <= i < loc1.size: * if loc1.arr[loc1.start+i] > loc2.arr[loc2.start+i-1]: * return 1 # <<<<<<<<<<<<<< @@ -46449,7 +46449,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings(s goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":708 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":708 * if loc1.arr[loc1.start+i] > loc2.arr[loc2.start+i-1]: * return 1 * if loc1.arr[loc1.start+i] < loc2.arr[loc2.start+i-1]: # <<<<<<<<<<<<<< @@ -46459,7 +46459,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings(s __pyx_t_3 = (((__pyx_v_loc1->arr[(__pyx_v_loc1->start + __pyx_v_i)]) < (__pyx_v_loc2->arr[((__pyx_v_loc2->start + __pyx_v_i) - 1)])) != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":709 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":709 * return 1 * if loc1.arr[loc1.start+i] < loc2.arr[loc2.start+i-1]: * return -1 # <<<<<<<<<<<<<< @@ -46474,7 +46474,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings(s } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":712 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":712 * * else: * if loc1.arr[loc1.start]+1 > loc2.arr[loc2.start]: # <<<<<<<<<<<<<< @@ -46484,7 +46484,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings(s __pyx_t_3 = ((((__pyx_v_loc1->arr[__pyx_v_loc1->start]) + 1) > (__pyx_v_loc2->arr[__pyx_v_loc2->start])) != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":713 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":713 * else: * if loc1.arr[loc1.start]+1 > loc2.arr[loc2.start]: * return 1 # <<<<<<<<<<<<<< @@ -46495,7 +46495,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings(s goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":714 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":714 * if loc1.arr[loc1.start]+1 > loc2.arr[loc2.start]: * return 1 * if loc1.arr[loc1.start]+1 < loc2.arr[loc2.start]: # <<<<<<<<<<<<<< @@ -46505,7 +46505,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings(s __pyx_t_3 = ((((__pyx_v_loc1->arr[__pyx_v_loc1->start]) + 1) < (__pyx_v_loc2->arr[__pyx_v_loc2->start])) != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":715 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":715 * return 1 * if loc1.arr[loc1.start]+1 < loc2.arr[loc2.start]: * return -1 # <<<<<<<<<<<<<< @@ -46516,7 +46516,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings(s goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":717 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":717 * return -1 * * for i from 1 <= i < loc1.size: # <<<<<<<<<<<<<< @@ -46526,7 +46526,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings(s __pyx_t_4 = __pyx_v_loc1->size; for (__pyx_v_i = 1; __pyx_v_i < __pyx_t_4; __pyx_v_i++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":718 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":718 * * for i from 1 <= i < loc1.size: * if loc1.arr[loc1.start+i] > loc2.arr[loc2.start+i]: # <<<<<<<<<<<<<< @@ -46536,7 +46536,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings(s __pyx_t_3 = (((__pyx_v_loc1->arr[(__pyx_v_loc1->start + __pyx_v_i)]) > (__pyx_v_loc2->arr[(__pyx_v_loc2->start + __pyx_v_i)])) != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":719 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":719 * for i from 1 <= i < loc1.size: * if loc1.arr[loc1.start+i] > loc2.arr[loc2.start+i]: * return 1 # <<<<<<<<<<<<<< @@ -46547,7 +46547,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings(s goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":720 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":720 * if loc1.arr[loc1.start+i] > loc2.arr[loc2.start+i]: * return 1 * if loc1.arr[loc1.start+i] < loc2.arr[loc2.start+i]: # <<<<<<<<<<<<<< @@ -46557,7 +46557,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings(s __pyx_t_3 = (((__pyx_v_loc1->arr[(__pyx_v_loc1->start + __pyx_v_i)]) < (__pyx_v_loc2->arr[(__pyx_v_loc2->start + __pyx_v_i)])) != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":721 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":721 * return 1 * if loc1.arr[loc1.start+i] < loc2.arr[loc2.start+i]: * return -1 # <<<<<<<<<<<<<< @@ -46571,7 +46571,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings(s } __pyx_L5:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":723 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":723 * return -1 * * if loc2.arr[loc2.end-1] + len_last - loc1.arr[loc1.start] > self.train_max_initial_size: # <<<<<<<<<<<<<< @@ -46581,7 +46581,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings(s __pyx_t_3 = (((((__pyx_v_loc2->arr[(__pyx_v_loc2->end - 1)]) + __pyx_v_len_last) - (__pyx_v_loc1->arr[__pyx_v_loc1->start])) > __pyx_v_self->train_max_initial_size) != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":724 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":724 * * if loc2.arr[loc2.end-1] + len_last - loc1.arr[loc1.start] > self.train_max_initial_size: * return -1 # <<<<<<<<<<<<<< @@ -46592,7 +46592,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings(s goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":725 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":725 * if loc2.arr[loc2.end-1] + len_last - loc1.arr[loc1.start] > self.train_max_initial_size: * return -1 * return 0 # <<<<<<<<<<<<<< @@ -46602,7 +46602,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings(s __pyx_r = 0; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":692 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":692 * * * cdef long compare_matchings(self, Matching* loc1, Matching* loc2, int offset_by_one, int len_last): # <<<<<<<<<<<<<< @@ -46616,7 +46616,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings(s return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":728 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":728 * * * cdef int* merge_helper(self, int low1, int high1, int* arr1, int step1, # <<<<<<<<<<<<<< @@ -46640,7 +46640,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_merge_helper(struct int __pyx_t_3; __Pyx_RefNannySetupContext("merge_helper", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":736 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":736 * cdef Matching loc1, loc2 * * result_len[0] = 0 # <<<<<<<<<<<<<< @@ -46649,7 +46649,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_merge_helper(struct */ (__pyx_v_result_len[0]) = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":737 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":737 * * result_len[0] = 0 * result = malloc(0*sizeof(int)) # <<<<<<<<<<<<<< @@ -46658,7 +46658,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_merge_helper(struct */ __pyx_v_result = ((int *)malloc((0 * (sizeof(int))))); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":739 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":739 * result = malloc(0*sizeof(int)) * * i1 = low1 # <<<<<<<<<<<<<< @@ -46667,7 +46667,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_merge_helper(struct */ __pyx_v_i1 = __pyx_v_low1; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":740 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":740 * * i1 = low1 * i2 = low2 # <<<<<<<<<<<<<< @@ -46676,7 +46676,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_merge_helper(struct */ __pyx_v_i2 = __pyx_v_low2; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":741 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":741 * i1 = low1 * i2 = low2 * while i1 < high1 and i2 < high2: # <<<<<<<<<<<<<< @@ -46693,7 +46693,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_merge_helper(struct } if (!__pyx_t_3) break; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":744 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":744 * * # First, pop all unneeded loc2's off the stack * assign_matching(&loc1, arr1, i1, step1, self.fda.sent_id.arr) # <<<<<<<<<<<<<< @@ -46702,7 +46702,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_merge_helper(struct */ __pyx_f_4cdec_2sa_3_sa_assign_matching((&__pyx_v_loc1), __pyx_v_arr1, __pyx_v_i1, __pyx_v_step1, __pyx_v_self->fda->sent_id->arr); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":745 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":745 * # First, pop all unneeded loc2's off the stack * assign_matching(&loc1, arr1, i1, step1, self.fda.sent_id.arr) * while i2 < high2: # <<<<<<<<<<<<<< @@ -46713,7 +46713,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_merge_helper(struct __pyx_t_3 = ((__pyx_v_i2 < __pyx_v_high2) != 0); if (!__pyx_t_3) break; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":746 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":746 * assign_matching(&loc1, arr1, i1, step1, self.fda.sent_id.arr) * while i2 < high2: * assign_matching(&loc2, arr2, i2, step2, self.fda.sent_id.arr) # <<<<<<<<<<<<<< @@ -46722,7 +46722,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_merge_helper(struct */ __pyx_f_4cdec_2sa_3_sa_assign_matching((&__pyx_v_loc2), __pyx_v_arr2, __pyx_v_i2, __pyx_v_step2, __pyx_v_self->fda->sent_id->arr); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":747 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":747 * while i2 < high2: * assign_matching(&loc2, arr2, i2, step2, self.fda.sent_id.arr) * if self.compare_matchings(&loc1, &loc2, offset_by_one, len_last) == 1: # <<<<<<<<<<<<<< @@ -46732,7 +46732,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_merge_helper(struct __pyx_t_3 = ((((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->compare_matchings(__pyx_v_self, (&__pyx_v_loc1), (&__pyx_v_loc2), __pyx_v_offset_by_one, __pyx_v_len_last) == 1) != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":748 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":748 * assign_matching(&loc2, arr2, i2, step2, self.fda.sent_id.arr) * if self.compare_matchings(&loc1, &loc2, offset_by_one, len_last) == 1: * i2 = i2 + step2 # <<<<<<<<<<<<<< @@ -46744,7 +46744,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_merge_helper(struct } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":750 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":750 * i2 = i2 + step2 * else: * break # <<<<<<<<<<<<<< @@ -46757,7 +46757,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_merge_helper(struct } __pyx_L6_break:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":753 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":753 * * # Next: process all loc1's with the same starting val * j1 = i1 # <<<<<<<<<<<<<< @@ -46766,7 +46766,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_merge_helper(struct */ __pyx_v_j1 = __pyx_v_i1; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":754 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":754 * # Next: process all loc1's with the same starting val * j1 = i1 * while i1 < high1 and arr1[j1] == arr1[i1]: # <<<<<<<<<<<<<< @@ -46783,7 +46783,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_merge_helper(struct } if (!__pyx_t_2) break; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":755 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":755 * j1 = i1 * while i1 < high1 and arr1[j1] == arr1[i1]: * assign_matching(&loc1, arr1, i1, step1, self.fda.sent_id.arr) # <<<<<<<<<<<<<< @@ -46792,7 +46792,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_merge_helper(struct */ __pyx_f_4cdec_2sa_3_sa_assign_matching((&__pyx_v_loc1), __pyx_v_arr1, __pyx_v_i1, __pyx_v_step1, __pyx_v_self->fda->sent_id->arr); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":756 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":756 * while i1 < high1 and arr1[j1] == arr1[i1]: * assign_matching(&loc1, arr1, i1, step1, self.fda.sent_id.arr) * j2 = i2 # <<<<<<<<<<<<<< @@ -46801,7 +46801,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_merge_helper(struct */ __pyx_v_j2 = __pyx_v_i2; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":757 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":757 * assign_matching(&loc1, arr1, i1, step1, self.fda.sent_id.arr) * j2 = i2 * while j2 < high2: # <<<<<<<<<<<<<< @@ -46812,7 +46812,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_merge_helper(struct __pyx_t_2 = ((__pyx_v_j2 < __pyx_v_high2) != 0); if (!__pyx_t_2) break; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":758 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":758 * j2 = i2 * while j2 < high2: * assign_matching(&loc2, arr2, j2, step2, self.fda.sent_id.arr) # <<<<<<<<<<<<<< @@ -46821,7 +46821,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_merge_helper(struct */ __pyx_f_4cdec_2sa_3_sa_assign_matching((&__pyx_v_loc2), __pyx_v_arr2, __pyx_v_j2, __pyx_v_step2, __pyx_v_self->fda->sent_id->arr); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":759 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":759 * while j2 < high2: * assign_matching(&loc2, arr2, j2, step2, self.fda.sent_id.arr) * comparison = self.compare_matchings(&loc1, &loc2, offset_by_one, len_last) # <<<<<<<<<<<<<< @@ -46830,7 +46830,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_merge_helper(struct */ __pyx_v_comparison = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->compare_matchings(__pyx_v_self, (&__pyx_v_loc1), (&__pyx_v_loc2), __pyx_v_offset_by_one, __pyx_v_len_last); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":760 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":760 * assign_matching(&loc2, arr2, j2, step2, self.fda.sent_id.arr) * comparison = self.compare_matchings(&loc1, &loc2, offset_by_one, len_last) * if comparison == 0: # <<<<<<<<<<<<<< @@ -46840,7 +46840,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_merge_helper(struct __pyx_t_2 = ((__pyx_v_comparison == 0) != 0); if (__pyx_t_2) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":761 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":761 * comparison = self.compare_matchings(&loc1, &loc2, offset_by_one, len_last) * if comparison == 0: * result = append_combined_matching(result, &loc1, &loc2, offset_by_one, num_subpatterns, result_len) # <<<<<<<<<<<<<< @@ -46852,7 +46852,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_merge_helper(struct } __pyx_L12:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":762 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":762 * if comparison == 0: * result = append_combined_matching(result, &loc1, &loc2, offset_by_one, num_subpatterns, result_len) * if comparison == 1: # <<<<<<<<<<<<<< @@ -46865,7 +46865,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_merge_helper(struct } __pyx_L13:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":764 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":764 * if comparison == 1: * pass * if comparison == -1: # <<<<<<<<<<<<<< @@ -46875,7 +46875,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_merge_helper(struct __pyx_t_2 = ((__pyx_v_comparison == -1) != 0); if (__pyx_t_2) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":765 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":765 * pass * if comparison == -1: * break # <<<<<<<<<<<<<< @@ -46886,7 +46886,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_merge_helper(struct } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":767 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":767 * break * else: * j2 = j2 + step2 # <<<<<<<<<<<<<< @@ -46898,7 +46898,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_merge_helper(struct } __pyx_L11_break:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":768 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":768 * else: * j2 = j2 + step2 * i1 = i1 + step1 # <<<<<<<<<<<<<< @@ -46909,7 +46909,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_merge_helper(struct } } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":769 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":769 * j2 = j2 + step2 * i1 = i1 + step1 * return result # <<<<<<<<<<<<<< @@ -46919,7 +46919,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_merge_helper(struct __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":728 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":728 * * * cdef int* merge_helper(self, int low1, int high1, int* arr1, int step1, # <<<<<<<<<<<<<< @@ -46933,7 +46933,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_merge_helper(struct return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":772 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":772 * * * cdef void sort_phrase_loc(self, IntList arr, PhraseLocation loc, Phrase phrase): # <<<<<<<<<<<<<< @@ -46956,7 +46956,7 @@ static void __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_sort_phrase_loc(str int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sort_phrase_loc", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":777 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":777 * cdef IntList result * * if phrase in self.precomputed_index: # <<<<<<<<<<<<<< @@ -46967,7 +46967,7 @@ static void __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_sort_phrase_loc(str __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":778 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":778 * * if phrase in self.precomputed_index: * loc.arr = self.precomputed_index[phrase] # <<<<<<<<<<<<<< @@ -46986,7 +46986,7 @@ static void __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_sort_phrase_loc(str } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":780 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":780 * loc.arr = self.precomputed_index[phrase] * else: * loc.arr = IntList(initial_len=loc.sa_high-loc.sa_low) # <<<<<<<<<<<<<< @@ -47008,7 +47008,7 @@ static void __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_sort_phrase_loc(str __pyx_v_loc->arr = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":781 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":781 * else: * loc.arr = IntList(initial_len=loc.sa_high-loc.sa_low) * veb = VEB(arr.len) # <<<<<<<<<<<<<< @@ -47028,7 +47028,7 @@ static void __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_sort_phrase_loc(str __pyx_v_veb = ((struct __pyx_obj_4cdec_2sa_3_sa_VEB *)__pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":782 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":782 * loc.arr = IntList(initial_len=loc.sa_high-loc.sa_low) * veb = VEB(arr.len) * for i from loc.sa_low <= i < loc.sa_high: # <<<<<<<<<<<<<< @@ -47038,7 +47038,7 @@ static void __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_sort_phrase_loc(str __pyx_t_5 = __pyx_v_loc->sa_high; for (__pyx_v_i = __pyx_v_loc->sa_low; __pyx_v_i < __pyx_t_5; __pyx_v_i++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":783 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":783 * veb = VEB(arr.len) * for i from loc.sa_low <= i < loc.sa_high: * veb._insert(arr.arr[i]) # <<<<<<<<<<<<<< @@ -47048,7 +47048,7 @@ static void __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_sort_phrase_loc(str ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_VEB *)__pyx_v_veb->__pyx_vtab)->_insert(__pyx_v_veb, (__pyx_v_arr->arr[__pyx_v_i])); } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":784 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":784 * for i from loc.sa_low <= i < loc.sa_high: * veb._insert(arr.arr[i]) * i = veb.veb.min_val # <<<<<<<<<<<<<< @@ -47058,7 +47058,7 @@ static void __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_sort_phrase_loc(str __pyx_t_5 = __pyx_v_veb->veb->min_val; __pyx_v_i = __pyx_t_5; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":785 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":785 * veb._insert(arr.arr[i]) * i = veb.veb.min_val * for j from 0 <= j < loc.sa_high-loc.sa_low: # <<<<<<<<<<<<<< @@ -47068,7 +47068,7 @@ static void __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_sort_phrase_loc(str __pyx_t_5 = (__pyx_v_loc->sa_high - __pyx_v_loc->sa_low); for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_5; __pyx_v_j++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":786 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":786 * i = veb.veb.min_val * for j from 0 <= j < loc.sa_high-loc.sa_low: * loc.arr.arr[j] = i # <<<<<<<<<<<<<< @@ -47077,7 +47077,7 @@ static void __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_sort_phrase_loc(str */ (__pyx_v_loc->arr->arr[__pyx_v_j]) = __pyx_v_i; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":787 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":787 * for j from 0 <= j < loc.sa_high-loc.sa_low: * loc.arr.arr[j] = i * i = veb._findsucc(i) # <<<<<<<<<<<<<< @@ -47089,7 +47089,7 @@ static void __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_sort_phrase_loc(str } __pyx_L3:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":788 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":788 * loc.arr.arr[j] = i * i = veb._findsucc(i) * loc.arr_low = 0 # <<<<<<<<<<<<<< @@ -47098,7 +47098,7 @@ static void __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_sort_phrase_loc(str */ __pyx_v_loc->arr_low = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":789 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":789 * i = veb._findsucc(i) * loc.arr_low = 0 * loc.arr_high = loc.arr.len # <<<<<<<<<<<<<< @@ -47108,7 +47108,7 @@ static void __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_sort_phrase_loc(str __pyx_t_5 = __pyx_v_loc->arr->len; __pyx_v_loc->arr_high = __pyx_t_5; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":772 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":772 * * * cdef void sort_phrase_loc(self, IntList arr, PhraseLocation loc, Phrase phrase): # <<<<<<<<<<<<<< @@ -47127,7 +47127,7 @@ static void __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_sort_phrase_loc(str __Pyx_RefNannyFinishContext(); } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":792 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":792 * * * cdef intersect_helper(self, Phrase prefix, Phrase suffix, # <<<<<<<<<<<<<< @@ -47164,7 +47164,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_intersect_help int __pyx_clineno = 0; __Pyx_RefNannySetupContext("intersect_helper", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":799 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":799 * cdef int* result_ptr * * result_len = 0 # <<<<<<<<<<<<<< @@ -47173,7 +47173,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_intersect_help */ __pyx_v_result_len = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":801 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":801 * result_len = 0 * * if sym_isvar(suffix[0]): # <<<<<<<<<<<<<< @@ -47187,7 +47187,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_intersect_help __pyx_t_3 = (__pyx_f_4cdec_2sa_3_sa_sym_isvar(__pyx_t_2) != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":802 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":802 * * if sym_isvar(suffix[0]): * offset_by_one = 1 # <<<<<<<<<<<<<< @@ -47199,7 +47199,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_intersect_help } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":804 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":804 * offset_by_one = 1 * else: * offset_by_one = 0 # <<<<<<<<<<<<<< @@ -47210,7 +47210,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_intersect_help } __pyx_L3:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":806 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":806 * offset_by_one = 0 * * len_last = len(suffix.getchunk(suffix.arity())) # <<<<<<<<<<<<<< @@ -47237,7 +47237,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_intersect_help __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_len_last = __pyx_t_6; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":808 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":808 * len_last = len(suffix.getchunk(suffix.arity())) * * if prefix_loc.arr is None: # <<<<<<<<<<<<<< @@ -47248,7 +47248,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_intersect_help __pyx_t_7 = (__pyx_t_3 != 0); if (__pyx_t_7) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":809 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":809 * * if prefix_loc.arr is None: * self.sort_phrase_loc(self.fsa.sa, prefix_loc, prefix) # <<<<<<<<<<<<<< @@ -47263,7 +47263,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_intersect_help } __pyx_L4:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":810 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":810 * if prefix_loc.arr is None: * self.sort_phrase_loc(self.fsa.sa, prefix_loc, prefix) * arr1 = prefix_loc.arr # <<<<<<<<<<<<<< @@ -47275,7 +47275,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_intersect_help __pyx_v_arr1 = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_5); __pyx_t_5 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":811 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":811 * self.sort_phrase_loc(self.fsa.sa, prefix_loc, prefix) * arr1 = prefix_loc.arr * low1 = prefix_loc.arr_low # <<<<<<<<<<<<<< @@ -47285,7 +47285,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_intersect_help __pyx_t_2 = __pyx_v_prefix_loc->arr_low; __pyx_v_low1 = __pyx_t_2; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":812 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":812 * arr1 = prefix_loc.arr * low1 = prefix_loc.arr_low * high1 = prefix_loc.arr_high # <<<<<<<<<<<<<< @@ -47295,7 +47295,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_intersect_help __pyx_t_2 = __pyx_v_prefix_loc->arr_high; __pyx_v_high1 = __pyx_t_2; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":813 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":813 * low1 = prefix_loc.arr_low * high1 = prefix_loc.arr_high * step1 = prefix_loc.num_subpatterns # <<<<<<<<<<<<<< @@ -47305,7 +47305,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_intersect_help __pyx_t_2 = __pyx_v_prefix_loc->num_subpatterns; __pyx_v_step1 = __pyx_t_2; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":815 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":815 * step1 = prefix_loc.num_subpatterns * * if suffix_loc.arr is None: # <<<<<<<<<<<<<< @@ -47316,7 +47316,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_intersect_help __pyx_t_3 = (__pyx_t_7 != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":816 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":816 * * if suffix_loc.arr is None: * self.sort_phrase_loc(self.fsa.sa, suffix_loc, suffix) # <<<<<<<<<<<<<< @@ -47331,7 +47331,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_intersect_help } __pyx_L5:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":817 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":817 * if suffix_loc.arr is None: * self.sort_phrase_loc(self.fsa.sa, suffix_loc, suffix) * arr2 = suffix_loc.arr # <<<<<<<<<<<<<< @@ -47343,7 +47343,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_intersect_help __pyx_v_arr2 = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_5); __pyx_t_5 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":818 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":818 * self.sort_phrase_loc(self.fsa.sa, suffix_loc, suffix) * arr2 = suffix_loc.arr * low2 = suffix_loc.arr_low # <<<<<<<<<<<<<< @@ -47353,7 +47353,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_intersect_help __pyx_t_2 = __pyx_v_suffix_loc->arr_low; __pyx_v_low2 = __pyx_t_2; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":819 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":819 * arr2 = suffix_loc.arr * low2 = suffix_loc.arr_low * high2 = suffix_loc.arr_high # <<<<<<<<<<<<<< @@ -47363,7 +47363,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_intersect_help __pyx_t_2 = __pyx_v_suffix_loc->arr_high; __pyx_v_high2 = __pyx_t_2; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":820 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":820 * low2 = suffix_loc.arr_low * high2 = suffix_loc.arr_high * step2 = suffix_loc.num_subpatterns # <<<<<<<<<<<<<< @@ -47373,7 +47373,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_intersect_help __pyx_t_2 = __pyx_v_suffix_loc->num_subpatterns; __pyx_v_step2 = __pyx_t_2; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":822 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":822 * step2 = suffix_loc.num_subpatterns * * num_subpatterns = prefix.arity()+1 # <<<<<<<<<<<<<< @@ -47392,7 +47392,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_intersect_help __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_num_subpatterns = __pyx_t_2; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":824 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":824 * num_subpatterns = prefix.arity()+1 * * if algorithm == MERGE: # <<<<<<<<<<<<<< @@ -47402,7 +47402,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_intersect_help __pyx_t_3 = ((__pyx_v_algorithm == __pyx_v_4cdec_2sa_3_sa_MERGE) != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":825 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":825 * * if algorithm == MERGE: * result_ptr = self.merge_helper(low1, high1, arr1.arr, step1, # <<<<<<<<<<<<<< @@ -47414,7 +47414,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_intersect_help } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":829 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":829 * offset_by_one, len_last, num_subpatterns, &result_len) * else: * result_ptr = self.baeza_yates_helper(low1, high1, arr1.arr, step1, # <<<<<<<<<<<<<< @@ -47425,7 +47425,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_intersect_help } __pyx_L6:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":833 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":833 * offset_by_one, len_last, num_subpatterns, &result_len) * * if result_len == 0: # <<<<<<<<<<<<<< @@ -47435,7 +47435,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_intersect_help __pyx_t_3 = ((__pyx_v_result_len == 0) != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":834 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":834 * * if result_len == 0: * free(result_ptr) # <<<<<<<<<<<<<< @@ -47444,7 +47444,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_intersect_help */ free(__pyx_v_result_ptr); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":835 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":835 * if result_len == 0: * free(result_ptr) * return None # <<<<<<<<<<<<<< @@ -47458,7 +47458,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_intersect_help } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":837 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":837 * return None * else: * result = IntList() # <<<<<<<<<<<<<< @@ -47470,7 +47470,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_intersect_help __pyx_v_result = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_5); __pyx_t_5 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":838 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":838 * else: * result = IntList() * free(result.arr) # <<<<<<<<<<<<<< @@ -47479,7 +47479,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_intersect_help */ free(__pyx_v_result->arr); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":839 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":839 * result = IntList() * free(result.arr) * result.arr = result_ptr # <<<<<<<<<<<<<< @@ -47488,7 +47488,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_intersect_help */ __pyx_v_result->arr = __pyx_v_result_ptr; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":840 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":840 * free(result.arr) * result.arr = result_ptr * result.len = result_len # <<<<<<<<<<<<<< @@ -47497,7 +47497,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_intersect_help */ __pyx_v_result->len = __pyx_v_result_len; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":841 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":841 * result.arr = result_ptr * result.len = result_len * result.size = result_len # <<<<<<<<<<<<<< @@ -47506,7 +47506,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_intersect_help */ __pyx_v_result->size = __pyx_v_result_len; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":842 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":842 * result.len = result_len * result.size = result_len * return PhraseLocation(arr_low=0, arr_high=result_len, arr=result, num_subpatterns=num_subpatterns) # <<<<<<<<<<<<<< @@ -47534,7 +47534,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_intersect_help goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":792 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":792 * * * cdef intersect_helper(self, Phrase prefix, Phrase suffix, # <<<<<<<<<<<<<< @@ -47558,7 +47558,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_intersect_help return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":844 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":844 * return PhraseLocation(arr_low=0, arr_high=result_len, arr=result, num_subpatterns=num_subpatterns) * * cdef loc2str(self, PhraseLocation loc): # <<<<<<<<<<<<<< @@ -47581,7 +47581,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_loc2str(CYTHON int __pyx_clineno = 0; __Pyx_RefNannySetupContext("loc2str", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":846 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":846 * cdef loc2str(self, PhraseLocation loc): * cdef int i, j * result = "{" # <<<<<<<<<<<<<< @@ -47591,7 +47591,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_loc2str(CYTHON __Pyx_INCREF(__pyx_kp_s__63); __pyx_v_result = __pyx_kp_s__63; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":847 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":847 * cdef int i, j * result = "{" * i = 0 # <<<<<<<<<<<<<< @@ -47600,7 +47600,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_loc2str(CYTHON */ __pyx_v_i = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":848 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":848 * result = "{" * i = 0 * while i < loc.arr_high: # <<<<<<<<<<<<<< @@ -47611,7 +47611,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_loc2str(CYTHON __pyx_t_1 = ((__pyx_v_i < __pyx_v_loc->arr_high) != 0); if (!__pyx_t_1) break; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":849 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":849 * i = 0 * while i < loc.arr_high: * result = result + "(" # <<<<<<<<<<<<<< @@ -47623,7 +47623,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_loc2str(CYTHON __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":850 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":850 * while i < loc.arr_high: * result = result + "(" * for j from i <= j < i + loc.num_subpatterns: # <<<<<<<<<<<<<< @@ -47633,7 +47633,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_loc2str(CYTHON __pyx_t_3 = (__pyx_v_i + __pyx_v_loc->num_subpatterns); for (__pyx_v_j = __pyx_v_i; __pyx_v_j < __pyx_t_3; __pyx_v_j++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":851 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":851 * result = result + "(" * for j from i <= j < i + loc.num_subpatterns: * result = result + ("%d " %loc.arr[j]) # <<<<<<<<<<<<<< @@ -47652,7 +47652,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_loc2str(CYTHON __pyx_t_2 = 0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":852 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":852 * for j from i <= j < i + loc.num_subpatterns: * result = result + ("%d " %loc.arr[j]) * result = result + ")" # <<<<<<<<<<<<<< @@ -47664,7 +47664,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_loc2str(CYTHON __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":853 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":853 * result = result + ("%d " %loc.arr[j]) * result = result + ")" * i = i + loc.num_subpatterns # <<<<<<<<<<<<<< @@ -47674,7 +47674,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_loc2str(CYTHON __pyx_v_i = (__pyx_v_i + __pyx_v_loc->num_subpatterns); } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":854 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":854 * result = result + ")" * i = i + loc.num_subpatterns * result = result + "}" # <<<<<<<<<<<<<< @@ -47686,7 +47686,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_loc2str(CYTHON __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":855 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":855 * i = i + loc.num_subpatterns * result = result + "}" * return result # <<<<<<<<<<<<<< @@ -47698,7 +47698,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_loc2str(CYTHON __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":844 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":844 * return PhraseLocation(arr_low=0, arr_high=result_len, arr=result, num_subpatterns=num_subpatterns) * * cdef loc2str(self, PhraseLocation loc): # <<<<<<<<<<<<<< @@ -47719,7 +47719,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_loc2str(CYTHON return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":857 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":857 * return result * * cdef PhraseLocation intersect(self, prefix_node, suffix_node, Phrase phrase): # <<<<<<<<<<<<<< @@ -47746,7 +47746,7 @@ static struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *__pyx_f_4cdec_2sa_3_sa_23 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("intersect", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":861 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":861 * cdef PhraseLocation prefix_loc, suffix_loc, result * * prefix = prefix_node.phrase # <<<<<<<<<<<<<< @@ -47759,7 +47759,7 @@ static struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *__pyx_f_4cdec_2sa_3_sa_23 __pyx_v_prefix = ((struct __pyx_obj_4cdec_2sa_3_sa_Phrase *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":862 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":862 * * prefix = prefix_node.phrase * suffix = suffix_node.phrase # <<<<<<<<<<<<<< @@ -47772,7 +47772,7 @@ static struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *__pyx_f_4cdec_2sa_3_sa_23 __pyx_v_suffix = ((struct __pyx_obj_4cdec_2sa_3_sa_Phrase *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":863 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":863 * prefix = prefix_node.phrase * suffix = suffix_node.phrase * prefix_loc = prefix_node.phrase_location # <<<<<<<<<<<<<< @@ -47785,7 +47785,7 @@ static struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *__pyx_f_4cdec_2sa_3_sa_23 __pyx_v_prefix_loc = ((struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":864 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":864 * suffix = suffix_node.phrase * prefix_loc = prefix_node.phrase_location * suffix_loc = suffix_node.phrase_location # <<<<<<<<<<<<<< @@ -47798,7 +47798,7 @@ static struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *__pyx_f_4cdec_2sa_3_sa_23 __pyx_v_suffix_loc = ((struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":866 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":866 * suffix_loc = suffix_node.phrase_location * * result = self.get_precomputed_collocation(phrase) # <<<<<<<<<<<<<< @@ -47820,7 +47820,7 @@ static struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *__pyx_f_4cdec_2sa_3_sa_23 __pyx_v_result = ((struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *)__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":867 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":867 * * result = self.get_precomputed_collocation(phrase) * if result is not None: # <<<<<<<<<<<<<< @@ -47831,7 +47831,7 @@ static struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *__pyx_f_4cdec_2sa_3_sa_23 __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":868 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":868 * result = self.get_precomputed_collocation(phrase) * if result is not None: * intersect_method = "precomputed" # <<<<<<<<<<<<<< @@ -47844,7 +47844,7 @@ static struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *__pyx_f_4cdec_2sa_3_sa_23 } __pyx_L3:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":870 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":870 * intersect_method = "precomputed" * * if result is None: # <<<<<<<<<<<<<< @@ -47855,7 +47855,7 @@ static struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *__pyx_f_4cdec_2sa_3_sa_23 __pyx_t_4 = (__pyx_t_5 != 0); if (__pyx_t_4) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":871 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":871 * * if result is None: * if self.use_baeza_yates: # <<<<<<<<<<<<<< @@ -47865,7 +47865,7 @@ static struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *__pyx_f_4cdec_2sa_3_sa_23 __pyx_t_4 = (__pyx_v_self->use_baeza_yates != 0); if (__pyx_t_4) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":872 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":872 * if result is None: * if self.use_baeza_yates: * result = self.intersect_helper(prefix, suffix, prefix_loc, suffix_loc, BAEZA_YATES) # <<<<<<<<<<<<<< @@ -47878,7 +47878,7 @@ static struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *__pyx_f_4cdec_2sa_3_sa_23 __Pyx_DECREF_SET(__pyx_v_result, ((struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *)__pyx_t_3)); __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":873 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":873 * if self.use_baeza_yates: * result = self.intersect_helper(prefix, suffix, prefix_loc, suffix_loc, BAEZA_YATES) * intersect_method="double binary" # <<<<<<<<<<<<<< @@ -47891,7 +47891,7 @@ static struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *__pyx_f_4cdec_2sa_3_sa_23 } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":875 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":875 * intersect_method="double binary" * else: * result = self.intersect_helper(prefix, suffix, prefix_loc, suffix_loc, MERGE) # <<<<<<<<<<<<<< @@ -47904,7 +47904,7 @@ static struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *__pyx_f_4cdec_2sa_3_sa_23 __Pyx_DECREF_SET(__pyx_v_result, ((struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *)__pyx_t_3)); __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":876 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":876 * else: * result = self.intersect_helper(prefix, suffix, prefix_loc, suffix_loc, MERGE) * intersect_method="merge" # <<<<<<<<<<<<<< @@ -47919,7 +47919,7 @@ static struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *__pyx_f_4cdec_2sa_3_sa_23 } __pyx_L4:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":877 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":877 * result = self.intersect_helper(prefix, suffix, prefix_loc, suffix_loc, MERGE) * intersect_method="merge" * return result # <<<<<<<<<<<<<< @@ -47931,7 +47931,7 @@ static struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *__pyx_f_4cdec_2sa_3_sa_23 __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":857 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":857 * return result * * cdef PhraseLocation intersect(self, prefix_node, suffix_node, Phrase phrase): # <<<<<<<<<<<<<< @@ -47958,7 +47958,7 @@ static struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *__pyx_f_4cdec_2sa_3_sa_23 return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":879 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":879 * return result * * def advance(self, frontier, res, fwords): # <<<<<<<<<<<<<< @@ -48069,7 +48069,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12advance(str int __pyx_clineno = 0; __Pyx_RefNannySetupContext("advance", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":881 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":881 * def advance(self, frontier, res, fwords): * cdef unsigned na * nf = [] # <<<<<<<<<<<<<< @@ -48081,7 +48081,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12advance(str __pyx_v_nf = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":882 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":882 * cdef unsigned na * nf = [] * for toskip, (i, alt, pathlen) in frontier: # <<<<<<<<<<<<<< @@ -48239,7 +48239,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12advance(str __Pyx_XDECREF_SET(__pyx_v_pathlen, __pyx_t_10); __pyx_t_10 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":883 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":883 * nf = [] * for toskip, (i, alt, pathlen) in frontier: * spanlen = fwords[i][alt][2] # <<<<<<<<<<<<<< @@ -48257,7 +48257,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12advance(str __Pyx_XDECREF_SET(__pyx_v_spanlen, __pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":884 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":884 * for toskip, (i, alt, pathlen) in frontier: * spanlen = fwords[i][alt][2] * if toskip == 0: # <<<<<<<<<<<<<< @@ -48269,7 +48269,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12advance(str __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_12) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":885 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":885 * spanlen = fwords[i][alt][2] * if toskip == 0: * res.append((i, alt, pathlen)) # <<<<<<<<<<<<<< @@ -48293,7 +48293,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12advance(str } __pyx_L9:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":886 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":886 * if toskip == 0: * res.append((i, alt, pathlen)) * ni = i + spanlen # <<<<<<<<<<<<<< @@ -48305,7 +48305,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12advance(str __Pyx_XDECREF_SET(__pyx_v_ni, __pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":887 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":887 * res.append((i, alt, pathlen)) * ni = i + spanlen * if ni < len(fwords) and pathlen + 1 < self.max_initial_size: # <<<<<<<<<<<<<< @@ -48335,7 +48335,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12advance(str } if (__pyx_t_16) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":888 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":888 * ni = i + spanlen * if ni < len(fwords) and pathlen + 1 < self.max_initial_size: * for na in range(len(fwords[ni])): # <<<<<<<<<<<<<< @@ -48349,7 +48349,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12advance(str for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_14; __pyx_t_17+=1) { __pyx_v_na = __pyx_t_17; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":889 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":889 * if ni < len(fwords) and pathlen + 1 < self.max_initial_size: * for na in range(len(fwords[ni])): * nf.append((toskip - 1, (ni, na, pathlen + 1))) # <<<<<<<<<<<<<< @@ -48390,7 +48390,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12advance(str } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":890 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":890 * for na in range(len(fwords[ni])): * nf.append((toskip - 1, (ni, na, pathlen + 1))) * if len(nf) > 0: # <<<<<<<<<<<<<< @@ -48401,7 +48401,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12advance(str __pyx_t_16 = ((__pyx_t_2 > 0) != 0); if (__pyx_t_16) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":891 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":891 * nf.append((toskip - 1, (ni, na, pathlen + 1))) * if len(nf) > 0: * return self.advance(nf, res, fwords) # <<<<<<<<<<<<<< @@ -48432,7 +48432,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12advance(str } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":893 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":893 * return self.advance(nf, res, fwords) * else: * return res # <<<<<<<<<<<<<< @@ -48445,7 +48445,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12advance(str goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":879 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":879 * return result * * def advance(self, frontier, res, fwords): # <<<<<<<<<<<<<< @@ -48478,7 +48478,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12advance(str return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":895 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":895 * return res * * def get_all_nodes_isteps_away(self, skip, i, spanlen, pathlen, fwords, next_states, reachable_buffer): # <<<<<<<<<<<<<< @@ -48622,7 +48622,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_14get_all_nod int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_all_nodes_isteps_away", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":897 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":897 * def get_all_nodes_isteps_away(self, skip, i, spanlen, pathlen, fwords, next_states, reachable_buffer): * cdef unsigned alt_it * frontier = [] # <<<<<<<<<<<<<< @@ -48634,7 +48634,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_14get_all_nod __pyx_v_frontier = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":898 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":898 * cdef unsigned alt_it * frontier = [] * if i+spanlen+skip >= len(next_states): # <<<<<<<<<<<<<< @@ -48656,7 +48656,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_14get_all_nod __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_5) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":899 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":899 * frontier = [] * if i+spanlen+skip >= len(next_states): * return frontier # <<<<<<<<<<<<<< @@ -48669,7 +48669,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_14get_all_nod goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":900 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":900 * if i+spanlen+skip >= len(next_states): * return frontier * key = tuple([i,spanlen]) # <<<<<<<<<<<<<< @@ -48690,7 +48690,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_14get_all_nod __pyx_v_key = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":901 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":901 * return frontier * key = tuple([i,spanlen]) * reachable = [] # <<<<<<<<<<<<<< @@ -48702,7 +48702,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_14get_all_nod __pyx_v_reachable = __pyx_t_1; __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":902 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":902 * key = tuple([i,spanlen]) * reachable = [] * if key in reachable_buffer: # <<<<<<<<<<<<<< @@ -48713,7 +48713,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_14get_all_nod __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":903 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":903 * reachable = [] * if key in reachable_buffer: * reachable = reachable_buffer[key] # <<<<<<<<<<<<<< @@ -48728,7 +48728,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_14get_all_nod } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":905 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":905 * reachable = reachable_buffer[key] * else: * reachable = self.reachable(fwords, i, spanlen) # <<<<<<<<<<<<<< @@ -48755,7 +48755,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_14get_all_nod __Pyx_DECREF_SET(__pyx_v_reachable, __pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":906 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":906 * else: * reachable = self.reachable(fwords, i, spanlen) * reachable_buffer[key] = reachable # <<<<<<<<<<<<<< @@ -48766,7 +48766,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_14get_all_nod } __pyx_L4:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":907 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":907 * reachable = self.reachable(fwords, i, spanlen) * reachable_buffer[key] = reachable * for nextreachable in reachable: # <<<<<<<<<<<<<< @@ -48811,7 +48811,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_14get_all_nod __Pyx_XDECREF_SET(__pyx_v_nextreachable, __pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":908 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":908 * reachable_buffer[key] = reachable * for nextreachable in reachable: * for next_id in next_states[nextreachable]: # <<<<<<<<<<<<<< @@ -48859,7 +48859,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_14get_all_nod __Pyx_XDECREF_SET(__pyx_v_next_id, __pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":909 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":909 * for nextreachable in reachable: * for next_id in next_states[nextreachable]: * jump = self.shortest(fwords,i,next_id) # <<<<<<<<<<<<<< @@ -48886,7 +48886,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_14get_all_nod __Pyx_XDECREF_SET(__pyx_v_jump, __pyx_t_11); __pyx_t_11 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":910 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":910 * for next_id in next_states[nextreachable]: * jump = self.shortest(fwords,i,next_id) * if jump < skip: # <<<<<<<<<<<<<< @@ -48898,7 +48898,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_14get_all_nod __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (__pyx_t_6) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":911 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":911 * jump = self.shortest(fwords,i,next_id) * if jump < skip: * continue # <<<<<<<<<<<<<< @@ -48908,7 +48908,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_14get_all_nod goto __pyx_L7_continue; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":912 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":912 * if jump < skip: * continue * if pathlen+jump <= self.max_initial_size: # <<<<<<<<<<<<<< @@ -48926,7 +48926,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_14get_all_nod __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":913 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":913 * continue * if pathlen+jump <= self.max_initial_size: * for alt_id in range(len(fwords[next_id])): # <<<<<<<<<<<<<< @@ -48940,7 +48940,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_14get_all_nod for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_12; __pyx_t_13+=1) { __pyx_v_alt_id = __pyx_t_13; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":914 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":914 * if pathlen+jump <= self.max_initial_size: * for alt_id in range(len(fwords[next_id])): * if fwords[next_id][alt_id][0] != EPSILON: # <<<<<<<<<<<<<< @@ -48964,7 +48964,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_14get_all_nod __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (__pyx_t_6) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":915 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":915 * for alt_id in range(len(fwords[next_id])): * if fwords[next_id][alt_id][0] != EPSILON: * newel = (next_id,alt_id,pathlen+jump) # <<<<<<<<<<<<<< @@ -48989,7 +48989,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_14get_all_nod __Pyx_XDECREF_SET(__pyx_v_newel, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":916 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":916 * if fwords[next_id][alt_id][0] != EPSILON: * newel = (next_id,alt_id,pathlen+jump) * if newel not in frontier: # <<<<<<<<<<<<<< @@ -49000,7 +49000,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_14get_all_nod __pyx_t_5 = (__pyx_t_6 != 0); if (__pyx_t_5) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":917 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":917 * newel = (next_id,alt_id,pathlen+jump) * if newel not in frontier: * frontier.append((next_id,alt_id,pathlen+jump)) # <<<<<<<<<<<<<< @@ -49040,7 +49040,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_14get_all_nod } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":918 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":918 * if newel not in frontier: * frontier.append((next_id,alt_id,pathlen+jump)) * return frontier # <<<<<<<<<<<<<< @@ -49052,7 +49052,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_14get_all_nod __pyx_r = __pyx_v_frontier; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":895 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":895 * return res * * def get_all_nodes_isteps_away(self, skip, i, spanlen, pathlen, fwords, next_states, reachable_buffer): # <<<<<<<<<<<<<< @@ -49082,7 +49082,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_14get_all_nod return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":920 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":920 * return frontier * * def reachable(self, fwords, ifrom, dist): # <<<<<<<<<<<<<< @@ -49182,7 +49182,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_16reachable(s int __pyx_clineno = 0; __Pyx_RefNannySetupContext("reachable", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":921 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":921 * * def reachable(self, fwords, ifrom, dist): * ret = [] # <<<<<<<<<<<<<< @@ -49194,7 +49194,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_16reachable(s __pyx_v_ret = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":922 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":922 * def reachable(self, fwords, ifrom, dist): * ret = [] * if ifrom >= len(fwords): # <<<<<<<<<<<<<< @@ -49210,7 +49210,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_16reachable(s __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_4) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":923 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":923 * ret = [] * if ifrom >= len(fwords): * return ret # <<<<<<<<<<<<<< @@ -49223,7 +49223,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_16reachable(s goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":924 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":924 * if ifrom >= len(fwords): * return ret * for alt_id in range(len(fwords[ifrom])): # <<<<<<<<<<<<<< @@ -49237,7 +49237,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_16reachable(s for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_2; __pyx_t_5+=1) { __pyx_v_alt_id = __pyx_t_5; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":925 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":925 * return ret * for alt_id in range(len(fwords[ifrom])): * if fwords[ifrom][alt_id][0] == EPSILON: # <<<<<<<<<<<<<< @@ -49261,7 +49261,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_16reachable(s __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_4) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":926 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":926 * for alt_id in range(len(fwords[ifrom])): * if fwords[ifrom][alt_id][0] == EPSILON: * ret.extend(self.reachable(fwords,ifrom+fwords[ifrom][alt_id][2],dist)) # <<<<<<<<<<<<<< @@ -49302,7 +49302,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_16reachable(s } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":928 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":928 * ret.extend(self.reachable(fwords,ifrom+fwords[ifrom][alt_id][2],dist)) * else: * if dist == 0: # <<<<<<<<<<<<<< @@ -49314,7 +49314,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_16reachable(s __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_4) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":929 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":929 * else: * if dist == 0: * if ifrom not in ret: # <<<<<<<<<<<<<< @@ -49325,7 +49325,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_16reachable(s __pyx_t_8 = (__pyx_t_4 != 0); if (__pyx_t_8) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":930 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":930 * if dist == 0: * if ifrom not in ret: * ret.append(ifrom) # <<<<<<<<<<<<<< @@ -49340,7 +49340,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_16reachable(s } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":932 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":932 * ret.append(ifrom) * else: * for ifromchild in self.reachable(fwords,ifrom+fwords[ifrom][alt_id][2],dist-1): # <<<<<<<<<<<<<< @@ -49416,7 +49416,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_16reachable(s __Pyx_XDECREF_SET(__pyx_v_ifromchild, __pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":933 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":933 * else: * for ifromchild in self.reachable(fwords,ifrom+fwords[ifrom][alt_id][2],dist-1): * if ifromchild not in ret: # <<<<<<<<<<<<<< @@ -49427,7 +49427,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_16reachable(s __pyx_t_4 = (__pyx_t_8 != 0); if (__pyx_t_4) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":934 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":934 * for ifromchild in self.reachable(fwords,ifrom+fwords[ifrom][alt_id][2],dist-1): * if ifromchild not in ret: * ret.append(ifromchild) # <<<<<<<<<<<<<< @@ -49446,7 +49446,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_16reachable(s __pyx_L6:; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":936 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":936 * ret.append(ifromchild) * * return ret # <<<<<<<<<<<<<< @@ -49458,7 +49458,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_16reachable(s __pyx_r = __pyx_v_ret; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":920 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":920 * return frontier * * def reachable(self, fwords, ifrom, dist): # <<<<<<<<<<<<<< @@ -49482,7 +49482,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_16reachable(s return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":938 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":938 * return ret * * def shortest(self, fwords, ifrom, ito): # <<<<<<<<<<<<<< @@ -49577,7 +49577,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_18shortest(st int __pyx_clineno = 0; __Pyx_RefNannySetupContext("shortest", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":940 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":940 * def shortest(self, fwords, ifrom, ito): * cdef unsigned alt_id * min = 1000 # <<<<<<<<<<<<<< @@ -49587,7 +49587,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_18shortest(st __Pyx_INCREF(__pyx_int_1000); __pyx_v_min = __pyx_int_1000; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":941 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":941 * cdef unsigned alt_id * min = 1000 * if ifrom > ito: # <<<<<<<<<<<<<< @@ -49599,7 +49599,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_18shortest(st __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":942 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":942 * min = 1000 * if ifrom > ito: * return min # <<<<<<<<<<<<<< @@ -49612,7 +49612,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_18shortest(st goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":943 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":943 * if ifrom > ito: * return min * if ifrom == ito: # <<<<<<<<<<<<<< @@ -49624,7 +49624,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_18shortest(st __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":944 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":944 * return min * if ifrom == ito: * return 0 # <<<<<<<<<<<<<< @@ -49637,7 +49637,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_18shortest(st goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":945 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":945 * if ifrom == ito: * return 0 * for alt_id in range(len(fwords[ifrom])): # <<<<<<<<<<<<<< @@ -49651,7 +49651,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_18shortest(st for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_alt_id = __pyx_t_4; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":946 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":946 * return 0 * for alt_id in range(len(fwords[ifrom])): * currmin = self.shortest(fwords,ifrom+fwords[ifrom][alt_id][2],ito) # <<<<<<<<<<<<<< @@ -49689,7 +49689,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_18shortest(st __Pyx_XDECREF_SET(__pyx_v_currmin, __pyx_t_6); __pyx_t_6 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":947 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":947 * for alt_id in range(len(fwords[ifrom])): * currmin = self.shortest(fwords,ifrom+fwords[ifrom][alt_id][2],ito) * if fwords[ifrom][alt_id][0] != EPSILON: # <<<<<<<<<<<<<< @@ -49713,7 +49713,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_18shortest(st __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":948 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":948 * currmin = self.shortest(fwords,ifrom+fwords[ifrom][alt_id][2],ito) * if fwords[ifrom][alt_id][0] != EPSILON: * currmin += 1 # <<<<<<<<<<<<<< @@ -49728,7 +49728,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_18shortest(st } __pyx_L7:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":949 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":949 * if fwords[ifrom][alt_id][0] != EPSILON: * currmin += 1 * if currmin < min: # <<<<<<<<<<<<<< @@ -49740,7 +49740,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_18shortest(st __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":950 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":950 * currmin += 1 * if currmin < min: * min = currmin # <<<<<<<<<<<<<< @@ -49754,7 +49754,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_18shortest(st __pyx_L8:; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":951 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":951 * if currmin < min: * min = currmin * return min # <<<<<<<<<<<<<< @@ -49766,7 +49766,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_18shortest(st __pyx_r = __pyx_v_min; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":938 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":938 * return ret * * def shortest(self, fwords, ifrom, ito): # <<<<<<<<<<<<<< @@ -49789,7 +49789,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_18shortest(st return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":953 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":953 * return min * * def get_next_states(self, _columns, curr_idx, min_dist=2): # <<<<<<<<<<<<<< @@ -49895,7 +49895,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_20get_next_st int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_next_states", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":954 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":954 * * def get_next_states(self, _columns, curr_idx, min_dist=2): * result = [] # <<<<<<<<<<<<<< @@ -49907,7 +49907,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_20get_next_st __pyx_v_result = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":955 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":955 * def get_next_states(self, _columns, curr_idx, min_dist=2): * result = [] * candidate = [[curr_idx,0]] # <<<<<<<<<<<<<< @@ -49930,7 +49930,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_20get_next_st __pyx_v_candidate = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":957 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":957 * candidate = [[curr_idx,0]] * * while len(candidate) > 0: # <<<<<<<<<<<<<< @@ -49942,7 +49942,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_20get_next_st __pyx_t_4 = ((__pyx_t_3 > 0) != 0); if (!__pyx_t_4) break; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":958 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":958 * * while len(candidate) > 0: * curr = candidate.pop() # <<<<<<<<<<<<<< @@ -49954,7 +49954,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_20get_next_st __Pyx_XDECREF_SET(__pyx_v_curr, __pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":959 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":959 * while len(candidate) > 0: * curr = candidate.pop() * if curr[0] >= len(_columns): # <<<<<<<<<<<<<< @@ -49973,7 +49973,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_20get_next_st __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_4) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":960 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":960 * curr = candidate.pop() * if curr[0] >= len(_columns): * continue # <<<<<<<<<<<<<< @@ -49983,7 +49983,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_20get_next_st goto __pyx_L3_continue; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":961 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":961 * if curr[0] >= len(_columns): * continue * if curr[0] not in result and min_dist <= curr[1] <= self.max_initial_size: # <<<<<<<<<<<<<< @@ -50014,7 +50014,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_20get_next_st } if (__pyx_t_7) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":962 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":962 * continue * if curr[0] not in result and min_dist <= curr[1] <= self.max_initial_size: * result.append(curr[0]); # <<<<<<<<<<<<<< @@ -50029,7 +50029,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_20get_next_st } __pyx_L6:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":963 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":963 * if curr[0] not in result and min_dist <= curr[1] <= self.max_initial_size: * result.append(curr[0]); * curr_col = _columns[curr[0]] # <<<<<<<<<<<<<< @@ -50044,7 +50044,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_20get_next_st __Pyx_XDECREF_SET(__pyx_v_curr_col, __pyx_t_5); __pyx_t_5 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":964 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":964 * result.append(curr[0]); * curr_col = _columns[curr[0]] * for alt in curr_col: # <<<<<<<<<<<<<< @@ -50089,7 +50089,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_20get_next_st __Pyx_XDECREF_SET(__pyx_v_alt, __pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":965 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":965 * curr_col = _columns[curr[0]] * for alt in curr_col: * next_id = curr[0]+alt[2] # <<<<<<<<<<<<<< @@ -50107,7 +50107,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_20get_next_st __Pyx_XDECREF_SET(__pyx_v_next_id, __pyx_t_10); __pyx_t_10 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":966 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":966 * for alt in curr_col: * next_id = curr[0]+alt[2] * jump = 1 # <<<<<<<<<<<<<< @@ -50117,7 +50117,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_20get_next_st __Pyx_INCREF(__pyx_int_1); __Pyx_XDECREF_SET(__pyx_v_jump, __pyx_int_1); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":967 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":967 * next_id = curr[0]+alt[2] * jump = 1 * if alt[0] == EPSILON: # <<<<<<<<<<<<<< @@ -50135,7 +50135,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_20get_next_st __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_7) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":968 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":968 * jump = 1 * if alt[0] == EPSILON: * jump = 0 # <<<<<<<<<<<<<< @@ -50148,7 +50148,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_20get_next_st } __pyx_L9:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":969 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":969 * if alt[0] == EPSILON: * jump = 0 * if next_id not in result and min_dist <= curr[1]+jump <= self.max_initial_size+1: # <<<<<<<<<<<<<< @@ -50179,7 +50179,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_20get_next_st } if (__pyx_t_6) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":970 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":970 * jump = 0 * if next_id not in result and min_dist <= curr[1]+jump <= self.max_initial_size+1: * candidate.append([next_id,curr[1]+jump]) # <<<<<<<<<<<<<< @@ -50209,7 +50209,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_20get_next_st __pyx_L3_continue:; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":971 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":971 * if next_id not in result and min_dist <= curr[1]+jump <= self.max_initial_size+1: * candidate.append([next_id,curr[1]+jump]) * return sorted(result); # <<<<<<<<<<<<<< @@ -50229,7 +50229,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_20get_next_st __pyx_t_1 = 0; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":953 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":953 * return min * * def get_next_states(self, _columns, curr_idx, min_dist=2): # <<<<<<<<<<<<<< @@ -50259,7 +50259,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_20get_next_st } static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":973 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":973 * return sorted(result); * * def input(self, fwords, meta, ctx_name=None): # <<<<<<<<<<<<<< @@ -50341,7 +50341,7 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_23input(PyObj return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1142 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1142 * if len(extracts) > 0: * fcount = Counter() * fphrases = defaultdict(lambda: defaultdict(lambda: defaultdict(list))) # <<<<<<<<<<<<<< @@ -50457,7 +50457,7 @@ static PyObject *__pyx_lambda_funcdef_lambda3(CYTHON_UNUSED PyObject *__pyx_self return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1148 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1148 * for f, elist in fphrases.iteritems(): * for e, alslist in elist.iteritems(): * alignment, max_locs = max(alslist.iteritems(), key=lambda x: len(x[1])) # <<<<<<<<<<<<<< @@ -50511,7 +50511,7 @@ static PyObject *__pyx_lambda_funcdef_lambda5(CYTHON_UNUSED PyObject *__pyx_self } static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_5input_4generator14(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1188 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1188 * if self.online: * stats = self.online_stats[ctx_name] * f_syms = tuple(word[0][0] for word in fwords) # <<<<<<<<<<<<<< @@ -50661,7 +50661,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_5input_4gener return NULL; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":973 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":973 * return sorted(result); * * def input(self, fwords, meta, ctx_name=None): # <<<<<<<<<<<<<< @@ -50764,7 +50764,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":984 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":984 * cdef Phrase hiero_phrase * * flen = len(fwords) # <<<<<<<<<<<<<< @@ -50777,7 +50777,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_cur_scope->__pyx_v_flen = __pyx_t_2; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":985 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":985 * * flen = len(fwords) * start_time = monitor_cpu() # <<<<<<<<<<<<<< @@ -50793,7 +50793,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_cur_scope->__pyx_v_start_time = __pyx_t_4; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":986 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":986 * flen = len(fwords) * start_time = monitor_cpu() * self.extract_time = 0.0 # <<<<<<<<<<<<<< @@ -50802,7 +50802,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( */ __pyx_cur_scope->__pyx_v_self->extract_time = 0.0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":987 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":987 * start_time = monitor_cpu() * self.extract_time = 0.0 * self.intersect_time = 0.0 # <<<<<<<<<<<<<< @@ -50811,7 +50811,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( */ __pyx_cur_scope->__pyx_v_self->intersect_time = 0.0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":988 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":988 * self.extract_time = 0.0 * self.intersect_time = 0.0 * nodes_isteps_away_buffer = {} # <<<<<<<<<<<<<< @@ -50824,7 +50824,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_cur_scope->__pyx_v_nodes_isteps_away_buffer = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":989 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":989 * self.intersect_time = 0.0 * nodes_isteps_away_buffer = {} * hit = 0 # <<<<<<<<<<<<<< @@ -50833,7 +50833,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( */ __pyx_cur_scope->__pyx_v_hit = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":990 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":990 * nodes_isteps_away_buffer = {} * hit = 0 * reachable_buffer = {} # <<<<<<<<<<<<<< @@ -50846,7 +50846,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_cur_scope->__pyx_v_reachable_buffer = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":995 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":995 * # during online extraction. This is probably the hackiest part of * # online grammar extraction. * seen_phrases = set() # <<<<<<<<<<<<<< @@ -50859,7 +50859,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_cur_scope->__pyx_v_seen_phrases = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":998 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":998 * * # Do not cache between sentences * self.rules.root = ExtendedTrieNode(phrase_location=PhraseLocation()) # <<<<<<<<<<<<<< @@ -50881,7 +50881,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_cur_scope->__pyx_v_self->rules->root = __pyx_t_1; __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1000 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1000 * self.rules.root = ExtendedTrieNode(phrase_location=PhraseLocation()) * * frontier = [] # <<<<<<<<<<<<<< @@ -50894,7 +50894,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_cur_scope->__pyx_v_frontier = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1001 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1001 * * frontier = [] * for i in range(len(fwords)): # <<<<<<<<<<<<<< @@ -50908,7 +50908,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_2; __pyx_t_5+=1) { __pyx_cur_scope->__pyx_v_i = __pyx_t_5; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1002 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1002 * frontier = [] * for i in range(len(fwords)): * for alt in range(0, len(fwords[i])): # <<<<<<<<<<<<<< @@ -50922,7 +50922,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) { __pyx_cur_scope->__pyx_v_alt = __pyx_t_7; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1003 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1003 * for i in range(len(fwords)): * for alt in range(0, len(fwords[i])): * if fwords[i][alt][0] != EPSILON: # <<<<<<<<<<<<<< @@ -50946,7 +50946,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_9) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1004 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1004 * for alt in range(0, len(fwords[i])): * if fwords[i][alt][0] != EPSILON: * frontier.append((i, i, (i,), alt, 0, self.rules.root, (), False)) # <<<<<<<<<<<<<< @@ -51000,7 +51000,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( } } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1006 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1006 * frontier.append((i, i, (i,), alt, 0, self.rules.root, (), False)) * * xroot = None # <<<<<<<<<<<<<< @@ -51011,7 +51011,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(Py_None); __pyx_cur_scope->__pyx_v_xroot = Py_None; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1007 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1007 * * xroot = None * x1 = sym_setindex(self.category, 1) # <<<<<<<<<<<<<< @@ -51020,7 +51020,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( */ __pyx_cur_scope->__pyx_v_x1 = __pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_cur_scope->__pyx_v_self->category, 1); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1008 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1008 * xroot = None * x1 = sym_setindex(self.category, 1) * if x1 in self.rules.root.children: # <<<<<<<<<<<<<< @@ -51037,7 +51037,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_t_13 = (__pyx_t_9 != 0); if (__pyx_t_13) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1009 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1009 * x1 = sym_setindex(self.category, 1) * if x1 in self.rules.root.children: * xroot = self.rules.root.children[x1] # <<<<<<<<<<<<<< @@ -51057,7 +51057,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1011 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1011 * xroot = self.rules.root.children[x1] * else: * xroot = ExtendedTrieNode(suffix_link=self.rules.root, phrase_location=PhraseLocation()) # <<<<<<<<<<<<<< @@ -51079,7 +51079,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1012 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1012 * else: * xroot = ExtendedTrieNode(suffix_link=self.rules.root, phrase_location=PhraseLocation()) * self.rules.root.children[x1] = xroot # <<<<<<<<<<<<<< @@ -51093,7 +51093,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( } __pyx_L9:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1014 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1014 * self.rules.root.children[x1] = xroot * * for i in range(self.min_gap_size, len(fwords)): # <<<<<<<<<<<<<< @@ -51107,7 +51107,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( for (__pyx_t_5 = __pyx_cur_scope->__pyx_v_self->min_gap_size; __pyx_t_5 < __pyx_t_2; __pyx_t_5+=1) { __pyx_cur_scope->__pyx_v_i = __pyx_t_5; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1015 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1015 * * for i in range(self.min_gap_size, len(fwords)): * for alt in range(0, len(fwords[i])): # <<<<<<<<<<<<<< @@ -51121,7 +51121,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) { __pyx_cur_scope->__pyx_v_alt = __pyx_t_7; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1016 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1016 * for i in range(self.min_gap_size, len(fwords)): * for alt in range(0, len(fwords[i])): * if fwords[i][alt][0] != EPSILON: # <<<<<<<<<<<<<< @@ -51145,7 +51145,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (__pyx_t_13) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1017 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1017 * for alt in range(0, len(fwords[i])): * if fwords[i][alt][0] != EPSILON: * frontier.append((i-self.min_gap_size, i, (i,), alt, self.min_gap_size, xroot, (x1,), True)) # <<<<<<<<<<<<<< @@ -51208,7 +51208,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( } } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1019 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1019 * frontier.append((i-self.min_gap_size, i, (i,), alt, self.min_gap_size, xroot, (x1,), True)) * * next_states = [] # <<<<<<<<<<<<<< @@ -51221,7 +51221,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_cur_scope->__pyx_v_next_states = ((PyObject*)__pyx_t_14); __pyx_t_14 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1020 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1020 * * next_states = [] * for i in range(len(fwords)): # <<<<<<<<<<<<<< @@ -51235,7 +51235,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_2; __pyx_t_5+=1) { __pyx_cur_scope->__pyx_v_i = __pyx_t_5; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1021 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1021 * next_states = [] * for i in range(len(fwords)): * next_states.append(self.get_next_states(fwords,i,self.min_gap_size)) # <<<<<<<<<<<<<< @@ -51267,7 +51267,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1023 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1023 * next_states.append(self.get_next_states(fwords,i,self.min_gap_size)) * * while len(frontier) > 0: # <<<<<<<<<<<<<< @@ -51279,7 +51279,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_t_13 = ((__pyx_t_2 > 0) != 0); if (!__pyx_t_13) break; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1024 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1024 * * while len(frontier) > 0: * new_frontier = [] # <<<<<<<<<<<<<< @@ -51293,7 +51293,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1025 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1025 * while len(frontier) > 0: * new_frontier = [] * for k, i, input_match, alt, pathlen, node, prefix, is_shadow_path in frontier: # <<<<<<<<<<<<<< @@ -51413,7 +51413,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_18); __pyx_t_18 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1026 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1026 * new_frontier = [] * for k, i, input_match, alt, pathlen, node, prefix, is_shadow_path in frontier: * word_id = fwords[i][alt][0] # <<<<<<<<<<<<<< @@ -51433,7 +51433,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1027 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1027 * for k, i, input_match, alt, pathlen, node, prefix, is_shadow_path in frontier: * word_id = fwords[i][alt][0] * spanlen = fwords[i][alt][2] # <<<<<<<<<<<<<< @@ -51453,7 +51453,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1029 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1029 * spanlen = fwords[i][alt][2] * # TODO get rid of k -- pathlen is replacing it * if word_id == EPSILON: # <<<<<<<<<<<<<< @@ -51468,7 +51468,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; if (__pyx_t_13) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1031 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1031 * if word_id == EPSILON: * # skipping because word_id is epsilon * if i+spanlen >= len(fwords): # <<<<<<<<<<<<<< @@ -51493,7 +51493,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; if (__pyx_t_13) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1032 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1032 * # skipping because word_id is epsilon * if i+spanlen >= len(fwords): * continue # <<<<<<<<<<<<<< @@ -51503,7 +51503,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( goto __pyx_L19_continue; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1033 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1033 * if i+spanlen >= len(fwords): * continue * for nualt in range(0,len(fwords[i+spanlen])): # <<<<<<<<<<<<<< @@ -51523,7 +51523,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( for (__pyx_t_21 = 0; __pyx_t_21 < __pyx_t_6; __pyx_t_21+=1) { __pyx_cur_scope->__pyx_v_nualt = __pyx_t_21; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1034 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1034 * continue * for nualt in range(0,len(fwords[i+spanlen])): * frontier.append((k, i+spanlen, input_match, nualt, pathlen, node, prefix, is_shadow_path)) # <<<<<<<<<<<<<< @@ -51569,7 +51569,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1035 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1035 * for nualt in range(0,len(fwords[i+spanlen])): * frontier.append((k, i+spanlen, input_match, nualt, pathlen, node, prefix, is_shadow_path)) * continue # <<<<<<<<<<<<<< @@ -51579,7 +51579,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( goto __pyx_L19_continue; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1037 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1037 * continue * * phrase = prefix + (word_id,) # <<<<<<<<<<<<<< @@ -51599,7 +51599,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_18); __pyx_t_18 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1038 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1038 * * phrase = prefix + (word_id,) * hiero_phrase = Phrase(phrase) # <<<<<<<<<<<<<< @@ -51619,7 +51619,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_16); __pyx_t_16 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1039 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1039 * phrase = prefix + (word_id,) * hiero_phrase = Phrase(phrase) * arity = hiero_phrase.arity() # <<<<<<<<<<<<<< @@ -51635,7 +51635,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_cur_scope->__pyx_v_arity = __pyx_t_21; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1041 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1041 * arity = hiero_phrase.arity() * * lookup_required = False # <<<<<<<<<<<<<< @@ -51644,7 +51644,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( */ __pyx_cur_scope->__pyx_v_lookup_required = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1042 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1042 * * lookup_required = False * if word_id in node.children: # <<<<<<<<<<<<<< @@ -51658,7 +51658,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_t_9 = (__pyx_t_13 != 0); if (__pyx_t_9) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1043 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1043 * lookup_required = False * if word_id in node.children: * if node.children[word_id] is None: # <<<<<<<<<<<<<< @@ -51675,7 +51675,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_t_13 = (__pyx_t_9 != 0); if (__pyx_t_13) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1045 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1045 * if node.children[word_id] is None: * # Path dead-ends at this node * continue # <<<<<<<<<<<<<< @@ -51686,7 +51686,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1048 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1048 * else: * # Path continues at this node * node = node.children[word_id] # <<<<<<<<<<<<<< @@ -51707,7 +51707,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1050 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1050 * node = node.children[word_id] * else: * if node.suffix_link is None: # <<<<<<<<<<<<<< @@ -51721,7 +51721,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_t_9 = (__pyx_t_13 != 0); if (__pyx_t_9) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1052 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1052 * if node.suffix_link is None: * # Current node is root; lookup required * lookup_required = True # <<<<<<<<<<<<<< @@ -51733,7 +51733,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1054 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1054 * lookup_required = True * else: * if word_id in node.suffix_link.children: # <<<<<<<<<<<<<< @@ -51750,7 +51750,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_t_13 = (__pyx_t_9 != 0); if (__pyx_t_13) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1055 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1055 * else: * if word_id in node.suffix_link.children: * if node.suffix_link.children[word_id] is None: # <<<<<<<<<<<<<< @@ -51770,7 +51770,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_t_9 = (__pyx_t_13 != 0); if (__pyx_t_9) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1057 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1057 * if node.suffix_link.children[word_id] is None: * # Suffix link reports path is dead end * node.children[word_id] = None # <<<<<<<<<<<<<< @@ -51782,7 +51782,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( if (unlikely(PyObject_SetItem(__pyx_t_16, __pyx_cur_scope->__pyx_v_word_id, Py_None) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1057; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1058 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1058 * # Suffix link reports path is dead end * node.children[word_id] = None * continue # <<<<<<<<<<<<<< @@ -51793,7 +51793,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1061 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1061 * else: * # Suffix link indicates lookup is reqired * lookup_required = True # <<<<<<<<<<<<<< @@ -51806,7 +51806,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1064 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1064 * else: * #ERROR: We never get here * raise Exception("Keyword trie error") # <<<<<<<<<<<<<< @@ -51825,7 +51825,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( } __pyx_L27:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1066 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1066 * raise Exception("Keyword trie error") * # checking whether lookup_required * if lookup_required: # <<<<<<<<<<<<<< @@ -51835,7 +51835,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_t_9 = (__pyx_cur_scope->__pyx_v_lookup_required != 0); if (__pyx_t_9) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1067 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1067 * # checking whether lookup_required * if lookup_required: * new_node = None # <<<<<<<<<<<<<< @@ -51847,7 +51847,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_new_node, Py_None); __Pyx_GIVEREF(Py_None); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1068 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1068 * if lookup_required: * new_node = None * if is_shadow_path: # <<<<<<<<<<<<<< @@ -51857,7 +51857,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_is_shadow_path); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1068; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_9) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1071 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1071 * # Extending shadow path * # on the shadow path we don't do any search, we just use info from suffix link * new_node = ExtendedTrieNode(phrase_location=node.suffix_link.children[word_id].phrase_location, # <<<<<<<<<<<<<< @@ -51880,7 +51880,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( if (PyDict_SetItem(__pyx_t_16, __pyx_n_s_phrase_location, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1072 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1072 * # on the shadow path we don't do any search, we just use info from suffix link * new_node = ExtendedTrieNode(phrase_location=node.suffix_link.children[word_id].phrase_location, * suffix_link=node.suffix_link.children[word_id], # <<<<<<<<<<<<<< @@ -51898,7 +51898,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( if (PyDict_SetItem(__pyx_t_16, __pyx_n_s_suffix_link, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1073 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1073 * new_node = ExtendedTrieNode(phrase_location=node.suffix_link.children[word_id].phrase_location, * suffix_link=node.suffix_link.children[word_id], * phrase=hiero_phrase) # <<<<<<<<<<<<<< @@ -51907,7 +51907,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( */ if (PyDict_SetItem(__pyx_t_16, __pyx_n_s_phrase, ((PyObject *)__pyx_cur_scope->__pyx_v_hiero_phrase)) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1071 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1071 * # Extending shadow path * # on the shadow path we don't do any search, we just use info from suffix link * new_node = ExtendedTrieNode(phrase_location=node.suffix_link.children[word_id].phrase_location, # <<<<<<<<<<<<<< @@ -51925,7 +51925,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1075 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1075 * phrase=hiero_phrase) * else: * if arity > 0: # <<<<<<<<<<<<<< @@ -51935,7 +51935,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_t_9 = ((__pyx_cur_scope->__pyx_v_arity > 0) != 0); if (__pyx_t_9) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1077 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1077 * if arity > 0: * # Intersecting because of arity > 0 * intersect_start_time = monitor_cpu() # <<<<<<<<<<<<<< @@ -51952,7 +51952,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_16); __pyx_t_16 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1078 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1078 * # Intersecting because of arity > 0 * intersect_start_time = monitor_cpu() * phrase_location = self.intersect(node, node.suffix_link.children[word_id], hiero_phrase) # <<<<<<<<<<<<<< @@ -51975,7 +51975,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1079 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1079 * intersect_start_time = monitor_cpu() * phrase_location = self.intersect(node, node.suffix_link.children[word_id], hiero_phrase) * intersect_stop_time = monitor_cpu() # <<<<<<<<<<<<<< @@ -51992,7 +51992,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_16); __pyx_t_16 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1080 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1080 * phrase_location = self.intersect(node, node.suffix_link.children[word_id], hiero_phrase) * intersect_stop_time = monitor_cpu() * self.intersect_time += intersect_stop_time - intersect_start_time # <<<<<<<<<<<<<< @@ -52014,7 +52014,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1083 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1083 * else: * # Suffix array search * phrase_location = node.phrase_location # <<<<<<<<<<<<<< @@ -52029,7 +52029,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_18); __pyx_t_18 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1084 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1084 * # Suffix array search * phrase_location = node.phrase_location * sa_range = self.fsa.lookup(sym_tostring(phrase[-1]), len(phrase)-1, phrase_location.sa_low, phrase_location.sa_high) # <<<<<<<<<<<<<< @@ -52074,7 +52074,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_10); __pyx_t_10 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1085 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1085 * phrase_location = node.phrase_location * sa_range = self.fsa.lookup(sym_tostring(phrase[-1]), len(phrase)-1, phrase_location.sa_low, phrase_location.sa_high) * if sa_range is not None: # <<<<<<<<<<<<<< @@ -52085,7 +52085,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_t_13 = (__pyx_t_9 != 0); if (__pyx_t_13) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1086 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1086 * sa_range = self.fsa.lookup(sym_tostring(phrase[-1]), len(phrase)-1, phrase_location.sa_low, phrase_location.sa_high) * if sa_range is not None: * phrase_location = PhraseLocation(sa_low=sa_range[0], sa_high=sa_range[1]) # <<<<<<<<<<<<<< @@ -52113,7 +52113,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1088 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1088 * phrase_location = PhraseLocation(sa_low=sa_range[0], sa_high=sa_range[1]) * else: * phrase_location = None # <<<<<<<<<<<<<< @@ -52129,7 +52129,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( } __pyx_L34:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1090 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1090 * phrase_location = None * * if phrase_location is None: # <<<<<<<<<<<<<< @@ -52140,7 +52140,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_t_9 = (__pyx_t_13 != 0); if (__pyx_t_9) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1091 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1091 * * if phrase_location is None: * node.children[word_id] = None # <<<<<<<<<<<<<< @@ -52152,7 +52152,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_cur_scope->__pyx_v_word_id, Py_None) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1091; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1093 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1093 * node.children[word_id] = None * # Search failed * continue # <<<<<<<<<<<<<< @@ -52162,7 +52162,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( goto __pyx_L19_continue; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1095 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1095 * continue * # Search succeeded * suffix_link = self.rules.root # <<<<<<<<<<<<<< @@ -52176,7 +52176,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_11); __pyx_t_11 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1096 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1096 * # Search succeeded * suffix_link = self.rules.root * if node.suffix_link is not None: # <<<<<<<<<<<<<< @@ -52190,7 +52190,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_t_13 = (__pyx_t_9 != 0); if (__pyx_t_13) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1097 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1097 * suffix_link = self.rules.root * if node.suffix_link is not None: * suffix_link = node.suffix_link.children[word_id] # <<<<<<<<<<<<<< @@ -52213,7 +52213,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( } __pyx_L37:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1098 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1098 * if node.suffix_link is not None: * suffix_link = node.suffix_link.children[word_id] * new_node = ExtendedTrieNode(phrase_location=phrase_location, # <<<<<<<<<<<<<< @@ -52224,7 +52224,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GOTREF(__pyx_t_11); if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_phrase_location, ((PyObject *)__pyx_cur_scope->__pyx_v_phrase_location)) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1099 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1099 * suffix_link = node.suffix_link.children[word_id] * new_node = ExtendedTrieNode(phrase_location=phrase_location, * suffix_link=suffix_link, # <<<<<<<<<<<<<< @@ -52233,7 +52233,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( */ if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_suffix_link, __pyx_cur_scope->__pyx_v_suffix_link) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1100 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1100 * new_node = ExtendedTrieNode(phrase_location=phrase_location, * suffix_link=suffix_link, * phrase=hiero_phrase) # <<<<<<<<<<<<<< @@ -52242,7 +52242,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( */ if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_phrase, ((PyObject *)__pyx_cur_scope->__pyx_v_hiero_phrase)) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1098 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1098 * if node.suffix_link is not None: * suffix_link = node.suffix_link.children[word_id] * new_node = ExtendedTrieNode(phrase_location=phrase_location, # <<<<<<<<<<<<<< @@ -52259,7 +52259,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( } __pyx_L33:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1101 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1101 * suffix_link=suffix_link, * phrase=hiero_phrase) * node.children[word_id] = new_node # <<<<<<<<<<<<<< @@ -52271,7 +52271,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( if (unlikely(PyObject_SetItem(__pyx_t_10, __pyx_cur_scope->__pyx_v_word_id, __pyx_cur_scope->__pyx_v_new_node) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1102 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1102 * phrase=hiero_phrase) * node.children[word_id] = new_node * node = new_node # <<<<<<<<<<<<<< @@ -52283,7 +52283,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_node, __pyx_cur_scope->__pyx_v_new_node); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_new_node); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1107 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1107 * This should happen before we get to extraction (so that * the node will exist if needed)''' * if arity < self.max_nonterminals: # <<<<<<<<<<<<<< @@ -52293,7 +52293,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_t_13 = ((__pyx_cur_scope->__pyx_v_arity < __pyx_cur_scope->__pyx_v_self->max_nonterminals) != 0); if (__pyx_t_13) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1108 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1108 * the node will exist if needed)''' * if arity < self.max_nonterminals: * xcat_index = arity+1 # <<<<<<<<<<<<<< @@ -52307,7 +52307,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_10); __pyx_t_10 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1109 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1109 * if arity < self.max_nonterminals: * xcat_index = arity+1 * xcat = sym_setindex(self.category, xcat_index) # <<<<<<<<<<<<<< @@ -52317,7 +52317,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_t_21 = __Pyx_PyInt_As_int(__pyx_cur_scope->__pyx_v_xcat_index); if (unlikely((__pyx_t_21 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_cur_scope->__pyx_v_xcat = __pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_cur_scope->__pyx_v_self->category, __pyx_t_21); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1110 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1110 * xcat_index = arity+1 * xcat = sym_setindex(self.category, xcat_index) * suffix_link_xcat_index = xcat_index # <<<<<<<<<<<<<< @@ -52329,7 +52329,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_suffix_link_xcat_index, __pyx_cur_scope->__pyx_v_xcat_index); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_xcat_index); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1111 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1111 * xcat = sym_setindex(self.category, xcat_index) * suffix_link_xcat_index = xcat_index * if is_shadow_path: # <<<<<<<<<<<<<< @@ -52339,7 +52339,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_is_shadow_path); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_13) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1112 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1112 * suffix_link_xcat_index = xcat_index * if is_shadow_path: * suffix_link_xcat_index = xcat_index-1 # <<<<<<<<<<<<<< @@ -52356,7 +52356,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( } __pyx_L39:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1113 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1113 * if is_shadow_path: * suffix_link_xcat_index = xcat_index-1 * suffix_link_xcat = sym_setindex(self.category, suffix_link_xcat_index) # <<<<<<<<<<<<<< @@ -52366,7 +52366,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_t_21 = __Pyx_PyInt_As_int(__pyx_cur_scope->__pyx_v_suffix_link_xcat_index); if (unlikely((__pyx_t_21 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_cur_scope->__pyx_v_suffix_link_xcat = __pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_cur_scope->__pyx_v_self->category, __pyx_t_21); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1114 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1114 * suffix_link_xcat_index = xcat_index-1 * suffix_link_xcat = sym_setindex(self.category, suffix_link_xcat_index) * node.children[xcat] = ExtendedTrieNode(phrase_location=node.phrase_location, # <<<<<<<<<<<<<< @@ -52380,7 +52380,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_phrase_location, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1115 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1115 * suffix_link_xcat = sym_setindex(self.category, suffix_link_xcat_index) * node.children[xcat] = ExtendedTrieNode(phrase_location=node.phrase_location, * suffix_link=node.suffix_link.children[suffix_link_xcat], # <<<<<<<<<<<<<< @@ -52398,7 +52398,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_suffix_link, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1116 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1116 * node.children[xcat] = ExtendedTrieNode(phrase_location=node.phrase_location, * suffix_link=node.suffix_link.children[suffix_link_xcat], * phrase= Phrase(phrase + (xcat,))) # <<<<<<<<<<<<<< @@ -52426,7 +52426,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_phrase, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1114 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1114 * suffix_link_xcat_index = xcat_index-1 * suffix_link_xcat = sym_setindex(self.category, suffix_link_xcat_index) * node.children[xcat] = ExtendedTrieNode(phrase_location=node.phrase_location, # <<<<<<<<<<<<<< @@ -52445,7 +52445,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( } __pyx_L38:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1119 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1119 * * # sample from range * if not is_shadow_path: # <<<<<<<<<<<<<< @@ -52456,7 +52456,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_t_9 = ((!__pyx_t_13) != 0); if (__pyx_t_9) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1120 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1120 * # sample from range * if not is_shadow_path: * sample = self.sampler.sample(node.phrase_location) # <<<<<<<<<<<<<< @@ -52482,7 +52482,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_10); __pyx_t_10 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1121 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1121 * if not is_shadow_path: * sample = self.sampler.sample(node.phrase_location) * num_subpatterns = ( node.phrase_location).num_subpatterns # <<<<<<<<<<<<<< @@ -52495,7 +52495,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_cur_scope->__pyx_v_num_subpatterns = __pyx_t_21; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1122 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1122 * sample = self.sampler.sample(node.phrase_location) * num_subpatterns = ( node.phrase_location).num_subpatterns * chunklen = IntList(initial_len=num_subpatterns) # <<<<<<<<<<<<<< @@ -52516,7 +52516,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_18); __pyx_t_18 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1123 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1123 * num_subpatterns = ( node.phrase_location).num_subpatterns * chunklen = IntList(initial_len=num_subpatterns) * for j from 0 <= j < num_subpatterns: # <<<<<<<<<<<<<< @@ -52526,7 +52526,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_t_21 = __pyx_cur_scope->__pyx_v_num_subpatterns; for (__pyx_cur_scope->__pyx_v_j = 0; __pyx_cur_scope->__pyx_v_j < __pyx_t_21; __pyx_cur_scope->__pyx_v_j++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1124 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1124 * chunklen = IntList(initial_len=num_subpatterns) * for j from 0 <= j < num_subpatterns: * chunklen.arr[j] = hiero_phrase.chunklen(j) # <<<<<<<<<<<<<< @@ -52536,7 +52536,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( (__pyx_cur_scope->__pyx_v_chunklen->arr[__pyx_cur_scope->__pyx_v_j]) = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Phrase *)__pyx_cur_scope->__pyx_v_hiero_phrase->__pyx_vtab)->chunklen(__pyx_cur_scope->__pyx_v_hiero_phrase, __pyx_cur_scope->__pyx_v_j); } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1125 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1125 * for j from 0 <= j < num_subpatterns: * chunklen.arr[j] = hiero_phrase.chunklen(j) * extracts = [] # <<<<<<<<<<<<<< @@ -52550,7 +52550,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_18); __pyx_t_18 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1126 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1126 * chunklen.arr[j] = hiero_phrase.chunklen(j) * extracts = [] * j = 0 # <<<<<<<<<<<<<< @@ -52559,7 +52559,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( */ __pyx_cur_scope->__pyx_v_j = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1127 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1127 * extracts = [] * j = 0 * extract_start = monitor_cpu() # <<<<<<<<<<<<<< @@ -52576,7 +52576,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_10); __pyx_t_10 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1128 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1128 * j = 0 * extract_start = monitor_cpu() * while j < sample.len: # <<<<<<<<<<<<<< @@ -52587,7 +52587,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_t_9 = ((__pyx_cur_scope->__pyx_v_j < __pyx_cur_scope->__pyx_v_sample->len) != 0); if (!__pyx_t_9) break; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1129 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1129 * extract_start = monitor_cpu() * while j < sample.len: * extract = [] # <<<<<<<<<<<<<< @@ -52601,7 +52601,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_10); __pyx_t_10 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1131 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1131 * extract = [] * * assign_matching(&matching, sample.arr, j, num_subpatterns, self.fda.sent_id.arr) # <<<<<<<<<<<<<< @@ -52610,7 +52610,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( */ __pyx_f_4cdec_2sa_3_sa_assign_matching((&__pyx_cur_scope->__pyx_v_matching), __pyx_cur_scope->__pyx_v_sample->arr, __pyx_cur_scope->__pyx_v_j, __pyx_cur_scope->__pyx_v_num_subpatterns, __pyx_cur_scope->__pyx_v_self->fda->sent_id->arr); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1132 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1132 * * assign_matching(&matching, sample.arr, j, num_subpatterns, self.fda.sent_id.arr) * loc = tuple(sample[j:j+num_subpatterns]) # <<<<<<<<<<<<<< @@ -52632,7 +52632,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_10); __pyx_t_10 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1133 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1133 * assign_matching(&matching, sample.arr, j, num_subpatterns, self.fda.sent_id.arr) * loc = tuple(sample[j:j+num_subpatterns]) * extract = self.extract(hiero_phrase, &matching, chunklen.arr, num_subpatterns) # <<<<<<<<<<<<<< @@ -52646,7 +52646,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_10); __pyx_t_10 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1134 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1134 * loc = tuple(sample[j:j+num_subpatterns]) * extract = self.extract(hiero_phrase, &matching, chunklen.arr, num_subpatterns) * extracts.extend([(e, loc) for e in extract]) # <<<<<<<<<<<<<< @@ -52709,7 +52709,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_t_12 = __Pyx_PyList_Extend(__pyx_cur_scope->__pyx_v_extracts, __pyx_t_10); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1135 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1135 * extract = self.extract(hiero_phrase, &matching, chunklen.arr, num_subpatterns) * extracts.extend([(e, loc) for e in extract]) * j = j + num_subpatterns # <<<<<<<<<<<<<< @@ -52719,7 +52719,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_cur_scope->__pyx_v_j = (__pyx_cur_scope->__pyx_v_j + __pyx_cur_scope->__pyx_v_num_subpatterns); } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1137 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1137 * j = j + num_subpatterns * * num_samples = sample.len/num_subpatterns # <<<<<<<<<<<<<< @@ -52748,7 +52748,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( } __pyx_cur_scope->__pyx_v_num_samples = __Pyx_div_int(__pyx_cur_scope->__pyx_v_sample->len, __pyx_cur_scope->__pyx_v_num_subpatterns); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1138 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1138 * * num_samples = sample.len/num_subpatterns * extract_stop = monitor_cpu() # <<<<<<<<<<<<<< @@ -52765,7 +52765,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_18); __pyx_t_18 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1139 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1139 * num_samples = sample.len/num_subpatterns * extract_stop = monitor_cpu() * self.extract_time = self.extract_time + extract_stop - extract_start # <<<<<<<<<<<<<< @@ -52784,7 +52784,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_cur_scope->__pyx_v_self->extract_time = __pyx_t_4; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1140 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1140 * extract_stop = monitor_cpu() * self.extract_time = self.extract_time + extract_stop - extract_start * if len(extracts) > 0: # <<<<<<<<<<<<<< @@ -52795,7 +52795,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_t_9 = ((__pyx_t_6 > 0) != 0); if (__pyx_t_9) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1141 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1141 * self.extract_time = self.extract_time + extract_stop - extract_start * if len(extracts) > 0: * fcount = Counter() # <<<<<<<<<<<<<< @@ -52812,7 +52812,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_10); __pyx_t_10 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1142 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1142 * if len(extracts) > 0: * fcount = Counter() * fphrases = defaultdict(lambda: defaultdict(lambda: defaultdict(list))) # <<<<<<<<<<<<<< @@ -52837,7 +52837,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_18); __pyx_t_18 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1143 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1143 * fcount = Counter() * fphrases = defaultdict(lambda: defaultdict(lambda: defaultdict(list))) * for (f, e, count, als), loc in extracts: # <<<<<<<<<<<<<< @@ -52986,7 +52986,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_17); __pyx_t_17 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1144 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1144 * fphrases = defaultdict(lambda: defaultdict(lambda: defaultdict(list))) * for (f, e, count, als), loc in extracts: * fcount[f] += count # <<<<<<<<<<<<<< @@ -53004,7 +53004,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1145 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1145 * for (f, e, count, als), loc in extracts: * fcount[f] += count * fphrases[f][e][als].append(loc) # <<<<<<<<<<<<<< @@ -53024,7 +53024,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( } __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1146 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1146 * fcount[f] += count * fphrases[f][e][als].append(loc) * for f, elist in fphrases.iteritems(): # <<<<<<<<<<<<<< @@ -53056,7 +53056,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_10); __pyx_t_10 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1147 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1147 * fphrases[f][e][als].append(loc) * for f, elist in fphrases.iteritems(): * for e, alslist in elist.iteritems(): # <<<<<<<<<<<<<< @@ -53088,7 +53088,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_17); __pyx_t_17 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1148 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1148 * for f, elist in fphrases.iteritems(): * for e, alslist in elist.iteritems(): * alignment, max_locs = max(alslist.iteritems(), key=lambda x: len(x[1])) # <<<<<<<<<<<<<< @@ -53174,7 +53174,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_17); __pyx_t_17 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1149 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1149 * for e, alslist in elist.iteritems(): * alignment, max_locs = max(alslist.iteritems(), key=lambda x: len(x[1])) * locs = tuple(itertools.chain.from_iterable(alslist.itervalues())) # <<<<<<<<<<<<<< @@ -53216,7 +53216,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_11); __pyx_t_11 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1150 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1150 * alignment, max_locs = max(alslist.iteritems(), key=lambda x: len(x[1])) * locs = tuple(itertools.chain.from_iterable(alslist.itervalues())) * count = len(locs) # <<<<<<<<<<<<<< @@ -53231,7 +53231,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_11); __pyx_t_11 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1151 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1151 * locs = tuple(itertools.chain.from_iterable(alslist.itervalues())) * count = len(locs) * scores = self.scorer.score(FeatureContext( # <<<<<<<<<<<<<< @@ -53241,7 +53241,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_FeatureContext); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1152 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1152 * count = len(locs) * scores = self.scorer.score(FeatureContext( * f, e, count, fcount[f], num_samples, # <<<<<<<<<<<<<< @@ -53253,7 +53253,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_t_15 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_num_samples); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1153 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1153 * scores = self.scorer.score(FeatureContext( * f, e, count, fcount[f], num_samples, * (k,i+spanlen), locs, input_match, # <<<<<<<<<<<<<< @@ -53276,7 +53276,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_t_3 = 0; __pyx_t_16 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1157 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1157 * meta, * # Include online stats. None if none. * self.online_ctx_lookup(f, e, ctx_name))) # <<<<<<<<<<<<<< @@ -53301,7 +53301,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1151 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1151 * locs = tuple(itertools.chain.from_iterable(alslist.itervalues())) * count = len(locs) * scores = self.scorer.score(FeatureContext( # <<<<<<<<<<<<<< @@ -53361,7 +53361,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1159 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1159 * self.online_ctx_lookup(f, e, ctx_name))) * # Phrase pair processed * if self.online: # <<<<<<<<<<<<<< @@ -53371,7 +53371,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_t_9 = (__pyx_cur_scope->__pyx_v_self->online != 0); if (__pyx_t_9) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1160 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1160 * # Phrase pair processed * if self.online: * seen_phrases.add((f, e)) # <<<<<<<<<<<<<< @@ -53392,7 +53392,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( } __pyx_L60:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1161 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1161 * if self.online: * seen_phrases.add((f, e)) * yield Rule(self.category, f, e, scores, alignment) # <<<<<<<<<<<<<< @@ -53473,7 +53473,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( } __pyx_L32:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1163 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1163 * yield Rule(self.category, f, e, scores, alignment) * * if len(phrase) < self.max_length and i+spanlen < len(fwords) and pathlen+1 <= self.max_initial_size: # <<<<<<<<<<<<<< @@ -53519,7 +53519,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( } if (__pyx_t_13) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1164 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1164 * * if len(phrase) < self.max_length and i+spanlen < len(fwords) and pathlen+1 <= self.max_initial_size: * for alt_id in range(len(fwords[i+spanlen])): # <<<<<<<<<<<<<< @@ -53539,7 +53539,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( for (__pyx_t_21 = 0; __pyx_t_21 < __pyx_t_23; __pyx_t_21+=1) { __pyx_cur_scope->__pyx_v_alt_id = __pyx_t_21; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1165 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1165 * if len(phrase) < self.max_length and i+spanlen < len(fwords) and pathlen+1 <= self.max_initial_size: * for alt_id in range(len(fwords[i+spanlen])): * new_frontier.append((k, i+spanlen, input_match, alt_id, pathlen + 1, node, phrase, is_shadow_path)) # <<<<<<<<<<<<<< @@ -53587,7 +53587,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1166 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1166 * for alt_id in range(len(fwords[i+spanlen])): * new_frontier.append((k, i+spanlen, input_match, alt_id, pathlen + 1, node, phrase, is_shadow_path)) * num_subpatterns = arity # <<<<<<<<<<<<<< @@ -53596,7 +53596,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( */ __pyx_cur_scope->__pyx_v_num_subpatterns = __pyx_cur_scope->__pyx_v_arity; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1167 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1167 * new_frontier.append((k, i+spanlen, input_match, alt_id, pathlen + 1, node, phrase, is_shadow_path)) * num_subpatterns = arity * if not is_shadow_path: # <<<<<<<<<<<<<< @@ -53607,7 +53607,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_t_9 = ((!__pyx_t_13) != 0); if (__pyx_t_9) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1168 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1168 * num_subpatterns = arity * if not is_shadow_path: * num_subpatterns = num_subpatterns + 1 # <<<<<<<<<<<<<< @@ -53619,7 +53619,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( } __pyx_L65:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1169 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1169 * if not is_shadow_path: * num_subpatterns = num_subpatterns + 1 * if len(phrase)+1 < self.max_length and arity < self.max_nonterminals and num_subpatterns < self.max_chunks: # <<<<<<<<<<<<<< @@ -53642,7 +53642,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( } if (__pyx_t_13) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1170 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1170 * num_subpatterns = num_subpatterns + 1 * if len(phrase)+1 < self.max_length and arity < self.max_nonterminals and num_subpatterns < self.max_chunks: * xcat = sym_setindex(self.category, arity+1) # <<<<<<<<<<<<<< @@ -53651,7 +53651,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( */ __pyx_cur_scope->__pyx_v_xcat = __pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_cur_scope->__pyx_v_self->category, (__pyx_cur_scope->__pyx_v_arity + 1)); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1171 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1171 * if len(phrase)+1 < self.max_length and arity < self.max_nonterminals and num_subpatterns < self.max_chunks: * xcat = sym_setindex(self.category, arity+1) * xnode = node.children[xcat] # <<<<<<<<<<<<<< @@ -53668,7 +53668,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_14); __pyx_t_14 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1173 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1173 * xnode = node.children[xcat] * # I put spanlen=1 below * key = tuple([self.min_gap_size, i, 1, pathlen]) # <<<<<<<<<<<<<< @@ -53701,7 +53701,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_11); __pyx_t_11 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1174 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1174 * # I put spanlen=1 below * key = tuple([self.min_gap_size, i, 1, pathlen]) * frontier_nodes = [] # <<<<<<<<<<<<<< @@ -53715,7 +53715,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_11); __pyx_t_11 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1175 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1175 * key = tuple([self.min_gap_size, i, 1, pathlen]) * frontier_nodes = [] * if key in nodes_isteps_away_buffer: # <<<<<<<<<<<<<< @@ -53726,7 +53726,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_t_9 = (__pyx_t_13 != 0); if (__pyx_t_9) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1176 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1176 * frontier_nodes = [] * if key in nodes_isteps_away_buffer: * frontier_nodes = nodes_isteps_away_buffer[key] # <<<<<<<<<<<<<< @@ -53743,7 +53743,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1178 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1178 * frontier_nodes = nodes_isteps_away_buffer[key] * else: * frontier_nodes = self.get_all_nodes_isteps_away(self.min_gap_size, i, 1, pathlen, fwords, next_states, reachable_buffer) # <<<<<<<<<<<<<< @@ -53788,7 +53788,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_14); __pyx_t_14 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1179 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1179 * else: * frontier_nodes = self.get_all_nodes_isteps_away(self.min_gap_size, i, 1, pathlen, fwords, next_states, reachable_buffer) * nodes_isteps_away_buffer[key] = frontier_nodes # <<<<<<<<<<<<<< @@ -53799,7 +53799,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( } __pyx_L67:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1181 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1181 * nodes_isteps_away_buffer[key] = frontier_nodes * * for i, alt, pathlen in frontier_nodes: # <<<<<<<<<<<<<< @@ -53909,7 +53909,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_10); __pyx_t_10 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1182 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1182 * * for i, alt, pathlen in frontier_nodes: * new_frontier.append((k, i, input_match + (i,), alt, pathlen, xnode, phrase +(xcat,), is_shadow_path)) # <<<<<<<<<<<<<< @@ -53982,7 +53982,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1183 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1183 * for i, alt, pathlen in frontier_nodes: * new_frontier.append((k, i, input_match + (i,), alt, pathlen, xnode, phrase +(xcat,), is_shadow_path)) * frontier = new_frontier # <<<<<<<<<<<<<< @@ -53995,7 +53995,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_new_frontier); } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1186 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1186 * * # Online rule extraction and scoring * if self.online: # <<<<<<<<<<<<<< @@ -54005,7 +54005,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_t_9 = (__pyx_cur_scope->__pyx_v_self->online != 0); if (__pyx_t_9) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1187 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1187 * # Online rule extraction and scoring * if self.online: * stats = self.online_stats[ctx_name] # <<<<<<<<<<<<<< @@ -54018,7 +54018,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_cur_scope->__pyx_v_stats = __pyx_t_8; __pyx_t_8 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1188 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1188 * if self.online: * stats = self.online_stats[ctx_name] * f_syms = tuple(word[0][0] for word in fwords) # <<<<<<<<<<<<<< @@ -54039,7 +54039,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_cur_scope->__pyx_v_f_syms = ((PyObject*)__pyx_t_8); __pyx_t_8 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1189 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1189 * stats = self.online_stats[ctx_name] * f_syms = tuple(word[0][0] for word in fwords) * for f, lex_i, lex_j in self.get_f_phrases(f_syms): # <<<<<<<<<<<<<< @@ -54163,7 +54163,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_11); __pyx_t_11 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1190 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1190 * f_syms = tuple(word[0][0] for word in fwords) * for f, lex_i, lex_j in self.get_f_phrases(f_syms): * spanlen = (lex_j - lex_i) + 1 # <<<<<<<<<<<<<< @@ -54180,7 +54180,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_11); __pyx_t_11 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1191 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1191 * for f, lex_i, lex_j in self.get_f_phrases(f_syms): * spanlen = (lex_j - lex_i) + 1 * if not sym_isvar(f[0]): # <<<<<<<<<<<<<< @@ -54194,7 +54194,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_t_9 = ((!(__pyx_f_4cdec_2sa_3_sa_sym_isvar(__pyx_t_7) != 0)) != 0); if (__pyx_t_9) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1192 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1192 * spanlen = (lex_j - lex_i) + 1 * if not sym_isvar(f[0]): * spanlen += 1 # <<<<<<<<<<<<<< @@ -54211,7 +54211,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( } __pyx_L77:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1193 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1193 * if not sym_isvar(f[0]): * spanlen += 1 * if not sym_isvar(f[1]): # <<<<<<<<<<<<<< @@ -54225,7 +54225,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_t_9 = ((!(__pyx_f_4cdec_2sa_3_sa_sym_isvar(__pyx_t_7) != 0)) != 0); if (__pyx_t_9) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1194 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1194 * spanlen += 1 * if not sym_isvar(f[1]): * spanlen += 1 # <<<<<<<<<<<<<< @@ -54242,7 +54242,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( } __pyx_L78:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1195 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1195 * if not sym_isvar(f[1]): * spanlen += 1 * for e in stats.phrases_fe.get(f, ()): # <<<<<<<<<<<<<< @@ -54307,7 +54307,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1196 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1196 * spanlen += 1 * for e in stats.phrases_fe.get(f, ()): * if (f, e) not in seen_phrases: # <<<<<<<<<<<<<< @@ -54327,7 +54327,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_t_13 = (__pyx_t_9 != 0); if (__pyx_t_13) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1198 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1198 * if (f, e) not in seen_phrases: * # Don't add multiple instances of the same phrase here * seen_phrases.add((f, e)) # <<<<<<<<<<<<<< @@ -54345,7 +54345,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_t_12 = PySet_Add(__pyx_cur_scope->__pyx_v_seen_phrases, __pyx_t_1); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1199 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1199 * # Don't add multiple instances of the same phrase here * seen_phrases.add((f, e)) * scores = self.scorer.score(FeatureContext( # <<<<<<<<<<<<<< @@ -54355,7 +54355,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_FeatureContext); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1204 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1204 * fwords, self.fda, self.eda, * meta, * self.online_ctx_lookup(f, e, ctx_name))) # <<<<<<<<<<<<<< @@ -54380,7 +54380,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1199 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1199 * # Don't add multiple instances of the same phrase here * seen_phrases.add((f, e)) * scores = self.scorer.score(FeatureContext( # <<<<<<<<<<<<<< @@ -54440,7 +54440,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1205 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1205 * meta, * self.online_ctx_lookup(f, e, ctx_name))) * alignment = stats.phrases_al[f][e] # <<<<<<<<<<<<<< @@ -54460,7 +54460,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1206 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1206 * self.online_ctx_lookup(f, e, ctx_name))) * alignment = stats.phrases_al[f][e] * yield Rule(self.category, f, e, scores, alignment) # <<<<<<<<<<<<<< @@ -54527,7 +54527,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( } __pyx_L72:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1208 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1208 * yield Rule(self.category, f, e, scores, alignment) * * stop_time = monitor_cpu() # <<<<<<<<<<<<<< @@ -54543,7 +54543,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_cur_scope->__pyx_v_stop_time = __pyx_t_11; __pyx_t_11 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1209 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1209 * * stop_time = monitor_cpu() * logger.info("Total time for rule lookup, extraction, and scoring = %f seconds", (stop_time - start_time)) # <<<<<<<<<<<<<< @@ -54574,7 +54574,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1210 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1210 * stop_time = monitor_cpu() * logger.info("Total time for rule lookup, extraction, and scoring = %f seconds", (stop_time - start_time)) * gc.collect() # <<<<<<<<<<<<<< @@ -54591,7 +54591,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1211 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1211 * logger.info("Total time for rule lookup, extraction, and scoring = %f seconds", (stop_time - start_time)) * gc.collect() * logger.info(" Extract time = %f seconds", self.extract_time) # <<<<<<<<<<<<<< @@ -54619,7 +54619,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1212 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1212 * gc.collect() * logger.info(" Extract time = %f seconds", self.extract_time) * logger.info(" Intersect time = %f seconds", self.intersect_time) # <<<<<<<<<<<<<< @@ -54647,7 +54647,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":973 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":973 * return sorted(result); * * def input(self, fwords, meta, ctx_name=None): # <<<<<<<<<<<<<< @@ -54679,7 +54679,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( return NULL; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1215 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1215 * * * cdef int find_fixpoint(self, # <<<<<<<<<<<<<< @@ -54709,7 +54709,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("find_fixpoint", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1230 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1230 * cdef int e_low_prev, e_high_prev, f_low_prev, f_high_prev, new_x, new_low_x, new_high_x * * e_low[0] = e_in_low # <<<<<<<<<<<<<< @@ -54718,7 +54718,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct */ (__pyx_v_e_low[0]) = __pyx_v_e_in_low; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1231 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1231 * * e_low[0] = e_in_low * e_high[0] = e_in_high # <<<<<<<<<<<<<< @@ -54727,7 +54727,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct */ (__pyx_v_e_high[0]) = __pyx_v_e_in_high; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1232 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1232 * e_low[0] = e_in_low * e_high[0] = e_in_high * self.find_projection(f_low, f_high, f_links_low, f_links_high, e_low, e_high) # <<<<<<<<<<<<<< @@ -54739,7 +54739,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1233 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1233 * e_high[0] = e_in_high * self.find_projection(f_low, f_high, f_links_low, f_links_high, e_low, e_high) * if e_low[0] == -1: # <<<<<<<<<<<<<< @@ -54749,7 +54749,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_t_3 = (((__pyx_v_e_low[0]) == -1) != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1239 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1239 * # rule X -> X_1 w X_2 / X_1 X_2. This is probably * # not worth the bother, though. * return 0 # <<<<<<<<<<<<<< @@ -54760,7 +54760,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1240 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1240 * # not worth the bother, though. * return 0 * elif e_in_low != -1 and e_low[0] != e_in_low: # <<<<<<<<<<<<<< @@ -54776,7 +54776,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct } if (__pyx_t_5) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1241 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1241 * return 0 * elif e_in_low != -1 and e_low[0] != e_in_low: * if e_in_low - e_low[0] < min_ex_size: # <<<<<<<<<<<<<< @@ -54786,7 +54786,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_t_5 = (((__pyx_v_e_in_low - (__pyx_v_e_low[0])) < __pyx_v_min_ex_size) != 0); if (__pyx_t_5) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1242 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1242 * elif e_in_low != -1 and e_low[0] != e_in_low: * if e_in_low - e_low[0] < min_ex_size: * e_low[0] = e_in_low - min_ex_size # <<<<<<<<<<<<<< @@ -54795,7 +54795,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct */ (__pyx_v_e_low[0]) = (__pyx_v_e_in_low - __pyx_v_min_ex_size); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1243 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1243 * if e_in_low - e_low[0] < min_ex_size: * e_low[0] = e_in_low - min_ex_size * if e_low[0] < 0: # <<<<<<<<<<<<<< @@ -54805,7 +54805,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_t_5 = (((__pyx_v_e_low[0]) < 0) != 0); if (__pyx_t_5) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1244 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1244 * e_low[0] = e_in_low - min_ex_size * if e_low[0] < 0: * return 0 # <<<<<<<<<<<<<< @@ -54822,7 +54822,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct } __pyx_L3:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1246 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1246 * return 0 * * if e_high[0] - e_low[0] > max_e_len: # <<<<<<<<<<<<<< @@ -54832,7 +54832,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_t_5 = ((((__pyx_v_e_high[0]) - (__pyx_v_e_low[0])) > __pyx_v_max_e_len) != 0); if (__pyx_t_5) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1247 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1247 * * if e_high[0] - e_low[0] > max_e_len: * return 0 # <<<<<<<<<<<<<< @@ -54843,7 +54843,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1248 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1248 * if e_high[0] - e_low[0] > max_e_len: * return 0 * elif e_in_high != -1 and e_high[0] != e_in_high: # <<<<<<<<<<<<<< @@ -54859,7 +54859,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct } if (__pyx_t_4) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1249 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1249 * return 0 * elif e_in_high != -1 and e_high[0] != e_in_high: * if e_high[0] - e_in_high < min_ex_size: # <<<<<<<<<<<<<< @@ -54869,7 +54869,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_t_4 = ((((__pyx_v_e_high[0]) - __pyx_v_e_in_high) < __pyx_v_min_ex_size) != 0); if (__pyx_t_4) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1250 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1250 * elif e_in_high != -1 and e_high[0] != e_in_high: * if e_high[0] - e_in_high < min_ex_size: * e_high[0] = e_in_high + min_ex_size # <<<<<<<<<<<<<< @@ -54878,7 +54878,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct */ (__pyx_v_e_high[0]) = (__pyx_v_e_in_high + __pyx_v_min_ex_size); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1251 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1251 * if e_high[0] - e_in_high < min_ex_size: * e_high[0] = e_in_high + min_ex_size * if e_high[0] > e_sent_len: # <<<<<<<<<<<<<< @@ -54888,7 +54888,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_t_4 = (((__pyx_v_e_high[0]) > __pyx_v_e_sent_len) != 0); if (__pyx_t_4) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1252 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1252 * e_high[0] = e_in_high + min_ex_size * if e_high[0] > e_sent_len: * return 0 # <<<<<<<<<<<<<< @@ -54905,7 +54905,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct } __pyx_L6:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1254 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1254 * return 0 * * f_back_low[0] = -1 # <<<<<<<<<<<<<< @@ -54914,7 +54914,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct */ (__pyx_v_f_back_low[0]) = -1; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1255 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1255 * * f_back_low[0] = -1 * f_back_high[0] = -1 # <<<<<<<<<<<<<< @@ -54923,7 +54923,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct */ (__pyx_v_f_back_high[0]) = -1; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1256 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1256 * f_back_low[0] = -1 * f_back_high[0] = -1 * f_low_prev = f_low # <<<<<<<<<<<<<< @@ -54932,7 +54932,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct */ __pyx_v_f_low_prev = __pyx_v_f_low; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1257 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1257 * f_back_high[0] = -1 * f_low_prev = f_low * f_high_prev = f_high # <<<<<<<<<<<<<< @@ -54942,7 +54942,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_f_high); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_f_high_prev = __pyx_t_1; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1258 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1258 * f_low_prev = f_low * f_high_prev = f_high * new_x = 0 # <<<<<<<<<<<<<< @@ -54951,7 +54951,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct */ __pyx_v_new_x = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1259 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1259 * f_high_prev = f_high * new_x = 0 * new_low_x = 0 # <<<<<<<<<<<<<< @@ -54960,7 +54960,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct */ __pyx_v_new_low_x = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1260 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1260 * new_x = 0 * new_low_x = 0 * new_high_x = 0 # <<<<<<<<<<<<<< @@ -54969,7 +54969,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct */ __pyx_v_new_high_x = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1262 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1262 * new_high_x = 0 * * while True: # <<<<<<<<<<<<<< @@ -54978,7 +54978,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct */ while (1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1264 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1264 * while True: * * if f_back_low[0] == -1: # <<<<<<<<<<<<<< @@ -54988,7 +54988,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_t_4 = (((__pyx_v_f_back_low[0]) == -1) != 0); if (__pyx_t_4) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1265 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1265 * * if f_back_low[0] == -1: * self.find_projection(e_low[0], e_high[0], e_links_low, e_links_high, f_back_low, f_back_high) # <<<<<<<<<<<<<< @@ -55002,7 +55002,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1267 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1267 * self.find_projection(e_low[0], e_high[0], e_links_low, e_links_high, f_back_low, f_back_high) * else: * self.find_projection(e_low[0], e_low_prev, e_links_low, e_links_high, f_back_low, f_back_high) # <<<<<<<<<<<<<< @@ -55013,7 +55013,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1268 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1268 * else: * self.find_projection(e_low[0], e_low_prev, e_links_low, e_links_high, f_back_low, f_back_high) * self.find_projection(e_high_prev, e_high[0], e_links_low, e_links_high, f_back_low, f_back_high) # <<<<<<<<<<<<<< @@ -55026,7 +55026,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct } __pyx_L11:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1270 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1270 * self.find_projection(e_high_prev, e_high[0], e_links_low, e_links_high, f_back_low, f_back_high) * * if f_back_low[0] > f_low: # <<<<<<<<<<<<<< @@ -55036,7 +55036,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_t_4 = (((__pyx_v_f_back_low[0]) > __pyx_v_f_low) != 0); if (__pyx_t_4) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1271 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1271 * * if f_back_low[0] > f_low: * f_back_low[0] = f_low # <<<<<<<<<<<<<< @@ -55048,7 +55048,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct } __pyx_L12:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1273 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1273 * f_back_low[0] = f_low * * if f_back_high[0] < f_high: # <<<<<<<<<<<<<< @@ -55063,7 +55063,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_4) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1274 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1274 * * if f_back_high[0] < f_high: * f_back_high[0] = f_high # <<<<<<<<<<<<<< @@ -55076,7 +55076,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct } __pyx_L13:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1276 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1276 * f_back_high[0] = f_high * * if f_back_low[0] == f_low_prev and f_back_high[0] == f_high_prev: # <<<<<<<<<<<<<< @@ -55092,7 +55092,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct } if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1277 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1277 * * if f_back_low[0] == f_low_prev and f_back_high[0] == f_high_prev: * return 1 # <<<<<<<<<<<<<< @@ -55103,7 +55103,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1279 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1279 * return 1 * * if allow_low_x == 0 and f_back_low[0] < f_low: # <<<<<<<<<<<<<< @@ -55119,7 +55119,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct } if (__pyx_t_5) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1281 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1281 * if allow_low_x == 0 and f_back_low[0] < f_low: * # FAIL: f phrase is not tight * return 0 # <<<<<<<<<<<<<< @@ -55130,7 +55130,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1283 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1283 * return 0 * * if f_back_high[0] - f_back_low[0] > max_f_len: # <<<<<<<<<<<<<< @@ -55140,7 +55140,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_t_5 = ((((__pyx_v_f_back_high[0]) - (__pyx_v_f_back_low[0])) > __pyx_v_max_f_len) != 0); if (__pyx_t_5) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1285 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1285 * if f_back_high[0] - f_back_low[0] > max_f_len: * # FAIL: f back projection is too wide * return 0 # <<<<<<<<<<<<<< @@ -55151,7 +55151,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1287 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1287 * return 0 * * if allow_high_x == 0 and f_back_high[0] > f_high: # <<<<<<<<<<<<<< @@ -55172,7 +55172,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct } if (__pyx_t_4) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1289 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1289 * if allow_high_x == 0 and f_back_high[0] > f_high: * # FAIL: extension on high side not allowed * return 0 # <<<<<<<<<<<<<< @@ -55183,7 +55183,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1291 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1291 * return 0 * * if f_low != f_back_low[0]: # <<<<<<<<<<<<<< @@ -55193,7 +55193,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_t_4 = ((__pyx_v_f_low != (__pyx_v_f_back_low[0])) != 0); if (__pyx_t_4) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1292 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1292 * * if f_low != f_back_low[0]: * if new_low_x == 0: # <<<<<<<<<<<<<< @@ -55203,7 +55203,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_t_4 = ((__pyx_v_new_low_x == 0) != 0); if (__pyx_t_4) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1293 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1293 * if f_low != f_back_low[0]: * if new_low_x == 0: * if new_x >= max_new_x: # <<<<<<<<<<<<<< @@ -55213,7 +55213,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_t_4 = ((__pyx_v_new_x >= __pyx_v_max_new_x) != 0); if (__pyx_t_4) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1295 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1295 * if new_x >= max_new_x: * # FAIL: extension required on low side violates max # of gaps * return 0 # <<<<<<<<<<<<<< @@ -55225,7 +55225,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1297 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1297 * return 0 * else: * new_x = new_x + 1 # <<<<<<<<<<<<<< @@ -55234,7 +55234,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct */ __pyx_v_new_x = (__pyx_v_new_x + 1); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1298 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1298 * else: * new_x = new_x + 1 * new_low_x = 1 # <<<<<<<<<<<<<< @@ -55247,7 +55247,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct } __pyx_L19:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1299 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1299 * new_x = new_x + 1 * new_low_x = 1 * if f_low - f_back_low[0] < min_fx_size: # <<<<<<<<<<<<<< @@ -55257,7 +55257,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_t_4 = (((__pyx_v_f_low - (__pyx_v_f_back_low[0])) < __pyx_v_min_fx_size) != 0); if (__pyx_t_4) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1300 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1300 * new_low_x = 1 * if f_low - f_back_low[0] < min_fx_size: * f_back_low[0] = f_low - min_fx_size # <<<<<<<<<<<<<< @@ -55266,7 +55266,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct */ (__pyx_v_f_back_low[0]) = (__pyx_v_f_low - __pyx_v_min_fx_size); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1301 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1301 * if f_low - f_back_low[0] < min_fx_size: * f_back_low[0] = f_low - min_fx_size * if f_back_high[0] - f_back_low[0] > max_f_len: # <<<<<<<<<<<<<< @@ -55276,7 +55276,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_t_4 = ((((__pyx_v_f_back_high[0]) - (__pyx_v_f_back_low[0])) > __pyx_v_max_f_len) != 0); if (__pyx_t_4) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1303 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1303 * if f_back_high[0] - f_back_low[0] > max_f_len: * # FAIL: extension required on low side violates max initial length * return 0 # <<<<<<<<<<<<<< @@ -55287,7 +55287,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1304 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1304 * # FAIL: extension required on low side violates max initial length * return 0 * if f_back_low[0] < 0: # <<<<<<<<<<<<<< @@ -55297,7 +55297,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_t_4 = (((__pyx_v_f_back_low[0]) < 0) != 0); if (__pyx_t_4) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1306 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1306 * if f_back_low[0] < 0: * # FAIL: extension required on low side violates sentence boundary * return 0 # <<<<<<<<<<<<<< @@ -55314,7 +55314,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct } __pyx_L18:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1308 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1308 * return 0 * * if f_high != f_back_high[0]: # <<<<<<<<<<<<<< @@ -55329,7 +55329,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_4) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1309 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1309 * * if f_high != f_back_high[0]: * if new_high_x == 0: # <<<<<<<<<<<<<< @@ -55339,7 +55339,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_t_4 = ((__pyx_v_new_high_x == 0) != 0); if (__pyx_t_4) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1310 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1310 * if f_high != f_back_high[0]: * if new_high_x == 0: * if new_x >= max_new_x: # <<<<<<<<<<<<<< @@ -55349,7 +55349,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_t_4 = ((__pyx_v_new_x >= __pyx_v_max_new_x) != 0); if (__pyx_t_4) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1312 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1312 * if new_x >= max_new_x: * # FAIL: extension required on high side violates max # of gaps * return 0 # <<<<<<<<<<<<<< @@ -55361,7 +55361,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1314 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1314 * return 0 * else: * new_x = new_x + 1 # <<<<<<<<<<<<<< @@ -55370,7 +55370,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct */ __pyx_v_new_x = (__pyx_v_new_x + 1); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1315 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1315 * else: * new_x = new_x + 1 * new_high_x = 1 # <<<<<<<<<<<<<< @@ -55383,7 +55383,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct } __pyx_L25:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1316 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1316 * new_x = new_x + 1 * new_high_x = 1 * if f_back_high[0] - f_high < min_fx_size: # <<<<<<<<<<<<<< @@ -55404,7 +55404,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_4) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1317 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1317 * new_high_x = 1 * if f_back_high[0] - f_high < min_fx_size: * f_back_high[0] = f_high + min_fx_size # <<<<<<<<<<<<<< @@ -55420,7 +55420,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; (__pyx_v_f_back_high[0]) = __pyx_t_1; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1318 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1318 * if f_back_high[0] - f_high < min_fx_size: * f_back_high[0] = f_high + min_fx_size * if f_back_high[0] - f_back_low[0] > max_f_len: # <<<<<<<<<<<<<< @@ -55430,7 +55430,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_t_4 = ((((__pyx_v_f_back_high[0]) - (__pyx_v_f_back_low[0])) > __pyx_v_max_f_len) != 0); if (__pyx_t_4) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1320 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1320 * if f_back_high[0] - f_back_low[0] > max_f_len: * # FAIL: extension required on high side violates max initial length * return 0 # <<<<<<<<<<<<<< @@ -55441,7 +55441,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1321 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1321 * # FAIL: extension required on high side violates max initial length * return 0 * if f_back_high[0] > f_sent_len: # <<<<<<<<<<<<<< @@ -55451,7 +55451,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_t_4 = (((__pyx_v_f_back_high[0]) > __pyx_v_f_sent_len) != 0); if (__pyx_t_4) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1323 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1323 * if f_back_high[0] > f_sent_len: * # FAIL: extension required on high side violates sentence boundary * return 0 # <<<<<<<<<<<<<< @@ -55468,7 +55468,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct } __pyx_L24:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1325 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1325 * return 0 * * e_low_prev = e_low[0] # <<<<<<<<<<<<<< @@ -55477,7 +55477,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct */ __pyx_v_e_low_prev = (__pyx_v_e_low[0]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1326 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1326 * * e_low_prev = e_low[0] * e_high_prev = e_high[0] # <<<<<<<<<<<<<< @@ -55486,7 +55486,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct */ __pyx_v_e_high_prev = (__pyx_v_e_high[0]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1328 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1328 * e_high_prev = e_high[0] * * self.find_projection(f_back_low[0], f_low_prev, f_links_low, f_links_high, e_low, e_high) # <<<<<<<<<<<<<< @@ -55497,7 +55497,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1329 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1329 * * self.find_projection(f_back_low[0], f_low_prev, f_links_low, f_links_high, e_low, e_high) * self.find_projection(f_high_prev, f_back_high[0], f_links_low, f_links_high, e_low, e_high) # <<<<<<<<<<<<<< @@ -55508,7 +55508,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1330 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1330 * self.find_projection(f_back_low[0], f_low_prev, f_links_low, f_links_high, e_low, e_high) * self.find_projection(f_high_prev, f_back_high[0], f_links_low, f_links_high, e_low, e_high) * if e_low[0] == e_low_prev and e_high[0] == e_high_prev: # <<<<<<<<<<<<<< @@ -55524,7 +55524,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct } if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1331 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1331 * self.find_projection(f_high_prev, f_back_high[0], f_links_low, f_links_high, e_low, e_high) * if e_low[0] == e_low_prev and e_high[0] == e_high_prev: * return 1 # <<<<<<<<<<<<<< @@ -55535,7 +55535,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1332 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1332 * if e_low[0] == e_low_prev and e_high[0] == e_high_prev: * return 1 * if allow_arbitrary_x == 0: # <<<<<<<<<<<<<< @@ -55545,7 +55545,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_t_3 = ((__pyx_v_allow_arbitrary_x == 0) != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1334 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1334 * if allow_arbitrary_x == 0: * # FAIL: arbitrary expansion not permitted * return 0 # <<<<<<<<<<<<<< @@ -55556,7 +55556,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1335 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1335 * # FAIL: arbitrary expansion not permitted * return 0 * if e_high[0] - e_low[0] > max_e_len: # <<<<<<<<<<<<<< @@ -55566,7 +55566,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_t_3 = ((((__pyx_v_e_high[0]) - (__pyx_v_e_low[0])) > __pyx_v_max_e_len) != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1337 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1337 * if e_high[0] - e_low[0] > max_e_len: * # FAIL: re-projection violates sentence max phrase length * return 0 # <<<<<<<<<<<<<< @@ -55577,7 +55577,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1338 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1338 * # FAIL: re-projection violates sentence max phrase length * return 0 * f_low_prev = f_back_low[0] # <<<<<<<<<<<<<< @@ -55586,7 +55586,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct */ __pyx_v_f_low_prev = (__pyx_v_f_back_low[0]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1339 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1339 * return 0 * f_low_prev = f_back_low[0] * f_high_prev = f_back_high[0] # <<<<<<<<<<<<<< @@ -55596,7 +55596,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_v_f_high_prev = (__pyx_v_f_back_high[0]); } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1215 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1215 * * * cdef int find_fixpoint(self, # <<<<<<<<<<<<<< @@ -55618,7 +55618,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1342 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1342 * * * cdef find_projection(self, int in_low, int in_high, int* in_links_low, int* in_links_high, # <<<<<<<<<<<<<< @@ -55636,7 +55636,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_projectio int __pyx_t_4; __Pyx_RefNannySetupContext("find_projection", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1345 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1345 * int* out_low, int* out_high): * cdef int i * for i from in_low <= i < in_high: # <<<<<<<<<<<<<< @@ -55646,7 +55646,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_projectio __pyx_t_1 = __pyx_v_in_high; for (__pyx_v_i = __pyx_v_in_low; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1346 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1346 * cdef int i * for i from in_low <= i < in_high: * if in_links_low[i] != -1: # <<<<<<<<<<<<<< @@ -55656,7 +55656,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_projectio __pyx_t_2 = (((__pyx_v_in_links_low[__pyx_v_i]) != -1) != 0); if (__pyx_t_2) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1347 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1347 * for i from in_low <= i < in_high: * if in_links_low[i] != -1: * if out_low[0] == -1 or in_links_low[i] < out_low[0]: # <<<<<<<<<<<<<< @@ -55672,7 +55672,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_projectio } if (__pyx_t_4) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1348 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1348 * if in_links_low[i] != -1: * if out_low[0] == -1 or in_links_low[i] < out_low[0]: * out_low[0] = in_links_low[i] # <<<<<<<<<<<<<< @@ -55684,7 +55684,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_projectio } __pyx_L6:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1349 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1349 * if out_low[0] == -1 or in_links_low[i] < out_low[0]: * out_low[0] = in_links_low[i] * if out_high[0] == -1 or in_links_high[i] > out_high[0]: # <<<<<<<<<<<<<< @@ -55700,7 +55700,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_projectio } if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1350 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1350 * out_low[0] = in_links_low[i] * if out_high[0] == -1 or in_links_high[i] > out_high[0]: * out_high[0] = in_links_high[i] # <<<<<<<<<<<<<< @@ -55716,7 +55716,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_projectio __pyx_L5:; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1342 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1342 * * * cdef find_projection(self, int in_low, int in_high, int* in_links_low, int* in_links_high, # <<<<<<<<<<<<<< @@ -55731,7 +55731,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_projectio return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1353 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1353 * * * cdef int* int_arr_extend(self, int* arr, int* arr_len, int* data, int data_len): # <<<<<<<<<<<<<< @@ -55745,7 +55745,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_int_arr_extend(CYTH __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("int_arr_extend", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1355 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1355 * cdef int* int_arr_extend(self, int* arr, int* arr_len, int* data, int data_len): * cdef int new_len * new_len = arr_len[0] + data_len # <<<<<<<<<<<<<< @@ -55754,7 +55754,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_int_arr_extend(CYTH */ __pyx_v_new_len = ((__pyx_v_arr_len[0]) + __pyx_v_data_len); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1356 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1356 * cdef int new_len * new_len = arr_len[0] + data_len * arr = realloc(arr, new_len*sizeof(int)) # <<<<<<<<<<<<<< @@ -55763,7 +55763,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_int_arr_extend(CYTH */ __pyx_v_arr = ((int *)realloc(__pyx_v_arr, (__pyx_v_new_len * (sizeof(int))))); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1357 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1357 * new_len = arr_len[0] + data_len * arr = realloc(arr, new_len*sizeof(int)) * memcpy(arr+arr_len[0], data, data_len*sizeof(int)) # <<<<<<<<<<<<<< @@ -55772,7 +55772,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_int_arr_extend(CYTH */ memcpy((__pyx_v_arr + (__pyx_v_arr_len[0])), __pyx_v_data, (__pyx_v_data_len * (sizeof(int)))); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1358 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1358 * arr = realloc(arr, new_len*sizeof(int)) * memcpy(arr+arr_len[0], data, data_len*sizeof(int)) * arr_len[0] = new_len # <<<<<<<<<<<<<< @@ -55781,7 +55781,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_int_arr_extend(CYTH */ (__pyx_v_arr_len[0]) = __pyx_v_new_len; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1359 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1359 * memcpy(arr+arr_len[0], data, data_len*sizeof(int)) * arr_len[0] = new_len * return arr # <<<<<<<<<<<<<< @@ -55791,7 +55791,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_int_arr_extend(CYTH __pyx_r = __pyx_v_arr; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1353 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1353 * * * cdef int* int_arr_extend(self, int* arr, int* arr_len, int* data, int data_len): # <<<<<<<<<<<<<< @@ -55805,7 +55805,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_int_arr_extend(CYTH return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1362 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1362 * * * cdef extract_phrases(self, int e_low, int e_high, int* e_gap_low, int* e_gap_high, int* e_links_low, int num_gaps, # <<<<<<<<<<<<<< @@ -55851,7 +55851,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase int __pyx_clineno = 0; __Pyx_RefNannySetupContext("extract_phrases", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1370 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1370 * cdef result * * result = [] # <<<<<<<<<<<<<< @@ -55863,7 +55863,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase __pyx_v_result = __pyx_t_1; __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1371 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1371 * * result = [] * len1 = 0 # <<<<<<<<<<<<<< @@ -55872,7 +55872,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase */ __pyx_v_len1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1372 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1372 * result = [] * len1 = 0 * e_gaps1 = malloc(0) # <<<<<<<<<<<<<< @@ -55881,7 +55881,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase */ __pyx_v_e_gaps1 = ((int *)malloc(0)); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1373 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1373 * len1 = 0 * e_gaps1 = malloc(0) * ephr_arr = IntList() # <<<<<<<<<<<<<< @@ -55893,7 +55893,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase __pyx_v_ephr_arr = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1375 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1375 * ephr_arr = IntList() * * e_gap_order = malloc(num_gaps*sizeof(int)) # <<<<<<<<<<<<<< @@ -55902,7 +55902,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase */ __pyx_v_e_gap_order = ((int *)malloc((__pyx_v_num_gaps * (sizeof(int))))); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1376 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1376 * * e_gap_order = malloc(num_gaps*sizeof(int)) * if num_gaps > 0: # <<<<<<<<<<<<<< @@ -55912,7 +55912,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase __pyx_t_2 = ((__pyx_v_num_gaps > 0) != 0); if (__pyx_t_2) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1377 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1377 * e_gap_order = malloc(num_gaps*sizeof(int)) * if num_gaps > 0: * e_gap_order[0] = 0 # <<<<<<<<<<<<<< @@ -55921,7 +55921,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase */ (__pyx_v_e_gap_order[0]) = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1378 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1378 * if num_gaps > 0: * e_gap_order[0] = 0 * for i from 1 <= i < num_gaps: # <<<<<<<<<<<<<< @@ -55931,7 +55931,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase __pyx_t_3 = __pyx_v_num_gaps; for (__pyx_v_i = 1; __pyx_v_i < __pyx_t_3; __pyx_v_i++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1379 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1379 * e_gap_order[0] = 0 * for i from 1 <= i < num_gaps: * for j from 0 <= j < i: # <<<<<<<<<<<<<< @@ -55941,7 +55941,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase __pyx_t_4 = __pyx_v_i; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_4; __pyx_v_j++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1380 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1380 * for i from 1 <= i < num_gaps: * for j from 0 <= j < i: * if e_gap_low[i] < e_gap_low[j]: # <<<<<<<<<<<<<< @@ -55951,7 +55951,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase __pyx_t_2 = (((__pyx_v_e_gap_low[__pyx_v_i]) < (__pyx_v_e_gap_low[__pyx_v_j])) != 0); if (__pyx_t_2) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1381 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1381 * for j from 0 <= j < i: * if e_gap_low[i] < e_gap_low[j]: * for k from j <= k < i: # <<<<<<<<<<<<<< @@ -55961,7 +55961,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase __pyx_t_5 = __pyx_v_i; for (__pyx_v_k = __pyx_v_j; __pyx_v_k < __pyx_t_5; __pyx_v_k++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1382 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1382 * if e_gap_low[i] < e_gap_low[j]: * for k from j <= k < i: * e_gap_order[k+1] = e_gap_order[k] # <<<<<<<<<<<<<< @@ -55971,7 +55971,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase (__pyx_v_e_gap_order[(__pyx_v_k + 1)]) = (__pyx_v_e_gap_order[__pyx_v_k]); } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1383 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1383 * for k from j <= k < i: * e_gap_order[k+1] = e_gap_order[k] * e_gap_order[j] = i # <<<<<<<<<<<<<< @@ -55980,7 +55980,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase */ (__pyx_v_e_gap_order[__pyx_v_j]) = __pyx_v_i; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1384 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1384 * e_gap_order[k+1] = e_gap_order[k] * e_gap_order[j] = i * break # <<<<<<<<<<<<<< @@ -55992,7 +55992,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1386 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1386 * break * else: * e_gap_order[i] = i # <<<<<<<<<<<<<< @@ -56007,7 +56007,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase } __pyx_L3:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1388 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1388 * e_gap_order[i] = i * * e_x_low = e_low # <<<<<<<<<<<<<< @@ -56016,7 +56016,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase */ __pyx_v_e_x_low = __pyx_v_e_low; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1389 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1389 * * e_x_low = e_low * e_x_high = e_high # <<<<<<<<<<<<<< @@ -56025,7 +56025,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase */ __pyx_v_e_x_high = __pyx_v_e_high; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1390 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1390 * e_x_low = e_low * e_x_high = e_high * if not self.tight_phrases: # <<<<<<<<<<<<<< @@ -56035,7 +56035,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase __pyx_t_2 = ((!(__pyx_v_self->tight_phrases != 0)) != 0); if (__pyx_t_2) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1391 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1391 * e_x_high = e_high * if not self.tight_phrases: * while e_x_low > 0 and e_high - e_x_low < self.train_max_initial_size and e_links_low[e_x_low-1] == -1: # <<<<<<<<<<<<<< @@ -56058,7 +56058,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase } if (!__pyx_t_6) break; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1392 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1392 * if not self.tight_phrases: * while e_x_low > 0 and e_high - e_x_low < self.train_max_initial_size and e_links_low[e_x_low-1] == -1: * e_x_low = e_x_low - 1 # <<<<<<<<<<<<<< @@ -56068,7 +56068,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase __pyx_v_e_x_low = (__pyx_v_e_x_low - 1); } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1393 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1393 * while e_x_low > 0 and e_high - e_x_low < self.train_max_initial_size and e_links_low[e_x_low-1] == -1: * e_x_low = e_x_low - 1 * while e_x_high < e_sent_len and e_x_high - e_low < self.train_max_initial_size and e_links_low[e_x_high] == -1: # <<<<<<<<<<<<<< @@ -56091,7 +56091,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase } if (!__pyx_t_2) break; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1394 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1394 * e_x_low = e_x_low - 1 * while e_x_high < e_sent_len and e_x_high - e_low < self.train_max_initial_size and e_links_low[e_x_high] == -1: * e_x_high = e_x_high + 1 # <<<<<<<<<<<<<< @@ -56104,7 +56104,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase } __pyx_L11:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1396 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1396 * e_x_high = e_x_high + 1 * * for i from e_x_low <= i <= e_low: # <<<<<<<<<<<<<< @@ -56114,7 +56114,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase __pyx_t_3 = __pyx_v_e_low; for (__pyx_v_i = __pyx_v_e_x_low; __pyx_v_i <= __pyx_t_3; __pyx_v_i++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1397 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1397 * * for i from e_x_low <= i <= e_low: * e_gaps1 = self.int_arr_extend(e_gaps1, &len1, &i, 1) # <<<<<<<<<<<<<< @@ -56124,7 +56124,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase __pyx_v_e_gaps1 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->int_arr_extend(__pyx_v_self, __pyx_v_e_gaps1, (&__pyx_v_len1), (&__pyx_v_i), 1); } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1399 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1399 * e_gaps1 = self.int_arr_extend(e_gaps1, &len1, &i, 1) * * for i from 0 <= i < num_gaps: # <<<<<<<<<<<<<< @@ -56134,7 +56134,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase __pyx_t_3 = __pyx_v_num_gaps; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_3; __pyx_v_i++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1400 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1400 * * for i from 0 <= i < num_gaps: * e_gaps2 = malloc(0) # <<<<<<<<<<<<<< @@ -56143,7 +56143,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase */ __pyx_v_e_gaps2 = ((int *)malloc(0)); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1401 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1401 * for i from 0 <= i < num_gaps: * e_gaps2 = malloc(0) * len2 = 0 # <<<<<<<<<<<<<< @@ -56152,7 +56152,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase */ __pyx_v_len2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1403 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1403 * len2 = 0 * * j = e_gap_order[i] # <<<<<<<<<<<<<< @@ -56161,7 +56161,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase */ __pyx_v_j = (__pyx_v_e_gap_order[__pyx_v_i]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1404 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1404 * * j = e_gap_order[i] * e_x_gap_low = e_gap_low[j] # <<<<<<<<<<<<<< @@ -56170,7 +56170,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase */ __pyx_v_e_x_gap_low = (__pyx_v_e_gap_low[__pyx_v_j]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1405 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1405 * j = e_gap_order[i] * e_x_gap_low = e_gap_low[j] * e_x_gap_high = e_gap_high[j] # <<<<<<<<<<<<<< @@ -56179,7 +56179,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase */ __pyx_v_e_x_gap_high = (__pyx_v_e_gap_high[__pyx_v_j]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1406 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1406 * e_x_gap_low = e_gap_low[j] * e_x_gap_high = e_gap_high[j] * if not self.tight_phrases: # <<<<<<<<<<<<<< @@ -56189,7 +56189,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase __pyx_t_2 = ((!(__pyx_v_self->tight_phrases != 0)) != 0); if (__pyx_t_2) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1407 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1407 * e_x_gap_high = e_gap_high[j] * if not self.tight_phrases: * while e_x_gap_low > e_x_low and e_links_low[e_x_gap_low-1] == -1: # <<<<<<<<<<<<<< @@ -56206,7 +56206,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase } if (!__pyx_t_7) break; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1408 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1408 * if not self.tight_phrases: * while e_x_gap_low > e_x_low and e_links_low[e_x_gap_low-1] == -1: * e_x_gap_low = e_x_gap_low - 1 # <<<<<<<<<<<<<< @@ -56216,7 +56216,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase __pyx_v_e_x_gap_low = (__pyx_v_e_x_gap_low - 1); } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1409 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1409 * while e_x_gap_low > e_x_low and e_links_low[e_x_gap_low-1] == -1: * e_x_gap_low = e_x_gap_low - 1 * while e_x_gap_high < e_x_high and e_links_low[e_x_gap_high] == -1: # <<<<<<<<<<<<<< @@ -56233,7 +56233,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase } if (!__pyx_t_6) break; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1410 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1410 * e_x_gap_low = e_x_gap_low - 1 * while e_x_gap_high < e_x_high and e_links_low[e_x_gap_high] == -1: * e_x_gap_high = e_x_gap_high + 1 # <<<<<<<<<<<<<< @@ -56246,7 +56246,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase } __pyx_L20:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1412 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1412 * e_x_gap_high = e_x_gap_high + 1 * * k = 0 # <<<<<<<<<<<<<< @@ -56255,7 +56255,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase */ __pyx_v_k = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1413 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1413 * * k = 0 * step = 1+(i*2) # <<<<<<<<<<<<<< @@ -56264,7 +56264,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase */ __pyx_v_step = (1 + (__pyx_v_i * 2)); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1414 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1414 * k = 0 * step = 1+(i*2) * while k < len1: # <<<<<<<<<<<<<< @@ -56275,7 +56275,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase __pyx_t_6 = ((__pyx_v_k < __pyx_v_len1) != 0); if (!__pyx_t_6) break; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1415 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1415 * step = 1+(i*2) * while k < len1: * for m from e_x_gap_low <= m <= e_gap_low[j]: # <<<<<<<<<<<<<< @@ -56285,7 +56285,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase __pyx_t_4 = (__pyx_v_e_gap_low[__pyx_v_j]); for (__pyx_v_m = __pyx_v_e_x_gap_low; __pyx_v_m <= __pyx_t_4; __pyx_v_m++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1416 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1416 * while k < len1: * for m from e_x_gap_low <= m <= e_gap_low[j]: * if m >= e_gaps1[k+step-1]: # <<<<<<<<<<<<<< @@ -56295,7 +56295,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase __pyx_t_6 = ((__pyx_v_m >= (__pyx_v_e_gaps1[((__pyx_v_k + __pyx_v_step) - 1)])) != 0); if (__pyx_t_6) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1417 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1417 * for m from e_x_gap_low <= m <= e_gap_low[j]: * if m >= e_gaps1[k+step-1]: * for n from e_gap_high[j] <= n <= e_x_gap_high: # <<<<<<<<<<<<<< @@ -56305,7 +56305,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase __pyx_t_5 = __pyx_v_e_x_gap_high; for (__pyx_v_n = (__pyx_v_e_gap_high[__pyx_v_j]); __pyx_v_n <= __pyx_t_5; __pyx_v_n++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1418 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1418 * if m >= e_gaps1[k+step-1]: * for n from e_gap_high[j] <= n <= e_x_gap_high: * if n-m >= 1: # extractor.py doesn't restrict target-side gap length # <<<<<<<<<<<<<< @@ -56315,7 +56315,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase __pyx_t_6 = (((__pyx_v_n - __pyx_v_m) >= 1) != 0); if (__pyx_t_6) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1419 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1419 * for n from e_gap_high[j] <= n <= e_x_gap_high: * if n-m >= 1: # extractor.py doesn't restrict target-side gap length * e_gaps2 = self.int_arr_extend(e_gaps2, &len2, e_gaps1+k, step) # <<<<<<<<<<<<<< @@ -56324,7 +56324,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase */ __pyx_v_e_gaps2 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->int_arr_extend(__pyx_v_self, __pyx_v_e_gaps2, (&__pyx_v_len2), (__pyx_v_e_gaps1 + __pyx_v_k), __pyx_v_step); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1420 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1420 * if n-m >= 1: # extractor.py doesn't restrict target-side gap length * e_gaps2 = self.int_arr_extend(e_gaps2, &len2, e_gaps1+k, step) * e_gaps2 = self.int_arr_extend(e_gaps2, &len2, &m, 1) # <<<<<<<<<<<<<< @@ -56333,7 +56333,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase */ __pyx_v_e_gaps2 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->int_arr_extend(__pyx_v_self, __pyx_v_e_gaps2, (&__pyx_v_len2), (&__pyx_v_m), 1); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1421 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1421 * e_gaps2 = self.int_arr_extend(e_gaps2, &len2, e_gaps1+k, step) * e_gaps2 = self.int_arr_extend(e_gaps2, &len2, &m, 1) * e_gaps2 = self.int_arr_extend(e_gaps2, &len2, &n, 1) # <<<<<<<<<<<<<< @@ -56350,7 +56350,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase __pyx_L29:; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1422 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1422 * e_gaps2 = self.int_arr_extend(e_gaps2, &len2, &m, 1) * e_gaps2 = self.int_arr_extend(e_gaps2, &len2, &n, 1) * k = k + step # <<<<<<<<<<<<<< @@ -56360,7 +56360,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase __pyx_v_k = (__pyx_v_k + __pyx_v_step); } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1423 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1423 * e_gaps2 = self.int_arr_extend(e_gaps2, &len2, &n, 1) * k = k + step * free(e_gaps1) # <<<<<<<<<<<<<< @@ -56369,7 +56369,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase */ free(__pyx_v_e_gaps1); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1424 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1424 * k = k + step * free(e_gaps1) * e_gaps1 = e_gaps2 # <<<<<<<<<<<<<< @@ -56378,7 +56378,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase */ __pyx_v_e_gaps1 = __pyx_v_e_gaps2; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1425 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1425 * free(e_gaps1) * e_gaps1 = e_gaps2 * len1 = len2 # <<<<<<<<<<<<<< @@ -56388,7 +56388,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase __pyx_v_len1 = __pyx_v_len2; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1427 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1427 * len1 = len2 * * step = 1+(num_gaps*2) # <<<<<<<<<<<<<< @@ -56397,7 +56397,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase */ __pyx_v_step = (1 + (__pyx_v_num_gaps * 2)); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1428 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1428 * * step = 1+(num_gaps*2) * e_gaps2 = malloc(0) # <<<<<<<<<<<<<< @@ -56406,7 +56406,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase */ __pyx_v_e_gaps2 = ((int *)malloc(0)); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1429 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1429 * step = 1+(num_gaps*2) * e_gaps2 = malloc(0) * len2 = 0 # <<<<<<<<<<<<<< @@ -56415,7 +56415,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase */ __pyx_v_len2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1430 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1430 * e_gaps2 = malloc(0) * len2 = 0 * for i from e_high <= i <= e_x_high: # <<<<<<<<<<<<<< @@ -56425,7 +56425,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase __pyx_t_3 = __pyx_v_e_x_high; for (__pyx_v_i = __pyx_v_e_high; __pyx_v_i <= __pyx_t_3; __pyx_v_i++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1431 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1431 * len2 = 0 * for i from e_high <= i <= e_x_high: * j = 0 # <<<<<<<<<<<<<< @@ -56434,7 +56434,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase */ __pyx_v_j = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1432 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1432 * for i from e_high <= i <= e_x_high: * j = 0 * while j < len1: # <<<<<<<<<<<<<< @@ -56445,7 +56445,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase __pyx_t_6 = ((__pyx_v_j < __pyx_v_len1) != 0); if (!__pyx_t_6) break; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1433 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1433 * j = 0 * while j < len1: * if i - e_gaps1[j] <= self.train_max_initial_size and i >= e_gaps1[j+step-1]: # <<<<<<<<<<<<<< @@ -56461,7 +56461,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase } if (__pyx_t_2) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1434 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1434 * while j < len1: * if i - e_gaps1[j] <= self.train_max_initial_size and i >= e_gaps1[j+step-1]: * e_gaps2 = self.int_arr_extend(e_gaps2, &len2, e_gaps1+j, step) # <<<<<<<<<<<<<< @@ -56470,7 +56470,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase */ __pyx_v_e_gaps2 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->int_arr_extend(__pyx_v_self, __pyx_v_e_gaps2, (&__pyx_v_len2), (__pyx_v_e_gaps1 + __pyx_v_j), __pyx_v_step); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1435 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1435 * if i - e_gaps1[j] <= self.train_max_initial_size and i >= e_gaps1[j+step-1]: * e_gaps2 = self.int_arr_extend(e_gaps2, &len2, e_gaps1+j, step) * e_gaps2 = self.int_arr_extend(e_gaps2, &len2, &i, 1) # <<<<<<<<<<<<<< @@ -56482,7 +56482,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase } __pyx_L37:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1436 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1436 * e_gaps2 = self.int_arr_extend(e_gaps2, &len2, e_gaps1+j, step) * e_gaps2 = self.int_arr_extend(e_gaps2, &len2, &i, 1) * j = j + step # <<<<<<<<<<<<<< @@ -56493,7 +56493,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase } } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1437 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1437 * e_gaps2 = self.int_arr_extend(e_gaps2, &len2, &i, 1) * j = j + step * free(e_gaps1) # <<<<<<<<<<<<<< @@ -56502,7 +56502,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase */ free(__pyx_v_e_gaps1); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1438 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1438 * j = j + step * free(e_gaps1) * e_gaps1 = e_gaps2 # <<<<<<<<<<<<<< @@ -56511,7 +56511,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase */ __pyx_v_e_gaps1 = __pyx_v_e_gaps2; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1439 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1439 * free(e_gaps1) * e_gaps1 = e_gaps2 * len1 = len2 # <<<<<<<<<<<<<< @@ -56520,7 +56520,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase */ __pyx_v_len1 = __pyx_v_len2; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1441 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1441 * len1 = len2 * * step = (num_gaps+1)*2 # <<<<<<<<<<<<<< @@ -56529,7 +56529,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase */ __pyx_v_step = ((__pyx_v_num_gaps + 1) * 2); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1442 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1442 * * step = (num_gaps+1)*2 * i = 0 # <<<<<<<<<<<<<< @@ -56538,7 +56538,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase */ __pyx_v_i = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1445 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1445 * * cdef IntList indexes * while i < len1: # <<<<<<<<<<<<<< @@ -56549,7 +56549,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase __pyx_t_2 = ((__pyx_v_i < __pyx_v_len1) != 0); if (!__pyx_t_2) break; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1446 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1446 * cdef IntList indexes * while i < len1: * ephr_arr._clear() # <<<<<<<<<<<<<< @@ -56558,7 +56558,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_ephr_arr->__pyx_vtab)->_clear(__pyx_v_ephr_arr); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1447 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1447 * while i < len1: * ephr_arr._clear() * num_chunks = 0 # <<<<<<<<<<<<<< @@ -56567,7 +56567,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase */ __pyx_v_num_chunks = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1448 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1448 * ephr_arr._clear() * num_chunks = 0 * indexes = IntList() # <<<<<<<<<<<<<< @@ -56579,7 +56579,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase __Pyx_XDECREF_SET(__pyx_v_indexes, ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1)); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1449 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1449 * num_chunks = 0 * indexes = IntList() * for j from 0 <= j < num_gaps+1: # <<<<<<<<<<<<<< @@ -56589,7 +56589,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase __pyx_t_9 = (__pyx_v_num_gaps + 1); for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_9; __pyx_v_j++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1450 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1450 * indexes = IntList() * for j from 0 <= j < num_gaps+1: * if e_gaps1[i+2*j] < e_gaps1[i+(2*j)+1]: # <<<<<<<<<<<<<< @@ -56599,7 +56599,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase __pyx_t_2 = (((__pyx_v_e_gaps1[(__pyx_v_i + (2 * __pyx_v_j))]) < (__pyx_v_e_gaps1[((__pyx_v_i + (2 * __pyx_v_j)) + 1)])) != 0); if (__pyx_t_2) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1451 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1451 * for j from 0 <= j < num_gaps+1: * if e_gaps1[i+2*j] < e_gaps1[i+(2*j)+1]: * num_chunks = num_chunks + 1 # <<<<<<<<<<<<<< @@ -56611,7 +56611,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase } __pyx_L42:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1452 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1452 * if e_gaps1[i+2*j] < e_gaps1[i+(2*j)+1]: * num_chunks = num_chunks + 1 * for k from e_gaps1[i+2*j] <= k < e_gaps1[i+(2*j)+1]: # <<<<<<<<<<<<<< @@ -56621,7 +56621,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase __pyx_t_3 = (__pyx_v_e_gaps1[((__pyx_v_i + (2 * __pyx_v_j)) + 1)]); for (__pyx_v_k = (__pyx_v_e_gaps1[(__pyx_v_i + (2 * __pyx_v_j))]); __pyx_v_k < __pyx_t_3; __pyx_v_k++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1453 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1453 * num_chunks = num_chunks + 1 * for k from e_gaps1[i+2*j] <= k < e_gaps1[i+(2*j)+1]: * indexes.append(k) # <<<<<<<<<<<<<< @@ -56633,7 +56633,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase __pyx_t_10 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_indexes), __pyx_t_1); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1453; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1454 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1454 * for k from e_gaps1[i+2*j] <= k < e_gaps1[i+(2*j)+1]: * indexes.append(k) * ephr_arr._append(self.eid2symid[self.eda.data.arr[e_sent_start+k]]) # <<<<<<<<<<<<<< @@ -56648,7 +56648,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_ephr_arr->__pyx_vtab)->_append(__pyx_v_ephr_arr, __pyx_t_4); } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1455 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1455 * indexes.append(k) * ephr_arr._append(self.eid2symid[self.eda.data.arr[e_sent_start+k]]) * if j < num_gaps: # <<<<<<<<<<<<<< @@ -56658,7 +56658,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase __pyx_t_2 = ((__pyx_v_j < __pyx_v_num_gaps) != 0); if (__pyx_t_2) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1456 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1456 * ephr_arr._append(self.eid2symid[self.eda.data.arr[e_sent_start+k]]) * if j < num_gaps: * indexes.append(sym_setindex(self.category, e_gap_order[j]+1)) # <<<<<<<<<<<<<< @@ -56670,7 +56670,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase __pyx_t_10 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_indexes), __pyx_t_1); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1457 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1457 * if j < num_gaps: * indexes.append(sym_setindex(self.category, e_gap_order[j]+1)) * ephr_arr._append(sym_setindex(self.category, e_gap_order[j]+1)) # <<<<<<<<<<<<<< @@ -56683,7 +56683,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase __pyx_L45:; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1458 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1458 * indexes.append(sym_setindex(self.category, e_gap_order[j]+1)) * ephr_arr._append(sym_setindex(self.category, e_gap_order[j]+1)) * i = i + step # <<<<<<<<<<<<<< @@ -56692,7 +56692,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase */ __pyx_v_i = (__pyx_v_i + __pyx_v_step); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1459 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1459 * ephr_arr._append(sym_setindex(self.category, e_gap_order[j]+1)) * i = i + step * if ephr_arr.len <= self.max_target_length and num_chunks <= self.max_target_chunks: # <<<<<<<<<<<<<< @@ -56708,7 +56708,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase } if (__pyx_t_7) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1460 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1460 * i = i + step * if ephr_arr.len <= self.max_target_length and num_chunks <= self.max_target_chunks: * result.append((Phrase(ephr_arr),indexes)) # <<<<<<<<<<<<<< @@ -56738,7 +56738,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase __pyx_L46:; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1462 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1462 * result.append((Phrase(ephr_arr),indexes)) * * free(e_gaps1) # <<<<<<<<<<<<<< @@ -56747,7 +56747,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase */ free(__pyx_v_e_gaps1); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1463 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1463 * * free(e_gaps1) * free(e_gap_order) # <<<<<<<<<<<<<< @@ -56756,7 +56756,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase */ free(__pyx_v_e_gap_order); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1464 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1464 * free(e_gaps1) * free(e_gap_order) * return result # <<<<<<<<<<<<<< @@ -56768,7 +56768,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1362 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1362 * * * cdef extract_phrases(self, int e_low, int e_high, int* e_gap_low, int* e_gap_high, int* e_links_low, int num_gaps, # <<<<<<<<<<<<<< @@ -56791,7 +56791,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1466 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1466 * return result * * cdef IntList create_alignments(self, int* sent_links, int num_links, # <<<<<<<<<<<<<< @@ -56820,7 +56820,7 @@ static struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_f_4cdec_2sa_3_sa_23HieroCa int __pyx_clineno = 0; __Pyx_RefNannySetupContext("create_alignments", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1469 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1469 * IntList findexes, IntList eindexes): * cdef unsigned i * cdef IntList ret = IntList() # <<<<<<<<<<<<<< @@ -56832,7 +56832,7 @@ static struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_f_4cdec_2sa_3_sa_23HieroCa __pyx_v_ret = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1470 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1470 * cdef unsigned i * cdef IntList ret = IntList() * for i in range(findexes.len): # <<<<<<<<<<<<<< @@ -56843,7 +56843,7 @@ static struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_f_4cdec_2sa_3_sa_23HieroCa for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { __pyx_v_i = __pyx_t_3; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1471 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1471 * cdef IntList ret = IntList() * for i in range(findexes.len): * s = findexes.arr[i] # <<<<<<<<<<<<<< @@ -56852,7 +56852,7 @@ static struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_f_4cdec_2sa_3_sa_23HieroCa */ __pyx_v_s = (__pyx_v_findexes->arr[__pyx_v_i]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1472 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1472 * for i in range(findexes.len): * s = findexes.arr[i] * if s < 0: continue # <<<<<<<<<<<<<< @@ -56864,7 +56864,7 @@ static struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_f_4cdec_2sa_3_sa_23HieroCa goto __pyx_L3_continue; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1473 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1473 * s = findexes.arr[i] * if s < 0: continue * idx = 0 # <<<<<<<<<<<<<< @@ -56874,7 +56874,7 @@ static struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_f_4cdec_2sa_3_sa_23HieroCa __Pyx_INCREF(__pyx_int_0); __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_int_0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1474 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1474 * if s < 0: continue * idx = 0 * while idx < num_links * 2: # <<<<<<<<<<<<<< @@ -56890,7 +56890,7 @@ static struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_f_4cdec_2sa_3_sa_23HieroCa __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!__pyx_t_4) break; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1475 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1475 * idx = 0 * while idx < num_links * 2: * if sent_links[idx] == s: # <<<<<<<<<<<<<< @@ -56901,7 +56901,7 @@ static struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_f_4cdec_2sa_3_sa_23HieroCa __pyx_t_4 = (((__pyx_v_sent_links[__pyx_t_6]) == __pyx_v_s) != 0); if (__pyx_t_4) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1476 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1476 * while idx < num_links * 2: * if sent_links[idx] == s: * j = eindexes.index(sent_links[idx+1]) # <<<<<<<<<<<<<< @@ -56928,7 +56928,7 @@ static struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_f_4cdec_2sa_3_sa_23HieroCa __Pyx_XDECREF_SET(__pyx_v_j, __pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1477 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1477 * if sent_links[idx] == s: * j = eindexes.index(sent_links[idx+1]) * ret.append(i * ALIGNMENT_CODE + j) # <<<<<<<<<<<<<< @@ -56946,7 +56946,7 @@ static struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_f_4cdec_2sa_3_sa_23HieroCa } __pyx_L8:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1478 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1478 * j = eindexes.index(sent_links[idx+1]) * ret.append(i * ALIGNMENT_CODE + j) * idx += 2 # <<<<<<<<<<<<<< @@ -56961,7 +56961,7 @@ static struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_f_4cdec_2sa_3_sa_23HieroCa __pyx_L3_continue:; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1479 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1479 * ret.append(i * ALIGNMENT_CODE + j) * idx += 2 * return ret # <<<<<<<<<<<<<< @@ -56973,7 +56973,7 @@ static struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_f_4cdec_2sa_3_sa_23HieroCa __pyx_r = __pyx_v_ret; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1466 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1466 * return result * * cdef IntList create_alignments(self, int* sent_links, int num_links, # <<<<<<<<<<<<<< @@ -56997,7 +56997,7 @@ static struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_f_4cdec_2sa_3_sa_23HieroCa return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1481 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1481 * return ret * * cdef extract(self, Phrase phrase, Matching* matching, int* chunklen, int num_chunks): # <<<<<<<<<<<<<< @@ -57091,7 +57091,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("extract", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1494 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1494 * cdef reason_for_failure * * fphr_arr = IntList() # <<<<<<<<<<<<<< @@ -57103,7 +57103,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_v_fphr_arr = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1495 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1495 * * fphr_arr = IntList() * phrase_len = phrase.n # <<<<<<<<<<<<<< @@ -57113,7 +57113,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_2 = __pyx_v_phrase->n; __pyx_v_phrase_len = __pyx_t_2; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1496 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1496 * fphr_arr = IntList() * phrase_len = phrase.n * extracts = [] # <<<<<<<<<<<<<< @@ -57125,7 +57125,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_v_extracts = __pyx_t_1; __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1497 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1497 * phrase_len = phrase.n * extracts = [] * sent_links = self.alignment._get_sent_links(matching.sent_id, &num_links) # <<<<<<<<<<<<<< @@ -57134,7 +57134,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_sent_links = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Alignment *)__pyx_v_self->alignment->__pyx_vtab)->_get_sent_links(__pyx_v_self->alignment, __pyx_v_matching->sent_id, (&__pyx_v_num_links)); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1499 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1499 * sent_links = self.alignment._get_sent_links(matching.sent_id, &num_links) * * e_sent_start = self.eda.sent_index.arr[matching.sent_id] # <<<<<<<<<<<<<< @@ -57143,7 +57143,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_e_sent_start = (__pyx_v_self->eda->sent_index->arr[__pyx_v_matching->sent_id]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1500 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1500 * * e_sent_start = self.eda.sent_index.arr[matching.sent_id] * e_sent_end = self.eda.sent_index.arr[matching.sent_id+1] # <<<<<<<<<<<<<< @@ -57152,7 +57152,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_e_sent_end = (__pyx_v_self->eda->sent_index->arr[(__pyx_v_matching->sent_id + 1)]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1501 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1501 * e_sent_start = self.eda.sent_index.arr[matching.sent_id] * e_sent_end = self.eda.sent_index.arr[matching.sent_id+1] * e_sent_len = e_sent_end - e_sent_start - 1 # <<<<<<<<<<<<<< @@ -57161,7 +57161,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_e_sent_len = ((__pyx_v_e_sent_end - __pyx_v_e_sent_start) - 1); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1502 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1502 * e_sent_end = self.eda.sent_index.arr[matching.sent_id+1] * e_sent_len = e_sent_end - e_sent_start - 1 * f_sent_start = self.fda.sent_index.arr[matching.sent_id] # <<<<<<<<<<<<<< @@ -57170,7 +57170,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_f_sent_start = (__pyx_v_self->fda->sent_index->arr[__pyx_v_matching->sent_id]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1503 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1503 * e_sent_len = e_sent_end - e_sent_start - 1 * f_sent_start = self.fda.sent_index.arr[matching.sent_id] * f_sent_end = self.fda.sent_index.arr[matching.sent_id+1] # <<<<<<<<<<<<<< @@ -57179,7 +57179,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_f_sent_end = (__pyx_v_self->fda->sent_index->arr[(__pyx_v_matching->sent_id + 1)]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1504 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1504 * f_sent_start = self.fda.sent_index.arr[matching.sent_id] * f_sent_end = self.fda.sent_index.arr[matching.sent_id+1] * f_sent_len = f_sent_end - f_sent_start - 1 # <<<<<<<<<<<<<< @@ -57188,7 +57188,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_f_sent_len = ((__pyx_v_f_sent_end - __pyx_v_f_sent_start) - 1); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1506 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1506 * f_sent_len = f_sent_end - f_sent_start - 1 * * self.findexes1.reset() # <<<<<<<<<<<<<< @@ -57202,7 +57202,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1507 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1507 * * self.findexes1.reset() * sofar = 0 # <<<<<<<<<<<<<< @@ -57212,7 +57212,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_INCREF(__pyx_int_0); __pyx_v_sofar = __pyx_int_0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1508 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1508 * self.findexes1.reset() * sofar = 0 * for i in range(num_chunks): # <<<<<<<<<<<<<< @@ -57223,7 +57223,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_2; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1509 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1509 * sofar = 0 * for i in range(num_chunks): * for j in range(chunklen[i]): # <<<<<<<<<<<<<< @@ -57234,7 +57234,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_v_j = __pyx_t_6; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1510 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1510 * for i in range(num_chunks): * for j in range(chunklen[i]): * self.findexes1.append(matching.arr[matching.start+i]+j-f_sent_start); # <<<<<<<<<<<<<< @@ -57246,7 +57246,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_7 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_self->findexes1), __pyx_t_3); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1511 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1511 * for j in range(chunklen[i]): * self.findexes1.append(matching.arr[matching.start+i]+j-f_sent_start); * sofar += 1 # <<<<<<<<<<<<<< @@ -57259,7 +57259,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_3 = 0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1512 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1512 * self.findexes1.append(matching.arr[matching.start+i]+j-f_sent_start); * sofar += 1 * if i+1 < num_chunks: # <<<<<<<<<<<<<< @@ -57269,7 +57269,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_8 = (((__pyx_v_i + 1) < __pyx_v_num_chunks) != 0); if (__pyx_t_8) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1513 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1513 * sofar += 1 * if i+1 < num_chunks: * self.findexes1.append(phrase[sofar]) # <<<<<<<<<<<<<< @@ -57281,7 +57281,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_7 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_self->findexes1), __pyx_t_3); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1514 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1514 * if i+1 < num_chunks: * self.findexes1.append(phrase[sofar]) * sofar += 1 # <<<<<<<<<<<<<< @@ -57297,7 +57297,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_L7:; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1517 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1517 * * * e_links_low = malloc(e_sent_len*sizeof(int)) # <<<<<<<<<<<<<< @@ -57306,7 +57306,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_e_links_low = ((int *)malloc((__pyx_v_e_sent_len * (sizeof(int))))); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1518 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1518 * * e_links_low = malloc(e_sent_len*sizeof(int)) * e_links_high = malloc(e_sent_len*sizeof(int)) # <<<<<<<<<<<<<< @@ -57315,7 +57315,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_e_links_high = ((int *)malloc((__pyx_v_e_sent_len * (sizeof(int))))); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1519 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1519 * e_links_low = malloc(e_sent_len*sizeof(int)) * e_links_high = malloc(e_sent_len*sizeof(int)) * f_links_low = malloc(f_sent_len*sizeof(int)) # <<<<<<<<<<<<<< @@ -57324,7 +57324,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_f_links_low = ((int *)malloc((__pyx_v_f_sent_len * (sizeof(int))))); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1520 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1520 * e_links_high = malloc(e_sent_len*sizeof(int)) * f_links_low = malloc(f_sent_len*sizeof(int)) * f_links_high = malloc(f_sent_len*sizeof(int)) # <<<<<<<<<<<<<< @@ -57333,7 +57333,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_f_links_high = ((int *)malloc((__pyx_v_f_sent_len * (sizeof(int))))); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1521 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1521 * f_links_low = malloc(f_sent_len*sizeof(int)) * f_links_high = malloc(f_sent_len*sizeof(int)) * f_gap_low = malloc((num_chunks+1)*sizeof(int)) # <<<<<<<<<<<<<< @@ -57342,7 +57342,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_f_gap_low = ((int *)malloc(((__pyx_v_num_chunks + 1) * (sizeof(int))))); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1522 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1522 * f_links_high = malloc(f_sent_len*sizeof(int)) * f_gap_low = malloc((num_chunks+1)*sizeof(int)) * f_gap_high = malloc((num_chunks+1)*sizeof(int)) # <<<<<<<<<<<<<< @@ -57351,7 +57351,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_f_gap_high = ((int *)malloc(((__pyx_v_num_chunks + 1) * (sizeof(int))))); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1523 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1523 * f_gap_low = malloc((num_chunks+1)*sizeof(int)) * f_gap_high = malloc((num_chunks+1)*sizeof(int)) * e_gap_low = malloc((num_chunks+1)*sizeof(int)) # <<<<<<<<<<<<<< @@ -57360,7 +57360,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_e_gap_low = ((int *)malloc(((__pyx_v_num_chunks + 1) * (sizeof(int))))); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1524 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1524 * f_gap_high = malloc((num_chunks+1)*sizeof(int)) * e_gap_low = malloc((num_chunks+1)*sizeof(int)) * e_gap_high = malloc((num_chunks+1)*sizeof(int)) # <<<<<<<<<<<<<< @@ -57369,7 +57369,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_e_gap_high = ((int *)malloc(((__pyx_v_num_chunks + 1) * (sizeof(int))))); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1525 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1525 * e_gap_low = malloc((num_chunks+1)*sizeof(int)) * e_gap_high = malloc((num_chunks+1)*sizeof(int)) * memset(f_gap_low, 0, (num_chunks+1)*sizeof(int)) # <<<<<<<<<<<<<< @@ -57378,7 +57378,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ memset(__pyx_v_f_gap_low, 0, ((__pyx_v_num_chunks + 1) * (sizeof(int)))); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1526 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1526 * e_gap_high = malloc((num_chunks+1)*sizeof(int)) * memset(f_gap_low, 0, (num_chunks+1)*sizeof(int)) * memset(f_gap_high, 0, (num_chunks+1)*sizeof(int)) # <<<<<<<<<<<<<< @@ -57387,7 +57387,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ memset(__pyx_v_f_gap_high, 0, ((__pyx_v_num_chunks + 1) * (sizeof(int)))); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1527 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1527 * memset(f_gap_low, 0, (num_chunks+1)*sizeof(int)) * memset(f_gap_high, 0, (num_chunks+1)*sizeof(int)) * memset(e_gap_low, 0, (num_chunks+1)*sizeof(int)) # <<<<<<<<<<<<<< @@ -57396,7 +57396,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ memset(__pyx_v_e_gap_low, 0, ((__pyx_v_num_chunks + 1) * (sizeof(int)))); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1528 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1528 * memset(f_gap_high, 0, (num_chunks+1)*sizeof(int)) * memset(e_gap_low, 0, (num_chunks+1)*sizeof(int)) * memset(e_gap_high, 0, (num_chunks+1)*sizeof(int)) # <<<<<<<<<<<<<< @@ -57405,7 +57405,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ memset(__pyx_v_e_gap_high, 0, ((__pyx_v_num_chunks + 1) * (sizeof(int)))); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1530 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1530 * memset(e_gap_high, 0, (num_chunks+1)*sizeof(int)) * * reason_for_failure = "" # <<<<<<<<<<<<<< @@ -57415,7 +57415,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_INCREF(__pyx_kp_s__32); __pyx_v_reason_for_failure = __pyx_kp_s__32; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1532 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1532 * reason_for_failure = "" * * for i from 0 <= i < e_sent_len: # <<<<<<<<<<<<<< @@ -57425,7 +57425,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_2 = __pyx_v_e_sent_len; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1533 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1533 * * for i from 0 <= i < e_sent_len: * e_links_low[i] = -1 # <<<<<<<<<<<<<< @@ -57434,7 +57434,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ (__pyx_v_e_links_low[__pyx_v_i]) = -1; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1534 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1534 * for i from 0 <= i < e_sent_len: * e_links_low[i] = -1 * e_links_high[i] = -1 # <<<<<<<<<<<<<< @@ -57444,7 +57444,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct (__pyx_v_e_links_high[__pyx_v_i]) = -1; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1535 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1535 * e_links_low[i] = -1 * e_links_high[i] = -1 * for i from 0 <= i < f_sent_len: # <<<<<<<<<<<<<< @@ -57454,7 +57454,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_2 = __pyx_v_f_sent_len; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1536 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1536 * e_links_high[i] = -1 * for i from 0 <= i < f_sent_len: * f_links_low[i] = -1 # <<<<<<<<<<<<<< @@ -57463,7 +57463,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ (__pyx_v_f_links_low[__pyx_v_i]) = -1; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1537 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1537 * for i from 0 <= i < f_sent_len: * f_links_low[i] = -1 * f_links_high[i] = -1 # <<<<<<<<<<<<<< @@ -57473,7 +57473,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct (__pyx_v_f_links_high[__pyx_v_i]) = -1; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1543 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1543 * # links that we care about (but then how to look up * # when we want to check something on the e side?) * i = 0 # <<<<<<<<<<<<<< @@ -57482,7 +57482,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_i = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1544 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1544 * # when we want to check something on the e side?) * i = 0 * while i < num_links*2: # <<<<<<<<<<<<<< @@ -57493,7 +57493,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_8 = ((__pyx_v_i < (__pyx_v_num_links * 2)) != 0); if (!__pyx_t_8) break; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1545 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1545 * i = 0 * while i < num_links*2: * f_i = sent_links[i] # <<<<<<<<<<<<<< @@ -57502,7 +57502,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_f_i = (__pyx_v_sent_links[__pyx_v_i]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1546 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1546 * while i < num_links*2: * f_i = sent_links[i] * e_i = sent_links[i+1] # <<<<<<<<<<<<<< @@ -57511,7 +57511,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_e_i = (__pyx_v_sent_links[(__pyx_v_i + 1)]); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1547 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1547 * f_i = sent_links[i] * e_i = sent_links[i+1] * if f_links_low[f_i] == -1 or f_links_low[f_i] > e_i: # <<<<<<<<<<<<<< @@ -57527,7 +57527,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } if (__pyx_t_10) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1548 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1548 * e_i = sent_links[i+1] * if f_links_low[f_i] == -1 or f_links_low[f_i] > e_i: * f_links_low[f_i] = e_i # <<<<<<<<<<<<<< @@ -57539,7 +57539,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } __pyx_L14:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1549 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1549 * if f_links_low[f_i] == -1 or f_links_low[f_i] > e_i: * f_links_low[f_i] = e_i * if f_links_high[f_i] == -1 or f_links_high[f_i] < e_i + 1: # <<<<<<<<<<<<<< @@ -57555,7 +57555,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } if (__pyx_t_9) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1550 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1550 * f_links_low[f_i] = e_i * if f_links_high[f_i] == -1 or f_links_high[f_i] < e_i + 1: * f_links_high[f_i] = e_i + 1 # <<<<<<<<<<<<<< @@ -57567,7 +57567,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } __pyx_L15:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1551 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1551 * if f_links_high[f_i] == -1 or f_links_high[f_i] < e_i + 1: * f_links_high[f_i] = e_i + 1 * if e_links_low[e_i] == -1 or e_links_low[e_i] > f_i: # <<<<<<<<<<<<<< @@ -57583,7 +57583,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } if (__pyx_t_8) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1552 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1552 * f_links_high[f_i] = e_i + 1 * if e_links_low[e_i] == -1 or e_links_low[e_i] > f_i: * e_links_low[e_i] = f_i # <<<<<<<<<<<<<< @@ -57595,7 +57595,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } __pyx_L16:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1553 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1553 * if e_links_low[e_i] == -1 or e_links_low[e_i] > f_i: * e_links_low[e_i] = f_i * if e_links_high[e_i] == -1 or e_links_high[e_i] < f_i + 1: # <<<<<<<<<<<<<< @@ -57611,7 +57611,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } if (__pyx_t_10) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1554 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1554 * e_links_low[e_i] = f_i * if e_links_high[e_i] == -1 or e_links_high[e_i] < f_i + 1: * e_links_high[e_i] = f_i + 1 # <<<<<<<<<<<<<< @@ -57623,7 +57623,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } __pyx_L17:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1555 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1555 * if e_links_high[e_i] == -1 or e_links_high[e_i] < f_i + 1: * e_links_high[e_i] = f_i + 1 * i = i + 2 # <<<<<<<<<<<<<< @@ -57633,7 +57633,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_v_i = (__pyx_v_i + 2); } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1557 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1557 * i = i + 2 * * als = [] # <<<<<<<<<<<<<< @@ -57645,7 +57645,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_v_als = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1558 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1558 * * als = [] * for x in range(matching.start,matching.end): # <<<<<<<<<<<<<< @@ -57656,7 +57656,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct for (__pyx_t_4 = __pyx_v_matching->start; __pyx_t_4 < __pyx_t_2; __pyx_t_4+=1) { __pyx_v_x = __pyx_t_4; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1559 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1559 * als = [] * for x in range(matching.start,matching.end): * al = (matching.arr[x]-f_sent_start,f_links_low[matching.arr[x]-f_sent_start]) # <<<<<<<<<<<<<< @@ -57678,7 +57678,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_XDECREF_SET(__pyx_v_al, ((PyObject*)__pyx_t_11)); __pyx_t_11 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1560 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1560 * for x in range(matching.start,matching.end): * al = (matching.arr[x]-f_sent_start,f_links_low[matching.arr[x]-f_sent_start]) * als.append(al) # <<<<<<<<<<<<<< @@ -57688,7 +57688,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_als, __pyx_v_al); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1560; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1562 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1562 * als.append(al) * # check all source-side alignment constraints * met_constraints = 1 # <<<<<<<<<<<<<< @@ -57697,7 +57697,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_met_constraints = 1; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1563 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1563 * # check all source-side alignment constraints * met_constraints = 1 * if self.require_aligned_terminal: # <<<<<<<<<<<<<< @@ -57707,7 +57707,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_10 = (__pyx_v_self->require_aligned_terminal != 0); if (__pyx_t_10) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1564 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1564 * met_constraints = 1 * if self.require_aligned_terminal: * num_aligned_chunks = 0 # <<<<<<<<<<<<<< @@ -57716,7 +57716,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_num_aligned_chunks = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1565 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1565 * if self.require_aligned_terminal: * num_aligned_chunks = 0 * for i from 0 <= i < num_chunks: # <<<<<<<<<<<<<< @@ -57726,7 +57726,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_2 = __pyx_v_num_chunks; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1566 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1566 * num_aligned_chunks = 0 * for i from 0 <= i < num_chunks: * for j from 0 <= j < chunklen[i]: # <<<<<<<<<<<<<< @@ -57736,7 +57736,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_4 = (__pyx_v_chunklen[__pyx_v_i]); for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_4; __pyx_v_j++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1567 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1567 * for i from 0 <= i < num_chunks: * for j from 0 <= j < chunklen[i]: * if f_links_low[matching.arr[matching.start+i]+j-f_sent_start] > -1: # <<<<<<<<<<<<<< @@ -57746,7 +57746,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_10 = (((__pyx_v_f_links_low[(((__pyx_v_matching->arr[(__pyx_v_matching->start + __pyx_v_i)]) + __pyx_v_j) - __pyx_v_f_sent_start)]) > -1) != 0); if (__pyx_t_10) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1568 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1568 * for j from 0 <= j < chunklen[i]: * if f_links_low[matching.arr[matching.start+i]+j-f_sent_start] > -1: * num_aligned_chunks = num_aligned_chunks + 1 # <<<<<<<<<<<<<< @@ -57755,7 +57755,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_num_aligned_chunks = (__pyx_v_num_aligned_chunks + 1); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1569 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1569 * if f_links_low[matching.arr[matching.start+i]+j-f_sent_start] > -1: * num_aligned_chunks = num_aligned_chunks + 1 * break # <<<<<<<<<<<<<< @@ -57768,7 +57768,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_L24_break:; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1570 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1570 * num_aligned_chunks = num_aligned_chunks + 1 * break * if num_aligned_chunks == 0: # <<<<<<<<<<<<<< @@ -57778,7 +57778,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_10 = ((__pyx_v_num_aligned_chunks == 0) != 0); if (__pyx_t_10) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1571 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1571 * break * if num_aligned_chunks == 0: * reason_for_failure = "No aligned terminals" # <<<<<<<<<<<<<< @@ -57788,7 +57788,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_INCREF(__pyx_kp_s_No_aligned_terminals); __Pyx_DECREF_SET(__pyx_v_reason_for_failure, __pyx_kp_s_No_aligned_terminals); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1572 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1572 * if num_aligned_chunks == 0: * reason_for_failure = "No aligned terminals" * met_constraints = 0 # <<<<<<<<<<<<<< @@ -57800,7 +57800,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } __pyx_L26:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1573 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1573 * reason_for_failure = "No aligned terminals" * met_constraints = 0 * if self.require_aligned_chunks and num_aligned_chunks < num_chunks: # <<<<<<<<<<<<<< @@ -57815,7 +57815,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } if (__pyx_t_8) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1574 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1574 * met_constraints = 0 * if self.require_aligned_chunks and num_aligned_chunks < num_chunks: * reason_for_failure = "Unaligned chunk" # <<<<<<<<<<<<<< @@ -57825,7 +57825,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_INCREF(__pyx_kp_s_Unaligned_chunk); __Pyx_DECREF_SET(__pyx_v_reason_for_failure, __pyx_kp_s_Unaligned_chunk); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1575 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1575 * if self.require_aligned_chunks and num_aligned_chunks < num_chunks: * reason_for_failure = "Unaligned chunk" * met_constraints = 0 # <<<<<<<<<<<<<< @@ -57840,7 +57840,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } __pyx_L20:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1577 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1577 * met_constraints = 0 * * if met_constraints and self.tight_phrases: # <<<<<<<<<<<<<< @@ -57855,7 +57855,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } if (__pyx_t_10) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1579 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1579 * if met_constraints and self.tight_phrases: * # outside edge constraints are checked later * for i from 0 <= i < num_chunks-1: # <<<<<<<<<<<<<< @@ -57865,7 +57865,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_12 = (__pyx_v_num_chunks - 1); for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_12; __pyx_v_i++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1580 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1580 * # outside edge constraints are checked later * for i from 0 <= i < num_chunks-1: * if f_links_low[matching.arr[matching.start+i]+chunklen[i]-f_sent_start] == -1: # <<<<<<<<<<<<<< @@ -57875,7 +57875,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_10 = (((__pyx_v_f_links_low[(((__pyx_v_matching->arr[(__pyx_v_matching->start + __pyx_v_i)]) + (__pyx_v_chunklen[__pyx_v_i])) - __pyx_v_f_sent_start)]) == -1) != 0); if (__pyx_t_10) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1581 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1581 * for i from 0 <= i < num_chunks-1: * if f_links_low[matching.arr[matching.start+i]+chunklen[i]-f_sent_start] == -1: * reason_for_failure = "Gaps are not tight phrases" # <<<<<<<<<<<<<< @@ -57885,7 +57885,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_INCREF(__pyx_kp_s_Gaps_are_not_tight_phrases); __Pyx_DECREF_SET(__pyx_v_reason_for_failure, __pyx_kp_s_Gaps_are_not_tight_phrases); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1582 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1582 * if f_links_low[matching.arr[matching.start+i]+chunklen[i]-f_sent_start] == -1: * reason_for_failure = "Gaps are not tight phrases" * met_constraints = 0 # <<<<<<<<<<<<<< @@ -57894,7 +57894,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_met_constraints = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1583 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1583 * reason_for_failure = "Gaps are not tight phrases" * met_constraints = 0 * break # <<<<<<<<<<<<<< @@ -57904,7 +57904,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct goto __pyx_L30_break; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1584 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1584 * met_constraints = 0 * break * if f_links_low[matching.arr[matching.start+i+1]-1-f_sent_start] == -1: # <<<<<<<<<<<<<< @@ -57914,7 +57914,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_10 = (((__pyx_v_f_links_low[(((__pyx_v_matching->arr[((__pyx_v_matching->start + __pyx_v_i) + 1)]) - 1) - __pyx_v_f_sent_start)]) == -1) != 0); if (__pyx_t_10) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1585 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1585 * break * if f_links_low[matching.arr[matching.start+i+1]-1-f_sent_start] == -1: * reason_for_failure = "Gaps are not tight phrases" # <<<<<<<<<<<<<< @@ -57924,7 +57924,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_INCREF(__pyx_kp_s_Gaps_are_not_tight_phrases); __Pyx_DECREF_SET(__pyx_v_reason_for_failure, __pyx_kp_s_Gaps_are_not_tight_phrases); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1586 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1586 * if f_links_low[matching.arr[matching.start+i+1]-1-f_sent_start] == -1: * reason_for_failure = "Gaps are not tight phrases" * met_constraints = 0 # <<<<<<<<<<<<<< @@ -57933,7 +57933,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_met_constraints = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1587 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1587 * reason_for_failure = "Gaps are not tight phrases" * met_constraints = 0 * break # <<<<<<<<<<<<<< @@ -57948,7 +57948,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } __pyx_L28:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1589 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1589 * break * * f_low = matching.arr[matching.start] - f_sent_start # <<<<<<<<<<<<<< @@ -57957,7 +57957,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_f_low = ((__pyx_v_matching->arr[__pyx_v_matching->start]) - __pyx_v_f_sent_start); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1590 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1590 * * f_low = matching.arr[matching.start] - f_sent_start * f_high = matching.arr[matching.start + matching.size - 1] + chunklen[num_chunks-1] - f_sent_start # <<<<<<<<<<<<<< @@ -57966,7 +57966,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_f_high = (((__pyx_v_matching->arr[((__pyx_v_matching->start + __pyx_v_matching->size) - 1)]) + (__pyx_v_chunklen[(__pyx_v_num_chunks - 1)])) - __pyx_v_f_sent_start); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1591 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1591 * f_low = matching.arr[matching.start] - f_sent_start * f_high = matching.arr[matching.start + matching.size - 1] + chunklen[num_chunks-1] - f_sent_start * if met_constraints: # <<<<<<<<<<<<<< @@ -57976,7 +57976,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_10 = (__pyx_v_met_constraints != 0); if (__pyx_t_10) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1593 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1593 * if met_constraints: * * if self.find_fixpoint(f_low, f_high, f_links_low, f_links_high, e_links_low, e_links_high, # <<<<<<<<<<<<<< @@ -57986,7 +57986,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_v_f_high); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1597 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1597 * self.train_max_initial_size, self.train_max_initial_size, * self.train_min_gap_size, 0, * self.max_nonterminals - num_chunks + 1, 1, 1, 0, 0): # <<<<<<<<<<<<<< @@ -57997,7 +57997,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (__pyx_t_10) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1598 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1598 * self.train_min_gap_size, 0, * self.max_nonterminals - num_chunks + 1, 1, 1, 0, 0): * gap_error = 0 # <<<<<<<<<<<<<< @@ -58006,7 +58006,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_gap_error = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1599 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1599 * self.max_nonterminals - num_chunks + 1, 1, 1, 0, 0): * gap_error = 0 * num_gaps = 0 # <<<<<<<<<<<<<< @@ -58015,7 +58015,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_num_gaps = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1601 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1601 * num_gaps = 0 * * if f_back_low < f_low: # <<<<<<<<<<<<<< @@ -58025,7 +58025,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_10 = ((__pyx_v_f_back_low < __pyx_v_f_low) != 0); if (__pyx_t_10) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1602 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1602 * * if f_back_low < f_low: * f_gap_low[0] = f_back_low # <<<<<<<<<<<<<< @@ -58034,7 +58034,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ (__pyx_v_f_gap_low[0]) = __pyx_v_f_back_low; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1603 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1603 * if f_back_low < f_low: * f_gap_low[0] = f_back_low * f_gap_high[0] = f_low # <<<<<<<<<<<<<< @@ -58043,7 +58043,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ (__pyx_v_f_gap_high[0]) = __pyx_v_f_low; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1604 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1604 * f_gap_low[0] = f_back_low * f_gap_high[0] = f_low * num_gaps = 1 # <<<<<<<<<<<<<< @@ -58052,7 +58052,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_num_gaps = 1; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1605 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1605 * f_gap_high[0] = f_low * num_gaps = 1 * gap_start = 0 # <<<<<<<<<<<<<< @@ -58061,7 +58061,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_gap_start = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1606 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1606 * num_gaps = 1 * gap_start = 0 * phrase_len = phrase_len+1 # <<<<<<<<<<<<<< @@ -58070,7 +58070,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_phrase_len = (__pyx_v_phrase_len + 1); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1607 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1607 * gap_start = 0 * phrase_len = phrase_len+1 * if phrase_len > self.max_length: # <<<<<<<<<<<<<< @@ -58080,7 +58080,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_10 = ((__pyx_v_phrase_len > __pyx_v_self->max_length) != 0); if (__pyx_t_10) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1608 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1608 * phrase_len = phrase_len+1 * if phrase_len > self.max_length: * gap_error = 1 # <<<<<<<<<<<<<< @@ -58092,7 +58092,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } __pyx_L36:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1609 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1609 * if phrase_len > self.max_length: * gap_error = 1 * if self.tight_phrases: # <<<<<<<<<<<<<< @@ -58102,7 +58102,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_10 = (__pyx_v_self->tight_phrases != 0); if (__pyx_t_10) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1610 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1610 * gap_error = 1 * if self.tight_phrases: * if f_links_low[f_back_low] == -1 or f_links_low[f_low-1] == -1: # <<<<<<<<<<<<<< @@ -58118,7 +58118,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } if (__pyx_t_9) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1611 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1611 * if self.tight_phrases: * if f_links_low[f_back_low] == -1 or f_links_low[f_low-1] == -1: * gap_error = 1 # <<<<<<<<<<<<<< @@ -58127,7 +58127,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_gap_error = 1; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1612 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1612 * if f_links_low[f_back_low] == -1 or f_links_low[f_low-1] == -1: * gap_error = 1 * reason_for_failure = "Inside edges of preceding subphrase are not tight" # <<<<<<<<<<<<<< @@ -58146,7 +58146,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1614 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1614 * reason_for_failure = "Inside edges of preceding subphrase are not tight" * else: * gap_start = 1 # <<<<<<<<<<<<<< @@ -58155,7 +58155,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_gap_start = 1; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1615 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1615 * else: * gap_start = 1 * if self.tight_phrases and f_links_low[f_low] == -1: # <<<<<<<<<<<<<< @@ -58170,7 +58170,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } if (__pyx_t_10) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1618 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1618 * # this is not a hard error. we can't extract this phrase * # but we still might be able to extract a superphrase * met_constraints = 0 # <<<<<<<<<<<<<< @@ -58184,7 +58184,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } __pyx_L35:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1620 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1620 * met_constraints = 0 * * for i from 0 <= i < matching.size - 1: # <<<<<<<<<<<<<< @@ -58194,7 +58194,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_12 = (__pyx_v_matching->size - 1); for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_12; __pyx_v_i++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1621 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1621 * * for i from 0 <= i < matching.size - 1: * f_gap_low[1+i] = matching.arr[matching.start+i] + chunklen[i] - f_sent_start # <<<<<<<<<<<<<< @@ -58203,7 +58203,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ (__pyx_v_f_gap_low[(1 + __pyx_v_i)]) = (((__pyx_v_matching->arr[(__pyx_v_matching->start + __pyx_v_i)]) + (__pyx_v_chunklen[__pyx_v_i])) - __pyx_v_f_sent_start); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1622 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1622 * for i from 0 <= i < matching.size - 1: * f_gap_low[1+i] = matching.arr[matching.start+i] + chunklen[i] - f_sent_start * f_gap_high[1+i] = matching.arr[matching.start+i+1] - f_sent_start # <<<<<<<<<<<<<< @@ -58212,7 +58212,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ (__pyx_v_f_gap_high[(1 + __pyx_v_i)]) = ((__pyx_v_matching->arr[((__pyx_v_matching->start + __pyx_v_i) + 1)]) - __pyx_v_f_sent_start); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1623 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1623 * f_gap_low[1+i] = matching.arr[matching.start+i] + chunklen[i] - f_sent_start * f_gap_high[1+i] = matching.arr[matching.start+i+1] - f_sent_start * num_gaps = num_gaps + 1 # <<<<<<<<<<<<<< @@ -58222,7 +58222,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_v_num_gaps = (__pyx_v_num_gaps + 1); } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1625 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1625 * num_gaps = num_gaps + 1 * * if f_high < f_back_high: # <<<<<<<<<<<<<< @@ -58232,7 +58232,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_10 = ((__pyx_v_f_high < __pyx_v_f_back_high) != 0); if (__pyx_t_10) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1626 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1626 * * if f_high < f_back_high: * f_gap_low[gap_start+num_gaps] = f_high # <<<<<<<<<<<<<< @@ -58241,7 +58241,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ (__pyx_v_f_gap_low[(__pyx_v_gap_start + __pyx_v_num_gaps)]) = __pyx_v_f_high; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1627 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1627 * if f_high < f_back_high: * f_gap_low[gap_start+num_gaps] = f_high * f_gap_high[gap_start+num_gaps] = f_back_high # <<<<<<<<<<<<<< @@ -58250,7 +58250,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ (__pyx_v_f_gap_high[(__pyx_v_gap_start + __pyx_v_num_gaps)]) = __pyx_v_f_back_high; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1628 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1628 * f_gap_low[gap_start+num_gaps] = f_high * f_gap_high[gap_start+num_gaps] = f_back_high * num_gaps = num_gaps + 1 # <<<<<<<<<<<<<< @@ -58259,7 +58259,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_num_gaps = (__pyx_v_num_gaps + 1); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1629 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1629 * f_gap_high[gap_start+num_gaps] = f_back_high * num_gaps = num_gaps + 1 * phrase_len = phrase_len+1 # <<<<<<<<<<<<<< @@ -58268,7 +58268,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_phrase_len = (__pyx_v_phrase_len + 1); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1630 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1630 * num_gaps = num_gaps + 1 * phrase_len = phrase_len+1 * if phrase_len > self.max_length: # <<<<<<<<<<<<<< @@ -58278,7 +58278,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_10 = ((__pyx_v_phrase_len > __pyx_v_self->max_length) != 0); if (__pyx_t_10) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1631 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1631 * phrase_len = phrase_len+1 * if phrase_len > self.max_length: * gap_error = 1 # <<<<<<<<<<<<<< @@ -58290,7 +58290,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } __pyx_L43:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1632 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1632 * if phrase_len > self.max_length: * gap_error = 1 * if self.tight_phrases: # <<<<<<<<<<<<<< @@ -58300,7 +58300,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_10 = (__pyx_v_self->tight_phrases != 0); if (__pyx_t_10) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1633 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1633 * gap_error = 1 * if self.tight_phrases: * if f_links_low[f_back_high-1] == -1 or f_links_low[f_high] == -1: # <<<<<<<<<<<<<< @@ -58316,7 +58316,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } if (__pyx_t_8) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1634 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1634 * if self.tight_phrases: * if f_links_low[f_back_high-1] == -1 or f_links_low[f_high] == -1: * gap_error = 1 # <<<<<<<<<<<<<< @@ -58325,7 +58325,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_gap_error = 1; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1635 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1635 * if f_links_low[f_back_high-1] == -1 or f_links_low[f_high] == -1: * gap_error = 1 * reason_for_failure = "Inside edges of following subphrase are not tight" # <<<<<<<<<<<<<< @@ -58344,7 +58344,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1637 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1637 * reason_for_failure = "Inside edges of following subphrase are not tight" * else: * if self.tight_phrases and f_links_low[f_high-1] == -1: # <<<<<<<<<<<<<< @@ -58359,7 +58359,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } if (__pyx_t_10) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1638 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1638 * else: * if self.tight_phrases and f_links_low[f_high-1] == -1: * met_constraints = 0 # <<<<<<<<<<<<<< @@ -58373,7 +58373,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } __pyx_L42:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1640 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1640 * met_constraints = 0 * * if gap_error == 0: # <<<<<<<<<<<<<< @@ -58383,7 +58383,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_10 = ((__pyx_v_gap_error == 0) != 0); if (__pyx_t_10) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1641 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1641 * * if gap_error == 0: * e_word_count = e_high - e_low # <<<<<<<<<<<<<< @@ -58392,7 +58392,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_e_word_count = (__pyx_v_e_high - __pyx_v_e_low); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1642 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1642 * if gap_error == 0: * e_word_count = e_high - e_low * for i from 0 <= i < num_gaps: # check integrity of subphrases # <<<<<<<<<<<<<< @@ -58402,7 +58402,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_2 = __pyx_v_num_gaps; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1643 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1643 * e_word_count = e_high - e_low * for i from 0 <= i < num_gaps: # check integrity of subphrases * if self.find_fixpoint(f_gap_low[gap_start+i], f_gap_high[gap_start+i], # <<<<<<<<<<<<<< @@ -58412,7 +58412,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_11 = __Pyx_PyInt_From_int((__pyx_v_f_gap_high[(__pyx_v_gap_start + __pyx_v_i)])); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1643; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1649 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1649 * f_sent_len, e_sent_len, * self.train_max_initial_size, self.train_max_initial_size, * 0, 0, 0, 0, 0, 0, 0) == 0: # <<<<<<<<<<<<<< @@ -58423,7 +58423,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (__pyx_t_10) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1650 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1650 * self.train_max_initial_size, self.train_max_initial_size, * 0, 0, 0, 0, 0, 0, 0) == 0: * gap_error = 1 # <<<<<<<<<<<<<< @@ -58432,7 +58432,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_gap_error = 1; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1651 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1651 * 0, 0, 0, 0, 0, 0, 0) == 0: * gap_error = 1 * reason_for_failure = "Subphrase [%d, %d] failed integrity check" % (f_gap_low[gap_start+i], f_gap_high[gap_start+i]) # <<<<<<<<<<<<<< @@ -58457,7 +58457,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_DECREF_SET(__pyx_v_reason_for_failure, __pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1652 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1652 * gap_error = 1 * reason_for_failure = "Subphrase [%d, %d] failed integrity check" % (f_gap_low[gap_start+i], f_gap_high[gap_start+i]) * break # <<<<<<<<<<<<<< @@ -58472,7 +58472,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } __pyx_L47:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1654 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1654 * break * * if gap_error == 0: # <<<<<<<<<<<<<< @@ -58482,7 +58482,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_10 = ((__pyx_v_gap_error == 0) != 0); if (__pyx_t_10) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1655 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1655 * * if gap_error == 0: * i = 1 # <<<<<<<<<<<<<< @@ -58491,7 +58491,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_i = 1; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1656 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1656 * if gap_error == 0: * i = 1 * self.findexes.reset() # <<<<<<<<<<<<<< @@ -58505,7 +58505,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1657 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1657 * i = 1 * self.findexes.reset() * if f_back_low < f_low: # <<<<<<<<<<<<<< @@ -58515,7 +58515,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_10 = ((__pyx_v_f_back_low < __pyx_v_f_low) != 0); if (__pyx_t_10) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1658 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1658 * self.findexes.reset() * if f_back_low < f_low: * fphr_arr._append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<< @@ -58524,7 +58524,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_append(__pyx_v_fphr_arr, __pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i)); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1659 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1659 * if f_back_low < f_low: * fphr_arr._append(sym_setindex(self.category, i)) * i = i+1 # <<<<<<<<<<<<<< @@ -58533,7 +58533,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_i = (__pyx_v_i + 1); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1660 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1660 * fphr_arr._append(sym_setindex(self.category, i)) * i = i+1 * self.findexes.append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<< @@ -58548,7 +58548,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } __pyx_L52:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1661 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1661 * i = i+1 * self.findexes.append(sym_setindex(self.category, i)) * self.findexes.extend(self.findexes1) # <<<<<<<<<<<<<< @@ -58568,7 +58568,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1662 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1662 * self.findexes.append(sym_setindex(self.category, i)) * self.findexes.extend(self.findexes1) * for j from 0 <= j < phrase.n: # <<<<<<<<<<<<<< @@ -58578,7 +58578,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_2 = __pyx_v_phrase->n; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_2; __pyx_v_j++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1663 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1663 * self.findexes.extend(self.findexes1) * for j from 0 <= j < phrase.n: * if sym_isvar(phrase.syms[j]): # <<<<<<<<<<<<<< @@ -58588,7 +58588,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_10 = (__pyx_f_4cdec_2sa_3_sa_sym_isvar((__pyx_v_phrase->syms[__pyx_v_j])) != 0); if (__pyx_t_10) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1664 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1664 * for j from 0 <= j < phrase.n: * if sym_isvar(phrase.syms[j]): * fphr_arr._append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<< @@ -58597,7 +58597,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_append(__pyx_v_fphr_arr, __pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i)); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1665 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1665 * if sym_isvar(phrase.syms[j]): * fphr_arr._append(sym_setindex(self.category, i)) * i = i + 1 # <<<<<<<<<<<<<< @@ -58609,7 +58609,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1667 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1667 * i = i + 1 * else: * fphr_arr._append(phrase.syms[j]) # <<<<<<<<<<<<<< @@ -58621,7 +58621,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_L55:; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1668 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1668 * else: * fphr_arr._append(phrase.syms[j]) * if f_back_high > f_high: # <<<<<<<<<<<<<< @@ -58631,7 +58631,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_10 = ((__pyx_v_f_back_high > __pyx_v_f_high) != 0); if (__pyx_t_10) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1669 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1669 * fphr_arr._append(phrase.syms[j]) * if f_back_high > f_high: * fphr_arr._append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<< @@ -58640,7 +58640,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_append(__pyx_v_fphr_arr, __pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i)); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1670 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1670 * if f_back_high > f_high: * fphr_arr._append(sym_setindex(self.category, i)) * self.findexes.append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<< @@ -58655,7 +58655,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } __pyx_L56:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1672 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1672 * self.findexes.append(sym_setindex(self.category, i)) * * fphr = Phrase(fphr_arr) # <<<<<<<<<<<<<< @@ -58673,7 +58673,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_v_fphr = ((struct __pyx_obj_4cdec_2sa_3_sa_Phrase *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1673 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1673 * * fphr = Phrase(fphr_arr) * if met_constraints: # <<<<<<<<<<<<<< @@ -58683,7 +58683,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_10 = (__pyx_v_met_constraints != 0); if (__pyx_t_10) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1674 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1674 * fphr = Phrase(fphr_arr) * if met_constraints: * phrase_list = self.extract_phrases(e_low, e_high, e_gap_low + gap_start, e_gap_high + gap_start, e_links_low, num_gaps, # <<<<<<<<<<<<<< @@ -58695,7 +58695,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_v_phrase_list = __pyx_t_1; __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1677 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1677 * f_back_low, f_back_high, f_gap_low + gap_start, f_gap_high + gap_start, f_links_low, * matching.sent_id, e_sent_len, e_sent_start) * if len(phrase_list) > 0: # <<<<<<<<<<<<<< @@ -58706,7 +58706,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_10 = ((__pyx_t_13 > 0) != 0); if (__pyx_t_10) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1678 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1678 * matching.sent_id, e_sent_len, e_sent_start) * if len(phrase_list) > 0: * pair_count = 1.0 / len(phrase_list) # <<<<<<<<<<<<<< @@ -58729,7 +58729,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1680 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1680 * pair_count = 1.0 / len(phrase_list) * else: * pair_count = 0 # <<<<<<<<<<<<<< @@ -58738,7 +58738,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_pair_count = 0.0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1681 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1681 * else: * pair_count = 0 * reason_for_failure = "Didn't extract anything from [%d, %d] -> [%d, %d]" % (f_back_low, f_back_high, e_low, e_high) # <<<<<<<<<<<<<< @@ -58775,7 +58775,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } __pyx_L58:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1682 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1682 * pair_count = 0 * reason_for_failure = "Didn't extract anything from [%d, %d] -> [%d, %d]" % (f_back_low, f_back_high, e_low, e_high) * for phrase2, eindexes in phrase_list: # <<<<<<<<<<<<<< @@ -58872,7 +58872,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_XDECREF_SET(__pyx_v_eindexes, __pyx_t_11); __pyx_t_11 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1683 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1683 * reason_for_failure = "Didn't extract anything from [%d, %d] -> [%d, %d]" % (f_back_low, f_back_high, e_low, e_high) * for phrase2, eindexes in phrase_list: * als1 = self.create_alignments(sent_links,num_links,self.findexes,eindexes) # <<<<<<<<<<<<<< @@ -58888,7 +58888,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_XDECREF_SET(__pyx_v_als1, ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_11)); __pyx_t_11 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1684 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1684 * for phrase2, eindexes in phrase_list: * als1 = self.create_alignments(sent_links,num_links,self.findexes,eindexes) * extracts.append((fphr, phrase2, pair_count, tuple(als1))) # <<<<<<<<<<<<<< @@ -58927,7 +58927,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } __pyx_L57:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1685 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1685 * als1 = self.create_alignments(sent_links,num_links,self.findexes,eindexes) * extracts.append((fphr, phrase2, pair_count, tuple(als1))) * if (num_gaps < self.max_nonterminals and # <<<<<<<<<<<<<< @@ -58937,7 +58937,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_10 = ((__pyx_v_num_gaps < __pyx_v_self->max_nonterminals) != 0); if (__pyx_t_10) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1686 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1686 * extracts.append((fphr, phrase2, pair_count, tuple(als1))) * if (num_gaps < self.max_nonterminals and * phrase_len < self.max_length and # <<<<<<<<<<<<<< @@ -58947,7 +58947,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_8 = ((__pyx_v_phrase_len < __pyx_v_self->max_length) != 0); if (__pyx_t_8) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1687 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1687 * if (num_gaps < self.max_nonterminals and * phrase_len < self.max_length and * f_back_high - f_back_low + self.train_min_gap_size <= self.train_max_initial_size): # <<<<<<<<<<<<<< @@ -58965,7 +58965,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } if (__pyx_t_8) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1688 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1688 * phrase_len < self.max_length and * f_back_high - f_back_low + self.train_min_gap_size <= self.train_max_initial_size): * if (f_back_low == f_low and # <<<<<<<<<<<<<< @@ -58975,7 +58975,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_8 = ((__pyx_v_f_back_low == __pyx_v_f_low) != 0); if (__pyx_t_8) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1689 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1689 * f_back_high - f_back_low + self.train_min_gap_size <= self.train_max_initial_size): * if (f_back_low == f_low and * f_low >= self.train_min_gap_size and # <<<<<<<<<<<<<< @@ -58985,7 +58985,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_10 = ((__pyx_v_f_low >= __pyx_v_self->train_min_gap_size) != 0); if (__pyx_t_10) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1690 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1690 * if (f_back_low == f_low and * f_low >= self.train_min_gap_size and * ((not self.tight_phrases) or (f_links_low[f_low-1] != -1 and f_links_low[f_back_high-1] != -1))): # <<<<<<<<<<<<<< @@ -59015,7 +59015,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } if (__pyx_t_10) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1691 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1691 * f_low >= self.train_min_gap_size and * ((not self.tight_phrases) or (f_links_low[f_low-1] != -1 and f_links_low[f_back_high-1] != -1))): * f_x_low = f_low-self.train_min_gap_size # <<<<<<<<<<<<<< @@ -59024,7 +59024,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_f_x_low = (__pyx_v_f_low - __pyx_v_self->train_min_gap_size); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1692 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1692 * ((not self.tight_phrases) or (f_links_low[f_low-1] != -1 and f_links_low[f_back_high-1] != -1))): * f_x_low = f_low-self.train_min_gap_size * met_constraints = 1 # <<<<<<<<<<<<<< @@ -59033,7 +59033,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_met_constraints = 1; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1693 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1693 * f_x_low = f_low-self.train_min_gap_size * met_constraints = 1 * if self.tight_phrases: # <<<<<<<<<<<<<< @@ -59043,7 +59043,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_10 = (__pyx_v_self->tight_phrases != 0); if (__pyx_t_10) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1694 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1694 * met_constraints = 1 * if self.tight_phrases: * while f_x_low >= 0 and f_links_low[f_x_low] == -1: # <<<<<<<<<<<<<< @@ -59060,7 +59060,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } if (!__pyx_t_18) break; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1695 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1695 * if self.tight_phrases: * while f_x_low >= 0 and f_links_low[f_x_low] == -1: * f_x_low = f_x_low - 1 # <<<<<<<<<<<<<< @@ -59073,7 +59073,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } __pyx_L65:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1696 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1696 * while f_x_low >= 0 and f_links_low[f_x_low] == -1: * f_x_low = f_x_low - 1 * if f_x_low < 0 or f_back_high - f_x_low > self.train_max_initial_size: # <<<<<<<<<<<<<< @@ -59089,7 +59089,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } if (__pyx_t_8) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1697 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1697 * f_x_low = f_x_low - 1 * if f_x_low < 0 or f_back_high - f_x_low > self.train_max_initial_size: * met_constraints = 0 # <<<<<<<<<<<<<< @@ -59101,7 +59101,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } __pyx_L68:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1699 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1699 * met_constraints = 0 * * if (met_constraints and # <<<<<<<<<<<<<< @@ -59110,7 +59110,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ if ((__pyx_v_met_constraints != 0)) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1700 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1700 * * if (met_constraints and * (self.find_fixpoint(f_x_low, f_back_high, # <<<<<<<<<<<<<< @@ -59120,7 +59120,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_14 = __Pyx_PyInt_From_int(__pyx_v_f_back_high); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1700; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1705 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1705 * f_sent_len, e_sent_len, * self.train_max_initial_size, self.train_max_initial_size, * 1, 1, 1, 1, 0, 1, 0) == 1) and # <<<<<<<<<<<<<< @@ -59131,7 +59131,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (__pyx_t_8) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1706 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1706 * self.train_max_initial_size, self.train_max_initial_size, * 1, 1, 1, 1, 0, 1, 0) == 1) and * ((not self.tight_phrases) or f_links_low[f_x_low] != -1) and # <<<<<<<<<<<<<< @@ -59147,7 +59147,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } if (__pyx_t_9) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1707 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1707 * 1, 1, 1, 1, 0, 1, 0) == 1) and * ((not self.tight_phrases) or f_links_low[f_x_low] != -1) and * self.find_fixpoint(f_x_low, f_low, # check integrity of new subphrase # <<<<<<<<<<<<<< @@ -59157,7 +59157,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_14 = __Pyx_PyInt_From_int(__pyx_v_f_low); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1707; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1711 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1711 * -1, -1, e_gap_low, e_gap_high, f_gap_low, f_gap_high, * f_sent_len, e_sent_len, * self.train_max_initial_size, self.train_max_initial_size, # <<<<<<<<<<<<<< @@ -59179,7 +59179,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } if (__pyx_t_8) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1713 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1713 * self.train_max_initial_size, self.train_max_initial_size, * 0, 0, 0, 0, 0, 0, 0)): * fphr_arr._clear() # <<<<<<<<<<<<<< @@ -59188,7 +59188,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_clear(__pyx_v_fphr_arr); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1714 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1714 * 0, 0, 0, 0, 0, 0, 0)): * fphr_arr._clear() * i = 1 # <<<<<<<<<<<<<< @@ -59197,7 +59197,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_i = 1; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1715 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1715 * fphr_arr._clear() * i = 1 * self.findexes.reset() # <<<<<<<<<<<<<< @@ -59211,7 +59211,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1716 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1716 * i = 1 * self.findexes.reset() * self.findexes.append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<< @@ -59223,7 +59223,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_7 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_self->findexes), __pyx_t_15); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1716; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1717 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1717 * self.findexes.reset() * self.findexes.append(sym_setindex(self.category, i)) * fphr_arr._append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<< @@ -59232,7 +59232,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_append(__pyx_v_fphr_arr, __pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i)); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1718 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1718 * self.findexes.append(sym_setindex(self.category, i)) * fphr_arr._append(sym_setindex(self.category, i)) * i = i+1 # <<<<<<<<<<<<<< @@ -59241,7 +59241,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_i = (__pyx_v_i + 1); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1719 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1719 * fphr_arr._append(sym_setindex(self.category, i)) * i = i+1 * self.findexes.extend(self.findexes1) # <<<<<<<<<<<<<< @@ -59261,7 +59261,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1720 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1720 * i = i+1 * self.findexes.extend(self.findexes1) * for j from 0 <= j < phrase.n: # <<<<<<<<<<<<<< @@ -59271,7 +59271,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_2 = __pyx_v_phrase->n; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_2; __pyx_v_j++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1721 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1721 * self.findexes.extend(self.findexes1) * for j from 0 <= j < phrase.n: * if sym_isvar(phrase.syms[j]): # <<<<<<<<<<<<<< @@ -59281,7 +59281,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_8 = (__pyx_f_4cdec_2sa_3_sa_sym_isvar((__pyx_v_phrase->syms[__pyx_v_j])) != 0); if (__pyx_t_8) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1722 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1722 * for j from 0 <= j < phrase.n: * if sym_isvar(phrase.syms[j]): * fphr_arr._append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<< @@ -59290,7 +59290,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_append(__pyx_v_fphr_arr, __pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i)); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1723 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1723 * if sym_isvar(phrase.syms[j]): * fphr_arr._append(sym_setindex(self.category, i)) * i = i + 1 # <<<<<<<<<<<<<< @@ -59302,7 +59302,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1725 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1725 * i = i + 1 * else: * fphr_arr._append(phrase.syms[j]) # <<<<<<<<<<<<<< @@ -59314,7 +59314,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_L72:; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1726 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1726 * else: * fphr_arr._append(phrase.syms[j]) * if f_back_high > f_high: # <<<<<<<<<<<<<< @@ -59324,7 +59324,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_8 = ((__pyx_v_f_back_high > __pyx_v_f_high) != 0); if (__pyx_t_8) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1727 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1727 * fphr_arr._append(phrase.syms[j]) * if f_back_high > f_high: * fphr_arr._append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<< @@ -59333,7 +59333,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_append(__pyx_v_fphr_arr, __pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i)); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1728 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1728 * if f_back_high > f_high: * fphr_arr._append(sym_setindex(self.category, i)) * self.findexes.append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<< @@ -59348,7 +59348,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } __pyx_L73:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1729 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1729 * fphr_arr._append(sym_setindex(self.category, i)) * self.findexes.append(sym_setindex(self.category, i)) * fphr = Phrase(fphr_arr) # <<<<<<<<<<<<<< @@ -59366,7 +59366,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_DECREF_SET(__pyx_v_fphr, ((struct __pyx_obj_4cdec_2sa_3_sa_Phrase *)__pyx_t_14)); __pyx_t_14 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1730 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1730 * self.findexes.append(sym_setindex(self.category, i)) * fphr = Phrase(fphr_arr) * phrase_list = self.extract_phrases(e_x_low, e_x_high, e_gap_low, e_gap_high, e_links_low, num_gaps+1, # <<<<<<<<<<<<<< @@ -59378,7 +59378,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_XDECREF_SET(__pyx_v_phrase_list, __pyx_t_14); __pyx_t_14 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1733 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1733 * f_x_low, f_x_high, f_gap_low, f_gap_high, f_links_low, matching.sent_id, * e_sent_len, e_sent_start) * if len(phrase_list) > 0: # <<<<<<<<<<<<<< @@ -59389,7 +59389,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_8 = ((__pyx_t_13 > 0) != 0); if (__pyx_t_8) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1734 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1734 * e_sent_len, e_sent_start) * if len(phrase_list) > 0: * pair_count = 1.0 / len(phrase_list) # <<<<<<<<<<<<<< @@ -59412,7 +59412,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1736 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1736 * pair_count = 1.0 / len(phrase_list) * else: * pair_count = 0 # <<<<<<<<<<<<<< @@ -59423,7 +59423,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } __pyx_L74:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1737 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1737 * else: * pair_count = 0 * for phrase2, eindexes in phrase_list: # <<<<<<<<<<<<<< @@ -59520,7 +59520,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_XDECREF_SET(__pyx_v_eindexes, __pyx_t_11); __pyx_t_11 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1738 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1738 * pair_count = 0 * for phrase2, eindexes in phrase_list: * als2 = self.create_alignments(sent_links,num_links,self.findexes,eindexes) # <<<<<<<<<<<<<< @@ -59536,7 +59536,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_XDECREF_SET(__pyx_v_als2, ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_11)); __pyx_t_11 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1739 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1739 * for phrase2, eindexes in phrase_list: * als2 = self.create_alignments(sent_links,num_links,self.findexes,eindexes) * extracts.append((fphr, phrase2, pair_count, tuple(als2))) # <<<<<<<<<<<<<< @@ -59578,7 +59578,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } __pyx_L64:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1741 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1741 * extracts.append((fphr, phrase2, pair_count, tuple(als2))) * * if (f_back_high == f_high and # <<<<<<<<<<<<<< @@ -59588,7 +59588,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_8 = ((__pyx_v_f_back_high == __pyx_v_f_high) != 0); if (__pyx_t_8) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1742 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1742 * * if (f_back_high == f_high and * f_sent_len - f_high >= self.train_min_gap_size and # <<<<<<<<<<<<<< @@ -59598,7 +59598,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_9 = (((__pyx_v_f_sent_len - __pyx_v_f_high) >= __pyx_v_self->train_min_gap_size) != 0); if (__pyx_t_9) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1743 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1743 * if (f_back_high == f_high and * f_sent_len - f_high >= self.train_min_gap_size and * ((not self.tight_phrases) or (f_links_low[f_high] != -1 and f_links_low[f_back_low] != -1))): # <<<<<<<<<<<<<< @@ -59628,7 +59628,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } if (__pyx_t_9) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1744 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1744 * f_sent_len - f_high >= self.train_min_gap_size and * ((not self.tight_phrases) or (f_links_low[f_high] != -1 and f_links_low[f_back_low] != -1))): * f_x_high = f_high+self.train_min_gap_size # <<<<<<<<<<<<<< @@ -59637,7 +59637,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_f_x_high = (__pyx_v_f_high + __pyx_v_self->train_min_gap_size); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1745 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1745 * ((not self.tight_phrases) or (f_links_low[f_high] != -1 and f_links_low[f_back_low] != -1))): * f_x_high = f_high+self.train_min_gap_size * met_constraints = 1 # <<<<<<<<<<<<<< @@ -59646,7 +59646,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_met_constraints = 1; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1746 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1746 * f_x_high = f_high+self.train_min_gap_size * met_constraints = 1 * if self.tight_phrases: # <<<<<<<<<<<<<< @@ -59656,7 +59656,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_9 = (__pyx_v_self->tight_phrases != 0); if (__pyx_t_9) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1747 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1747 * met_constraints = 1 * if self.tight_phrases: * while f_x_high <= f_sent_len and f_links_low[f_x_high-1] == -1: # <<<<<<<<<<<<<< @@ -59673,7 +59673,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } if (!__pyx_t_18) break; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1748 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1748 * if self.tight_phrases: * while f_x_high <= f_sent_len and f_links_low[f_x_high-1] == -1: * f_x_high = f_x_high + 1 # <<<<<<<<<<<<<< @@ -59686,7 +59686,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } __pyx_L80:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1749 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1749 * while f_x_high <= f_sent_len and f_links_low[f_x_high-1] == -1: * f_x_high = f_x_high + 1 * if f_x_high > f_sent_len or f_x_high - f_back_low > self.train_max_initial_size: # <<<<<<<<<<<<<< @@ -59702,7 +59702,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } if (__pyx_t_8) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1750 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1750 * f_x_high = f_x_high + 1 * if f_x_high > f_sent_len or f_x_high - f_back_low > self.train_max_initial_size: * met_constraints = 0 # <<<<<<<<<<<<<< @@ -59714,7 +59714,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } __pyx_L83:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1752 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1752 * met_constraints = 0 * * if (met_constraints and # <<<<<<<<<<<<<< @@ -59723,7 +59723,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ if ((__pyx_v_met_constraints != 0)) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1753 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1753 * * if (met_constraints and * self.find_fixpoint(f_back_low, f_x_high, # <<<<<<<<<<<<<< @@ -59733,7 +59733,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_14 = __Pyx_PyInt_From_int(__pyx_v_f_x_high); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1753; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1757 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1757 * e_low, e_high, &e_x_low, &e_x_high, &f_x_low, &f_x_high, * f_sent_len, e_sent_len, * self.train_max_initial_size, self.train_max_initial_size, # <<<<<<<<<<<<<< @@ -59743,7 +59743,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct if ((((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->find_fixpoint(__pyx_v_self, __pyx_v_f_back_low, __pyx_t_14, __pyx_v_f_links_low, __pyx_v_f_links_high, __pyx_v_e_links_low, __pyx_v_e_links_high, __pyx_v_e_low, __pyx_v_e_high, (&__pyx_v_e_x_low), (&__pyx_v_e_x_high), (&__pyx_v_f_x_low), (&__pyx_v_f_x_high), __pyx_v_f_sent_len, __pyx_v_e_sent_len, __pyx_v_self->train_max_initial_size, __pyx_v_self->train_max_initial_size, 1, 1, 1, 0, 1, 1, 0) != 0)) { __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1759 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1759 * self.train_max_initial_size, self.train_max_initial_size, * 1, 1, 1, 0, 1, 1, 0) and * ((not self.tight_phrases) or f_links_low[f_x_high-1] != -1) and # <<<<<<<<<<<<<< @@ -59759,7 +59759,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } if (__pyx_t_9) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1760 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1760 * 1, 1, 1, 0, 1, 1, 0) and * ((not self.tight_phrases) or f_links_low[f_x_high-1] != -1) and * self.find_fixpoint(f_high, f_x_high, # <<<<<<<<<<<<<< @@ -59769,7 +59769,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_f_x_high); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1760; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1765 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1765 * f_gap_low+gap_start+num_gaps, f_gap_high+gap_start+num_gaps, * f_sent_len, e_sent_len, * self.train_max_initial_size, self.train_max_initial_size, # <<<<<<<<<<<<<< @@ -59792,7 +59792,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } if (__pyx_t_8) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1767 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1767 * self.train_max_initial_size, self.train_max_initial_size, * 0, 0, 0, 0, 0, 0, 0)): * fphr_arr._clear() # <<<<<<<<<<<<<< @@ -59801,7 +59801,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_clear(__pyx_v_fphr_arr); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1768 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1768 * 0, 0, 0, 0, 0, 0, 0)): * fphr_arr._clear() * i = 1 # <<<<<<<<<<<<<< @@ -59810,7 +59810,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_i = 1; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1769 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1769 * fphr_arr._clear() * i = 1 * self.findexes.reset() # <<<<<<<<<<<<<< @@ -59824,7 +59824,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1770 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1770 * i = 1 * self.findexes.reset() * if f_back_low < f_low: # <<<<<<<<<<<<<< @@ -59834,7 +59834,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_8 = ((__pyx_v_f_back_low < __pyx_v_f_low) != 0); if (__pyx_t_8) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1771 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1771 * self.findexes.reset() * if f_back_low < f_low: * fphr_arr._append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<< @@ -59843,7 +59843,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_append(__pyx_v_fphr_arr, __pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i)); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1772 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1772 * if f_back_low < f_low: * fphr_arr._append(sym_setindex(self.category, i)) * i = i+1 # <<<<<<<<<<<<<< @@ -59852,7 +59852,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_i = (__pyx_v_i + 1); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1773 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1773 * fphr_arr._append(sym_setindex(self.category, i)) * i = i+1 * self.findexes.append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<< @@ -59867,7 +59867,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } __pyx_L85:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1774 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1774 * i = i+1 * self.findexes.append(sym_setindex(self.category, i)) * self.findexes.extend(self.findexes1) # <<<<<<<<<<<<<< @@ -59887,7 +59887,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1775 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1775 * self.findexes.append(sym_setindex(self.category, i)) * self.findexes.extend(self.findexes1) * for j from 0 <= j < phrase.n: # <<<<<<<<<<<<<< @@ -59897,7 +59897,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_2 = __pyx_v_phrase->n; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_2; __pyx_v_j++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1776 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1776 * self.findexes.extend(self.findexes1) * for j from 0 <= j < phrase.n: * if sym_isvar(phrase.syms[j]): # <<<<<<<<<<<<<< @@ -59907,7 +59907,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_8 = (__pyx_f_4cdec_2sa_3_sa_sym_isvar((__pyx_v_phrase->syms[__pyx_v_j])) != 0); if (__pyx_t_8) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1777 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1777 * for j from 0 <= j < phrase.n: * if sym_isvar(phrase.syms[j]): * fphr_arr._append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<< @@ -59916,7 +59916,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_append(__pyx_v_fphr_arr, __pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i)); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1778 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1778 * if sym_isvar(phrase.syms[j]): * fphr_arr._append(sym_setindex(self.category, i)) * i = i + 1 # <<<<<<<<<<<<<< @@ -59928,7 +59928,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1780 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1780 * i = i + 1 * else: * fphr_arr._append(phrase.syms[j]) # <<<<<<<<<<<<<< @@ -59940,7 +59940,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_L88:; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1781 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1781 * else: * fphr_arr._append(phrase.syms[j]) * fphr_arr._append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<< @@ -59949,7 +59949,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_append(__pyx_v_fphr_arr, __pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i)); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1782 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1782 * fphr_arr._append(phrase.syms[j]) * fphr_arr._append(sym_setindex(self.category, i)) * self.findexes.append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<< @@ -59961,7 +59961,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_7 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_self->findexes), __pyx_t_15); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1782; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1783 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1783 * fphr_arr._append(sym_setindex(self.category, i)) * self.findexes.append(sym_setindex(self.category, i)) * fphr = Phrase(fphr_arr) # <<<<<<<<<<<<<< @@ -59979,7 +59979,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_DECREF_SET(__pyx_v_fphr, ((struct __pyx_obj_4cdec_2sa_3_sa_Phrase *)__pyx_t_14)); __pyx_t_14 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1784 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1784 * self.findexes.append(sym_setindex(self.category, i)) * fphr = Phrase(fphr_arr) * phrase_list = self.extract_phrases(e_x_low, e_x_high, e_gap_low+gap_start, e_gap_high+gap_start, e_links_low, num_gaps+1, # <<<<<<<<<<<<<< @@ -59991,7 +59991,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_XDECREF_SET(__pyx_v_phrase_list, __pyx_t_14); __pyx_t_14 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1787 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1787 * f_x_low, f_x_high, f_gap_low+gap_start, f_gap_high+gap_start, f_links_low, * matching.sent_id, e_sent_len, e_sent_start) * if len(phrase_list) > 0: # <<<<<<<<<<<<<< @@ -60002,7 +60002,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_8 = ((__pyx_t_13 > 0) != 0); if (__pyx_t_8) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1788 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1788 * matching.sent_id, e_sent_len, e_sent_start) * if len(phrase_list) > 0: * pair_count = 1.0 / len(phrase_list) # <<<<<<<<<<<<<< @@ -60025,7 +60025,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1790 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1790 * pair_count = 1.0 / len(phrase_list) * else: * pair_count = 0 # <<<<<<<<<<<<<< @@ -60036,7 +60036,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } __pyx_L89:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1791 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1791 * else: * pair_count = 0 * for phrase2, eindexes in phrase_list: # <<<<<<<<<<<<<< @@ -60133,7 +60133,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_XDECREF_SET(__pyx_v_eindexes, __pyx_t_11); __pyx_t_11 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1792 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1792 * pair_count = 0 * for phrase2, eindexes in phrase_list: * als3 = self.create_alignments(sent_links,num_links,self.findexes,eindexes) # <<<<<<<<<<<<<< @@ -60149,7 +60149,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_XDECREF_SET(__pyx_v_als3, ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_11)); __pyx_t_11 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1793 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1793 * for phrase2, eindexes in phrase_list: * als3 = self.create_alignments(sent_links,num_links,self.findexes,eindexes) * extracts.append((fphr, phrase2, pair_count, tuple(als3))) # <<<<<<<<<<<<<< @@ -60191,7 +60191,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } __pyx_L79:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1794 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1794 * als3 = self.create_alignments(sent_links,num_links,self.findexes,eindexes) * extracts.append((fphr, phrase2, pair_count, tuple(als3))) * if (num_gaps < self.max_nonterminals - 1 and # <<<<<<<<<<<<<< @@ -60201,7 +60201,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_8 = ((__pyx_v_num_gaps < (__pyx_v_self->max_nonterminals - 1)) != 0); if (__pyx_t_8) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1795 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1795 * extracts.append((fphr, phrase2, pair_count, tuple(als3))) * if (num_gaps < self.max_nonterminals - 1 and * phrase_len+1 < self.max_length and # <<<<<<<<<<<<<< @@ -60211,7 +60211,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_9 = (((__pyx_v_phrase_len + 1) < __pyx_v_self->max_length) != 0); if (__pyx_t_9) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1796 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1796 * if (num_gaps < self.max_nonterminals - 1 and * phrase_len+1 < self.max_length and * f_back_high == f_high and # <<<<<<<<<<<<<< @@ -60221,7 +60221,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_18 = ((__pyx_v_f_back_high == __pyx_v_f_high) != 0); if (__pyx_t_18) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1797 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1797 * phrase_len+1 < self.max_length and * f_back_high == f_high and * f_back_low == f_low and # <<<<<<<<<<<<<< @@ -60231,7 +60231,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_10 = ((__pyx_v_f_back_low == __pyx_v_f_low) != 0); if (__pyx_t_10) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1798 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1798 * f_back_high == f_high and * f_back_low == f_low and * f_back_high - f_back_low + (2*self.train_min_gap_size) <= self.train_max_initial_size and # <<<<<<<<<<<<<< @@ -60241,7 +60241,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_19 = ((((__pyx_v_f_back_high - __pyx_v_f_back_low) + (2 * __pyx_v_self->train_min_gap_size)) <= __pyx_v_self->train_max_initial_size) != 0); if (__pyx_t_19) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1799 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1799 * f_back_low == f_low and * f_back_high - f_back_low + (2*self.train_min_gap_size) <= self.train_max_initial_size and * f_low >= self.train_min_gap_size and # <<<<<<<<<<<<<< @@ -60251,7 +60251,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_20 = ((__pyx_v_f_low >= __pyx_v_self->train_min_gap_size) != 0); if (__pyx_t_20) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1800 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1800 * f_back_high - f_back_low + (2*self.train_min_gap_size) <= self.train_max_initial_size and * f_low >= self.train_min_gap_size and * f_high <= f_sent_len - self.train_min_gap_size and # <<<<<<<<<<<<<< @@ -60261,7 +60261,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_21 = ((__pyx_v_f_high <= (__pyx_v_f_sent_len - __pyx_v_self->train_min_gap_size)) != 0); if (__pyx_t_21) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1801 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1801 * f_low >= self.train_min_gap_size and * f_high <= f_sent_len - self.train_min_gap_size and * ((not self.tight_phrases) or (f_links_low[f_low-1] != -1 and f_links_low[f_high] != -1))): # <<<<<<<<<<<<<< @@ -60311,7 +60311,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } if (__pyx_t_9) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1803 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1803 * ((not self.tight_phrases) or (f_links_low[f_low-1] != -1 and f_links_low[f_high] != -1))): * * met_constraints = 1 # <<<<<<<<<<<<<< @@ -60320,7 +60320,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_met_constraints = 1; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1804 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1804 * * met_constraints = 1 * f_x_low = f_low-self.train_min_gap_size # <<<<<<<<<<<<<< @@ -60329,7 +60329,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_f_x_low = (__pyx_v_f_low - __pyx_v_self->train_min_gap_size); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1805 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1805 * met_constraints = 1 * f_x_low = f_low-self.train_min_gap_size * if self.tight_phrases: # <<<<<<<<<<<<<< @@ -60339,7 +60339,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_9 = (__pyx_v_self->tight_phrases != 0); if (__pyx_t_9) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1806 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1806 * f_x_low = f_low-self.train_min_gap_size * if self.tight_phrases: * while f_x_low >= 0 and f_links_low[f_x_low] == -1: # <<<<<<<<<<<<<< @@ -60356,7 +60356,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } if (!__pyx_t_18) break; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1807 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1807 * if self.tight_phrases: * while f_x_low >= 0 and f_links_low[f_x_low] == -1: * f_x_low = f_x_low - 1 # <<<<<<<<<<<<<< @@ -60369,7 +60369,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } __pyx_L95:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1808 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1808 * while f_x_low >= 0 and f_links_low[f_x_low] == -1: * f_x_low = f_x_low - 1 * if f_x_low < 0: # <<<<<<<<<<<<<< @@ -60379,7 +60379,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_18 = ((__pyx_v_f_x_low < 0) != 0); if (__pyx_t_18) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1809 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1809 * f_x_low = f_x_low - 1 * if f_x_low < 0: * met_constraints = 0 # <<<<<<<<<<<<<< @@ -60391,7 +60391,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } __pyx_L98:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1811 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1811 * met_constraints = 0 * * f_x_high = f_high+self.train_min_gap_size # <<<<<<<<<<<<<< @@ -60400,7 +60400,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_f_x_high = (__pyx_v_f_high + __pyx_v_self->train_min_gap_size); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1812 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1812 * * f_x_high = f_high+self.train_min_gap_size * if self.tight_phrases: # <<<<<<<<<<<<<< @@ -60410,7 +60410,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_18 = (__pyx_v_self->tight_phrases != 0); if (__pyx_t_18) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1813 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1813 * f_x_high = f_high+self.train_min_gap_size * if self.tight_phrases: * while f_x_high <= f_sent_len and f_links_low[f_x_high-1] == -1: # <<<<<<<<<<<<<< @@ -60427,7 +60427,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } if (!__pyx_t_8) break; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1814 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1814 * if self.tight_phrases: * while f_x_high <= f_sent_len and f_links_low[f_x_high-1] == -1: * f_x_high = f_x_high + 1 # <<<<<<<<<<<<<< @@ -60440,7 +60440,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } __pyx_L99:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1815 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1815 * while f_x_high <= f_sent_len and f_links_low[f_x_high-1] == -1: * f_x_high = f_x_high + 1 * if f_x_high > f_sent_len or f_x_high - f_x_low > self.train_max_initial_size: # <<<<<<<<<<<<<< @@ -60456,7 +60456,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } if (__pyx_t_9) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1816 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1816 * f_x_high = f_x_high + 1 * if f_x_high > f_sent_len or f_x_high - f_x_low > self.train_max_initial_size: * met_constraints = 0 # <<<<<<<<<<<<<< @@ -60468,7 +60468,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } __pyx_L102:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1818 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1818 * met_constraints = 0 * * if (met_constraints and # <<<<<<<<<<<<<< @@ -60477,7 +60477,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ if ((__pyx_v_met_constraints != 0)) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1819 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1819 * * if (met_constraints and * (self.find_fixpoint(f_x_low, f_x_high, # <<<<<<<<<<<<<< @@ -60487,7 +60487,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_14 = __Pyx_PyInt_From_int(__pyx_v_f_x_high); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1819; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1824 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1824 * f_sent_len, e_sent_len, * self.train_max_initial_size, self.train_max_initial_size, * 1, 1, 2, 1, 1, 1, 1) == 1) and # <<<<<<<<<<<<<< @@ -60498,7 +60498,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (__pyx_t_9) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1825 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1825 * self.train_max_initial_size, self.train_max_initial_size, * 1, 1, 2, 1, 1, 1, 1) == 1) and * ((not self.tight_phrases) or (f_links_low[f_x_low] != -1 and f_links_low[f_x_high-1] != -1)) and # <<<<<<<<<<<<<< @@ -60520,7 +60520,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } if (__pyx_t_18) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1826 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1826 * 1, 1, 2, 1, 1, 1, 1) == 1) and * ((not self.tight_phrases) or (f_links_low[f_x_low] != -1 and f_links_low[f_x_high-1] != -1)) and * self.find_fixpoint(f_x_low, f_low, # <<<<<<<<<<<<<< @@ -60530,7 +60530,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_14 = __Pyx_PyInt_From_int(__pyx_v_f_low); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1826; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1830 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1830 * -1, -1, e_gap_low, e_gap_high, f_gap_low, f_gap_high, * f_sent_len, e_sent_len, * self.train_max_initial_size, self.train_max_initial_size, # <<<<<<<<<<<<<< @@ -60541,7 +60541,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (__pyx_t_8) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1832 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1832 * self.train_max_initial_size, self.train_max_initial_size, * 0, 0, 0, 0, 0, 0, 0) and * self.find_fixpoint(f_high, f_x_high, # <<<<<<<<<<<<<< @@ -60551,7 +60551,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_14 = __Pyx_PyInt_From_int(__pyx_v_f_x_high); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1837 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1837 * f_gap_low+1+num_gaps, f_gap_high+1+num_gaps, * f_sent_len, e_sent_len, * self.train_max_initial_size, self.train_max_initial_size, # <<<<<<<<<<<<<< @@ -60578,7 +60578,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } if (__pyx_t_9) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1839 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1839 * self.train_max_initial_size, self.train_max_initial_size, * 0, 0, 0, 0, 0, 0, 0)): * fphr_arr._clear() # <<<<<<<<<<<<<< @@ -60587,7 +60587,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_clear(__pyx_v_fphr_arr); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1840 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1840 * 0, 0, 0, 0, 0, 0, 0)): * fphr_arr._clear() * i = 1 # <<<<<<<<<<<<<< @@ -60596,7 +60596,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_i = 1; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1841 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1841 * fphr_arr._clear() * i = 1 * self.findexes.reset() # <<<<<<<<<<<<<< @@ -60610,7 +60610,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1842 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1842 * i = 1 * self.findexes.reset() * self.findexes.append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<< @@ -60622,7 +60622,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_7 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_self->findexes), __pyx_t_15); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1843 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1843 * self.findexes.reset() * self.findexes.append(sym_setindex(self.category, i)) * fphr_arr._append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<< @@ -60631,7 +60631,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_append(__pyx_v_fphr_arr, __pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i)); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1844 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1844 * self.findexes.append(sym_setindex(self.category, i)) * fphr_arr._append(sym_setindex(self.category, i)) * i = i+1 # <<<<<<<<<<<<<< @@ -60640,7 +60640,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_i = (__pyx_v_i + 1); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1845 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1845 * fphr_arr._append(sym_setindex(self.category, i)) * i = i+1 * self.findexes.extend(self.findexes1) # <<<<<<<<<<<<<< @@ -60660,7 +60660,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1846 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1846 * i = i+1 * self.findexes.extend(self.findexes1) * for j from 0 <= j < phrase.n: # <<<<<<<<<<<<<< @@ -60670,7 +60670,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_2 = __pyx_v_phrase->n; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_2; __pyx_v_j++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1847 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1847 * self.findexes.extend(self.findexes1) * for j from 0 <= j < phrase.n: * if sym_isvar(phrase.syms[j]): # <<<<<<<<<<<<<< @@ -60680,7 +60680,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_9 = (__pyx_f_4cdec_2sa_3_sa_sym_isvar((__pyx_v_phrase->syms[__pyx_v_j])) != 0); if (__pyx_t_9) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1848 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1848 * for j from 0 <= j < phrase.n: * if sym_isvar(phrase.syms[j]): * fphr_arr._append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<< @@ -60689,7 +60689,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_append(__pyx_v_fphr_arr, __pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i)); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1849 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1849 * if sym_isvar(phrase.syms[j]): * fphr_arr._append(sym_setindex(self.category, i)) * i = i + 1 # <<<<<<<<<<<<<< @@ -60701,7 +60701,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1851 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1851 * i = i + 1 * else: * fphr_arr._append(phrase.syms[j]) # <<<<<<<<<<<<<< @@ -60713,7 +60713,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_L106:; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1852 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1852 * else: * fphr_arr._append(phrase.syms[j]) * fphr_arr._append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<< @@ -60722,7 +60722,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_append(__pyx_v_fphr_arr, __pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i)); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1853 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1853 * fphr_arr._append(phrase.syms[j]) * fphr_arr._append(sym_setindex(self.category, i)) * self.findexes.append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<< @@ -60734,7 +60734,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_7 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_self->findexes), __pyx_t_3); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1854 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1854 * fphr_arr._append(sym_setindex(self.category, i)) * self.findexes.append(sym_setindex(self.category, i)) * fphr = Phrase(fphr_arr) # <<<<<<<<<<<<<< @@ -60752,7 +60752,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_DECREF_SET(__pyx_v_fphr, ((struct __pyx_obj_4cdec_2sa_3_sa_Phrase *)__pyx_t_14)); __pyx_t_14 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1855 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1855 * self.findexes.append(sym_setindex(self.category, i)) * fphr = Phrase(fphr_arr) * phrase_list = self.extract_phrases(e_x_low, e_x_high, e_gap_low, e_gap_high, e_links_low, num_gaps+2, # <<<<<<<<<<<<<< @@ -60764,7 +60764,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_XDECREF_SET(__pyx_v_phrase_list, __pyx_t_14); __pyx_t_14 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1858 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1858 * f_x_low, f_x_high, f_gap_low, f_gap_high, f_links_low, * matching.sent_id, e_sent_len, e_sent_start) * if len(phrase_list) > 0: # <<<<<<<<<<<<<< @@ -60775,7 +60775,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_9 = ((__pyx_t_13 > 0) != 0); if (__pyx_t_9) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1859 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1859 * matching.sent_id, e_sent_len, e_sent_start) * if len(phrase_list) > 0: * pair_count = 1.0 / len(phrase_list) # <<<<<<<<<<<<<< @@ -60798,7 +60798,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1861 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1861 * pair_count = 1.0 / len(phrase_list) * else: * pair_count = 0 # <<<<<<<<<<<<<< @@ -60809,7 +60809,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } __pyx_L107:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1862 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1862 * else: * pair_count = 0 * for phrase2, eindexes in phrase_list: # <<<<<<<<<<<<<< @@ -60906,7 +60906,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_XDECREF_SET(__pyx_v_eindexes, __pyx_t_11); __pyx_t_11 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1863 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1863 * pair_count = 0 * for phrase2, eindexes in phrase_list: * als4 = self.create_alignments(sent_links,num_links,self.findexes,eindexes) # <<<<<<<<<<<<<< @@ -60922,7 +60922,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_XDECREF_SET(__pyx_v_als4, ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_11)); __pyx_t_11 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1864 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1864 * for phrase2, eindexes in phrase_list: * als4 = self.create_alignments(sent_links,num_links,self.findexes,eindexes) * extracts.append((fphr, phrase2, pair_count, tuple(als4))) # <<<<<<<<<<<<<< @@ -60973,7 +60973,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1866 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1866 * extracts.append((fphr, phrase2, pair_count, tuple(als4))) * else: * reason_for_failure = "Unable to extract basic phrase" # <<<<<<<<<<<<<< @@ -60988,7 +60988,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } __pyx_L33:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1868 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1868 * reason_for_failure = "Unable to extract basic phrase" * * free(sent_links) # <<<<<<<<<<<<<< @@ -60997,7 +60997,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ free(__pyx_v_sent_links); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1869 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1869 * * free(sent_links) * free(f_links_low) # <<<<<<<<<<<<<< @@ -61006,7 +61006,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ free(__pyx_v_f_links_low); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1870 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1870 * free(sent_links) * free(f_links_low) * free(f_links_high) # <<<<<<<<<<<<<< @@ -61015,7 +61015,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ free(__pyx_v_f_links_high); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1871 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1871 * free(f_links_low) * free(f_links_high) * free(e_links_low) # <<<<<<<<<<<<<< @@ -61024,7 +61024,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ free(__pyx_v_e_links_low); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1872 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1872 * free(f_links_high) * free(e_links_low) * free(e_links_high) # <<<<<<<<<<<<<< @@ -61033,7 +61033,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ free(__pyx_v_e_links_high); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1873 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1873 * free(e_links_low) * free(e_links_high) * free(f_gap_low) # <<<<<<<<<<<<<< @@ -61042,7 +61042,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ free(__pyx_v_f_gap_low); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1874 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1874 * free(e_links_high) * free(f_gap_low) * free(f_gap_high) # <<<<<<<<<<<<<< @@ -61051,7 +61051,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ free(__pyx_v_f_gap_high); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1875 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1875 * free(f_gap_low) * free(f_gap_high) * free(e_gap_low) # <<<<<<<<<<<<<< @@ -61060,7 +61060,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ free(__pyx_v_e_gap_low); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1876 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1876 * free(f_gap_high) * free(e_gap_low) * free(e_gap_high) # <<<<<<<<<<<<<< @@ -61069,7 +61069,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ free(__pyx_v_e_gap_high); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1878 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1878 * free(e_gap_high) * * return extracts # <<<<<<<<<<<<<< @@ -61081,7 +61081,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_r = __pyx_v_extracts; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1481 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1481 * return ret * * cdef extract(self, Phrase phrase, Matching* matching, int* chunklen, int num_chunks): # <<<<<<<<<<<<<< @@ -61118,7 +61118,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1886 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1886 * # Aggregate stats from a training instance * # (Extract rules, update counts) * def add_instance(self, f_words, e_words, alignment, ctx_name=None): # <<<<<<<<<<<<<< @@ -61208,7 +61208,7 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_26add_instanc return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1920 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1920 * # f_ i and j are current, e_ i and j are previous * # We care _considering_ f_j, so it is not yet in counts * def extract(f_i, f_j, e_i, e_j, min_bound, wc, links, nt, nt_open): # <<<<<<<<<<<<<< @@ -61378,7 +61378,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __pyx_outer_scope = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_21_add_instance *) __Pyx_CyFunction_GetClosure(__pyx_self); __pyx_cur_scope = __pyx_outer_scope; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1922 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1922 * def extract(f_i, f_j, e_i, e_j, min_bound, wc, links, nt, nt_open): * # Phrase extraction limits * if f_j > (f_len - 1) or (f_j - f_i) + 1 > self.max_initial_size: # <<<<<<<<<<<<<< @@ -61412,7 +61412,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc } if (__pyx_t_6) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1923 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1923 * # Phrase extraction limits * if f_j > (f_len - 1) or (f_j - f_i) + 1 > self.max_initial_size: * return # <<<<<<<<<<<<<< @@ -61424,7 +61424,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1925 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1925 * return * # Unaligned word * if not al[f_j]: # <<<<<<<<<<<<<< @@ -61439,7 +61439,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __pyx_t_3 = ((!__pyx_t_6) != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1927 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1927 * if not al[f_j]: * # Adjacent to non-terminal: extend (non-terminal now open) * if nt and nt[-1][2] == f_j - 1: # <<<<<<<<<<<<<< @@ -61466,7 +61466,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc } if (__pyx_t_5) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1928 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1928 * # Adjacent to non-terminal: extend (non-terminal now open) * if nt and nt[-1][2] == f_j - 1: * nt[-1][2] += 1 # <<<<<<<<<<<<<< @@ -61485,7 +61485,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1929 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1929 * if nt and nt[-1][2] == f_j - 1: * nt[-1][2] += 1 * extract(f_i, f_j + 1, e_i, e_j, min_bound, wc, links, nt, True) # <<<<<<<<<<<<<< @@ -61500,7 +61500,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1930 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1930 * nt[-1][2] += 1 * extract(f_i, f_j + 1, e_i, e_j, min_bound, wc, links, nt, True) * nt[-1][2] -= 1 # <<<<<<<<<<<<<< @@ -61522,7 +61522,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc } __pyx_L5:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1933 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1933 * # Unless non-terminal already open, always extend with word * # Make sure adding a word doesn't exceed length * if not nt_open and wc < self.max_length: # <<<<<<<<<<<<<< @@ -61545,7 +61545,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc } if (__pyx_t_6) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1934 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1934 * # Make sure adding a word doesn't exceed length * if not nt_open and wc < self.max_length: * extract(f_i, f_j + 1, e_i, e_j, min_bound, wc + 1, links, nt, False) # <<<<<<<<<<<<<< @@ -61566,7 +61566,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc } __pyx_L6:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1935 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1935 * if not nt_open and wc < self.max_length: * extract(f_i, f_j + 1, e_i, e_j, min_bound, wc + 1, links, nt, False) * return # <<<<<<<<<<<<<< @@ -61578,7 +61578,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1937 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1937 * return * # Aligned word * link_i = fe_span[f_j][0] # <<<<<<<<<<<<<< @@ -61598,7 +61598,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __pyx_v_link_i = __pyx_t_2; __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1938 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1938 * # Aligned word * link_i = fe_span[f_j][0] * link_j = fe_span[f_j][1] # <<<<<<<<<<<<<< @@ -61618,7 +61618,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __pyx_v_link_j = __pyx_t_1; __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1939 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1939 * link_i = fe_span[f_j][0] * link_j = fe_span[f_j][1] * new_e_i = min(link_i, e_i) # <<<<<<<<<<<<<< @@ -61647,7 +61647,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __pyx_v_new_e_i = __pyx_t_1; __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1940 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1940 * link_j = fe_span[f_j][1] * new_e_i = min(link_i, e_i) * new_e_j = max(link_j, e_j) # <<<<<<<<<<<<<< @@ -61676,7 +61676,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __pyx_v_new_e_j = __pyx_t_1; __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1943 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1943 * # Check reverse links of newly covered words to see if they violate left * # bound (return) or extend minimum right bound for chunk * new_min_bound = min_bound # <<<<<<<<<<<<<< @@ -61686,7 +61686,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __Pyx_INCREF(__pyx_v_min_bound); __pyx_v_new_min_bound = __pyx_v_min_bound; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1945 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1945 * new_min_bound = min_bound * # First aligned word creates span * if e_j == -1: # <<<<<<<<<<<<<< @@ -61698,7 +61698,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_6) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1946 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1946 * # First aligned word creates span * if e_j == -1: * for i from new_e_i <= i <= new_e_j: # <<<<<<<<<<<<<< @@ -61713,7 +61713,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1947 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1947 * if e_j == -1: * for i from new_e_i <= i <= new_e_j: * if ef_span[i][0] < f_i: # <<<<<<<<<<<<<< @@ -61736,7 +61736,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_6) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1948 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1948 * for i from new_e_i <= i <= new_e_j: * if ef_span[i][0] < f_i: * return # <<<<<<<<<<<<<< @@ -61748,7 +61748,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1949 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1949 * if ef_span[i][0] < f_i: * return * new_min_bound = max(new_min_bound, ef_span[i][1]) # <<<<<<<<<<<<<< @@ -61787,7 +61787,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_v_i); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1946 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1946 * # First aligned word creates span * if e_j == -1: * for i from new_e_i <= i <= new_e_j: # <<<<<<<<<<<<<< @@ -61802,7 +61802,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1952 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1952 * # Other aligned words extend span * else: * for i from new_e_i <= i < e_i: # <<<<<<<<<<<<<< @@ -61817,7 +61817,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1953 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1953 * else: * for i from new_e_i <= i < e_i: * if ef_span[i][0] < f_i: # <<<<<<<<<<<<<< @@ -61840,7 +61840,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_6) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1954 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1954 * for i from new_e_i <= i < e_i: * if ef_span[i][0] < f_i: * return # <<<<<<<<<<<<<< @@ -61852,7 +61852,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1955 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1955 * if ef_span[i][0] < f_i: * return * new_min_bound = max(new_min_bound, ef_span[i][1]) # <<<<<<<<<<<<<< @@ -61891,7 +61891,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_i); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1952 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1952 * # Other aligned words extend span * else: * for i from new_e_i <= i < e_i: # <<<<<<<<<<<<<< @@ -61903,7 +61903,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1956 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1956 * return * new_min_bound = max(new_min_bound, ef_span[i][1]) * for i from e_j < i <= new_e_j: # <<<<<<<<<<<<<< @@ -61918,7 +61918,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1957 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1957 * new_min_bound = max(new_min_bound, ef_span[i][1]) * for i from e_j < i <= new_e_j: * if ef_span[i][0] < f_i: # <<<<<<<<<<<<<< @@ -61941,7 +61941,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1958 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1958 * for i from e_j < i <= new_e_j: * if ef_span[i][0] < f_i: * return # <<<<<<<<<<<<<< @@ -61953,7 +61953,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1959 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1959 * if ef_span[i][0] < f_i: * return * new_min_bound = max(new_min_bound, ef_span[i][1]) # <<<<<<<<<<<<<< @@ -61992,7 +61992,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_v_i); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1956; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1956 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1956 * return * new_min_bound = max(new_min_bound, ef_span[i][1]) * for i from e_j < i <= new_e_j: # <<<<<<<<<<<<<< @@ -62006,7 +62006,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc } __pyx_L7:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1961 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1961 * new_min_bound = max(new_min_bound, ef_span[i][1]) * # Extract, extend with word (unless non-terminal open) * if not nt_open: # <<<<<<<<<<<<<< @@ -62017,7 +62017,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __pyx_t_3 = ((!__pyx_t_6) != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1962 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1962 * # Extract, extend with word (unless non-terminal open) * if not nt_open: * nt_collision = False # <<<<<<<<<<<<<< @@ -62026,7 +62026,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc */ __pyx_v_nt_collision = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1963 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1963 * if not nt_open: * nt_collision = False * for link in al[f_j]: # <<<<<<<<<<<<<< @@ -62075,7 +62075,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __Pyx_XDECREF_SET(__pyx_v_link, __pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1964 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1964 * nt_collision = False * for link in al[f_j]: * if e_nt_cover[link]: # <<<<<<<<<<<<<< @@ -62093,7 +62093,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1965 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1965 * for link in al[f_j]: * if e_nt_cover[link]: * nt_collision = True # <<<<<<<<<<<<<< @@ -62107,7 +62107,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1968 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1968 * # Non-terminal collisions block word extraction and extension, but * # may be okay for continuing non-terminals * if not nt_collision and wc < self.max_length: # <<<<<<<<<<<<<< @@ -62129,7 +62129,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc } if (__pyx_t_5) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1969 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1969 * # may be okay for continuing non-terminals * if not nt_collision and wc < self.max_length: * plus_links = [] # <<<<<<<<<<<<<< @@ -62141,7 +62141,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __pyx_v_plus_links = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1970 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1970 * if not nt_collision and wc < self.max_length: * plus_links = [] * for link in al[f_j]: # <<<<<<<<<<<<<< @@ -62190,7 +62190,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __Pyx_XDECREF_SET(__pyx_v_link, __pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1971 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1971 * plus_links = [] * for link in al[f_j]: * plus_links.append((f_j, link)) # <<<<<<<<<<<<<< @@ -62208,7 +62208,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_plus_links, __pyx_t_1); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1972 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1972 * for link in al[f_j]: * plus_links.append((f_j, link)) * cover[link] += 1 # <<<<<<<<<<<<<< @@ -62244,7 +62244,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1973 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1973 * plus_links.append((f_j, link)) * cover[link] += 1 * links.append(plus_links) # <<<<<<<<<<<<<< @@ -62253,7 +62253,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc */ __pyx_t_13 = __Pyx_PyObject_Append(__pyx_v_links, __pyx_v_plus_links); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1973; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1974 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1974 * cover[link] += 1 * links.append(plus_links) * if links and f_j >= new_min_bound: # <<<<<<<<<<<<<< @@ -62271,7 +62271,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc } if (__pyx_t_6) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1975 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1975 * links.append(plus_links) * if links and f_j >= new_min_bound: * rules.add(self.form_rule(f_i, new_e_i, f_words[f_i:f_j + 1], e_words[new_e_i:new_e_j + 1], nt, links)) # <<<<<<<<<<<<<< @@ -62328,7 +62328,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc } __pyx_L24:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1976 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1976 * if links and f_j >= new_min_bound: * rules.add(self.form_rule(f_i, new_e_i, f_words[f_i:f_j + 1], e_words[new_e_i:new_e_j + 1], nt, links)) * extract(f_i, f_j + 1, new_e_i, new_e_j, new_min_bound, wc + 1, links, nt, False) # <<<<<<<<<<<<<< @@ -62346,7 +62346,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1977 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1977 * rules.add(self.form_rule(f_i, new_e_i, f_words[f_i:f_j + 1], e_words[new_e_i:new_e_j + 1], nt, links)) * extract(f_i, f_j + 1, new_e_i, new_e_j, new_min_bound, wc + 1, links, nt, False) * links.pop() # <<<<<<<<<<<<<< @@ -62357,7 +62357,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1978 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1978 * extract(f_i, f_j + 1, new_e_i, new_e_j, new_min_bound, wc + 1, links, nt, False) * links.pop() * for link in al[f_j]: # <<<<<<<<<<<<<< @@ -62406,7 +62406,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __Pyx_XDECREF_SET(__pyx_v_link, __pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1979 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1979 * links.pop() * for link in al[f_j]: * cover[link] -= 1 # <<<<<<<<<<<<<< @@ -62448,7 +62448,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc } __pyx_L17:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1981 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1981 * cover[link] -= 1 * # Try to add a word to current non-terminal (if any), extract, extend * if nt and nt[-1][2] == f_j - 1: # <<<<<<<<<<<<<< @@ -62475,7 +62475,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc } if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1983 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1983 * if nt and nt[-1][2] == f_j - 1: * # Add to non-terminal, checking for collisions * old_last_nt = nt[-1][:] # <<<<<<<<<<<<<< @@ -62490,7 +62490,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __pyx_v_old_last_nt = __pyx_t_1; __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1984 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1984 * # Add to non-terminal, checking for collisions * old_last_nt = nt[-1][:] * nt[-1][2] = f_j # <<<<<<<<<<<<<< @@ -62502,7 +62502,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc if (unlikely(__Pyx_SetItemInt(__pyx_t_1, 2, __pyx_v_f_j, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1984; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1985 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1985 * old_last_nt = nt[-1][:] * nt[-1][2] = f_j * if link_i < nt[-1][3]: # <<<<<<<<<<<<<< @@ -62520,7 +62520,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1986 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1986 * nt[-1][2] = f_j * if link_i < nt[-1][3]: * if not span_check(cover, link_i, nt[-1][3] - 1): # <<<<<<<<<<<<<< @@ -62558,7 +62558,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __pyx_t_6 = ((!__pyx_t_3) != 0); if (__pyx_t_6) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1987 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1987 * if link_i < nt[-1][3]: * if not span_check(cover, link_i, nt[-1][3] - 1): * nt[-1] = old_last_nt # <<<<<<<<<<<<<< @@ -62567,7 +62567,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc */ if (unlikely(__Pyx_SetItemInt(__pyx_v_nt, -1, __pyx_v_old_last_nt, long, 1, __Pyx_PyInt_From_long, 0, 1, 1) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1987; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1988 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1988 * if not span_check(cover, link_i, nt[-1][3] - 1): * nt[-1] = old_last_nt * return # <<<<<<<<<<<<<< @@ -62579,7 +62579,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1989 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1989 * nt[-1] = old_last_nt * return * span_inc(cover, link_i, nt[-1][3] - 1) # <<<<<<<<<<<<<< @@ -62614,7 +62614,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1990 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1990 * return * span_inc(cover, link_i, nt[-1][3] - 1) * span_inc(e_nt_cover, link_i, nt[-1][3] - 1) # <<<<<<<<<<<<<< @@ -62649,7 +62649,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1991 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1991 * span_inc(cover, link_i, nt[-1][3] - 1) * span_inc(e_nt_cover, link_i, nt[-1][3] - 1) * nt[-1][3] = link_i # <<<<<<<<<<<<<< @@ -62664,7 +62664,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc } __pyx_L28:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1992 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1992 * span_inc(e_nt_cover, link_i, nt[-1][3] - 1) * nt[-1][3] = link_i * if link_j > nt[-1][4]: # <<<<<<<<<<<<<< @@ -62682,7 +62682,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_6) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1993 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1993 * nt[-1][3] = link_i * if link_j > nt[-1][4]: * if not span_check(cover, nt[-1][4] + 1, link_j): # <<<<<<<<<<<<<< @@ -62720,7 +62720,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __pyx_t_3 = ((!__pyx_t_6) != 0); if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1994 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1994 * if link_j > nt[-1][4]: * if not span_check(cover, nt[-1][4] + 1, link_j): * nt[-1] = old_last_nt # <<<<<<<<<<<<<< @@ -62729,7 +62729,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc */ if (unlikely(__Pyx_SetItemInt(__pyx_v_nt, -1, __pyx_v_old_last_nt, long, 1, __Pyx_PyInt_From_long, 0, 1, 1) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1994; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1995 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1995 * if not span_check(cover, nt[-1][4] + 1, link_j): * nt[-1] = old_last_nt * return # <<<<<<<<<<<<<< @@ -62741,7 +62741,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1996 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1996 * nt[-1] = old_last_nt * return * span_inc(cover, nt[-1][4] + 1, link_j) # <<<<<<<<<<<<<< @@ -62776,7 +62776,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1997 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1997 * return * span_inc(cover, nt[-1][4] + 1, link_j) * span_inc(e_nt_cover, nt[-1][4] + 1, link_j) # <<<<<<<<<<<<<< @@ -62811,7 +62811,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1998 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1998 * span_inc(cover, nt[-1][4] + 1, link_j) * span_inc(e_nt_cover, nt[-1][4] + 1, link_j) * nt[-1][4] = link_j # <<<<<<<<<<<<<< @@ -62826,7 +62826,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc } __pyx_L30:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1999 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1999 * span_inc(e_nt_cover, nt[-1][4] + 1, link_j) * nt[-1][4] = link_j * if links and f_j >= new_min_bound: # <<<<<<<<<<<<<< @@ -62844,7 +62844,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc } if (__pyx_t_5) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2000 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2000 * nt[-1][4] = link_j * if links and f_j >= new_min_bound: * rules.add(self.form_rule(f_i, new_e_i, f_words[f_i:f_j + 1], e_words[new_e_i:new_e_j + 1], nt, links)) # <<<<<<<<<<<<<< @@ -62901,7 +62901,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc } __pyx_L32:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2001 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2001 * if links and f_j >= new_min_bound: * rules.add(self.form_rule(f_i, new_e_i, f_words[f_i:f_j + 1], e_words[new_e_i:new_e_j + 1], nt, links)) * extract(f_i, f_j + 1, new_e_i, new_e_j, new_min_bound, wc, links, nt, False) # <<<<<<<<<<<<<< @@ -62916,7 +62916,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2002 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2002 * rules.add(self.form_rule(f_i, new_e_i, f_words[f_i:f_j + 1], e_words[new_e_i:new_e_j + 1], nt, links)) * extract(f_i, f_j + 1, new_e_i, new_e_j, new_min_bound, wc, links, nt, False) * nt[-1] = old_last_nt # <<<<<<<<<<<<<< @@ -62925,7 +62925,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc */ if (unlikely(__Pyx_SetItemInt(__pyx_v_nt, -1, __pyx_v_old_last_nt, long, 1, __Pyx_PyInt_From_long, 0, 1, 1) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2002; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2003 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2003 * extract(f_i, f_j + 1, new_e_i, new_e_j, new_min_bound, wc, links, nt, False) * nt[-1] = old_last_nt * if link_i < nt[-1][3]: # <<<<<<<<<<<<<< @@ -62943,7 +62943,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_5) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2004 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2004 * nt[-1] = old_last_nt * if link_i < nt[-1][3]: * span_dec(cover, link_i, nt[-1][3] - 1) # <<<<<<<<<<<<<< @@ -62978,7 +62978,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2005 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2005 * if link_i < nt[-1][3]: * span_dec(cover, link_i, nt[-1][3] - 1) * span_dec(e_nt_cover, link_i, nt[-1][3] - 1) # <<<<<<<<<<<<<< @@ -63016,7 +63016,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc } __pyx_L33:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2006 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2006 * span_dec(cover, link_i, nt[-1][3] - 1) * span_dec(e_nt_cover, link_i, nt[-1][3] - 1) * if link_j > nt[-1][4]: # <<<<<<<<<<<<<< @@ -63034,7 +63034,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2007 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2007 * span_dec(e_nt_cover, link_i, nt[-1][3] - 1) * if link_j > nt[-1][4]: * span_dec(cover, nt[-1][4] + 1, link_j) # <<<<<<<<<<<<<< @@ -63069,7 +63069,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2008 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2008 * if link_j > nt[-1][4]: * span_dec(cover, nt[-1][4] + 1, link_j) * span_dec(e_nt_cover, nt[-1][4] + 1, link_j) # <<<<<<<<<<<<<< @@ -63110,7 +63110,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc } __pyx_L27:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2010 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2010 * span_dec(e_nt_cover, nt[-1][4] + 1, link_j) * # Try to start a new non-terminal, extract, extend * if (not nt or f_j - nt[-1][2] > 1) and wc < self.max_length and len(nt) < self.max_nonterminals: # <<<<<<<<<<<<<< @@ -63158,7 +63158,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc } if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2012 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2012 * if (not nt or f_j - nt[-1][2] > 1) and wc < self.max_length and len(nt) < self.max_nonterminals: * # Check for collisions * if not span_check(cover, link_i, link_j): # <<<<<<<<<<<<<< @@ -63188,7 +63188,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __pyx_t_6 = ((!__pyx_t_3) != 0); if (__pyx_t_6) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2013 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2013 * # Check for collisions * if not span_check(cover, link_i, link_j): * return # <<<<<<<<<<<<<< @@ -63200,7 +63200,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2014 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2014 * if not span_check(cover, link_i, link_j): * return * span_inc(cover, link_i, link_j) # <<<<<<<<<<<<<< @@ -63227,7 +63227,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2015 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2015 * return * span_inc(cover, link_i, link_j) * span_inc(e_nt_cover, link_i, link_j) # <<<<<<<<<<<<<< @@ -63254,7 +63254,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2016 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2016 * span_inc(cover, link_i, link_j) * span_inc(e_nt_cover, link_i, link_j) * nt.append([(nt[-1][0] + 1) if nt else 1, f_j, f_j, link_i, link_j]) # <<<<<<<<<<<<<< @@ -63297,7 +63297,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __pyx_t_13 = __Pyx_PyObject_Append(__pyx_v_nt, __pyx_t_1); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2016; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2018 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2018 * nt.append([(nt[-1][0] + 1) if nt else 1, f_j, f_j, link_i, link_j]) * # Require at least one word in phrase * if links and f_j >= new_min_bound: # <<<<<<<<<<<<<< @@ -63315,7 +63315,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc } if (__pyx_t_15) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2019 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2019 * # Require at least one word in phrase * if links and f_j >= new_min_bound: * rules.add(self.form_rule(f_i, new_e_i, f_words[f_i:f_j + 1], e_words[new_e_i:new_e_j + 1], nt, links)) # <<<<<<<<<<<<<< @@ -63372,7 +63372,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc } __pyx_L37:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2020 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2020 * if links and f_j >= new_min_bound: * rules.add(self.form_rule(f_i, new_e_i, f_words[f_i:f_j + 1], e_words[new_e_i:new_e_j + 1], nt, links)) * extract(f_i, f_j + 1, new_e_i, new_e_j, new_min_bound, wc + 1, links, nt, False) # <<<<<<<<<<<<<< @@ -63390,7 +63390,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2021 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2021 * rules.add(self.form_rule(f_i, new_e_i, f_words[f_i:f_j + 1], e_words[new_e_i:new_e_j + 1], nt, links)) * extract(f_i, f_j + 1, new_e_i, new_e_j, new_min_bound, wc + 1, links, nt, False) * nt.pop() # <<<<<<<<<<<<<< @@ -63401,7 +63401,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2022 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2022 * extract(f_i, f_j + 1, new_e_i, new_e_j, new_min_bound, wc + 1, links, nt, False) * nt.pop() * span_dec(cover, link_i, link_j) # <<<<<<<<<<<<<< @@ -63428,7 +63428,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2023 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2023 * nt.pop() * span_dec(cover, link_i, link_j) * span_dec(e_nt_cover, link_i, link_j) # <<<<<<<<<<<<<< @@ -63458,7 +63458,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc } __pyx_L35:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1920 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1920 * # f_ i and j are current, e_ i and j are previous * # We care _considering_ f_j, so it is not yet in counts * def extract(f_i, f_j, e_i, e_j, min_bound, wc, links, nt, nt_open): # <<<<<<<<<<<<<< @@ -63492,7 +63492,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1886 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1886 * # Aggregate stats from a training instance * # (Extract rules, update counts) * def add_instance(self, f_words, e_words, alignment, ctx_name=None): # <<<<<<<<<<<<<< @@ -63550,7 +63550,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc __Pyx_INCREF(__pyx_cur_scope->__pyx_v_e_words); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_e_words); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1888 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1888 * def add_instance(self, f_words, e_words, alignment, ctx_name=None): * * self.online = True # <<<<<<<<<<<<<< @@ -63559,7 +63559,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc */ __pyx_cur_scope->__pyx_v_self->online = 1; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1895 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1895 * # span more than once. * # (f, e, al, lex_f_i, lex_f_j) * rules = set() # <<<<<<<<<<<<<< @@ -63572,7 +63572,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc __pyx_cur_scope->__pyx_v_rules = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1897 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1897 * rules = set() * * f_len = len(f_words) # <<<<<<<<<<<<<< @@ -63589,7 +63589,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc __pyx_cur_scope->__pyx_v_f_len = __pyx_t_1; __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1898 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1898 * * f_len = len(f_words) * e_len = len(e_words) # <<<<<<<<<<<<<< @@ -63605,7 +63605,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc __pyx_v_e_len = __pyx_t_1; __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1901 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1901 * * # Pre-compute alignment info * al = [[] for i in range(f_len)] # <<<<<<<<<<<<<< @@ -63670,7 +63670,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc __pyx_cur_scope->__pyx_v_al = __pyx_t_1; __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1902 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1902 * # Pre-compute alignment info * al = [[] for i in range(f_len)] * fe_span = [[e_len + 1, -1] for i in range(f_len)] # <<<<<<<<<<<<<< @@ -63743,7 +63743,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc __pyx_cur_scope->__pyx_v_fe_span = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1903 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1903 * al = [[] for i in range(f_len)] * fe_span = [[e_len + 1, -1] for i in range(f_len)] * ef_span = [[f_len + 1, -1] for i in range(e_len)] # <<<<<<<<<<<<<< @@ -63816,7 +63816,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc __pyx_cur_scope->__pyx_v_ef_span = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1904 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1904 * fe_span = [[e_len + 1, -1] for i in range(f_len)] * ef_span = [[f_len + 1, -1] for i in range(e_len)] * for f, e in alignment: # <<<<<<<<<<<<<< @@ -63913,7 +63913,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_6); __pyx_t_6 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1905 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1905 * ef_span = [[f_len + 1, -1] for i in range(e_len)] * for f, e in alignment: * al[f].append(e) # <<<<<<<<<<<<<< @@ -63925,7 +63925,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc __pyx_t_9 = __Pyx_PyObject_Append(__pyx_t_3, __pyx_v_e); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1905; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1906 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1906 * for f, e in alignment: * al[f].append(e) * fe_span[f][0] = min(fe_span[f][0], e) # <<<<<<<<<<<<<< @@ -63960,7 +63960,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1907 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1907 * al[f].append(e) * fe_span[f][0] = min(fe_span[f][0], e) * fe_span[f][1] = max(fe_span[f][1], e) # <<<<<<<<<<<<<< @@ -63995,7 +63995,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1908 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1908 * fe_span[f][0] = min(fe_span[f][0], e) * fe_span[f][1] = max(fe_span[f][1], e) * ef_span[e][0] = min(ef_span[e][0], f) # <<<<<<<<<<<<<< @@ -64030,7 +64030,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1909 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1909 * fe_span[f][1] = max(fe_span[f][1], e) * ef_span[e][0] = min(ef_span[e][0], f) * ef_span[e][1] = max(ef_span[e][1], f) # <<<<<<<<<<<<<< @@ -64067,7 +64067,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1912 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1912 * * # Target side word coverage * cover = [0] * e_len # <<<<<<<<<<<<<< @@ -64088,7 +64088,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc __pyx_cur_scope->__pyx_v_cover = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1914 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1914 * cover = [0] * e_len * # Non-terminal coverage * f_nt_cover = [0] * f_len # <<<<<<<<<<<<<< @@ -64108,7 +64108,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc __pyx_v_f_nt_cover = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1915 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1915 * # Non-terminal coverage * f_nt_cover = [0] * f_len * e_nt_cover = [0] * e_len # <<<<<<<<<<<<<< @@ -64129,7 +64129,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc __pyx_cur_scope->__pyx_v_e_nt_cover = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1920 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1920 * # f_ i and j are current, e_ i and j are previous * # We care _considering_ f_j, so it is not yet in counts * def extract(f_i, f_j, e_i, e_j, min_bound, wc, links, nt, nt_open): # <<<<<<<<<<<<<< @@ -64142,7 +64142,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc __pyx_cur_scope->__pyx_v_extract = __pyx_t_1; __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2026 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2026 * * # Try to extract phrases from every f index * for f_i from 0 <= f_i < f_len: # <<<<<<<<<<<<<< @@ -64152,7 +64152,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc __pyx_t_11 = __Pyx_PyInt_As_long(__pyx_cur_scope->__pyx_v_f_len); if (unlikely((__pyx_t_11 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2026; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_v_f_i = 0; __pyx_v_f_i < __pyx_t_11; __pyx_v_f_i++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2028 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2028 * for f_i from 0 <= f_i < f_len: * # Skip if phrases won't be tight on left side * if not al[f_i]: # <<<<<<<<<<<<<< @@ -64166,7 +64166,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc __pyx_t_12 = ((!__pyx_t_10) != 0); if (__pyx_t_12) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2029 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2029 * # Skip if phrases won't be tight on left side * if not al[f_i]: * continue # <<<<<<<<<<<<<< @@ -64176,7 +64176,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc goto __pyx_L13_continue; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2030 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2030 * if not al[f_i]: * continue * extract(f_i, f_i, f_len + 1, -1, f_i, 0, [], [], False) # <<<<<<<<<<<<<< @@ -64207,7 +64207,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc __pyx_L13_continue:; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2032 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2032 * extract(f_i, f_i, f_len + 1, -1, f_i, 0, [], [], False) * * stats = self.online_stats[ctx_name] # <<<<<<<<<<<<<< @@ -64219,7 +64219,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc __pyx_v_stats = __pyx_t_14; __pyx_t_14 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2037 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2037 * # This could be more efficiently integrated with extraction * # at the cost of readability * for f, lex_i, lex_j in self.get_f_phrases(f_words): # <<<<<<<<<<<<<< @@ -64337,7 +64337,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc __Pyx_XDECREF_SET(__pyx_v_lex_j, __pyx_t_6); __pyx_t_6 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2038 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2038 * # at the cost of readability * for f, lex_i, lex_j in self.get_f_phrases(f_words): * stats.samples_f[f] += 1 # <<<<<<<<<<<<<< @@ -64360,7 +64360,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2041 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2041 * * # Update phrase counts * for rule in rules: # <<<<<<<<<<<<<< @@ -64386,7 +64386,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc __Pyx_XDECREF_SET(__pyx_v_rule, __pyx_t_7); __pyx_t_7 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2042 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2042 * # Update phrase counts * for rule in rules: * (f_ph, e_ph, al) = rule[:3] # <<<<<<<<<<<<<< @@ -64461,7 +64461,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2043 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2043 * for rule in rules: * (f_ph, e_ph, al) = rule[:3] * stats.phrases_f[f_ph] += 1 # <<<<<<<<<<<<<< @@ -64482,7 +64482,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2044 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2044 * (f_ph, e_ph, al) = rule[:3] * stats.phrases_f[f_ph] += 1 * stats.phrases_e[e_ph] += 1 # <<<<<<<<<<<<<< @@ -64503,7 +64503,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2045 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2045 * stats.phrases_f[f_ph] += 1 * stats.phrases_e[e_ph] += 1 * stats.phrases_fe[f_ph][e_ph] += 1 # <<<<<<<<<<<<<< @@ -64527,7 +64527,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2046 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2046 * stats.phrases_e[e_ph] += 1 * stats.phrases_fe[f_ph][e_ph] += 1 * if not stats.phrases_al[f_ph][e_ph]: # <<<<<<<<<<<<<< @@ -64547,7 +64547,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc __pyx_t_10 = ((!__pyx_t_12) != 0); if (__pyx_t_10) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2047 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2047 * stats.phrases_fe[f_ph][e_ph] += 1 * if not stats.phrases_al[f_ph][e_ph]: * stats.phrases_al[f_ph][e_ph] = al # <<<<<<<<<<<<<< @@ -64567,7 +64567,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2050 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2050 * * # Update bilexical dictionary (if exists) * if self.bilex: # <<<<<<<<<<<<<< @@ -64577,7 +64577,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_self->bilex); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2050; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_10) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2051 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2051 * # Update bilexical dictionary (if exists) * if self.bilex: * self.bilex.update(f_words, e_words, alignment) # <<<<<<<<<<<<<< @@ -64606,7 +64606,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc } /*else*/ { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2053 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2053 * self.bilex.update(f_words, e_words, alignment) * else: * logger.warning('No online bilexical dictionary specified, not updating lexical weights') # <<<<<<<<<<<<<< @@ -64625,7 +64625,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc } __pyx_L25:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1886 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1886 * # Aggregate stats from a training instance * # (Extract rules, update counts) * def add_instance(self, f_words, e_words, alignment, ctx_name=None): # <<<<<<<<<<<<<< @@ -64664,7 +64664,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2056 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2056 * * # Create a rule from source, target, non-terminals, and alignments * def form_rule(self, f_i, e_i, f_span, e_span, nt, al): # <<<<<<<<<<<<<< @@ -64769,7 +64769,7 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_28form_rule(P return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2059 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2059 * * # Substitute in non-terminals * nt_inv = sorted(nt, cmp=lambda x, y: cmp(x[3], y[3])) # <<<<<<<<<<<<<< @@ -64882,7 +64882,7 @@ static PyObject *__pyx_lambda_funcdef_lambda6(CYTHON_UNUSED PyObject *__pyx_self return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2083 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2083 * # Adjusting alignment links takes some doing * links = [list(link) for sub in al for link in sub] * links_inv = sorted(links, cmp=lambda x, y: cmp(x[1], y[1])) # <<<<<<<<<<<<<< @@ -64996,7 +64996,7 @@ static PyObject *__pyx_lambda_funcdef_lambda7(CYTHON_UNUSED PyObject *__pyx_self } static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_9form_rule_4generator15(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2117 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2117 * f = Phrase(f_sym) * e = Phrase(e_sym) * a = tuple(self.alignment.link(i, j) for i, j in links) # <<<<<<<<<<<<<< @@ -65181,7 +65181,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_9form_rule_4g return NULL; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2056 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2056 * * # Create a rule from source, target, non-terminals, and alignments * def form_rule(self, f_i, e_i, f_span, e_span, nt, al): # <<<<<<<<<<<<<< @@ -65238,7 +65238,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2059 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2059 * * # Substitute in non-terminals * nt_inv = sorted(nt, cmp=lambda x, y: cmp(x[3], y[3])) # <<<<<<<<<<<<<< @@ -65263,7 +65263,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __pyx_v_nt_inv = __pyx_t_3; __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2060 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2060 * # Substitute in non-terminals * nt_inv = sorted(nt, cmp=lambda x, y: cmp(x[3], y[3])) * f_sym = list(f_span[:]) # <<<<<<<<<<<<<< @@ -65283,7 +65283,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __pyx_v_f_sym = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2061 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2061 * nt_inv = sorted(nt, cmp=lambda x, y: cmp(x[3], y[3])) * f_sym = list(f_span[:]) * off = f_i # <<<<<<<<<<<<<< @@ -65293,7 +65293,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __Pyx_INCREF(__pyx_v_f_i); __pyx_v_off = __pyx_v_f_i; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2062 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2062 * f_sym = list(f_span[:]) * off = f_i * for next_nt in nt: # <<<<<<<<<<<<<< @@ -65338,7 +65338,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __Pyx_XDECREF_SET(__pyx_v_next_nt, __pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2063 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2063 * off = f_i * for next_nt in nt: * nt_len = (next_nt[2] - next_nt[1]) + 1 # <<<<<<<<<<<<<< @@ -65359,7 +65359,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __Pyx_XDECREF_SET(__pyx_v_nt_len, __pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2064 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2064 * for next_nt in nt: * nt_len = (next_nt[2] - next_nt[1]) + 1 * i = 0 # <<<<<<<<<<<<<< @@ -65369,7 +65369,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __Pyx_INCREF(__pyx_int_0); __Pyx_XDECREF_SET(__pyx_v_i, __pyx_int_0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2065 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2065 * nt_len = (next_nt[2] - next_nt[1]) + 1 * i = 0 * while i < nt_len: # <<<<<<<<<<<<<< @@ -65382,7 +65382,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!__pyx_t_7) break; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2066 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2066 * i = 0 * while i < nt_len: * f_sym.pop(next_nt[1] - off) # <<<<<<<<<<<<<< @@ -65400,7 +65400,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2067 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2067 * while i < nt_len: * f_sym.pop(next_nt[1] - off) * i += 1 # <<<<<<<<<<<<<< @@ -65413,7 +65413,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __pyx_t_6 = 0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2068 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2068 * f_sym.pop(next_nt[1] - off) * i += 1 * f_sym.insert(next_nt[1] - off, sym_setindex(self.category, next_nt[0])) # <<<<<<<<<<<<<< @@ -65436,7 +65436,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __pyx_t_10 = PyList_Insert(__pyx_v_f_sym, __pyx_t_8, __pyx_t_1); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2068; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2069 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2069 * i += 1 * f_sym.insert(next_nt[1] - off, sym_setindex(self.category, next_nt[0])) * off += (nt_len - 1) # <<<<<<<<<<<<<< @@ -65453,7 +65453,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2070 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2070 * f_sym.insert(next_nt[1] - off, sym_setindex(self.category, next_nt[0])) * off += (nt_len - 1) * e_sym = list(e_span[:]) # <<<<<<<<<<<<<< @@ -65473,7 +65473,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __pyx_v_e_sym = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2071 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2071 * off += (nt_len - 1) * e_sym = list(e_span[:]) * off = e_i # <<<<<<<<<<<<<< @@ -65483,7 +65483,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __Pyx_INCREF(__pyx_v_e_i); __Pyx_DECREF_SET(__pyx_v_off, __pyx_v_e_i); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2072 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2072 * e_sym = list(e_span[:]) * off = e_i * for next_nt in nt_inv: # <<<<<<<<<<<<<< @@ -65528,7 +65528,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __Pyx_XDECREF_SET(__pyx_v_next_nt, __pyx_t_6); __pyx_t_6 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2073 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2073 * off = e_i * for next_nt in nt_inv: * nt_len = (next_nt[4] - next_nt[3]) + 1 # <<<<<<<<<<<<<< @@ -65549,7 +65549,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __Pyx_XDECREF_SET(__pyx_v_nt_len, __pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2074 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2074 * for next_nt in nt_inv: * nt_len = (next_nt[4] - next_nt[3]) + 1 * i = 0 # <<<<<<<<<<<<<< @@ -65559,7 +65559,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __Pyx_INCREF(__pyx_int_0); __Pyx_XDECREF_SET(__pyx_v_i, __pyx_int_0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2075 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2075 * nt_len = (next_nt[4] - next_nt[3]) + 1 * i = 0 * while i < nt_len: # <<<<<<<<<<<<<< @@ -65572,7 +65572,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!__pyx_t_7) break; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2076 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2076 * i = 0 * while i < nt_len: * e_sym.pop(next_nt[3] - off) # <<<<<<<<<<<<<< @@ -65590,7 +65590,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2077 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2077 * while i < nt_len: * e_sym.pop(next_nt[3] - off) * i += 1 # <<<<<<<<<<<<<< @@ -65603,7 +65603,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __pyx_t_2 = 0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2078 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2078 * e_sym.pop(next_nt[3] - off) * i += 1 * e_sym.insert(next_nt[3] - off, sym_setindex(self.category, next_nt[0])) # <<<<<<<<<<<<<< @@ -65626,7 +65626,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __pyx_t_10 = PyList_Insert(__pyx_v_e_sym, __pyx_t_8, __pyx_t_1); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2078; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2079 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2079 * i += 1 * e_sym.insert(next_nt[3] - off, sym_setindex(self.category, next_nt[0])) * off += (nt_len - 1) # <<<<<<<<<<<<<< @@ -65643,7 +65643,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2082 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2082 * * # Adjusting alignment links takes some doing * links = [list(link) for sub in al for link in sub] # <<<<<<<<<<<<<< @@ -65744,7 +65744,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __pyx_cur_scope->__pyx_v_links = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2083 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2083 * # Adjusting alignment links takes some doing * links = [list(link) for sub in al for link in sub] * links_inv = sorted(links, cmp=lambda x, y: cmp(x[1], y[1])) # <<<<<<<<<<<<<< @@ -65769,7 +65769,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __pyx_v_links_inv = __pyx_t_1; __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2084 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2084 * links = [list(link) for sub in al for link in sub] * links_inv = sorted(links, cmp=lambda x, y: cmp(x[1], y[1])) * links_len = len(links) # <<<<<<<<<<<<<< @@ -65786,7 +65786,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_links_len = __pyx_t_4; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2085 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2085 * links_inv = sorted(links, cmp=lambda x, y: cmp(x[1], y[1])) * links_len = len(links) * nt_len = len(nt) # <<<<<<<<<<<<<< @@ -65799,7 +65799,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __Pyx_XDECREF_SET(__pyx_v_nt_len, __pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2086 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2086 * links_len = len(links) * nt_len = len(nt) * nt_i = 0 # <<<<<<<<<<<<<< @@ -65809,7 +65809,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __Pyx_INCREF(__pyx_int_0); __pyx_v_nt_i = __pyx_int_0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2087 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2087 * nt_len = len(nt) * nt_i = 0 * off = f_i # <<<<<<<<<<<<<< @@ -65819,7 +65819,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __Pyx_INCREF(__pyx_v_f_i); __Pyx_DECREF_SET(__pyx_v_off, __pyx_v_f_i); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2088 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2088 * nt_i = 0 * off = f_i * i = 0 # <<<<<<<<<<<<<< @@ -65829,7 +65829,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __Pyx_INCREF(__pyx_int_0); __Pyx_XDECREF_SET(__pyx_v_i, __pyx_int_0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2089 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2089 * off = f_i * i = 0 * while i < links_len: # <<<<<<<<<<<<<< @@ -65845,7 +65845,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!__pyx_t_7) break; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2090 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2090 * i = 0 * while i < links_len: * while nt_i < nt_len and links[i][0] > nt[nt_i][1]: # <<<<<<<<<<<<<< @@ -65878,7 +65878,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s } if (!__pyx_t_14) break; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2091 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2091 * while i < links_len: * while nt_i < nt_len and links[i][0] > nt[nt_i][1]: * off += (nt[nt_i][2] - nt[nt_i][1]) # <<<<<<<<<<<<<< @@ -65905,7 +65905,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __Pyx_DECREF_SET(__pyx_v_off, __pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2092 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2092 * while nt_i < nt_len and links[i][0] > nt[nt_i][1]: * off += (nt[nt_i][2] - nt[nt_i][1]) * nt_i += 1 # <<<<<<<<<<<<<< @@ -65918,7 +65918,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __pyx_t_1 = 0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2093 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2093 * off += (nt[nt_i][2] - nt[nt_i][1]) * nt_i += 1 * links[i][0] -= off # <<<<<<<<<<<<<< @@ -65937,7 +65937,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2094 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2094 * nt_i += 1 * links[i][0] -= off * i += 1 # <<<<<<<<<<<<<< @@ -65950,7 +65950,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __pyx_t_1 = 0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2095 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2095 * links[i][0] -= off * i += 1 * nt_i = 0 # <<<<<<<<<<<<<< @@ -65960,7 +65960,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __Pyx_INCREF(__pyx_int_0); __Pyx_DECREF_SET(__pyx_v_nt_i, __pyx_int_0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2096 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2096 * i += 1 * nt_i = 0 * off = e_i # <<<<<<<<<<<<<< @@ -65970,7 +65970,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __Pyx_INCREF(__pyx_v_e_i); __Pyx_DECREF_SET(__pyx_v_off, __pyx_v_e_i); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2097 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2097 * nt_i = 0 * off = e_i * i = 0 # <<<<<<<<<<<<<< @@ -65980,7 +65980,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __Pyx_INCREF(__pyx_int_0); __Pyx_DECREF_SET(__pyx_v_i, __pyx_int_0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2098 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2098 * off = e_i * i = 0 * while i < links_len: # <<<<<<<<<<<<<< @@ -65996,7 +65996,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!__pyx_t_14) break; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2099 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2099 * i = 0 * while i < links_len: * while nt_i < nt_len and links_inv[i][1] > nt_inv[nt_i][3]: # <<<<<<<<<<<<<< @@ -66029,7 +66029,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s } if (!__pyx_t_13) break; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2100 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2100 * while i < links_len: * while nt_i < nt_len and links_inv[i][1] > nt_inv[nt_i][3]: * off += (nt_inv[nt_i][4] - nt_inv[nt_i][3]) # <<<<<<<<<<<<<< @@ -66056,7 +66056,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __Pyx_DECREF_SET(__pyx_v_off, __pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2101 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2101 * while nt_i < nt_len and links_inv[i][1] > nt_inv[nt_i][3]: * off += (nt_inv[nt_i][4] - nt_inv[nt_i][3]) * nt_i += 1 # <<<<<<<<<<<<<< @@ -66069,7 +66069,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __pyx_t_1 = 0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2102 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2102 * off += (nt_inv[nt_i][4] - nt_inv[nt_i][3]) * nt_i += 1 * links_inv[i][1] -= off # <<<<<<<<<<<<<< @@ -66088,7 +66088,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2103 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2103 * nt_i += 1 * links_inv[i][1] -= off * i += 1 # <<<<<<<<<<<<<< @@ -66101,7 +66101,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __pyx_t_1 = 0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2106 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2106 * * # Find lexical span * lex_f_i = f_i # <<<<<<<<<<<<<< @@ -66111,7 +66111,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __Pyx_INCREF(__pyx_v_f_i); __pyx_v_lex_f_i = __pyx_v_f_i; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2107 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2107 * # Find lexical span * lex_f_i = f_i * lex_f_j = f_i + (len(f_span) - 1) # <<<<<<<<<<<<<< @@ -66127,7 +66127,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __pyx_v_lex_f_j = __pyx_t_2; __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2108 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2108 * lex_f_i = f_i * lex_f_j = f_i + (len(f_span) - 1) * if nt: # <<<<<<<<<<<<<< @@ -66137,7 +66137,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_v_nt); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_13) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2109 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2109 * lex_f_j = f_i + (len(f_span) - 1) * if nt: * if nt[0][1] == lex_f_i: # <<<<<<<<<<<<<< @@ -66155,7 +66155,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_13) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2110 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2110 * if nt: * if nt[0][1] == lex_f_i: * lex_f_i += (nt[0][2] - nt[0][1]) + 1 # <<<<<<<<<<<<<< @@ -66188,7 +66188,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s } __pyx_L24:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2111 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2111 * if nt[0][1] == lex_f_i: * lex_f_i += (nt[0][2] - nt[0][1]) + 1 * if nt[-1][2] == lex_f_j: # <<<<<<<<<<<<<< @@ -66206,7 +66206,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_13) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2112 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2112 * lex_f_i += (nt[0][2] - nt[0][1]) + 1 * if nt[-1][2] == lex_f_j: * lex_f_j -= (nt[-1][2] - nt[-1][1]) + 1 # <<<<<<<<<<<<<< @@ -66242,7 +66242,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s } __pyx_L23:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2115 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2115 * * # Create rule (f_phrase, e_phrase, links, f_link_min, f_link_max) * f = Phrase(f_sym) # <<<<<<<<<<<<<< @@ -66260,7 +66260,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __pyx_v_f = ((struct __pyx_obj_4cdec_2sa_3_sa_Phrase *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2116 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2116 * # Create rule (f_phrase, e_phrase, links, f_link_min, f_link_max) * f = Phrase(f_sym) * e = Phrase(e_sym) # <<<<<<<<<<<<<< @@ -66278,7 +66278,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __pyx_v_e = ((struct __pyx_obj_4cdec_2sa_3_sa_Phrase *)__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2117 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2117 * f = Phrase(f_sym) * e = Phrase(e_sym) * a = tuple(self.alignment.link(i, j) for i, j in links) # <<<<<<<<<<<<<< @@ -66298,7 +66298,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __pyx_v_a = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2118 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2118 * e = Phrase(e_sym) * a = tuple(self.alignment.link(i, j) for i, j in links) * return (f, e, a, lex_f_i, lex_f_j) # <<<<<<<<<<<<<< @@ -66327,7 +66327,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __pyx_t_2 = 0; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2056 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2056 * * # Create a rule from source, target, non-terminals, and alignments * def form_rule(self, f_i, e_i, f_span, e_span, nt, al): # <<<<<<<<<<<<<< @@ -66367,7 +66367,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2121 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2121 * * # Rule string from rule * def fmt_rule(self, f, e, a): # <<<<<<<<<<<<<< @@ -66446,7 +66446,7 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_30fmt_rule(Py } static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8fmt_rule_2generator16(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2122 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2122 * # Rule string from rule * def fmt_rule(self, f, e, a): * a_str = ' '.join('{0}-{1}'.format(*self.alignment.unlink(packed)) for packed in a) # <<<<<<<<<<<<<< @@ -66616,7 +66616,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8fmt_rule_2ge return NULL; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2121 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2121 * * # Rule string from rule * def fmt_rule(self, f, e, a): # <<<<<<<<<<<<<< @@ -66649,7 +66649,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_29fmt_rule(st __Pyx_INCREF(__pyx_cur_scope->__pyx_v_a); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_a); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2122 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2122 * # Rule string from rule * def fmt_rule(self, f, e, a): * a_str = ' '.join('{0}-{1}'.format(*self.alignment.unlink(packed)) for packed in a) # <<<<<<<<<<<<<< @@ -66664,7 +66664,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_29fmt_rule(st __pyx_v_a_str = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2123 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2123 * def fmt_rule(self, f, e, a): * a_str = ' '.join('{0}-{1}'.format(*self.alignment.unlink(packed)) for packed in a) * return '[X] ||| {0} ||| {1} ||| {2}'.format(f, e, a_str) # <<<<<<<<<<<<<< @@ -66693,7 +66693,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_29fmt_rule(st __pyx_t_3 = 0; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2121 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2121 * * # Rule string from rule * def fmt_rule(self, f, e, a): # <<<<<<<<<<<<<< @@ -66716,7 +66716,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_29fmt_rule(st return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2127 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2127 * # Lookup online stats for phrase pair (f, e). Return None if no match. * # IMPORTANT: use get() to avoid adding items to defaultdict * def online_ctx_lookup(self, f, e, ctx_name=None): # <<<<<<<<<<<<<< @@ -66815,7 +66815,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_31online_ctx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("online_ctx_lookup", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2128 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2128 * # IMPORTANT: use get() to avoid adding items to defaultdict * def online_ctx_lookup(self, f, e, ctx_name=None): * if self.online: # <<<<<<<<<<<<<< @@ -66825,7 +66825,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_31online_ctx_ __pyx_t_1 = (__pyx_v_self->online != 0); if (__pyx_t_1) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2129 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2129 * def online_ctx_lookup(self, f, e, ctx_name=None): * if self.online: * stats = self.online_stats[ctx_name] # <<<<<<<<<<<<<< @@ -66837,7 +66837,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_31online_ctx_ __pyx_v_stats = __pyx_t_2; __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2130 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2130 * if self.online: * stats = self.online_stats[ctx_name] * fcount = stats.phrases_f.get(f, 0) # <<<<<<<<<<<<<< @@ -66864,7 +66864,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_31online_ctx_ __pyx_v_fcount = __pyx_t_4; __pyx_t_4 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2131 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2131 * stats = self.online_stats[ctx_name] * fcount = stats.phrases_f.get(f, 0) * fsample_count = stats.samples_f.get(f, 0) # <<<<<<<<<<<<<< @@ -66891,7 +66891,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_31online_ctx_ __pyx_v_fsample_count = __pyx_t_3; __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2132 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2132 * fcount = stats.phrases_f.get(f, 0) * fsample_count = stats.samples_f.get(f, 0) * d = stats.phrases_fe.get(f, None) # <<<<<<<<<<<<<< @@ -66918,7 +66918,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_31online_ctx_ __pyx_v_d = __pyx_t_2; __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2133 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2133 * fsample_count = stats.samples_f.get(f, 0) * d = stats.phrases_fe.get(f, None) * paircount = d.get(e, 0) if d else 0 # <<<<<<<<<<<<<< @@ -66950,7 +66950,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_31online_ctx_ __pyx_v_paircount = __pyx_t_2; __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2134 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2134 * d = stats.phrases_fe.get(f, None) * paircount = d.get(e, 0) if d else 0 * return OnlineFeatureContext(fcount, fsample_count, paircount) # <<<<<<<<<<<<<< @@ -66980,7 +66980,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_31online_ctx_ goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2135 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2135 * paircount = d.get(e, 0) if d else 0 * return OnlineFeatureContext(fcount, fsample_count, paircount) * return None # <<<<<<<<<<<<<< @@ -66992,7 +66992,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_31online_ctx_ __pyx_r = Py_None; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2127 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2127 * # Lookup online stats for phrase pair (f, e). Return None if no match. * # IMPORTANT: use get() to avoid adding items to defaultdict * def online_ctx_lookup(self, f, e, ctx_name=None): # <<<<<<<<<<<<<< @@ -67019,7 +67019,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_31online_ctx_ return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2140 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2140 * # (Used for EGivenFCoherent) * # Return set of (fphrase, lex_i, lex_j) * def get_f_phrases(self, f_words): # <<<<<<<<<<<<<< @@ -67040,7 +67040,7 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_34get_f_phras return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2145 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2145 * phrases = set() # (fphrase, lex_i, lex_j) * * def extract(f_i, f_j, lex_i, lex_j, wc, ntc, syms): # <<<<<<<<<<<<<< @@ -67180,7 +67180,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_13get_f_phras __pyx_outer_scope = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_26_get_f_phrases *) __Pyx_CyFunction_GetClosure(__pyx_self); __pyx_cur_scope = __pyx_outer_scope; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2147 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2147 * def extract(f_i, f_j, lex_i, lex_j, wc, ntc, syms): * # Phrase extraction limits * if f_j > (f_len - 1) or (f_j - f_i) + 1 > self.max_initial_size: # <<<<<<<<<<<<<< @@ -67213,7 +67213,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_13get_f_phras } if (__pyx_t_6) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2148 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2148 * # Phrase extraction limits * if f_j > (f_len - 1) or (f_j - f_i) + 1 > self.max_initial_size: * return # <<<<<<<<<<<<<< @@ -67225,7 +67225,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_13get_f_phras goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2150 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2150 * return * # Extend with word * if wc + ntc < self.max_length: # <<<<<<<<<<<<<< @@ -67244,7 +67244,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_13get_f_phras __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_6) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2151 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2151 * # Extend with word * if wc + ntc < self.max_length: * syms.append(f_words[f_j]) # <<<<<<<<<<<<<< @@ -67257,7 +67257,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_13get_f_phras __pyx_t_7 = __Pyx_PyObject_Append(__pyx_v_syms, __pyx_t_1); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2152 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2152 * if wc + ntc < self.max_length: * syms.append(f_words[f_j]) * f = Phrase(syms) # <<<<<<<<<<<<<< @@ -67275,7 +67275,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_13get_f_phras __pyx_v_f = ((struct __pyx_obj_4cdec_2sa_3_sa_Phrase *)__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2153 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2153 * syms.append(f_words[f_j]) * f = Phrase(syms) * new_lex_i = min(lex_i, f_j) # <<<<<<<<<<<<<< @@ -67304,7 +67304,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_13get_f_phras __pyx_v_new_lex_i = __pyx_t_2; __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2154 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2154 * f = Phrase(syms) * new_lex_i = min(lex_i, f_j) * new_lex_j = max(lex_j, f_j) # <<<<<<<<<<<<<< @@ -67333,7 +67333,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_13get_f_phras __pyx_v_new_lex_j = __pyx_t_2; __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2155 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2155 * new_lex_i = min(lex_i, f_j) * new_lex_j = max(lex_j, f_j) * phrases.add((f, new_lex_i, new_lex_j)) # <<<<<<<<<<<<<< @@ -67359,7 +67359,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_13get_f_phras __pyx_t_7 = PySet_Add(__pyx_cur_scope->__pyx_v_phrases, __pyx_t_2); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2156 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2156 * new_lex_j = max(lex_j, f_j) * phrases.add((f, new_lex_i, new_lex_j)) * extract(f_i, f_j + 1, new_lex_i, new_lex_j, wc + 1, ntc, syms) # <<<<<<<<<<<<<< @@ -67377,7 +67377,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_13get_f_phras __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2157 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2157 * phrases.add((f, new_lex_i, new_lex_j)) * extract(f_i, f_j + 1, new_lex_i, new_lex_j, wc + 1, ntc, syms) * syms.pop() # <<<<<<<<<<<<<< @@ -67391,7 +67391,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_13get_f_phras } __pyx_L4:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2159 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2159 * syms.pop() * # Extend with existing non-terminal * if syms and sym_isvar(syms[-1]): # <<<<<<<<<<<<<< @@ -67410,7 +67410,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_13get_f_phras } if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2161 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2161 * if syms and sym_isvar(syms[-1]): * # Don't re-extract the same phrase * extract(f_i, f_j + 1, lex_i, lex_j, wc, ntc, syms) # <<<<<<<<<<<<<< @@ -67428,7 +67428,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_13get_f_phras } __pyx_L5:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2163 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2163 * extract(f_i, f_j + 1, lex_i, lex_j, wc, ntc, syms) * # Extend with new non-terminal * if wc + ntc < self.max_length: # <<<<<<<<<<<<<< @@ -67447,7 +67447,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_13get_f_phras __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2164 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2164 * # Extend with new non-terminal * if wc + ntc < self.max_length: * if not syms or (ntc < self.max_nonterminals and not sym_isvar(syms[-1])): # <<<<<<<<<<<<<< @@ -67480,7 +67480,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_13get_f_phras } if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2165 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2165 * if wc + ntc < self.max_length: * if not syms or (ntc < self.max_nonterminals and not sym_isvar(syms[-1])): * syms.append(sym_setindex(self.category, ntc + 1)) # <<<<<<<<<<<<<< @@ -67497,7 +67497,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_13get_f_phras __pyx_t_7 = __Pyx_PyObject_Append(__pyx_v_syms, __pyx_t_4); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2166 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2166 * if not syms or (ntc < self.max_nonterminals and not sym_isvar(syms[-1])): * syms.append(sym_setindex(self.category, ntc + 1)) * f = Phrase(syms) # <<<<<<<<<<<<<< @@ -67515,7 +67515,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_13get_f_phras __Pyx_XDECREF_SET(__pyx_v_f, ((struct __pyx_obj_4cdec_2sa_3_sa_Phrase *)__pyx_t_2)); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2167 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2167 * syms.append(sym_setindex(self.category, ntc + 1)) * f = Phrase(syms) * if wc > 0: # <<<<<<<<<<<<<< @@ -67527,7 +67527,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_13get_f_phras __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2168 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2168 * f = Phrase(syms) * if wc > 0: * phrases.add((f, lex_i, lex_j)) # <<<<<<<<<<<<<< @@ -67556,7 +67556,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_13get_f_phras } __pyx_L8:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2169 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2169 * if wc > 0: * phrases.add((f, lex_i, lex_j)) * extract(f_i, f_j + 1, lex_i, lex_j, wc, ntc + 1, syms) # <<<<<<<<<<<<<< @@ -67574,7 +67574,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_13get_f_phras __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2170 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2170 * phrases.add((f, lex_i, lex_j)) * extract(f_i, f_j + 1, lex_i, lex_j, wc, ntc + 1, syms) * syms.pop() # <<<<<<<<<<<<<< @@ -67591,7 +67591,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_13get_f_phras } __pyx_L6:; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2145 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2145 * phrases = set() # (fphrase, lex_i, lex_j) * * def extract(f_i, f_j, lex_i, lex_j, wc, ntc, syms): # <<<<<<<<<<<<<< @@ -67618,7 +67618,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_13get_f_phras return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2140 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2140 * # (Used for EGivenFCoherent) * # Return set of (fphrase, lex_i, lex_j) * def get_f_phrases(self, f_words): # <<<<<<<<<<<<<< @@ -67654,7 +67654,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_33get_f_phras __Pyx_INCREF(__pyx_cur_scope->__pyx_v_f_words); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_f_words); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2142 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2142 * def get_f_phrases(self, f_words): * * f_len = len(f_words) # <<<<<<<<<<<<<< @@ -67667,7 +67667,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_33get_f_phras __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_cur_scope->__pyx_v_f_len = __pyx_t_2; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2143 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2143 * * f_len = len(f_words) * phrases = set() # (fphrase, lex_i, lex_j) # <<<<<<<<<<<<<< @@ -67680,7 +67680,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_33get_f_phras __pyx_cur_scope->__pyx_v_phrases = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2145 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2145 * phrases = set() # (fphrase, lex_i, lex_j) * * def extract(f_i, f_j, lex_i, lex_j, wc, ntc, syms): # <<<<<<<<<<<<<< @@ -67693,7 +67693,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_33get_f_phras __pyx_cur_scope->__pyx_v_extract = __pyx_t_1; __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2173 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2173 * * # Try to extract phrases from every f index * for f_i from 0 <= f_i < f_len: # <<<<<<<<<<<<<< @@ -67703,7 +67703,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_33get_f_phras __pyx_t_2 = __pyx_cur_scope->__pyx_v_f_len; for (__pyx_v_f_i = 0; __pyx_v_f_i < __pyx_t_2; __pyx_v_f_i++) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2174 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2174 * # Try to extract phrases from every f index * for f_i from 0 <= f_i < f_len: * extract(f_i, f_i, f_len, -1, 0, 0, []) # <<<<<<<<<<<<<< @@ -67727,7 +67727,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_33get_f_phras __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2176 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2176 * extract(f_i, f_i, f_len, -1, 0, 0, []) * * return phrases # <<<<<<<<<<<<<< @@ -67739,7 +67739,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_33get_f_phras __pyx_r = __pyx_cur_scope->__pyx_v_phrases; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2140 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2140 * # (Used for EGivenFCoherent) * # Return set of (fphrase, lex_i, lex_j) * def get_f_phrases(self, f_words): # <<<<<<<<<<<<<< @@ -67763,7 +67763,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_33get_f_phras return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2179 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2179 * * # Drop online stats for a context * def drop_ctx(self, ctx_name=None): # <<<<<<<<<<<<<< @@ -67839,7 +67839,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_35drop_ctx(st int __pyx_clineno = 0; __Pyx_RefNannySetupContext("drop_ctx", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2180 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2180 * # Drop online stats for a context * def drop_ctx(self, ctx_name=None): * self.online_stats.pop(ctx_name, None) # <<<<<<<<<<<<<< @@ -67862,7 +67862,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_35drop_ctx(st __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2179 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2179 * * # Drop online stats for a context * def drop_ctx(self, ctx_name=None): # <<<<<<<<<<<<<< @@ -67885,7 +67885,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_35drop_ctx(st return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2183 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2183 * * # Spans are _inclusive_ on both ends [i, j] * def span_check(vec, i, j): # <<<<<<<<<<<<<< @@ -67975,7 +67975,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_16span_check(CYTHON_UNUSED PyObject *__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("span_check", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2184 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2184 * # Spans are _inclusive_ on both ends [i, j] * def span_check(vec, i, j): * k = i # <<<<<<<<<<<<<< @@ -67985,7 +67985,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_16span_check(CYTHON_UNUSED PyObject *__ __Pyx_INCREF(__pyx_v_i); __pyx_v_k = __pyx_v_i; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2185 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2185 * def span_check(vec, i, j): * k = i * while k <= j: # <<<<<<<<<<<<<< @@ -67998,7 +67998,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_16span_check(CYTHON_UNUSED PyObject *__ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!__pyx_t_2) break; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2186 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2186 * k = i * while k <= j: * if vec[k]: # <<<<<<<<<<<<<< @@ -68011,7 +68011,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_16span_check(CYTHON_UNUSED PyObject *__ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2187 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2187 * while k <= j: * if vec[k]: * return False # <<<<<<<<<<<<<< @@ -68024,7 +68024,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_16span_check(CYTHON_UNUSED PyObject *__ goto __pyx_L0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2188 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2188 * if vec[k]: * return False * k += 1 # <<<<<<<<<<<<<< @@ -68037,7 +68037,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_16span_check(CYTHON_UNUSED PyObject *__ __pyx_t_1 = 0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2189 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2189 * return False * k += 1 * return True # <<<<<<<<<<<<<< @@ -68049,7 +68049,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_16span_check(CYTHON_UNUSED PyObject *__ __pyx_r = Py_True; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2183 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2183 * * # Spans are _inclusive_ on both ends [i, j] * def span_check(vec, i, j): # <<<<<<<<<<<<<< @@ -68069,7 +68069,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_16span_check(CYTHON_UNUSED PyObject *__ return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2191 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2191 * return True * * def span_inc(vec, i, j): # <<<<<<<<<<<<<< @@ -68161,7 +68161,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_18span_inc(CYTHON_UNUSED PyObject *__py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("span_inc", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2192 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2192 * * def span_inc(vec, i, j): * k = i # <<<<<<<<<<<<<< @@ -68171,7 +68171,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_18span_inc(CYTHON_UNUSED PyObject *__py __Pyx_INCREF(__pyx_v_i); __pyx_v_k = __pyx_v_i; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2193 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2193 * def span_inc(vec, i, j): * k = i * while k <= j: # <<<<<<<<<<<<<< @@ -68184,7 +68184,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_18span_inc(CYTHON_UNUSED PyObject *__py __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!__pyx_t_2) break; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2194 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2194 * k = i * while k <= j: * vec[k] += 1 # <<<<<<<<<<<<<< @@ -68202,7 +68202,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_18span_inc(CYTHON_UNUSED PyObject *__py __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2195 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2195 * while k <= j: * vec[k] += 1 * k += 1 # <<<<<<<<<<<<<< @@ -68215,7 +68215,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_18span_inc(CYTHON_UNUSED PyObject *__py __pyx_t_1 = 0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2191 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2191 * return True * * def span_inc(vec, i, j): # <<<<<<<<<<<<<< @@ -68239,7 +68239,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_18span_inc(CYTHON_UNUSED PyObject *__py return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2197 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2197 * k += 1 * * def span_dec(vec, i, j): # <<<<<<<<<<<<<< @@ -68331,7 +68331,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_20span_dec(CYTHON_UNUSED PyObject *__py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("span_dec", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2198 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2198 * * def span_dec(vec, i, j): * k = i # <<<<<<<<<<<<<< @@ -68341,7 +68341,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_20span_dec(CYTHON_UNUSED PyObject *__py __Pyx_INCREF(__pyx_v_i); __pyx_v_k = __pyx_v_i; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2199 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2199 * def span_dec(vec, i, j): * k = i * while k <= j: # <<<<<<<<<<<<<< @@ -68354,7 +68354,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_20span_dec(CYTHON_UNUSED PyObject *__py __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!__pyx_t_2) break; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2200 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2200 * k = i * while k <= j: * vec[k] -= 1 # <<<<<<<<<<<<<< @@ -68371,7 +68371,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_20span_dec(CYTHON_UNUSED PyObject *__py __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2201 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2201 * while k <= j: * vec[k] -= 1 * k += 1 # <<<<<<<<<<<<<< @@ -68382,7 +68382,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_20span_dec(CYTHON_UNUSED PyObject *__py __pyx_t_1 = 0; } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2197 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2197 * k += 1 * * def span_dec(vec, i, j): # <<<<<<<<<<<<<< @@ -68406,7 +68406,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_20span_dec(CYTHON_UNUSED PyObject *__py return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/features.pxi":7 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/features.pxi":7 * * cdef class FeatureVector: * def __cinit__(self): # <<<<<<<<<<<<<< @@ -68441,7 +68441,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_13FeatureVector___cinit__(struct __pyx_obj_4c int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/features.pxi":8 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/features.pxi":8 * cdef class FeatureVector: * def __cinit__(self): * self.names = IntList(INITIAL_CAPACITY, INCREMENT) # <<<<<<<<<<<<<< @@ -68469,7 +68469,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_13FeatureVector___cinit__(struct __pyx_obj_4c __pyx_v_self->names = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/features.pxi":9 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/features.pxi":9 * def __cinit__(self): * self.names = IntList(INITIAL_CAPACITY, INCREMENT) * self.values = FloatList(INITIAL_CAPACITY, INCREMENT) # <<<<<<<<<<<<<< @@ -68497,7 +68497,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_13FeatureVector___cinit__(struct __pyx_obj_4c __pyx_v_self->values = ((struct __pyx_obj_4cdec_2sa_3_sa_FloatList *)__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/features.pxi":7 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/features.pxi":7 * * cdef class FeatureVector: * def __cinit__(self): # <<<<<<<<<<<<<< @@ -68519,7 +68519,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_13FeatureVector___cinit__(struct __pyx_obj_4c return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/features.pxi":11 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/features.pxi":11 * self.values = FloatList(INITIAL_CAPACITY, INCREMENT) * * def set(self, unsigned name, float value): # <<<<<<<<<<<<<< @@ -68598,7 +68598,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_13FeatureVector_2set(struct __pyx_obj_4 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/features.pxi":12 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/features.pxi":12 * * def set(self, unsigned name, float value): * self.names.append(name) # <<<<<<<<<<<<<< @@ -68610,7 +68610,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_13FeatureVector_2set(struct __pyx_obj_4 __pyx_t_2 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_self->names), __pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/features.pxi":13 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/features.pxi":13 * def set(self, unsigned name, float value): * self.names.append(name) * self.values.append(value) # <<<<<<<<<<<<<< @@ -68622,7 +68622,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_13FeatureVector_2set(struct __pyx_obj_4 __pyx_t_2 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_self->values), __pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/features.pxi":11 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/features.pxi":11 * self.values = FloatList(INITIAL_CAPACITY, INCREMENT) * * def set(self, unsigned name, float value): # <<<<<<<<<<<<<< @@ -68644,7 +68644,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_13FeatureVector_2set(struct __pyx_obj_4 } static PyObject *__pyx_gb_4cdec_2sa_3_sa_13FeatureVector_6generator5(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/features.pxi":15 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/features.pxi":15 * self.values.append(value) * * def __iter__(self): # <<<<<<<<<<<<<< @@ -68727,7 +68727,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_13FeatureVector_6generator5(__pyx_Gener __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/features.pxi":17 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/features.pxi":17 * def __iter__(self): * cdef unsigned i * for i in range(self.names.len): # <<<<<<<<<<<<<< @@ -68738,7 +68738,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_13FeatureVector_6generator5(__pyx_Gener for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_cur_scope->__pyx_v_i = __pyx_t_2; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/features.pxi":18 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/features.pxi":18 * cdef unsigned i * for i in range(self.names.len): * yield (FD.word(self.names[i]), self.values[i]) # <<<<<<<<<<<<<< @@ -68776,7 +68776,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_13FeatureVector_6generator5(__pyx_Gener if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/features.pxi":15 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/features.pxi":15 * self.values.append(value) * * def __iter__(self): # <<<<<<<<<<<<<< @@ -68800,7 +68800,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_13FeatureVector_6generator5(__pyx_Gener return NULL; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/features.pxi":20 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/features.pxi":20 * yield (FD.word(self.names[i]), self.values[i]) * * def __str__(self): # <<<<<<<<<<<<<< @@ -68822,7 +68822,7 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_13FeatureVector_8__str__(PyObject *__py } static PyObject *__pyx_gb_4cdec_2sa_3_sa_13FeatureVector_7__str___2generator17(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/features.pxi":21 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/features.pxi":21 * * def __str__(self): * return ' '.join('%s=%s' % feat for feat in self) # <<<<<<<<<<<<<< @@ -68967,7 +68967,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_13FeatureVector_7__str___2generator17(_ return NULL; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/features.pxi":20 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/features.pxi":20 * yield (FD.word(self.names[i]), self.values[i]) * * def __str__(self): # <<<<<<<<<<<<<< @@ -68995,7 +68995,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_13FeatureVector_7__str__(struct __pyx_o __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/features.pxi":21 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/features.pxi":21 * * def __str__(self): * return ' '.join('%s=%s' % feat for feat in self) # <<<<<<<<<<<<<< @@ -69012,7 +69012,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_13FeatureVector_7__str__(struct __pyx_o __pyx_t_2 = 0; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/features.pxi":20 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/features.pxi":20 * yield (FD.word(self.names[i]), self.values[i]) * * def __str__(self): # <<<<<<<<<<<<<< @@ -69033,7 +69033,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_13FeatureVector_7__str__(struct __pyx_o return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/features.pxi":25 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/features.pxi":25 * cdef class Scorer: * cdef models * def __init__(self, *models): # <<<<<<<<<<<<<< @@ -69074,7 +69074,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Scorer___init__(struct __pyx_obj_4cdec_2sa_3 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/features.pxi":26 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/features.pxi":26 * cdef models * def __init__(self, *models): * names = [FD.index(model.__name__) for model in models] # <<<<<<<<<<<<<< @@ -69106,7 +69106,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Scorer___init__(struct __pyx_obj_4cdec_2sa_3 __pyx_v_names = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/features.pxi":27 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/features.pxi":27 * def __init__(self, *models): * names = [FD.index(model.__name__) for model in models] * self.models = zip(names, models) # <<<<<<<<<<<<<< @@ -69130,7 +69130,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Scorer___init__(struct __pyx_obj_4cdec_2sa_3 __pyx_v_self->models = __pyx_t_2; __pyx_t_2 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/features.pxi":25 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/features.pxi":25 * cdef class Scorer: * cdef models * def __init__(self, *models): # <<<<<<<<<<<<<< @@ -69154,7 +69154,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Scorer___init__(struct __pyx_obj_4cdec_2sa_3 return __pyx_r; } -/* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/features.pxi":29 +/* "/usr0/home/cdyer/cdec/python/cdec/sa/features.pxi":29 * self.models = zip(names, models) * * cdef FeatureVector score(self, ctx): # <<<<<<<<<<<<<< @@ -69181,7 +69181,7 @@ static struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector *__pyx_f_4cdec_2sa_3_sa_6Sc int __pyx_clineno = 0; __Pyx_RefNannySetupContext("score", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/features.pxi":30 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/features.pxi":30 * * cdef FeatureVector score(self, ctx): * cdef FeatureVector scores = FeatureVector() # <<<<<<<<<<<<<< @@ -69193,7 +69193,7 @@ static struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector *__pyx_f_4cdec_2sa_3_sa_6Sc __pyx_v_scores = ((struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/features.pxi":31 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/features.pxi":31 * cdef FeatureVector score(self, ctx): * cdef FeatureVector scores = FeatureVector() * for name, model in self.models: # <<<<<<<<<<<<<< @@ -69290,7 +69290,7 @@ static struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector *__pyx_f_4cdec_2sa_3_sa_6Sc __Pyx_XDECREF_SET(__pyx_v_model, __pyx_t_6); __pyx_t_6 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/features.pxi":32 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/features.pxi":32 * cdef FeatureVector scores = FeatureVector() * for name, model in self.models: * scores.set(name, model(ctx)) # <<<<<<<<<<<<<< @@ -69322,7 +69322,7 @@ static struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector *__pyx_f_4cdec_2sa_3_sa_6Sc } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/features.pxi":33 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/features.pxi":33 * for name, model in self.models: * scores.set(name, model(ctx)) * return scores # <<<<<<<<<<<<<< @@ -69332,7 +69332,7 @@ static struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector *__pyx_f_4cdec_2sa_3_sa_6Sc __pyx_r = __pyx_v_scores; goto __pyx_L0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/features.pxi":29 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/features.pxi":29 * self.models = zip(names, models) * * cdef FeatureVector score(self, ctx): # <<<<<<<<<<<<<< @@ -77344,9 +77344,9 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_use_collocations, __pyx_k_use_collocations, sizeof(__pyx_k_use_collocations), 0, 0, 1, 1}, {&__pyx_n_s_use_index, __pyx_k_use_index, sizeof(__pyx_k_use_index), 0, 0, 1, 1}, {&__pyx_n_s_use_sent_id, __pyx_k_use_sent_id, sizeof(__pyx_k_use_sent_id), 0, 0, 1, 1}, - {&__pyx_kp_s_usr0_home_mdenkows_cdec_git_pyt, __pyx_k_usr0_home_mdenkows_cdec_git_pyt, sizeof(__pyx_k_usr0_home_mdenkows_cdec_git_pyt), 0, 0, 1, 0}, - {&__pyx_kp_s_usr0_home_mdenkows_cdec_git_pyt_2, __pyx_k_usr0_home_mdenkows_cdec_git_pyt_2, sizeof(__pyx_k_usr0_home_mdenkows_cdec_git_pyt_2), 0, 0, 1, 0}, - {&__pyx_kp_s_usr0_home_mdenkows_cdec_git_pyt_3, __pyx_k_usr0_home_mdenkows_cdec_git_pyt_3, sizeof(__pyx_k_usr0_home_mdenkows_cdec_git_pyt_3), 0, 0, 1, 0}, + {&__pyx_kp_s_usr0_home_cdyer_cdec_python_cde, __pyx_k_usr0_home_cdyer_cdec_python_cde, sizeof(__pyx_k_usr0_home_cdyer_cdec_python_cde), 0, 0, 1, 0}, + {&__pyx_kp_s_usr0_home_cdyer_cdec_python_cde_2, __pyx_k_usr0_home_cdyer_cdec_python_cde_2, sizeof(__pyx_k_usr0_home_cdyer_cdec_python_cde_2), 0, 0, 1, 0}, + {&__pyx_kp_s_usr0_home_cdyer_cdec_python_cde_3, __pyx_k_usr0_home_cdyer_cdec_python_cde_3, sizeof(__pyx_k_usr0_home_cdyer_cdec_python_cde_3), 0, 0, 1, 0}, {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1}, {&__pyx_n_s_vec, __pyx_k_vec, sizeof(__pyx_k_vec), 0, 0, 1, 1}, {&__pyx_n_s_w, __pyx_k_w, sizeof(__pyx_k_w), 0, 0, 1, 1}, @@ -77388,7 +77388,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":20 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":20 * self.word2id = {"END_OF_FILE":0, "END_OF_LINE":1} * self.id2word = ["END_OF_FILE", "END_OF_LINE"] * self.data = IntList(1000,1000) # <<<<<<<<<<<<<< @@ -77399,7 +77399,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__3); __Pyx_GIVEREF(__pyx_tuple__3); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":21 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":21 * self.id2word = ["END_OF_FILE", "END_OF_LINE"] * self.data = IntList(1000,1000) * self.sent_id = IntList(1000,1000) # <<<<<<<<<<<<<< @@ -77410,7 +77410,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__4); __Pyx_GIVEREF(__pyx_tuple__4); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":22 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":22 * self.data = IntList(1000,1000) * self.sent_id = IntList(1000,1000) * self.sent_index = IntList(1000,1000) # <<<<<<<<<<<<<< @@ -77421,7 +77421,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__5); __Pyx_GIVEREF(__pyx_tuple__5); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":66 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":66 * f.write("%s " % self.get_word(w_id)) * if w_id == 1: * f.write("\n") # <<<<<<<<<<<<<< @@ -77432,7 +77432,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__7); __Pyx_GIVEREF(__pyx_tuple__7); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":61 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":61 * * def write_text(self, char* filename): * with open(filename, "w") as f: # <<<<<<<<<<<<<< @@ -77443,7 +77443,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__8); __Pyx_GIVEREF(__pyx_tuple__8); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":69 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":69 * * def read_text(self, char* filename): * with gzip_or_text(filename) as fp: # <<<<<<<<<<<<<< @@ -77454,7 +77454,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__9); __Pyx_GIVEREF(__pyx_tuple__9); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":74 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":74 * def read_bitext(self, char* filename, int side): * with gzip_or_text(filename) as fp: * data = (line.split(' ||| ')[side] for line in fp) # <<<<<<<<<<<<<< @@ -77465,7 +77465,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__11); __Pyx_GIVEREF(__pyx_tuple__11); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":73 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":73 * * def read_bitext(self, char* filename, int side): * with gzip_or_text(filename) as fp: # <<<<<<<<<<<<<< @@ -77476,7 +77476,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__12); __Pyx_GIVEREF(__pyx_tuple__12); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":130 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":130 * num_words = len(self.id2word) - 2 * fwrite(&(num_words), sizeof(int), 1, f) * for word in self.id2word[2:]: # <<<<<<<<<<<<<< @@ -77487,7 +77487,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_slice__13); __Pyx_GIVEREF(__pyx_slice__13); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":144 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":144 * for i in self.data: * f.write("%d " %i) * f.write("\n") # <<<<<<<<<<<<<< @@ -77498,7 +77498,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__14); __Pyx_GIVEREF(__pyx_tuple__14); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":147 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":147 * for i in self.sent_index: * f.write("%d " %i) * f.write("\n") # <<<<<<<<<<<<<< @@ -77509,7 +77509,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__15); __Pyx_GIVEREF(__pyx_tuple__15); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":150 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":150 * for i in self.sent_id: * f.write("%d " %i) * f.write("\n") # <<<<<<<<<<<<<< @@ -77520,7 +77520,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__16); __Pyx_GIVEREF(__pyx_tuple__16); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":153 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":153 * for word in self.id2word: * f.write("%s %d " % (word, self.word2id[word])) * f.write("\n") # <<<<<<<<<<<<<< @@ -77531,7 +77531,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__17); __Pyx_GIVEREF(__pyx_tuple__17); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/data_array.pxi":156 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":156 * * def write_enhanced(self, char* filename): * with open(filename, "w") as f: # <<<<<<<<<<<<<< @@ -77541,7 +77541,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__18); __Pyx_GIVEREF(__pyx_tuple__18); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":48 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":48 * * def __cinit__(self, from_binary=None, from_text=None): * self.links = IntList(1000,1000) # <<<<<<<<<<<<<< @@ -77552,7 +77552,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__19); __Pyx_GIVEREF(__pyx_tuple__19); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":49 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":49 * def __cinit__(self, from_binary=None, from_text=None): * self.links = IntList(1000,1000) * self.sent_index = IntList(1000,1000) # <<<<<<<<<<<<<< @@ -77563,7 +77563,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__20); __Pyx_GIVEREF(__pyx_tuple__20); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":61 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":61 * pairs = line.split() * for pair in pairs: * (i, j) = map(int, pair.split('-')) # <<<<<<<<<<<<<< @@ -77574,7 +77574,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__22); __Pyx_GIVEREF(__pyx_tuple__22); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":56 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":56 * * def read_text(self, char* filename): * with gzip_or_text(filename) as f: # <<<<<<<<<<<<<< @@ -77585,7 +77585,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__23); __Pyx_GIVEREF(__pyx_tuple__23); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":77 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":77 * for i, link in enumerate(self.links): * while i >= self.sent_index[sent_num]: * f.write("\n") # <<<<<<<<<<<<<< @@ -77596,7 +77596,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__24); __Pyx_GIVEREF(__pyx_tuple__24); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":80 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":80 * sent_num = sent_num + 1 * f.write("%d-%d " % self.unlink(link)) * f.write("\n") # <<<<<<<<<<<<<< @@ -77607,7 +77607,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__25); __Pyx_GIVEREF(__pyx_tuple__25); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":73 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":73 * * def write_text(self, char* filename): * with open(filename, "w") as f: # <<<<<<<<<<<<<< @@ -77618,7 +77618,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__26); __Pyx_GIVEREF(__pyx_tuple__26); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":93 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":93 * for link in self.links: * f.write("%d " % link) * f.write("\n") # <<<<<<<<<<<<<< @@ -77629,7 +77629,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__27); __Pyx_GIVEREF(__pyx_tuple__27); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":96 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":96 * for i in self.sent_index: * f.write("%d " % i) * f.write("\n") # <<<<<<<<<<<<<< @@ -77640,7 +77640,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__28); __Pyx_GIVEREF(__pyx_tuple__28); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":90 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":90 * * def write_enhanced(self, char* filename): * with open(filename, "w") as f: # <<<<<<<<<<<<<< @@ -77651,7 +77651,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__29); __Pyx_GIVEREF(__pyx_tuple__29); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":305 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":305 * * # Re-read file, placing words into buckets * f.seek(0) # <<<<<<<<<<<<<< @@ -77662,7 +77662,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__30); __Pyx_GIVEREF(__pyx_tuple__30); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":281 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":281 * * fcount = IntList() * with gzip_or_text(filename) as f: # <<<<<<<<<<<<<< @@ -77673,7 +77673,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__31); __Pyx_GIVEREF(__pyx_tuple__31); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":347 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":347 * * if i > j: * raise Exception("Sort error in CLex") # <<<<<<<<<<<<<< @@ -77684,7 +77684,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__33); __Pyx_GIVEREF(__pyx_tuple__33); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":370 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":370 * for i in self.f_index: * f.write("%d " % i) * f.write("\n") # <<<<<<<<<<<<<< @@ -77695,7 +77695,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__35); __Pyx_GIVEREF(__pyx_tuple__35); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":373 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":373 * for i, s1, s2 in zip(self.e_index, self.col1, self.col2): * f.write("%d %f %f " % (i, s1, s2)) * f.write("\n") # <<<<<<<<<<<<<< @@ -77706,7 +77706,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__36); __Pyx_GIVEREF(__pyx_tuple__36); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":376 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":376 * for i, w in enumerate(self.id2fword): * f.write("%d %s " % (i, w)) * f.write("\n") # <<<<<<<<<<<<<< @@ -77717,7 +77717,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__37); __Pyx_GIVEREF(__pyx_tuple__37); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":379 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":379 * for i, w in enumerate(self.id2eword): * f.write("%d %s " % (i, w)) * f.write("\n") # <<<<<<<<<<<<<< @@ -77728,7 +77728,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__38); __Pyx_GIVEREF(__pyx_tuple__38); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":367 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":367 * * def write_enhanced(self, char* filename): * with open(filename, "w") as f: # <<<<<<<<<<<<<< @@ -77739,7 +77739,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__39); __Pyx_GIVEREF(__pyx_tuple__39); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/bilex.pxi":412 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":412 * cdef i, N, e_id, f_id * * with open(filename, "w") as f: # <<<<<<<<<<<<<< @@ -77750,7 +77750,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__40); __Pyx_GIVEREF(__pyx_tuple__40); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/lcp.pxi":13 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":13 * cdef IntList rank * * logger.info("Constructing LCP array") # <<<<<<<<<<<<<< @@ -77761,7 +77761,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__43); __Pyx_GIVEREF(__pyx_tuple__43); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/lcp.pxi":34 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":34 * if h > 0: * h = h-1 * logger.info("LCP array completed") # <<<<<<<<<<<<<< @@ -77772,7 +77772,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__44); __Pyx_GIVEREF(__pyx_tuple__44); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":297 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":297 * pattern_rank = {} * * logger.info("Precomputing frequent intersections") # <<<<<<<<<<<<<< @@ -77783,7 +77783,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__47); __Pyx_GIVEREF(__pyx_tuple__47); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":314 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":314 * queue = IntList(increment=1000) * * logger.info(" Computing inverted indexes...") # <<<<<<<<<<<<<< @@ -77794,7 +77794,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__48); __Pyx_GIVEREF(__pyx_tuple__48); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":329 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":329 * trie_node_data_append(node, i) * * logger.info(" Computing collocations...") # <<<<<<<<<<<<<< @@ -77805,7 +77805,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__49); __Pyx_GIVEREF(__pyx_tuple__49); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":386 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":386 * ptr1 = ptr1 + 1 * * self.precomputed_collocations = collocations.toMap(False) # <<<<<<<<<<<<<< @@ -77816,7 +77816,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__50); __Pyx_GIVEREF(__pyx_tuple__50); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":387 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":387 * * self.precomputed_collocations = collocations.toMap(False) * self.precomputed_index = frequent_patterns.toMap(True) # <<<<<<<<<<<<<< @@ -77827,7 +77827,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__51); __Pyx_GIVEREF(__pyx_tuple__51); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":393 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":393 * for pattern2 in J_set: * if len(pattern1) + len(pattern2) + 1 < self.max_length: * combined_pattern = pattern1 + (-1,) + pattern2 # <<<<<<<<<<<<<< @@ -77838,7 +77838,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__52); __Pyx_GIVEREF(__pyx_tuple__52); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":400 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":400 * x = x+1 * if len(pattern1) + len(pattern2) + 1 <= self.max_length: * combined_pattern = pattern1 + (-1,) + pattern2 # <<<<<<<<<<<<<< @@ -77849,7 +77849,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__53); __Pyx_GIVEREF(__pyx_tuple__53); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":407 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":407 * x = x+2 * if len(pattern1) + len(pattern2) + 1<= self.max_length: * combined_pattern = pattern1 + (-1,) + pattern2 # <<<<<<<<<<<<<< @@ -77860,7 +77860,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__54); __Pyx_GIVEREF(__pyx_tuple__54); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/precomputation.pxi":409 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":409 * combined_pattern = pattern1 + (-1,) + pattern2 * IJ_set.add(combined_pattern) * combined_pattern = pattern2 + (-1,) + pattern1 # <<<<<<<<<<<<<< @@ -77871,7 +77871,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__55); __Pyx_GIVEREF(__pyx_tuple__55); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":94 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":94 * * '''Step 3: read off suffix array from inverse suffix array''' * logger.info(" Finalizing sort...") # <<<<<<<<<<<<<< @@ -77882,7 +77882,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__56); __Pyx_GIVEREF(__pyx_tuple__56); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":193 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":193 * for a_i in self.sa: * f.write("%d " % a_i) * f.write("\n") # <<<<<<<<<<<<<< @@ -77893,7 +77893,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__57); __Pyx_GIVEREF(__pyx_tuple__57); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":196 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":196 * for w_i in self.ha: * f.write("%d " % w_i) * f.write("\n") # <<<<<<<<<<<<<< @@ -77904,7 +77904,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__58); __Pyx_GIVEREF(__pyx_tuple__58); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/suffix_array.pxi":189 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":189 * * def write_enhanced(self, char* filename): * with open(filename, "w") as f: # <<<<<<<<<<<<<< @@ -77915,7 +77915,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__59); __Pyx_GIVEREF(__pyx_tuple__59); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":133 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":133 * logger.info("Sampling strategy: uniform, max sample size = %d", sample_size) * else: * logger.info("Sampling strategy: no sampling") # <<<<<<<<<<<<<< @@ -77926,7 +77926,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__60); __Pyx_GIVEREF(__pyx_tuple__60); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":346 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":346 * respectively. This is because Chiang's model does not require * them to be the same, therefore we don't either.''' * self.rules = TrieTable(True) # cache # <<<<<<<<<<<<<< @@ -77937,7 +77937,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__61); __Pyx_GIVEREF(__pyx_tuple__61); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":349 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":349 * self.rules.root = ExtendedTrieNode(phrase_location=PhraseLocation()) * if alignment is None: * raise Exception("Must specify an alignment object") # <<<<<<<<<<<<<< @@ -77948,7 +77948,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__62); __Pyx_GIVEREF(__pyx_tuple__62); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1064 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1064 * else: * #ERROR: We never get here * raise Exception("Keyword trie error") # <<<<<<<<<<<<<< @@ -77959,7 +77959,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__66); __Pyx_GIVEREF(__pyx_tuple__66); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1983 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1983 * if nt and nt[-1][2] == f_j - 1: * # Add to non-terminal, checking for collisions * old_last_nt = nt[-1][:] # <<<<<<<<<<<<<< @@ -77970,7 +77970,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_slice__67); __Pyx_GIVEREF(__pyx_slice__67); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":1920 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1920 * # f_ i and j are current, e_ i and j are previous * # We care _considering_ f_j, so it is not yet in counts * def extract(f_i, f_j, e_i, e_j, min_bound, wc, links, nt, nt_open): # <<<<<<<<<<<<<< @@ -77980,9 +77980,9 @@ static int __Pyx_InitCachedConstants(void) { __pyx_tuple__68 = PyTuple_Pack(19, __pyx_n_s_f_i, __pyx_n_s_f_j, __pyx_n_s_e_i, __pyx_n_s_e_j, __pyx_n_s_min_bound, __pyx_n_s_wc, __pyx_n_s_links, __pyx_n_s_nt, __pyx_n_s_nt_open, __pyx_n_s_link_i, __pyx_n_s_link_j, __pyx_n_s_new_e_i, __pyx_n_s_new_e_j, __pyx_n_s_new_min_bound, __pyx_n_s_i, __pyx_n_s_nt_collision, __pyx_n_s_link, __pyx_n_s_plus_links, __pyx_n_s_old_last_nt); if (unlikely(!__pyx_tuple__68)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1920; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__68); __Pyx_GIVEREF(__pyx_tuple__68); - __pyx_codeobj__69 = (PyObject*)__Pyx_PyCode_New(9, 0, 19, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__68, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr0_home_mdenkows_cdec_git_pyt, __pyx_n_s_extract, 1920, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__69)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1920; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_codeobj__69 = (PyObject*)__Pyx_PyCode_New(9, 0, 19, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__68, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr0_home_cdyer_cdec_python_cde, __pyx_n_s_extract, 1920, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__69)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1920; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2042 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2042 * # Update phrase counts * for rule in rules: * (f_ph, e_ph, al) = rule[:3] # <<<<<<<<<<<<<< @@ -77993,7 +77993,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_slice__70); __Pyx_GIVEREF(__pyx_slice__70); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2053 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2053 * self.bilex.update(f_words, e_words, alignment) * else: * logger.warning('No online bilexical dictionary specified, not updating lexical weights') # <<<<<<<<<<<<<< @@ -78004,7 +78004,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__71); __Pyx_GIVEREF(__pyx_tuple__71); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2060 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2060 * # Substitute in non-terminals * nt_inv = sorted(nt, cmp=lambda x, y: cmp(x[3], y[3])) * f_sym = list(f_span[:]) # <<<<<<<<<<<<<< @@ -78015,7 +78015,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_slice__72); __Pyx_GIVEREF(__pyx_slice__72); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2070 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2070 * f_sym.insert(next_nt[1] - off, sym_setindex(self.category, next_nt[0])) * off += (nt_len - 1) * e_sym = list(e_span[:]) # <<<<<<<<<<<<<< @@ -78026,7 +78026,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_slice__73); __Pyx_GIVEREF(__pyx_slice__73); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2145 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2145 * phrases = set() # (fphrase, lex_i, lex_j) * * def extract(f_i, f_j, lex_i, lex_j, wc, ntc, syms): # <<<<<<<<<<<<<< @@ -78036,7 +78036,7 @@ static int __Pyx_InitCachedConstants(void) { __pyx_tuple__74 = PyTuple_Pack(10, __pyx_n_s_f_i, __pyx_n_s_f_j, __pyx_n_s_lex_i, __pyx_n_s_lex_j, __pyx_n_s_wc, __pyx_n_s_ntc, __pyx_n_s_syms, __pyx_n_s_f, __pyx_n_s_new_lex_i, __pyx_n_s_new_lex_j); if (unlikely(!__pyx_tuple__74)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__74); __Pyx_GIVEREF(__pyx_tuple__74); - __pyx_codeobj__75 = (PyObject*)__Pyx_PyCode_New(7, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__74, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr0_home_mdenkows_cdec_git_pyt, __pyx_n_s_extract, 2145, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__75)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_codeobj__75 = (PyObject*)__Pyx_PyCode_New(7, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__74, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr0_home_cdyer_cdec_python_cde, __pyx_n_s_extract, 2145, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__75)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "cdec/sa/_sa.pyx":5 * import gzip @@ -78045,7 +78045,7 @@ static int __Pyx_InitCachedConstants(void) { * return (resource.getrusage(resource.RUSAGE_SELF).ru_utime+ * resource.getrusage(resource.RUSAGE_SELF).ru_stime) */ - __pyx_codeobj__76 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr0_home_mdenkows_cdec_git_pyt_2, __pyx_n_s_monitor_cpu, 5, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__76)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_codeobj__76 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr0_home_cdyer_cdec_python_cde_2, __pyx_n_s_monitor_cpu, 5, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__76)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "cdec/sa/_sa.pyx":9 * resource.getrusage(resource.RUSAGE_SELF).ru_stime) @@ -78057,7 +78057,7 @@ static int __Pyx_InitCachedConstants(void) { __pyx_tuple__77 = PyTuple_Pack(2, __pyx_n_s_filename, __pyx_n_s_filename); if (unlikely(!__pyx_tuple__77)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__77); __Pyx_GIVEREF(__pyx_tuple__77); - __pyx_codeobj__78 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__77, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr0_home_mdenkows_cdec_git_pyt_2, __pyx_n_s_gzip_or_text, 9, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__78)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_codeobj__78 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__77, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr0_home_cdyer_cdec_python_cde_2, __pyx_n_s_gzip_or_text, 9, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__78)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "cdec/sa/_sa.pyx":15 * return open(filename) @@ -78070,7 +78070,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__79); __Pyx_GIVEREF(__pyx_tuple__79); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":107 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":107 * return ALPHABET.fromstring(string, terminal) * * def isvar(sym): # <<<<<<<<<<<<<< @@ -78080,9 +78080,9 @@ static int __Pyx_InitCachedConstants(void) { __pyx_tuple__80 = PyTuple_Pack(1, __pyx_n_s_sym); if (unlikely(!__pyx_tuple__80)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__80); __Pyx_GIVEREF(__pyx_tuple__80); - __pyx_codeobj__81 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__80, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr0_home_mdenkows_cdec_git_pyt_3, __pyx_n_s_isvar, 107, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__81)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_codeobj__81 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__80, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr0_home_cdyer_cdec_python_cde_3, __pyx_n_s_isvar, 107, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__81)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":110 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":110 * return sym_isvar(sym) * * def make_lattice(words): # <<<<<<<<<<<<<< @@ -78092,9 +78092,9 @@ static int __Pyx_InitCachedConstants(void) { __pyx_tuple__82 = PyTuple_Pack(5, __pyx_n_s_words, __pyx_n_s_word_ids, __pyx_n_s_genexpr, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__82)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__82); __Pyx_GIVEREF(__pyx_tuple__82); - __pyx_codeobj__83 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__82, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr0_home_mdenkows_cdec_git_pyt_3, __pyx_n_s_make_lattice, 110, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__83)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_codeobj__83 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__82, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr0_home_cdyer_cdec_python_cde_3, __pyx_n_s_make_lattice, 110, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__83)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":114 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":114 * return tuple(((word, None, 1), ) for word in word_ids) * * def decode_lattice(lattice): # <<<<<<<<<<<<<< @@ -78104,9 +78104,9 @@ static int __Pyx_InitCachedConstants(void) { __pyx_tuple__84 = PyTuple_Pack(3, __pyx_n_s_lattice, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__84)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__84); __Pyx_GIVEREF(__pyx_tuple__84); - __pyx_codeobj__85 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__84, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr0_home_mdenkows_cdec_git_pyt_3, __pyx_n_s_decode_lattice, 114, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__85)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_codeobj__85 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__84, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr0_home_cdyer_cdec_python_cde_3, __pyx_n_s_decode_lattice, 114, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__85)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":118 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":118 * for arc in node for node in lattice) * * def decode_sentence(lattice): # <<<<<<<<<<<<<< @@ -78116,9 +78116,9 @@ static int __Pyx_InitCachedConstants(void) { __pyx_tuple__86 = PyTuple_Pack(3, __pyx_n_s_lattice, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__86)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__86); __Pyx_GIVEREF(__pyx_tuple__86); - __pyx_codeobj__87 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__86, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr0_home_mdenkows_cdec_git_pyt_3, __pyx_n_s_decode_sentence, 118, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__87)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_codeobj__87 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__86, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr0_home_cdyer_cdec_python_cde_3, __pyx_n_s_decode_sentence, 118, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__87)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":121 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":121 * return tuple(sym_tostring(sym) for ((sym, _, _),) in lattice) * * def encode_words(words): # <<<<<<<<<<<<<< @@ -78128,9 +78128,9 @@ static int __Pyx_InitCachedConstants(void) { __pyx_tuple__88 = PyTuple_Pack(3, __pyx_n_s_words, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__88)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__88); __Pyx_GIVEREF(__pyx_tuple__88); - __pyx_codeobj__89 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__88, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr0_home_mdenkows_cdec_git_pyt_3, __pyx_n_s_encode_words, 121, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__89)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_codeobj__89 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__88, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr0_home_cdyer_cdec_python_cde_3, __pyx_n_s_encode_words, 121, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__89)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":124 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":124 * return tuple(sym_fromstring(word, True) for word in words) * * def decode_words(syms): # <<<<<<<<<<<<<< @@ -78139,9 +78139,9 @@ static int __Pyx_InitCachedConstants(void) { __pyx_tuple__90 = PyTuple_Pack(3, __pyx_n_s_syms, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__90)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__90); __Pyx_GIVEREF(__pyx_tuple__90); - __pyx_codeobj__91 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__90, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr0_home_mdenkows_cdec_git_pyt_3, __pyx_n_s_decode_words, 124, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__91)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_codeobj__91 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__90, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr0_home_cdyer_cdec_python_cde_3, __pyx_n_s_decode_words, 124, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__91)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2183 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2183 * * # Spans are _inclusive_ on both ends [i, j] * def span_check(vec, i, j): # <<<<<<<<<<<<<< @@ -78151,9 +78151,9 @@ static int __Pyx_InitCachedConstants(void) { __pyx_tuple__92 = PyTuple_Pack(4, __pyx_n_s_vec, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k); if (unlikely(!__pyx_tuple__92)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__92); __Pyx_GIVEREF(__pyx_tuple__92); - __pyx_codeobj__93 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__92, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr0_home_mdenkows_cdec_git_pyt, __pyx_n_s_span_check, 2183, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__93)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_codeobj__93 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__92, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr0_home_cdyer_cdec_python_cde, __pyx_n_s_span_check, 2183, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__93)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2191 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2191 * return True * * def span_inc(vec, i, j): # <<<<<<<<<<<<<< @@ -78163,9 +78163,9 @@ static int __Pyx_InitCachedConstants(void) { __pyx_tuple__94 = PyTuple_Pack(4, __pyx_n_s_vec, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k); if (unlikely(!__pyx_tuple__94)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__94); __Pyx_GIVEREF(__pyx_tuple__94); - __pyx_codeobj__95 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__94, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr0_home_mdenkows_cdec_git_pyt, __pyx_n_s_span_inc, 2191, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__95)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_codeobj__95 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__94, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr0_home_cdyer_cdec_python_cde, __pyx_n_s_span_inc, 2191, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__95)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/rulefactory.pxi":2197 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2197 * k += 1 * * def span_dec(vec, i, j): # <<<<<<<<<<<<<< @@ -78175,7 +78175,7 @@ static int __Pyx_InitCachedConstants(void) { __pyx_tuple__96 = PyTuple_Pack(4, __pyx_n_s_vec, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k); if (unlikely(!__pyx_tuple__96)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__96); __Pyx_GIVEREF(__pyx_tuple__96); - __pyx_codeobj__97 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__96, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr0_home_mdenkows_cdec_git_pyt, __pyx_n_s_span_dec, 2197, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__97)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_codeobj__97 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__96, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr0_home_cdyer_cdec_python_cde, __pyx_n_s_span_dec, 2197, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__97)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; @@ -78656,7 +78656,7 @@ PyMODINIT_FUNC PyInit__sa(void) if (PyDict_SetItem(__pyx_d, __pyx_n_s_logger, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/alignment.pxi":8 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":8 * # May need to revisit if things get really tight, though. * * cdef int ALIGNMENT_CODE = 1 << 16 # <<<<<<<<<<<<<< @@ -78665,7 +78665,7 @@ PyMODINIT_FUNC PyInit__sa(void) */ __pyx_v_4cdec_2sa_3_sa_ALIGNMENT_CODE = 65536; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":17 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":17 * from libc.string cimport memset * * cdef int MIN_BOTTOM_SIZE = 32 # <<<<<<<<<<<<<< @@ -78674,7 +78674,7 @@ PyMODINIT_FUNC PyInit__sa(void) */ __pyx_v_4cdec_2sa_3_sa_MIN_BOTTOM_SIZE = 32; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":18 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":18 * * cdef int MIN_BOTTOM_SIZE = 32 * cdef int MIN_BOTTOM_BITS = 5 # <<<<<<<<<<<<<< @@ -78683,7 +78683,7 @@ PyMODINIT_FUNC PyInit__sa(void) */ __pyx_v_4cdec_2sa_3_sa_MIN_BOTTOM_BITS = 5; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/veb.pxi":28 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":28 * LOWER_MASK[i] = mask * * _init_lower_mask() # <<<<<<<<<<<<<< @@ -78692,7 +78692,7 @@ PyMODINIT_FUNC PyInit__sa(void) */ __pyx_f_4cdec_2sa_3_sa__init_lower_mask(); - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":4 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":4 * from libc.stdlib cimport malloc, realloc, strtol * * cdef int INDEX_SHIFT = 3 # <<<<<<<<<<<<<< @@ -78701,7 +78701,7 @@ PyMODINIT_FUNC PyInit__sa(void) */ __pyx_v_4cdec_2sa_3_sa_INDEX_SHIFT = 3; - /* "/usr0/home/mdenkows/cdec-git/python/cdec/sa/sym.pxi":5 + /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":5 * * cdef int INDEX_SHIFT = 3 * cdef int INDEX_MASK = (1< Date: Thu, 10 Apr 2014 16:42:50 -0400 Subject: New feature: working implementation (online bilex) --- python/cdec/sa/_sa.cpp | 12230 ++++++++++++++++++++------------------- python/cdec/sa/features.py | 25 +- python/cdec/sa/rulefactory.pxi | 19 +- 3 files changed, 6212 insertions(+), 6062 deletions(-) (limited to 'python/cdec') diff --git a/python/cdec/sa/_sa.cpp b/python/cdec/sa/_sa.cpp index d02eed3d..652261fe 100644 --- a/python/cdec/sa/_sa.cpp +++ b/python/cdec/sa/_sa.cpp @@ -1,4 +1,4 @@ -/* Generated by Cython 0.20.1 on Mon Apr 7 01:29:27 2014 */ +/* Generated by Cython 0.20.1 on Thu Apr 10 16:38:02 2014 */ #define PY_SSIZE_T_CLEAN #ifndef CYTHON_USE_PYLONG_INTERNALS @@ -612,7 +612,7 @@ struct __pyx_t_4cdec_2sa_3_sa__Trie_Node; struct __pyx_t_4cdec_2sa_3_sa_match_node; struct __pyx_t_4cdec_2sa_3_sa_Matching; -/* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":9 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":9 * from libc.string cimport memset, strcpy * * cdef struct _node: # <<<<<<<<<<<<<< @@ -626,7 +626,7 @@ struct __pyx_t_4cdec_2sa_3_sa__node { int val; }; -/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":30 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":30 * _init_lower_mask() * * cdef struct _BitSet: # <<<<<<<<<<<<<< @@ -640,7 +640,7 @@ struct __pyx_t_4cdec_2sa_3_sa__BitSet { int size; }; -/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":168 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":168 * return result * * cdef struct _VEB: # <<<<<<<<<<<<<< @@ -657,7 +657,7 @@ struct __pyx_t_4cdec_2sa_3_sa__VEB { void **bottom; }; -/* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":10 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":10 * cdef struct _Trie_Node # forward decl * * cdef struct _Trie_Edge: # <<<<<<<<<<<<<< @@ -671,7 +671,7 @@ struct __pyx_t_4cdec_2sa_3_sa__Trie_Edge { struct __pyx_t_4cdec_2sa_3_sa__Trie_Edge *smaller; }; -/* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":8 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":8 * from libc.string cimport memset, memcpy * * cdef struct _Trie_Node # forward decl # <<<<<<<<<<<<<< @@ -684,7 +684,7 @@ struct __pyx_t_4cdec_2sa_3_sa__Trie_Node { int arr_len; }; -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":90 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":97 * * # linked list structure for storing matches in BaselineRuleFactory * cdef struct match_node: # <<<<<<<<<<<<<< @@ -696,7 +696,7 @@ struct __pyx_t_4cdec_2sa_3_sa_match_node { struct __pyx_t_4cdec_2sa_3_sa_match_node *next; }; -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":186 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":193 * * # struct used to encapsulate a single matching * cdef struct Matching: # <<<<<<<<<<<<<< @@ -794,7 +794,7 @@ struct __pyx_obj_4cdec_2sa_3_sa_Rule { }; -/* "/usr0/home/cdyer/cdec/python/cdec/sa/str_map.pxi":8 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/str_map.pxi":8 * char* stringmap_word(StrMap *vocab, int i) * * cdef class StringMap: # <<<<<<<<<<<<<< @@ -808,7 +808,7 @@ struct __pyx_obj_4cdec_2sa_3_sa_StringMap { }; -/* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":9 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":9 * from libc.string cimport memset, strcpy * * cdef class DataArray: # <<<<<<<<<<<<<< @@ -827,7 +827,7 @@ struct __pyx_obj_4cdec_2sa_3_sa_DataArray { }; -/* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":10 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":10 * cdef int ALIGNMENT_CODE = 1 << 16 * * cdef class Alignment: # <<<<<<<<<<<<<< @@ -842,7 +842,7 @@ struct __pyx_obj_4cdec_2sa_3_sa_Alignment { }; -/* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":47 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":47 * * * cdef class BiLex: # <<<<<<<<<<<<<< @@ -863,7 +863,7 @@ struct __pyx_obj_4cdec_2sa_3_sa_BiLex { }; -/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":100 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":100 * * * cdef class BitSetIterator: # <<<<<<<<<<<<<< @@ -877,7 +877,7 @@ struct __pyx_obj_4cdec_2sa_3_sa_BitSetIterator { }; -/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":118 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":118 * # (entirely C-implemented) _BitSet struct. * # Very slow; use only for debugging * cdef class BitSet: # <<<<<<<<<<<<<< @@ -890,7 +890,7 @@ struct __pyx_obj_4cdec_2sa_3_sa_BitSet { }; -/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":340 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":340 * * * cdef class VEBIterator: # <<<<<<<<<<<<<< @@ -904,7 +904,7 @@ struct __pyx_obj_4cdec_2sa_3_sa_VEBIterator { }; -/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":354 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":354 * * * cdef class VEB: # <<<<<<<<<<<<<< @@ -918,7 +918,7 @@ struct __pyx_obj_4cdec_2sa_3_sa_VEB { }; -/* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":5 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":5 * as k most frequent n-grams""" * * cdef class LCP: # <<<<<<<<<<<<<< @@ -932,7 +932,7 @@ struct __pyx_obj_4cdec_2sa_3_sa_LCP { }; -/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":7 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":7 * cdef int INDEX_MASK = (1< size: # <<<<<<<<<<<<<< @@ -4212,7 +4213,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9FloatList___cinit__(struct __pyx_obj_4cdec_2 __pyx_t_1 = ((__pyx_v_initial_len > __pyx_v_size) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":13 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":13 * def __cinit__(self, int size=0, int increment=1, int initial_len=0): * if initial_len > size: * size = initial_len # <<<<<<<<<<<<<< @@ -4224,7 +4225,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9FloatList___cinit__(struct __pyx_obj_4cdec_2 } __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":14 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":14 * if initial_len > size: * size = initial_len * self.size = size # <<<<<<<<<<<<<< @@ -4233,7 +4234,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9FloatList___cinit__(struct __pyx_obj_4cdec_2 */ __pyx_v_self->size = __pyx_v_size; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":15 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":15 * size = initial_len * self.size = size * self.increment = increment # <<<<<<<<<<<<<< @@ -4242,7 +4243,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9FloatList___cinit__(struct __pyx_obj_4cdec_2 */ __pyx_v_self->increment = __pyx_v_increment; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":16 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":16 * self.size = size * self.increment = increment * self.len = initial_len # <<<<<<<<<<<<<< @@ -4251,7 +4252,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9FloatList___cinit__(struct __pyx_obj_4cdec_2 */ __pyx_v_self->len = __pyx_v_initial_len; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":17 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":17 * self.increment = increment * self.len = initial_len * self.arr = malloc(size*sizeof(float)) # <<<<<<<<<<<<<< @@ -4260,7 +4261,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9FloatList___cinit__(struct __pyx_obj_4cdec_2 */ __pyx_v_self->arr = ((float *)malloc((__pyx_v_size * (sizeof(float))))); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":18 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":18 * self.len = initial_len * self.arr = malloc(size*sizeof(float)) * memset(self.arr, 0, initial_len*sizeof(float)) # <<<<<<<<<<<<<< @@ -4269,7 +4270,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9FloatList___cinit__(struct __pyx_obj_4cdec_2 */ memset(__pyx_v_self->arr, 0, (__pyx_v_initial_len * (sizeof(float)))); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":11 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":11 * cdef class FloatList: * * def __cinit__(self, int size=0, int increment=1, int initial_len=0): # <<<<<<<<<<<<<< @@ -4283,7 +4284,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9FloatList___cinit__(struct __pyx_obj_4cdec_2 return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":20 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":20 * memset(self.arr, 0, initial_len*sizeof(float)) * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -4306,7 +4307,7 @@ static void __pyx_pf_4cdec_2sa_3_sa_9FloatList_2__dealloc__(struct __pyx_obj_4cd __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":21 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":21 * * def __dealloc__(self): * free(self.arr) # <<<<<<<<<<<<<< @@ -4315,7 +4316,7 @@ static void __pyx_pf_4cdec_2sa_3_sa_9FloatList_2__dealloc__(struct __pyx_obj_4cd */ free(__pyx_v_self->arr); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":20 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":20 * memset(self.arr, 0, initial_len*sizeof(float)) * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -4327,7 +4328,7 @@ static void __pyx_pf_4cdec_2sa_3_sa_9FloatList_2__dealloc__(struct __pyx_obj_4cd __Pyx_RefNannyFinishContext(); } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":23 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":23 * free(self.arr) * * def __getitem__(self, i): # <<<<<<<<<<<<<< @@ -4363,7 +4364,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9FloatList_4__getitem__(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getitem__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":24 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":24 * * def __getitem__(self, i): * j = i # <<<<<<<<<<<<<< @@ -4373,7 +4374,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9FloatList_4__getitem__(struct __pyx_ob __Pyx_INCREF(__pyx_v_i); __pyx_v_j = __pyx_v_i; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":25 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":25 * def __getitem__(self, i): * j = i * if i<0: # <<<<<<<<<<<<<< @@ -4385,7 +4386,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9FloatList_4__getitem__(struct __pyx_ob __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":26 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":26 * j = i * if i<0: * j = self.len + i # <<<<<<<<<<<<<< @@ -4403,7 +4404,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9FloatList_4__getitem__(struct __pyx_ob } __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":27 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":27 * if i<0: * j = self.len + i * if j<0 or j>=self.len: # <<<<<<<<<<<<<< @@ -4426,7 +4427,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9FloatList_4__getitem__(struct __pyx_ob } if (__pyx_t_5) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":28 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":28 * j = self.len + i * if j<0 or j>=self.len: * raise IndexError("Requested index %d of %d-length FloatList" % (i, self.len)) # <<<<<<<<<<<<<< @@ -4459,7 +4460,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9FloatList_4__getitem__(struct __pyx_ob {__pyx_filename = __pyx_f[1]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":29 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":29 * if j<0 or j>=self.len: * raise IndexError("Requested index %d of %d-length FloatList" % (i, self.len)) * return self.arr[j] # <<<<<<<<<<<<<< @@ -4474,7 +4475,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9FloatList_4__getitem__(struct __pyx_ob __pyx_t_1 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":23 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":23 * free(self.arr) * * def __getitem__(self, i): # <<<<<<<<<<<<<< @@ -4495,7 +4496,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9FloatList_4__getitem__(struct __pyx_ob return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":31 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":31 * return self.arr[j] * * cdef void set(self, int i, float v): # <<<<<<<<<<<<<< @@ -4517,7 +4518,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9FloatList_set(struct __pyx_obj_4cdec_2sa_3_s int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":32 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":32 * * cdef void set(self, int i, float v): * j = i # <<<<<<<<<<<<<< @@ -4526,7 +4527,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9FloatList_set(struct __pyx_obj_4cdec_2sa_3_s */ __pyx_v_j = __pyx_v_i; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":33 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":33 * cdef void set(self, int i, float v): * j = i * if i<0: # <<<<<<<<<<<<<< @@ -4536,7 +4537,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9FloatList_set(struct __pyx_obj_4cdec_2sa_3_s __pyx_t_1 = ((__pyx_v_i < 0) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":34 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":34 * j = i * if i<0: * j = self.len + i # <<<<<<<<<<<<<< @@ -4548,7 +4549,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9FloatList_set(struct __pyx_obj_4cdec_2sa_3_s } __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":35 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":35 * if i<0: * j = self.len + i * if j<0 or j>=self.len: # <<<<<<<<<<<<<< @@ -4564,7 +4565,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9FloatList_set(struct __pyx_obj_4cdec_2sa_3_s } if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":36 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":36 * j = self.len + i * if j<0 or j>=self.len: * raise IndexError("Requested index %d of %d-length FloatList" % (i, self.len)) # <<<<<<<<<<<<<< @@ -4599,7 +4600,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9FloatList_set(struct __pyx_obj_4cdec_2sa_3_s {__pyx_filename = __pyx_f[1]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":37 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":37 * if j<0 or j>=self.len: * raise IndexError("Requested index %d of %d-length FloatList" % (i, self.len)) * self.arr[j] = v # <<<<<<<<<<<<<< @@ -4608,7 +4609,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9FloatList_set(struct __pyx_obj_4cdec_2sa_3_s */ (__pyx_v_self->arr[__pyx_v_j]) = __pyx_v_v; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":31 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":31 * return self.arr[j] * * cdef void set(self, int i, float v): # <<<<<<<<<<<<<< @@ -4627,7 +4628,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9FloatList_set(struct __pyx_obj_4cdec_2sa_3_s __Pyx_RefNannyFinishContext(); } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":39 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":39 * self.arr[j] = v * * def __setitem__(self, i, val): # <<<<<<<<<<<<<< @@ -4658,7 +4659,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9FloatList_6__setitem__(struct __pyx_obj_4cde int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setitem__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":40 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":40 * * def __setitem__(self, i, val): * self.set(i, val) # <<<<<<<<<<<<<< @@ -4669,7 +4670,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9FloatList_6__setitem__(struct __pyx_obj_4cde __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_v_val); if (unlikely((__pyx_t_2 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 40; __pyx_clineno = __LINE__; goto __pyx_L1_error;} ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_FloatList *)__pyx_v_self->__pyx_vtab)->set(__pyx_v_self, __pyx_t_1, __pyx_t_2); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":39 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":39 * self.arr[j] = v * * def __setitem__(self, i, val): # <<<<<<<<<<<<<< @@ -4688,7 +4689,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9FloatList_6__setitem__(struct __pyx_obj_4cde return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":42 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":42 * self.set(i, val) * * def __len__(self): # <<<<<<<<<<<<<< @@ -4714,7 +4715,7 @@ static Py_ssize_t __pyx_pf_4cdec_2sa_3_sa_9FloatList_8__len__(struct __pyx_obj_4 __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":43 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":43 * * def __len__(self): * return self.len # <<<<<<<<<<<<<< @@ -4724,7 +4725,7 @@ static Py_ssize_t __pyx_pf_4cdec_2sa_3_sa_9FloatList_8__len__(struct __pyx_obj_4 __pyx_r = __pyx_v_self->len; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":42 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":42 * self.set(i, val) * * def __len__(self): # <<<<<<<<<<<<<< @@ -4738,7 +4739,7 @@ static Py_ssize_t __pyx_pf_4cdec_2sa_3_sa_9FloatList_8__len__(struct __pyx_obj_4 return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":45 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":45 * return self.len * * def append(self, float val): # <<<<<<<<<<<<<< @@ -4778,7 +4779,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9FloatList_10append(struct __pyx_obj_4c int __pyx_t_1; __Pyx_RefNannySetupContext("append", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":46 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":46 * * def append(self, float val): * if self.len == self.size: # <<<<<<<<<<<<<< @@ -4788,7 +4789,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9FloatList_10append(struct __pyx_obj_4c __pyx_t_1 = ((__pyx_v_self->len == __pyx_v_self->size) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":47 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":47 * def append(self, float val): * if self.len == self.size: * self.size = self.size + self.increment # <<<<<<<<<<<<<< @@ -4797,7 +4798,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9FloatList_10append(struct __pyx_obj_4c */ __pyx_v_self->size = (__pyx_v_self->size + __pyx_v_self->increment); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":48 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":48 * if self.len == self.size: * self.size = self.size + self.increment * self.arr = realloc(self.arr, self.size*sizeof(float)) # <<<<<<<<<<<<<< @@ -4809,7 +4810,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9FloatList_10append(struct __pyx_obj_4c } __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":49 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":49 * self.size = self.size + self.increment * self.arr = realloc(self.arr, self.size*sizeof(float)) * self.arr[self.len] = val # <<<<<<<<<<<<<< @@ -4818,7 +4819,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9FloatList_10append(struct __pyx_obj_4c */ (__pyx_v_self->arr[__pyx_v_self->len]) = __pyx_v_val; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":50 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":50 * self.arr = realloc(self.arr, self.size*sizeof(float)) * self.arr[self.len] = val * self.len = self.len + 1 # <<<<<<<<<<<<<< @@ -4827,7 +4828,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9FloatList_10append(struct __pyx_obj_4c */ __pyx_v_self->len = (__pyx_v_self->len + 1); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":45 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":45 * return self.len * * def append(self, float val): # <<<<<<<<<<<<<< @@ -4842,7 +4843,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9FloatList_10append(struct __pyx_obj_4c return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":52 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":52 * self.len = self.len + 1 * * cdef void write_handle(self, FILE* f): # <<<<<<<<<<<<<< @@ -4854,7 +4855,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9FloatList_write_handle(struct __pyx_obj_4cde __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("write_handle", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":53 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":53 * * cdef void write_handle(self, FILE* f): * fwrite(&(self.len), sizeof(float), 1, f) # <<<<<<<<<<<<<< @@ -4863,7 +4864,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9FloatList_write_handle(struct __pyx_obj_4cde */ fwrite((&__pyx_v_self->len), (sizeof(float)), 1, __pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":54 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":54 * cdef void write_handle(self, FILE* f): * fwrite(&(self.len), sizeof(float), 1, f) * fwrite(self.arr, sizeof(float), self.len, f) # <<<<<<<<<<<<<< @@ -4872,7 +4873,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9FloatList_write_handle(struct __pyx_obj_4cde */ fwrite(__pyx_v_self->arr, (sizeof(float)), __pyx_v_self->len, __pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":52 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":52 * self.len = self.len + 1 * * cdef void write_handle(self, FILE* f): # <<<<<<<<<<<<<< @@ -4884,7 +4885,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9FloatList_write_handle(struct __pyx_obj_4cde __Pyx_RefNannyFinishContext(); } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":56 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":56 * fwrite(self.arr, sizeof(float), self.len, f) * * def write(self, char* filename): # <<<<<<<<<<<<<< @@ -4924,7 +4925,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9FloatList_12write(struct __pyx_obj_4cd __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("write", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":58 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":58 * def write(self, char* filename): * cdef FILE* f * f = fopen(filename, "w") # <<<<<<<<<<<<<< @@ -4933,7 +4934,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9FloatList_12write(struct __pyx_obj_4cd */ __pyx_v_f = fopen(__pyx_v_filename, __pyx_k_w); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":59 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":59 * cdef FILE* f * f = fopen(filename, "w") * self.write_handle(f) # <<<<<<<<<<<<<< @@ -4942,7 +4943,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9FloatList_12write(struct __pyx_obj_4cd */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_FloatList *)__pyx_v_self->__pyx_vtab)->write_handle(__pyx_v_self, __pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":60 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":60 * f = fopen(filename, "w") * self.write_handle(f) * fclose(f) # <<<<<<<<<<<<<< @@ -4951,7 +4952,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9FloatList_12write(struct __pyx_obj_4cd */ fclose(__pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":56 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":56 * fwrite(self.arr, sizeof(float), self.len, f) * * def write(self, char* filename): # <<<<<<<<<<<<<< @@ -4966,7 +4967,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9FloatList_12write(struct __pyx_obj_4cd return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":62 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":62 * fclose(f) * * cdef void read_handle(self, FILE* f): # <<<<<<<<<<<<<< @@ -4979,7 +4980,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9FloatList_read_handle(struct __pyx_obj_4cdec int __pyx_t_1; __Pyx_RefNannySetupContext("read_handle", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":63 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":63 * * cdef void read_handle(self, FILE* f): * free(self.arr) # <<<<<<<<<<<<<< @@ -4988,7 +4989,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9FloatList_read_handle(struct __pyx_obj_4cdec */ free(__pyx_v_self->arr); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":64 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":64 * cdef void read_handle(self, FILE* f): * free(self.arr) * fread(&(self.len), sizeof(float), 1, f) # <<<<<<<<<<<<<< @@ -4997,7 +4998,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9FloatList_read_handle(struct __pyx_obj_4cdec */ fread((&__pyx_v_self->len), (sizeof(float)), 1, __pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":65 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":65 * free(self.arr) * fread(&(self.len), sizeof(float), 1, f) * self.arr = malloc(self.len * sizeof(float)) # <<<<<<<<<<<<<< @@ -5006,7 +5007,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9FloatList_read_handle(struct __pyx_obj_4cdec */ __pyx_v_self->arr = ((float *)malloc((__pyx_v_self->len * (sizeof(float))))); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":66 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":66 * fread(&(self.len), sizeof(float), 1, f) * self.arr = malloc(self.len * sizeof(float)) * self.size = self.len # <<<<<<<<<<<<<< @@ -5016,7 +5017,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9FloatList_read_handle(struct __pyx_obj_4cdec __pyx_t_1 = __pyx_v_self->len; __pyx_v_self->size = __pyx_t_1; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":67 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":67 * self.arr = malloc(self.len * sizeof(float)) * self.size = self.len * fread(self.arr, sizeof(float), self.len, f) # <<<<<<<<<<<<<< @@ -5025,7 +5026,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9FloatList_read_handle(struct __pyx_obj_4cdec */ fread(__pyx_v_self->arr, (sizeof(float)), __pyx_v_self->len, __pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":62 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":62 * fclose(f) * * cdef void read_handle(self, FILE* f): # <<<<<<<<<<<<<< @@ -5037,7 +5038,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9FloatList_read_handle(struct __pyx_obj_4cdec __Pyx_RefNannyFinishContext(); } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":69 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":69 * fread(self.arr, sizeof(float), self.len, f) * * def read(self, char* filename): # <<<<<<<<<<<<<< @@ -5077,7 +5078,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9FloatList_14read(struct __pyx_obj_4cde __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("read", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":71 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":71 * def read(self, char* filename): * cdef FILE* f * f = fopen(filename, "r") # <<<<<<<<<<<<<< @@ -5086,7 +5087,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9FloatList_14read(struct __pyx_obj_4cde */ __pyx_v_f = fopen(__pyx_v_filename, __pyx_k_r); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":72 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":72 * cdef FILE* f * f = fopen(filename, "r") * self.read_handle(f) # <<<<<<<<<<<<<< @@ -5094,14 +5095,14 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9FloatList_14read(struct __pyx_obj_4cde */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_FloatList *)__pyx_v_self->__pyx_vtab)->read_handle(__pyx_v_self, __pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":73 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":73 * f = fopen(filename, "r") * self.read_handle(f) * fclose(f) # <<<<<<<<<<<<<< */ fclose(__pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/float_list.pxi":69 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/float_list.pxi":69 * fread(self.arr, sizeof(float), self.len, f) * * def read(self, char* filename): # <<<<<<<<<<<<<< @@ -5116,7 +5117,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9FloatList_14read(struct __pyx_obj_4cde return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":11 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":11 * cdef class IntList: * * def __cinit__(self, int size=0, int increment=1, int initial_len=0): # <<<<<<<<<<<<<< @@ -5216,7 +5217,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_7IntList___cinit__(struct __pyx_obj_4cdec_2sa int __pyx_t_1; __Pyx_RefNannySetupContext("__cinit__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":12 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":12 * * def __cinit__(self, int size=0, int increment=1, int initial_len=0): * if initial_len > size: # <<<<<<<<<<<<<< @@ -5226,7 +5227,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_7IntList___cinit__(struct __pyx_obj_4cdec_2sa __pyx_t_1 = ((__pyx_v_initial_len > __pyx_v_size) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":13 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":13 * def __cinit__(self, int size=0, int increment=1, int initial_len=0): * if initial_len > size: * size = initial_len # <<<<<<<<<<<<<< @@ -5238,7 +5239,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_7IntList___cinit__(struct __pyx_obj_4cdec_2sa } __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":14 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":14 * if initial_len > size: * size = initial_len * self.size = size # <<<<<<<<<<<<<< @@ -5247,7 +5248,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_7IntList___cinit__(struct __pyx_obj_4cdec_2sa */ __pyx_v_self->size = __pyx_v_size; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":15 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":15 * size = initial_len * self.size = size * self.increment = increment # <<<<<<<<<<<<<< @@ -5256,7 +5257,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_7IntList___cinit__(struct __pyx_obj_4cdec_2sa */ __pyx_v_self->increment = __pyx_v_increment; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":16 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":16 * self.size = size * self.increment = increment * self.len = initial_len # <<<<<<<<<<<<<< @@ -5265,7 +5266,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_7IntList___cinit__(struct __pyx_obj_4cdec_2sa */ __pyx_v_self->len = __pyx_v_initial_len; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":17 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":17 * self.increment = increment * self.len = initial_len * self.arr = malloc(size*sizeof(int)) # <<<<<<<<<<<<<< @@ -5274,7 +5275,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_7IntList___cinit__(struct __pyx_obj_4cdec_2sa */ __pyx_v_self->arr = ((int *)malloc((__pyx_v_size * (sizeof(int))))); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":18 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":18 * self.len = initial_len * self.arr = malloc(size*sizeof(int)) * memset(self.arr, 0, initial_len*sizeof(int)) # <<<<<<<<<<<<<< @@ -5283,7 +5284,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_7IntList___cinit__(struct __pyx_obj_4cdec_2sa */ memset(__pyx_v_self->arr, 0, (__pyx_v_initial_len * (sizeof(int)))); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":11 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":11 * cdef class IntList: * * def __cinit__(self, int size=0, int increment=1, int initial_len=0): # <<<<<<<<<<<<<< @@ -5297,7 +5298,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_7IntList___cinit__(struct __pyx_obj_4cdec_2sa return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":20 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":20 * memset(self.arr, 0, initial_len*sizeof(int)) * * def __str__(self): # <<<<<<<<<<<<<< @@ -5333,7 +5334,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_2__str__(struct __pyx_obj_4cde int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__str__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":22 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":22 * def __str__(self): * cdef unsigned i * ret = "IntList[" # <<<<<<<<<<<<<< @@ -5343,7 +5344,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_2__str__(struct __pyx_obj_4cde __Pyx_INCREF(__pyx_kp_s_IntList); __pyx_v_ret = __pyx_kp_s_IntList; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":23 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":23 * cdef unsigned i * ret = "IntList[" * for idx in range(self.size): # <<<<<<<<<<<<<< @@ -5354,7 +5355,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_2__str__(struct __pyx_obj_4cde for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_idx = __pyx_t_2; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":24 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":24 * ret = "IntList[" * for idx in range(self.size): * if idx>0: # <<<<<<<<<<<<<< @@ -5364,7 +5365,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_2__str__(struct __pyx_obj_4cde __pyx_t_3 = ((__pyx_v_idx > 0) != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":25 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":25 * for idx in range(self.size): * if idx>0: * ret += "," # <<<<<<<<<<<<<< @@ -5379,7 +5380,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_2__str__(struct __pyx_obj_4cde } __pyx_L5:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":26 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":26 * if idx>0: * ret += "," * ret += str(self.arr[idx]) # <<<<<<<<<<<<<< @@ -5403,7 +5404,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_2__str__(struct __pyx_obj_4cde __pyx_t_5 = 0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":27 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":27 * ret += "," * ret += str(self.arr[idx]) * ret += "]" # <<<<<<<<<<<<<< @@ -5415,7 +5416,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_2__str__(struct __pyx_obj_4cde __Pyx_DECREF_SET(__pyx_v_ret, __pyx_t_5); __pyx_t_5 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":28 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":28 * ret += str(self.arr[idx]) * ret += "]" * ret += "len=" # <<<<<<<<<<<<<< @@ -5427,7 +5428,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_2__str__(struct __pyx_obj_4cde __Pyx_DECREF_SET(__pyx_v_ret, __pyx_t_5); __pyx_t_5 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":29 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":29 * ret += "]" * ret += "len=" * ret += str(self.len) # <<<<<<<<<<<<<< @@ -5450,7 +5451,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_2__str__(struct __pyx_obj_4cde __Pyx_DECREF_SET(__pyx_v_ret, __pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":30 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":30 * ret += "len=" * ret += str(self.len) * return ret # <<<<<<<<<<<<<< @@ -5462,7 +5463,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_2__str__(struct __pyx_obj_4cde __pyx_r = __pyx_v_ret; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":20 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":20 * memset(self.arr, 0, initial_len*sizeof(int)) * * def __str__(self): # <<<<<<<<<<<<<< @@ -5483,7 +5484,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_2__str__(struct __pyx_obj_4cde return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":32 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":32 * return ret * * def index(self, int val): # <<<<<<<<<<<<<< @@ -5531,7 +5532,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_4index(struct __pyx_obj_4cdec_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("index", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":34 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":34 * def index(self, int val): * cdef unsigned i * for i in range(self.len): # <<<<<<<<<<<<<< @@ -5542,7 +5543,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_4index(struct __pyx_obj_4cdec_ for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":35 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":35 * cdef unsigned i * for i in range(self.len): * if self.arr[i] == val: # <<<<<<<<<<<<<< @@ -5552,7 +5553,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_4index(struct __pyx_obj_4cdec_ __pyx_t_3 = (((__pyx_v_self->arr[__pyx_v_i]) == __pyx_v_val) != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":36 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":36 * for i in range(self.len): * if self.arr[i] == val: * return i # <<<<<<<<<<<<<< @@ -5568,7 +5569,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_4index(struct __pyx_obj_4cdec_ } } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":37 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":37 * if self.arr[i] == val: * return i * raise ValueError('%s not in IntList' % val) # <<<<<<<<<<<<<< @@ -5592,7 +5593,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_4index(struct __pyx_obj_4cdec_ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":32 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":32 * return ret * * def index(self, int val): # <<<<<<<<<<<<<< @@ -5612,7 +5613,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_4index(struct __pyx_obj_4cdec_ return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":39 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":39 * raise ValueError('%s not in IntList' % val) * * def partition(self,start,end): # <<<<<<<<<<<<<< @@ -5699,7 +5700,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_6partition(struct __pyx_obj_4c int __pyx_clineno = 0; __Pyx_RefNannySetupContext("partition", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":40 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":40 * * def partition(self,start,end): * pivot = self.arr[end] # <<<<<<<<<<<<<< @@ -5712,7 +5713,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_6partition(struct __pyx_obj_4c __pyx_v_pivot = __pyx_t_2; __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":41 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":41 * def partition(self,start,end): * pivot = self.arr[end] * bottom = start-1 # <<<<<<<<<<<<<< @@ -5724,7 +5725,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_6partition(struct __pyx_obj_4c __pyx_v_bottom = __pyx_t_2; __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":42 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":42 * pivot = self.arr[end] * bottom = start-1 * top = end # <<<<<<<<<<<<<< @@ -5734,7 +5735,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_6partition(struct __pyx_obj_4c __Pyx_INCREF(__pyx_v_end); __pyx_v_top = __pyx_v_end; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":43 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":43 * bottom = start-1 * top = end * done = 0 # <<<<<<<<<<<<<< @@ -5743,7 +5744,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_6partition(struct __pyx_obj_4c */ __pyx_v_done = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":44 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":44 * top = end * done = 0 * while not done: # <<<<<<<<<<<<<< @@ -5754,7 +5755,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_6partition(struct __pyx_obj_4c __pyx_t_3 = ((!(__pyx_v_done != 0)) != 0); if (!__pyx_t_3) break; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":45 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":45 * done = 0 * while not done: * while not done: # <<<<<<<<<<<<<< @@ -5765,7 +5766,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_6partition(struct __pyx_obj_4c __pyx_t_3 = ((!(__pyx_v_done != 0)) != 0); if (!__pyx_t_3) break; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":46 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":46 * while not done: * while not done: * bottom += 1 # <<<<<<<<<<<<<< @@ -5777,7 +5778,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_6partition(struct __pyx_obj_4c __Pyx_DECREF_SET(__pyx_v_bottom, __pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":47 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":47 * while not done: * bottom += 1 * if bottom == top: # <<<<<<<<<<<<<< @@ -5789,7 +5790,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_6partition(struct __pyx_obj_4c __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":48 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":48 * bottom += 1 * if bottom == top: * done = 1 # <<<<<<<<<<<<<< @@ -5798,7 +5799,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_6partition(struct __pyx_obj_4c */ __pyx_v_done = 1; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":49 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":49 * if bottom == top: * done = 1 * break # <<<<<<<<<<<<<< @@ -5808,7 +5809,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_6partition(struct __pyx_obj_4c goto __pyx_L6_break; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":50 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":50 * done = 1 * break * if self.arr[bottom] > pivot: # <<<<<<<<<<<<<< @@ -5824,7 +5825,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_6partition(struct __pyx_obj_4c __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":51 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":51 * break * if self.arr[bottom] > pivot: * self.arr[top] = self.arr[bottom] # <<<<<<<<<<<<<< @@ -5835,7 +5836,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_6partition(struct __pyx_obj_4c __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_v_top); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} (__pyx_v_self->arr[__pyx_t_5]) = (__pyx_v_self->arr[__pyx_t_1]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":52 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":52 * if self.arr[bottom] > pivot: * self.arr[top] = self.arr[bottom] * break # <<<<<<<<<<<<<< @@ -5847,7 +5848,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_6partition(struct __pyx_obj_4c } __pyx_L6_break:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":53 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":53 * self.arr[top] = self.arr[bottom] * break * while not done: # <<<<<<<<<<<<<< @@ -5858,7 +5859,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_6partition(struct __pyx_obj_4c __pyx_t_3 = ((!(__pyx_v_done != 0)) != 0); if (!__pyx_t_3) break; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":54 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":54 * break * while not done: * top -= 1 # <<<<<<<<<<<<<< @@ -5870,7 +5871,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_6partition(struct __pyx_obj_4c __Pyx_DECREF_SET(__pyx_v_top, __pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":55 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":55 * while not done: * top -= 1 * if top == bottom: # <<<<<<<<<<<<<< @@ -5882,7 +5883,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_6partition(struct __pyx_obj_4c __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":56 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":56 * top -= 1 * if top == bottom: * done = 1 # <<<<<<<<<<<<<< @@ -5891,7 +5892,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_6partition(struct __pyx_obj_4c */ __pyx_v_done = 1; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":57 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":57 * if top == bottom: * done = 1 * break # <<<<<<<<<<<<<< @@ -5901,7 +5902,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_6partition(struct __pyx_obj_4c goto __pyx_L10_break; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":58 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":58 * done = 1 * break * if self.arr[top] < pivot: # <<<<<<<<<<<<<< @@ -5917,7 +5918,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_6partition(struct __pyx_obj_4c __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":59 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":59 * break * if self.arr[top] < pivot: * self.arr[bottom] = self.arr[top] # <<<<<<<<<<<<<< @@ -5928,7 +5929,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_6partition(struct __pyx_obj_4c __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_v_bottom); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} (__pyx_v_self->arr[__pyx_t_5]) = (__pyx_v_self->arr[__pyx_t_1]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":60 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":60 * if self.arr[top] < pivot: * self.arr[bottom] = self.arr[top] * break # <<<<<<<<<<<<<< @@ -5941,7 +5942,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_6partition(struct __pyx_obj_4c __pyx_L10_break:; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":61 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":61 * self.arr[bottom] = self.arr[top] * break * self.arr[top] = pivot # <<<<<<<<<<<<<< @@ -5952,7 +5953,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_6partition(struct __pyx_obj_4c __pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_v_top); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} (__pyx_v_self->arr[__pyx_t_1]) = __pyx_t_6; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":62 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":62 * break * self.arr[top] = pivot * return top # <<<<<<<<<<<<<< @@ -5964,7 +5965,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_6partition(struct __pyx_obj_4c __pyx_r = __pyx_v_top; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":39 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":39 * raise ValueError('%s not in IntList' % val) * * def partition(self,start,end): # <<<<<<<<<<<<<< @@ -5987,7 +5988,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_6partition(struct __pyx_obj_4c return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":64 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":64 * return top * * def _doquicksort(self,start,end): # <<<<<<<<<<<<<< @@ -6069,7 +6070,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_8_doquicksort(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_doquicksort", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":65 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":65 * * def _doquicksort(self,start,end): * if start < end: # <<<<<<<<<<<<<< @@ -6081,7 +6082,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_8_doquicksort(struct __pyx_obj __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":66 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":66 * def _doquicksort(self,start,end): * if start < end: * split = self.partition(start,end) # <<<<<<<<<<<<<< @@ -6105,7 +6106,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_8_doquicksort(struct __pyx_obj __pyx_v_split = __pyx_t_4; __pyx_t_4 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":67 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":67 * if start < end: * split = self.partition(start,end) * self._doquicksort(start,split-1) # <<<<<<<<<<<<<< @@ -6130,7 +6131,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_8_doquicksort(struct __pyx_obj __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":68 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":68 * split = self.partition(start,end) * self._doquicksort(start,split-1) * self._doquicksort(split+1,end) # <<<<<<<<<<<<<< @@ -6158,7 +6159,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_8_doquicksort(struct __pyx_obj } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":70 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":70 * self._doquicksort(split+1,end) * else: * return # <<<<<<<<<<<<<< @@ -6171,7 +6172,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_8_doquicksort(struct __pyx_obj } __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":64 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":64 * return top * * def _doquicksort(self,start,end): # <<<<<<<<<<<<<< @@ -6195,7 +6196,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_8_doquicksort(struct __pyx_obj return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":72 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":72 * return * * def sort(self): # <<<<<<<<<<<<<< @@ -6227,7 +6228,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_10sort(struct __pyx_obj_4cdec_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sort", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":73 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":73 * * def sort(self): * self._doquicksort(0,self.len-1) # <<<<<<<<<<<<<< @@ -6252,7 +6253,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_10sort(struct __pyx_obj_4cdec_ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":72 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":72 * return * * def sort(self): # <<<<<<<<<<<<<< @@ -6275,7 +6276,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_10sort(struct __pyx_obj_4cdec_ return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":75 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":75 * self._doquicksort(0,self.len-1) * * def reset(self): # <<<<<<<<<<<<<< @@ -6301,7 +6302,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_12reset(struct __pyx_obj_4cdec __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("reset", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":76 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":76 * * def reset(self): * self.len = 0 # <<<<<<<<<<<<<< @@ -6310,7 +6311,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_12reset(struct __pyx_obj_4cdec */ __pyx_v_self->len = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":75 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":75 * self._doquicksort(0,self.len-1) * * def reset(self): # <<<<<<<<<<<<<< @@ -6325,7 +6326,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_12reset(struct __pyx_obj_4cdec return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":78 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":78 * self.len = 0 * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -6348,7 +6349,7 @@ static void __pyx_pf_4cdec_2sa_3_sa_7IntList_14__dealloc__(struct __pyx_obj_4cde __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":79 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":79 * * def __dealloc__(self): * free(self.arr) # <<<<<<<<<<<<<< @@ -6357,7 +6358,7 @@ static void __pyx_pf_4cdec_2sa_3_sa_7IntList_14__dealloc__(struct __pyx_obj_4cde */ free(__pyx_v_self->arr); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":78 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":78 * self.len = 0 * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -6370,7 +6371,7 @@ static void __pyx_pf_4cdec_2sa_3_sa_7IntList_14__dealloc__(struct __pyx_obj_4cde } static PyObject *__pyx_gb_4cdec_2sa_3_sa_7IntList_18generator(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":81 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":81 * free(self.arr) * * def __iter__(self): # <<<<<<<<<<<<<< @@ -6450,7 +6451,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_7IntList_18generator(__pyx_GeneratorObj __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":83 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":83 * def __iter__(self): * cdef int i * for i in range(self.len): # <<<<<<<<<<<<<< @@ -6461,7 +6462,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_7IntList_18generator(__pyx_GeneratorObj for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_cur_scope->__pyx_v_i = __pyx_t_2; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":84 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":84 * cdef int i * for i in range(self.len): * yield self.arr[i] # <<<<<<<<<<<<<< @@ -6485,7 +6486,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_7IntList_18generator(__pyx_GeneratorObj if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":81 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":81 * free(self.arr) * * def __iter__(self): # <<<<<<<<<<<<<< @@ -6507,7 +6508,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_7IntList_18generator(__pyx_GeneratorObj return NULL; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":86 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":86 * yield self.arr[i] * * def __getitem__(self, index): # <<<<<<<<<<<<<< @@ -6550,7 +6551,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_19__getitem__(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getitem__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":88 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":88 * def __getitem__(self, index): * cdef int i, j, k * if isinstance(index, int): # <<<<<<<<<<<<<< @@ -6561,7 +6562,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_19__getitem__(struct __pyx_obj __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":89 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":89 * cdef int i, j, k * if isinstance(index, int): * j = index # <<<<<<<<<<<<<< @@ -6571,7 +6572,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_19__getitem__(struct __pyx_obj __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_index); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_j = __pyx_t_3; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":90 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":90 * if isinstance(index, int): * j = index * if j < 0: # <<<<<<<<<<<<<< @@ -6581,7 +6582,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_19__getitem__(struct __pyx_obj __pyx_t_2 = ((__pyx_v_j < 0) != 0); if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":91 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":91 * j = index * if j < 0: * j = self.len + j # <<<<<<<<<<<<<< @@ -6593,7 +6594,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_19__getitem__(struct __pyx_obj } __pyx_L4:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":92 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":92 * if j < 0: * j = self.len + j * if j<0 or j>=self.len: # <<<<<<<<<<<<<< @@ -6609,7 +6610,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_19__getitem__(struct __pyx_obj } if (__pyx_t_4) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":93 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":93 * j = self.len + j * if j<0 or j>=self.len: * raise IndexError("Requested index %d of %d-length IntList" % (index, self.len)) # <<<<<<<<<<<<<< @@ -6642,7 +6643,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_19__getitem__(struct __pyx_obj {__pyx_filename = __pyx_f[2]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":94 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":94 * if j<0 or j>=self.len: * raise IndexError("Requested index %d of %d-length IntList" % (index, self.len)) * return self.arr[j] # <<<<<<<<<<<<<< @@ -6657,7 +6658,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_19__getitem__(struct __pyx_obj goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":95 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":95 * raise IndexError("Requested index %d of %d-length IntList" % (index, self.len)) * return self.arr[j] * elif isinstance(index, slice): # <<<<<<<<<<<<<< @@ -6668,7 +6669,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_19__getitem__(struct __pyx_obj __pyx_t_2 = (__pyx_t_4 != 0); if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":96 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":96 * return self.arr[j] * elif isinstance(index, slice): * i = index.start # <<<<<<<<<<<<<< @@ -6681,7 +6682,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_19__getitem__(struct __pyx_obj __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_i = __pyx_t_3; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":97 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":97 * elif isinstance(index, slice): * i = index.start * j = index.stop # <<<<<<<<<<<<<< @@ -6694,7 +6695,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_19__getitem__(struct __pyx_obj __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_j = __pyx_t_3; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":98 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":98 * i = index.start * j = index.stop * if i < 0: # <<<<<<<<<<<<<< @@ -6704,7 +6705,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_19__getitem__(struct __pyx_obj __pyx_t_2 = ((__pyx_v_i < 0) != 0); if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":99 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":99 * j = index.stop * if i < 0: * i = self.len + i # <<<<<<<<<<<<<< @@ -6716,7 +6717,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_19__getitem__(struct __pyx_obj } __pyx_L6:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":100 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":100 * if i < 0: * i = self.len + i * if j < 0: # <<<<<<<<<<<<<< @@ -6726,7 +6727,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_19__getitem__(struct __pyx_obj __pyx_t_2 = ((__pyx_v_j < 0) != 0); if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":101 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":101 * i = self.len + i * if j < 0: * j = self.len + j # <<<<<<<<<<<<<< @@ -6738,7 +6739,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_19__getitem__(struct __pyx_obj } __pyx_L7:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":102 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":102 * if j < 0: * j = self.len + j * if i < 0 or i >= self.len or j < 0 or j > self.len: # <<<<<<<<<<<<<< @@ -6766,7 +6767,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_19__getitem__(struct __pyx_obj } if (__pyx_t_4) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":103 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":103 * j = self.len + j * if i < 0 or i >= self.len or j < 0 or j > self.len: * raise IndexError("Requested index %d:%d of %d-length IntList" % (index.start, index.stop, self.len)) # <<<<<<<<<<<<<< @@ -6806,7 +6807,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_19__getitem__(struct __pyx_obj {__pyx_filename = __pyx_f[2]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":104 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":104 * if i < 0 or i >= self.len or j < 0 or j > self.len: * raise IndexError("Requested index %d:%d of %d-length IntList" % (index.start, index.stop, self.len)) * result = () # <<<<<<<<<<<<<< @@ -6816,7 +6817,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_19__getitem__(struct __pyx_obj __Pyx_INCREF(__pyx_empty_tuple); __pyx_v_result = __pyx_empty_tuple; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":105 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":105 * raise IndexError("Requested index %d:%d of %d-length IntList" % (index.start, index.stop, self.len)) * result = () * for k from i <= k < j: # <<<<<<<<<<<<<< @@ -6826,7 +6827,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_19__getitem__(struct __pyx_obj __pyx_t_3 = __pyx_v_j; for (__pyx_v_k = __pyx_v_i; __pyx_v_k < __pyx_t_3; __pyx_v_k++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":106 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":106 * result = () * for k from i <= k < j: * result = result + (self.arr[k],) # <<<<<<<<<<<<<< @@ -6847,7 +6848,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_19__getitem__(struct __pyx_obj __pyx_t_9 = 0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":107 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":107 * for k from i <= k < j: * result = result + (self.arr[k],) * return result # <<<<<<<<<<<<<< @@ -6861,7 +6862,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_19__getitem__(struct __pyx_obj } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":109 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":109 * return result * else: * raise TypeError("Illegal key type %s for IntList" % type(index)) # <<<<<<<<<<<<<< @@ -6883,7 +6884,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_19__getitem__(struct __pyx_obj {__pyx_filename = __pyx_f[2]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":86 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":86 * yield self.arr[i] * * def __getitem__(self, index): # <<<<<<<<<<<<<< @@ -6906,7 +6907,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_19__getitem__(struct __pyx_obj return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":111 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":111 * raise TypeError("Illegal key type %s for IntList" % type(index)) * * cdef void set(self, int i, int val): # <<<<<<<<<<<<<< @@ -6928,7 +6929,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList_set(struct __pyx_obj_4cdec_2sa_3_sa_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":112 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":112 * * cdef void set(self, int i, int val): * j = i # <<<<<<<<<<<<<< @@ -6937,7 +6938,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList_set(struct __pyx_obj_4cdec_2sa_3_sa_ */ __pyx_v_j = __pyx_v_i; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":113 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":113 * cdef void set(self, int i, int val): * j = i * if i<0: # <<<<<<<<<<<<<< @@ -6947,7 +6948,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList_set(struct __pyx_obj_4cdec_2sa_3_sa_ __pyx_t_1 = ((__pyx_v_i < 0) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":114 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":114 * j = i * if i<0: * j = self.len + i # <<<<<<<<<<<<<< @@ -6959,7 +6960,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList_set(struct __pyx_obj_4cdec_2sa_3_sa_ } __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":115 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":115 * if i<0: * j = self.len + i * if j<0 or j>=self.len: # <<<<<<<<<<<<<< @@ -6975,7 +6976,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList_set(struct __pyx_obj_4cdec_2sa_3_sa_ } if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":116 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":116 * j = self.len + i * if j<0 or j>=self.len: * raise IndexError("Requested index %d of %d-length IntList" % (i, self.len)) # <<<<<<<<<<<<<< @@ -7010,7 +7011,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList_set(struct __pyx_obj_4cdec_2sa_3_sa_ {__pyx_filename = __pyx_f[2]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":117 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":117 * if j<0 or j>=self.len: * raise IndexError("Requested index %d of %d-length IntList" % (i, self.len)) * self.arr[j] = val # <<<<<<<<<<<<<< @@ -7019,7 +7020,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList_set(struct __pyx_obj_4cdec_2sa_3_sa_ */ (__pyx_v_self->arr[__pyx_v_j]) = __pyx_v_val; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":111 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":111 * raise TypeError("Illegal key type %s for IntList" % type(index)) * * cdef void set(self, int i, int val): # <<<<<<<<<<<<<< @@ -7038,7 +7039,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList_set(struct __pyx_obj_4cdec_2sa_3_sa_ __Pyx_RefNannyFinishContext(); } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":119 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":119 * self.arr[j] = val * * def __setitem__(self, i, val): # <<<<<<<<<<<<<< @@ -7069,7 +7070,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_7IntList_21__setitem__(struct __pyx_obj_4cdec int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setitem__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":120 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":120 * * def __setitem__(self, i, val): * self.set(i, val) # <<<<<<<<<<<<<< @@ -7080,7 +7081,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_7IntList_21__setitem__(struct __pyx_obj_4cdec __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_v_val); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->__pyx_vtab)->set(__pyx_v_self, __pyx_t_1, __pyx_t_2); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":119 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":119 * self.arr[j] = val * * def __setitem__(self, i, val): # <<<<<<<<<<<<<< @@ -7099,7 +7100,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_7IntList_21__setitem__(struct __pyx_obj_4cdec return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":122 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":122 * self.set(i, val) * * def __len__(self): # <<<<<<<<<<<<<< @@ -7125,7 +7126,7 @@ static Py_ssize_t __pyx_pf_4cdec_2sa_3_sa_7IntList_23__len__(struct __pyx_obj_4c __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":123 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":123 * * def __len__(self): * return self.len # <<<<<<<<<<<<<< @@ -7135,7 +7136,7 @@ static Py_ssize_t __pyx_pf_4cdec_2sa_3_sa_7IntList_23__len__(struct __pyx_obj_4c __pyx_r = __pyx_v_self->len; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":122 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":122 * self.set(i, val) * * def __len__(self): # <<<<<<<<<<<<<< @@ -7149,7 +7150,7 @@ static Py_ssize_t __pyx_pf_4cdec_2sa_3_sa_7IntList_23__len__(struct __pyx_obj_4c return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":125 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":125 * return self.len * * def get_size(self): # <<<<<<<<<<<<<< @@ -7179,7 +7180,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_25get_size(struct __pyx_obj_4c int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_size", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":126 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":126 * * def get_size(self): * return self.size # <<<<<<<<<<<<<< @@ -7193,7 +7194,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_25get_size(struct __pyx_obj_4c __pyx_t_1 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":125 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":125 * return self.len * * def get_size(self): # <<<<<<<<<<<<<< @@ -7212,7 +7213,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_25get_size(struct __pyx_obj_4c return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":128 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":128 * return self.size * * def append(self, int val): # <<<<<<<<<<<<<< @@ -7251,7 +7252,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_27append(struct __pyx_obj_4cde __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("append", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":129 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":129 * * def append(self, int val): * self._append(val) # <<<<<<<<<<<<<< @@ -7260,7 +7261,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_27append(struct __pyx_obj_4cde */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->__pyx_vtab)->_append(__pyx_v_self, __pyx_v_val); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":128 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":128 * return self.size * * def append(self, int val): # <<<<<<<<<<<<<< @@ -7275,7 +7276,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_27append(struct __pyx_obj_4cde return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":131 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":131 * self._append(val) * * cdef void _append(self, int val): # <<<<<<<<<<<<<< @@ -7288,7 +7289,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList__append(struct __pyx_obj_4cdec_2sa_3 int __pyx_t_1; __Pyx_RefNannySetupContext("_append", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":132 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":132 * * cdef void _append(self, int val): * if self.len == self.size: # <<<<<<<<<<<<<< @@ -7298,7 +7299,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList__append(struct __pyx_obj_4cdec_2sa_3 __pyx_t_1 = ((__pyx_v_self->len == __pyx_v_self->size) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":133 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":133 * cdef void _append(self, int val): * if self.len == self.size: * self.size = self.size + self.increment # <<<<<<<<<<<<<< @@ -7307,7 +7308,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList__append(struct __pyx_obj_4cdec_2sa_3 */ __pyx_v_self->size = (__pyx_v_self->size + __pyx_v_self->increment); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":134 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":134 * if self.len == self.size: * self.size = self.size + self.increment * self.arr = realloc(self.arr, self.size*sizeof(int)) # <<<<<<<<<<<<<< @@ -7319,7 +7320,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList__append(struct __pyx_obj_4cdec_2sa_3 } __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":135 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":135 * self.size = self.size + self.increment * self.arr = realloc(self.arr, self.size*sizeof(int)) * self.arr[self.len] = val # <<<<<<<<<<<<<< @@ -7328,7 +7329,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList__append(struct __pyx_obj_4cdec_2sa_3 */ (__pyx_v_self->arr[__pyx_v_self->len]) = __pyx_v_val; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":136 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":136 * self.arr = realloc(self.arr, self.size*sizeof(int)) * self.arr[self.len] = val * self.len = self.len + 1 # <<<<<<<<<<<<<< @@ -7337,7 +7338,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList__append(struct __pyx_obj_4cdec_2sa_3 */ __pyx_v_self->len = (__pyx_v_self->len + 1); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":131 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":131 * self._append(val) * * cdef void _append(self, int val): # <<<<<<<<<<<<<< @@ -7349,7 +7350,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList__append(struct __pyx_obj_4cdec_2sa_3 __Pyx_RefNannyFinishContext(); } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":138 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":138 * self.len = self.len + 1 * * def extend(self, other): # <<<<<<<<<<<<<< @@ -7378,7 +7379,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_29extend(struct __pyx_obj_4cde int __pyx_clineno = 0; __Pyx_RefNannySetupContext("extend", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":139 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":139 * * def extend(self, other): * self._extend(other) # <<<<<<<<<<<<<< @@ -7388,7 +7389,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_29extend(struct __pyx_obj_4cde if (!(likely(((__pyx_v_other) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_other, __pyx_ptype_4cdec_2sa_3_sa_IntList))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->__pyx_vtab)->_extend(__pyx_v_self, ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_v_other)); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":138 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":138 * self.len = self.len + 1 * * def extend(self, other): # <<<<<<<<<<<<<< @@ -7408,7 +7409,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_29extend(struct __pyx_obj_4cde return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":141 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":141 * self._extend(other) * * cdef void _extend(self, IntList other): # <<<<<<<<<<<<<< @@ -7420,7 +7421,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList__extend(struct __pyx_obj_4cdec_2sa_3 __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_extend", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":142 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":142 * * cdef void _extend(self, IntList other): * self._extend_arr(other.arr, other.len) # <<<<<<<<<<<<<< @@ -7429,7 +7430,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList__extend(struct __pyx_obj_4cdec_2sa_3 */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->__pyx_vtab)->_extend_arr(__pyx_v_self, __pyx_v_other->arr, __pyx_v_other->len); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":141 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":141 * self._extend(other) * * cdef void _extend(self, IntList other): # <<<<<<<<<<<<<< @@ -7441,7 +7442,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList__extend(struct __pyx_obj_4cdec_2sa_3 __Pyx_RefNannyFinishContext(); } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":144 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":144 * self._extend_arr(other.arr, other.len) * * cdef void _extend_arr(self, int* other, int other_len): # <<<<<<<<<<<<<< @@ -7454,7 +7455,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList__extend_arr(struct __pyx_obj_4cdec_2 int __pyx_t_1; __Pyx_RefNannySetupContext("_extend_arr", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":145 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":145 * * cdef void _extend_arr(self, int* other, int other_len): * if self.size < self.len + other_len: # <<<<<<<<<<<<<< @@ -7464,7 +7465,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList__extend_arr(struct __pyx_obj_4cdec_2 __pyx_t_1 = ((__pyx_v_self->size < (__pyx_v_self->len + __pyx_v_other_len)) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":146 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":146 * cdef void _extend_arr(self, int* other, int other_len): * if self.size < self.len + other_len: * self.size = self.len + other_len # <<<<<<<<<<<<<< @@ -7473,7 +7474,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList__extend_arr(struct __pyx_obj_4cdec_2 */ __pyx_v_self->size = (__pyx_v_self->len + __pyx_v_other_len); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":147 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":147 * if self.size < self.len + other_len: * self.size = self.len + other_len * self.arr = realloc(self.arr, self.size*sizeof(int)) # <<<<<<<<<<<<<< @@ -7485,7 +7486,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList__extend_arr(struct __pyx_obj_4cdec_2 } __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":148 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":148 * self.size = self.len + other_len * self.arr = realloc(self.arr, self.size*sizeof(int)) * memcpy(self.arr+self.len, other, other_len*sizeof(int)) # <<<<<<<<<<<<<< @@ -7494,7 +7495,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList__extend_arr(struct __pyx_obj_4cdec_2 */ memcpy((__pyx_v_self->arr + __pyx_v_self->len), __pyx_v_other, (__pyx_v_other_len * (sizeof(int)))); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":149 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":149 * self.arr = realloc(self.arr, self.size*sizeof(int)) * memcpy(self.arr+self.len, other, other_len*sizeof(int)) * self.len = self.len + other_len # <<<<<<<<<<<<<< @@ -7503,7 +7504,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList__extend_arr(struct __pyx_obj_4cdec_2 */ __pyx_v_self->len = (__pyx_v_self->len + __pyx_v_other_len); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":144 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":144 * self._extend_arr(other.arr, other.len) * * cdef void _extend_arr(self, int* other, int other_len): # <<<<<<<<<<<<<< @@ -7515,7 +7516,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList__extend_arr(struct __pyx_obj_4cdec_2 __Pyx_RefNannyFinishContext(); } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":151 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":151 * self.len = self.len + other_len * * cdef void _clear(self): # <<<<<<<<<<<<<< @@ -7527,7 +7528,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList__clear(struct __pyx_obj_4cdec_2sa_3_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_clear", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":152 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":152 * * cdef void _clear(self): * free(self.arr) # <<<<<<<<<<<<<< @@ -7536,7 +7537,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList__clear(struct __pyx_obj_4cdec_2sa_3_ */ free(__pyx_v_self->arr); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":153 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":153 * cdef void _clear(self): * free(self.arr) * self.len = 0 # <<<<<<<<<<<<<< @@ -7545,7 +7546,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList__clear(struct __pyx_obj_4cdec_2sa_3_ */ __pyx_v_self->len = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":154 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":154 * free(self.arr) * self.len = 0 * self.size = 0 # <<<<<<<<<<<<<< @@ -7554,7 +7555,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList__clear(struct __pyx_obj_4cdec_2sa_3_ */ __pyx_v_self->size = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":155 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":155 * self.len = 0 * self.size = 0 * self.arr = malloc(0) # <<<<<<<<<<<<<< @@ -7563,7 +7564,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList__clear(struct __pyx_obj_4cdec_2sa_3_ */ __pyx_v_self->arr = ((int *)malloc(0)); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":151 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":151 * self.len = self.len + other_len * * cdef void _clear(self): # <<<<<<<<<<<<<< @@ -7575,7 +7576,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList__clear(struct __pyx_obj_4cdec_2sa_3_ __Pyx_RefNannyFinishContext(); } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":157 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":157 * self.arr = malloc(0) * * cdef void write_handle(self, FILE* f): # <<<<<<<<<<<<<< @@ -7587,7 +7588,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList_write_handle(struct __pyx_obj_4cdec_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("write_handle", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":158 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":158 * * cdef void write_handle(self, FILE* f): * fwrite(&(self.len), sizeof(int), 1, f) # <<<<<<<<<<<<<< @@ -7596,7 +7597,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList_write_handle(struct __pyx_obj_4cdec_ */ fwrite((&__pyx_v_self->len), (sizeof(int)), 1, __pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":159 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":159 * cdef void write_handle(self, FILE* f): * fwrite(&(self.len), sizeof(int), 1, f) * fwrite(self.arr, sizeof(int), self.len, f) # <<<<<<<<<<<<<< @@ -7605,7 +7606,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList_write_handle(struct __pyx_obj_4cdec_ */ fwrite(__pyx_v_self->arr, (sizeof(int)), __pyx_v_self->len, __pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":157 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":157 * self.arr = malloc(0) * * cdef void write_handle(self, FILE* f): # <<<<<<<<<<<<<< @@ -7617,7 +7618,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList_write_handle(struct __pyx_obj_4cdec_ __Pyx_RefNannyFinishContext(); } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":161 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":161 * fwrite(self.arr, sizeof(int), self.len, f) * * def write(self, char* filename): # <<<<<<<<<<<<<< @@ -7657,7 +7658,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_31write(struct __pyx_obj_4cdec __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("write", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":163 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":163 * def write(self, char* filename): * cdef FILE* f * f = fopen(filename, "w") # <<<<<<<<<<<<<< @@ -7666,7 +7667,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_31write(struct __pyx_obj_4cdec */ __pyx_v_f = fopen(__pyx_v_filename, __pyx_k_w); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":164 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":164 * cdef FILE* f * f = fopen(filename, "w") * self.write_handle(f) # <<<<<<<<<<<<<< @@ -7675,7 +7676,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_31write(struct __pyx_obj_4cdec */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->__pyx_vtab)->write_handle(__pyx_v_self, __pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":165 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":165 * f = fopen(filename, "w") * self.write_handle(f) * fclose(f) # <<<<<<<<<<<<<< @@ -7684,7 +7685,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_31write(struct __pyx_obj_4cdec */ fclose(__pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":161 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":161 * fwrite(self.arr, sizeof(int), self.len, f) * * def write(self, char* filename): # <<<<<<<<<<<<<< @@ -7699,7 +7700,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_31write(struct __pyx_obj_4cdec return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":167 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":167 * fclose(f) * * cdef void read_handle(self, FILE* f): # <<<<<<<<<<<<<< @@ -7712,7 +7713,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList_read_handle(struct __pyx_obj_4cdec_2 int __pyx_t_1; __Pyx_RefNannySetupContext("read_handle", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":168 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":168 * * cdef void read_handle(self, FILE* f): * (self.arr) # <<<<<<<<<<<<<< @@ -7721,7 +7722,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList_read_handle(struct __pyx_obj_4cdec_2 */ __pyx_v_self->arr; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":169 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":169 * cdef void read_handle(self, FILE* f): * (self.arr) * fread(&(self.len), sizeof(int), 1, f) # <<<<<<<<<<<<<< @@ -7730,7 +7731,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList_read_handle(struct __pyx_obj_4cdec_2 */ fread((&__pyx_v_self->len), (sizeof(int)), 1, __pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":170 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":170 * (self.arr) * fread(&(self.len), sizeof(int), 1, f) * self.arr = malloc(self.len * sizeof(int)) # <<<<<<<<<<<<<< @@ -7739,7 +7740,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList_read_handle(struct __pyx_obj_4cdec_2 */ __pyx_v_self->arr = ((int *)malloc((__pyx_v_self->len * (sizeof(int))))); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":171 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":171 * fread(&(self.len), sizeof(int), 1, f) * self.arr = malloc(self.len * sizeof(int)) * self.size = self.len # <<<<<<<<<<<<<< @@ -7749,7 +7750,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList_read_handle(struct __pyx_obj_4cdec_2 __pyx_t_1 = __pyx_v_self->len; __pyx_v_self->size = __pyx_t_1; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":172 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":172 * self.arr = malloc(self.len * sizeof(int)) * self.size = self.len * fread(self.arr, sizeof(int), self.len, f) # <<<<<<<<<<<<<< @@ -7758,7 +7759,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList_read_handle(struct __pyx_obj_4cdec_2 */ fread(__pyx_v_self->arr, (sizeof(int)), __pyx_v_self->len, __pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":167 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":167 * fclose(f) * * cdef void read_handle(self, FILE* f): # <<<<<<<<<<<<<< @@ -7770,7 +7771,7 @@ static void __pyx_f_4cdec_2sa_3_sa_7IntList_read_handle(struct __pyx_obj_4cdec_2 __Pyx_RefNannyFinishContext(); } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":174 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":174 * fread(self.arr, sizeof(int), self.len, f) * * def read(self, char* filename): # <<<<<<<<<<<<<< @@ -7810,7 +7811,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_33read(struct __pyx_obj_4cdec_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("read", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":176 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":176 * def read(self, char* filename): * cdef FILE* f * f = fopen(filename, "r") # <<<<<<<<<<<<<< @@ -7819,7 +7820,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_33read(struct __pyx_obj_4cdec_ */ __pyx_v_f = fopen(__pyx_v_filename, __pyx_k_r); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":177 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":177 * cdef FILE* f * f = fopen(filename, "r") * self.read_handle(f) # <<<<<<<<<<<<<< @@ -7827,14 +7828,14 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_33read(struct __pyx_obj_4cdec_ */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->__pyx_vtab)->read_handle(__pyx_v_self, __pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":178 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":178 * f = fopen(filename, "r") * self.read_handle(f) * fclose(f) # <<<<<<<<<<<<<< */ fclose(__pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/int_list.pxi":174 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/int_list.pxi":174 * fread(self.arr, sizeof(int), self.len, f) * * def read(self, char* filename): # <<<<<<<<<<<<<< @@ -7849,7 +7850,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7IntList_33read(struct __pyx_obj_4cdec_ return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/str_map.pxi":13 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/str_map.pxi":13 * cdef int index(self, char *s) * * def __cinit__(self): # <<<<<<<<<<<<<< @@ -7878,7 +7879,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9StringMap___cinit__(struct __pyx_obj_4cdec_2 __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/str_map.pxi":14 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/str_map.pxi":14 * * def __cinit__(self): * self.vocab = stringmap_new() # <<<<<<<<<<<<<< @@ -7887,7 +7888,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9StringMap___cinit__(struct __pyx_obj_4cdec_2 */ __pyx_v_self->vocab = stringmap_new(); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/str_map.pxi":13 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/str_map.pxi":13 * cdef int index(self, char *s) * * def __cinit__(self): # <<<<<<<<<<<<<< @@ -7901,7 +7902,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9StringMap___cinit__(struct __pyx_obj_4cdec_2 return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/str_map.pxi":16 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/str_map.pxi":16 * self.vocab = stringmap_new() * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -7924,7 +7925,7 @@ static void __pyx_pf_4cdec_2sa_3_sa_9StringMap_2__dealloc__(struct __pyx_obj_4cd __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/str_map.pxi":17 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/str_map.pxi":17 * * def __dealloc__(self): * stringmap_delete(self.vocab) # <<<<<<<<<<<<<< @@ -7933,7 +7934,7 @@ static void __pyx_pf_4cdec_2sa_3_sa_9StringMap_2__dealloc__(struct __pyx_obj_4cd */ stringmap_delete(__pyx_v_self->vocab); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/str_map.pxi":16 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/str_map.pxi":16 * self.vocab = stringmap_new() * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -7945,7 +7946,7 @@ static void __pyx_pf_4cdec_2sa_3_sa_9StringMap_2__dealloc__(struct __pyx_obj_4cd __Pyx_RefNannyFinishContext(); } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/str_map.pxi":19 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/str_map.pxi":19 * stringmap_delete(self.vocab) * * cdef char *word(self, int i): # <<<<<<<<<<<<<< @@ -7958,7 +7959,7 @@ static char *__pyx_f_4cdec_2sa_3_sa_9StringMap_word(struct __pyx_obj_4cdec_2sa_3 __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("word", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/str_map.pxi":20 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/str_map.pxi":20 * * cdef char *word(self, int i): * return stringmap_word(self.vocab, i) # <<<<<<<<<<<<<< @@ -7968,7 +7969,7 @@ static char *__pyx_f_4cdec_2sa_3_sa_9StringMap_word(struct __pyx_obj_4cdec_2sa_3 __pyx_r = stringmap_word(__pyx_v_self->vocab, __pyx_v_i); goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/str_map.pxi":19 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/str_map.pxi":19 * stringmap_delete(self.vocab) * * cdef char *word(self, int i): # <<<<<<<<<<<<<< @@ -7982,7 +7983,7 @@ static char *__pyx_f_4cdec_2sa_3_sa_9StringMap_word(struct __pyx_obj_4cdec_2sa_3 return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/str_map.pxi":22 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/str_map.pxi":22 * return stringmap_word(self.vocab, i) * * cdef int index(self, char *s): # <<<<<<<<<<<<<< @@ -7994,7 +7995,7 @@ static int __pyx_f_4cdec_2sa_3_sa_9StringMap_index(struct __pyx_obj_4cdec_2sa_3_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("index", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/str_map.pxi":23 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/str_map.pxi":23 * * cdef int index(self, char *s): * return stringmap_index(self.vocab, s) # <<<<<<<<<<<<<< @@ -8002,7 +8003,7 @@ static int __pyx_f_4cdec_2sa_3_sa_9StringMap_index(struct __pyx_obj_4cdec_2sa_3_ __pyx_r = stringmap_index(__pyx_v_self->vocab, __pyx_v_s); goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/str_map.pxi":22 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/str_map.pxi":22 * return stringmap_word(self.vocab, i) * * cdef int index(self, char *s): # <<<<<<<<<<<<<< @@ -8015,7 +8016,7 @@ static int __pyx_f_4cdec_2sa_3_sa_9StringMap_index(struct __pyx_obj_4cdec_2sa_3_ return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":17 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":17 * cdef bint use_sent_id * * def __cinit__(self, from_binary=None, from_text=None, side=None, bint use_sent_id=False): # <<<<<<<<<<<<<< @@ -8125,7 +8126,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9DataArray___cinit__(struct __pyx_obj_4cdec_2 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":18 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":18 * * def __cinit__(self, from_binary=None, from_text=None, side=None, bint use_sent_id=False): * self.word2id = {"END_OF_FILE":0, "END_OF_LINE":1} # <<<<<<<<<<<<<< @@ -8142,7 +8143,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9DataArray___cinit__(struct __pyx_obj_4cdec_2 __pyx_v_self->word2id = __pyx_t_1; __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":19 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":19 * def __cinit__(self, from_binary=None, from_text=None, side=None, bint use_sent_id=False): * self.word2id = {"END_OF_FILE":0, "END_OF_LINE":1} * self.id2word = ["END_OF_FILE", "END_OF_LINE"] # <<<<<<<<<<<<<< @@ -8163,7 +8164,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9DataArray___cinit__(struct __pyx_obj_4cdec_2 __pyx_v_self->id2word = __pyx_t_1; __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":20 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":20 * self.word2id = {"END_OF_FILE":0, "END_OF_LINE":1} * self.id2word = ["END_OF_FILE", "END_OF_LINE"] * self.data = IntList(1000,1000) # <<<<<<<<<<<<<< @@ -8178,7 +8179,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9DataArray___cinit__(struct __pyx_obj_4cdec_2 __pyx_v_self->data = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":21 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":21 * self.id2word = ["END_OF_FILE", "END_OF_LINE"] * self.data = IntList(1000,1000) * self.sent_id = IntList(1000,1000) # <<<<<<<<<<<<<< @@ -8193,7 +8194,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9DataArray___cinit__(struct __pyx_obj_4cdec_2 __pyx_v_self->sent_id = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":22 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":22 * self.data = IntList(1000,1000) * self.sent_id = IntList(1000,1000) * self.sent_index = IntList(1000,1000) # <<<<<<<<<<<<<< @@ -8208,7 +8209,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9DataArray___cinit__(struct __pyx_obj_4cdec_2 __pyx_v_self->sent_index = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":23 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":23 * self.sent_id = IntList(1000,1000) * self.sent_index = IntList(1000,1000) * self.use_sent_id = use_sent_id # <<<<<<<<<<<<<< @@ -8217,7 +8218,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9DataArray___cinit__(struct __pyx_obj_4cdec_2 */ __pyx_v_self->use_sent_id = __pyx_v_use_sent_id; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":24 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":24 * self.sent_index = IntList(1000,1000) * self.use_sent_id = use_sent_id * if from_binary: # <<<<<<<<<<<<<< @@ -8227,7 +8228,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9DataArray___cinit__(struct __pyx_obj_4cdec_2 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_from_binary); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":25 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":25 * self.use_sent_id = use_sent_id * if from_binary: * self.read_binary(from_binary) # <<<<<<<<<<<<<< @@ -8249,7 +8250,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9DataArray___cinit__(struct __pyx_obj_4cdec_2 goto __pyx_L3; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":26 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":26 * if from_binary: * self.read_binary(from_binary) * elif from_text: # <<<<<<<<<<<<<< @@ -8259,7 +8260,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9DataArray___cinit__(struct __pyx_obj_4cdec_2 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_from_text); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":27 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":27 * self.read_binary(from_binary) * elif from_text: * if side: # <<<<<<<<<<<<<< @@ -8269,7 +8270,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9DataArray___cinit__(struct __pyx_obj_4cdec_2 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_side); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":28 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":28 * elif from_text: * if side: * self.read_bitext(from_text, (0 if side == 'source' else 1)) # <<<<<<<<<<<<<< @@ -8303,7 +8304,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9DataArray___cinit__(struct __pyx_obj_4cdec_2 } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":30 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":30 * self.read_bitext(from_text, (0 if side == 'source' else 1)) * else: * self.read_text(from_text) # <<<<<<<<<<<<<< @@ -8328,7 +8329,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9DataArray___cinit__(struct __pyx_obj_4cdec_2 } __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":17 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":17 * cdef bint use_sent_id * * def __cinit__(self, from_binary=None, from_text=None, side=None, bint use_sent_id=False): # <<<<<<<<<<<<<< @@ -8350,7 +8351,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9DataArray___cinit__(struct __pyx_obj_4cdec_2 return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":32 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":32 * self.read_text(from_text) * * def __len__(self): # <<<<<<<<<<<<<< @@ -8381,7 +8382,7 @@ static Py_ssize_t __pyx_pf_4cdec_2sa_3_sa_9DataArray_2__len__(struct __pyx_obj_4 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__len__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":33 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":33 * * def __len__(self): * return len(self.data) # <<<<<<<<<<<<<< @@ -8395,7 +8396,7 @@ static Py_ssize_t __pyx_pf_4cdec_2sa_3_sa_9DataArray_2__len__(struct __pyx_obj_4 __pyx_r = __pyx_t_2; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":32 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":32 * self.read_text(from_text) * * def __len__(self): # <<<<<<<<<<<<<< @@ -8413,7 +8414,7 @@ static Py_ssize_t __pyx_pf_4cdec_2sa_3_sa_9DataArray_2__len__(struct __pyx_obj_4 return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":35 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":35 * return len(self.data) * * def get_sentence_id(self, i): # <<<<<<<<<<<<<< @@ -8444,7 +8445,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_4get_sentence_id(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_sentence_id", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":36 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":36 * * def get_sentence_id(self, i): * return self.sent_id.arr[i] # <<<<<<<<<<<<<< @@ -8459,7 +8460,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_4get_sentence_id(struct __py __pyx_t_2 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":35 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":35 * return len(self.data) * * def get_sentence_id(self, i): # <<<<<<<<<<<<<< @@ -8478,7 +8479,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_4get_sentence_id(struct __py return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":38 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":38 * return self.sent_id.arr[i] * * def get_sentence(self, i): # <<<<<<<<<<<<<< @@ -8516,7 +8517,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_6get_sentence(struct __pyx_o __Pyx_RefNannySetupContext("get_sentence", 0); __Pyx_INCREF(__pyx_v_i); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":40 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":40 * def get_sentence(self, i): * cdef int j, start, stop * sent = [] # <<<<<<<<<<<<<< @@ -8528,7 +8529,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_6get_sentence(struct __pyx_o __pyx_v_sent = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":41 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":41 * cdef int j, start, stop * sent = [] * start = self.sent_index.arr[i] # <<<<<<<<<<<<<< @@ -8538,7 +8539,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_6get_sentence(struct __pyx_o __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_start = (__pyx_v_self->sent_index->arr[__pyx_t_2]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":42 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":42 * sent = [] * start = self.sent_index.arr[i] * stop = self.sent_index.arr[i+1] # <<<<<<<<<<<<<< @@ -8551,7 +8552,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_6get_sentence(struct __pyx_o __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_stop = (__pyx_v_self->sent_index->arr[__pyx_t_2]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":43 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":43 * start = self.sent_index.arr[i] * stop = self.sent_index.arr[i+1] * for i from start <= i < stop: # <<<<<<<<<<<<<< @@ -8565,7 +8566,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_6get_sentence(struct __pyx_o __Pyx_DECREF_SET(__pyx_v_i, __pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":44 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":44 * stop = self.sent_index.arr[i+1] * for i from start <= i < stop: * sent.append(self.id2word[self.data.arr[i]]) # <<<<<<<<<<<<<< @@ -8580,7 +8581,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_6get_sentence(struct __pyx_o __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_i); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":43 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":43 * start = self.sent_index.arr[i] * stop = self.sent_index.arr[i+1] * for i from start <= i < stop: # <<<<<<<<<<<<<< @@ -8592,7 +8593,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_6get_sentence(struct __pyx_o __Pyx_DECREF_SET(__pyx_v_i, __pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":45 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":45 * for i from start <= i < stop: * sent.append(self.id2word[self.data.arr[i]]) * return sent # <<<<<<<<<<<<<< @@ -8604,7 +8605,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_6get_sentence(struct __pyx_o __pyx_r = __pyx_v_sent; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":38 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":38 * return self.sent_id.arr[i] * * def get_sentence(self, i): # <<<<<<<<<<<<<< @@ -8625,7 +8626,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_6get_sentence(struct __pyx_o return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":47 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":47 * return sent * * def get_id(self, word): # <<<<<<<<<<<<<< @@ -8659,7 +8660,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_8get_id(struct __pyx_obj_4cd int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_id", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":48 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":48 * * def get_id(self, word): * if not word in self.word2id: # <<<<<<<<<<<<<< @@ -8670,7 +8671,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_8get_id(struct __pyx_obj_4cd __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":49 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":49 * def get_id(self, word): * if not word in self.word2id: * self.word2id[word] = len(self.id2word) # <<<<<<<<<<<<<< @@ -8686,7 +8687,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_8get_id(struct __pyx_obj_4cd if (unlikely(PyObject_SetItem(__pyx_v_self->word2id, __pyx_v_word, __pyx_t_3) < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":50 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":50 * if not word in self.word2id: * self.word2id[word] = len(self.id2word) * self.id2word.append(word) # <<<<<<<<<<<<<< @@ -8698,7 +8699,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_8get_id(struct __pyx_obj_4cd } __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":51 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":51 * self.word2id[word] = len(self.id2word) * self.id2word.append(word) * return self.word2id[word] # <<<<<<<<<<<<<< @@ -8712,7 +8713,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_8get_id(struct __pyx_obj_4cd __pyx_t_3 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":47 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":47 * return sent * * def get_id(self, word): # <<<<<<<<<<<<<< @@ -8731,7 +8732,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_8get_id(struct __pyx_obj_4cd return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":53 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":53 * return self.word2id[word] * * def __getitem__(self, loc): # <<<<<<<<<<<<<< @@ -8762,7 +8763,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_10__getitem__(struct __pyx_o int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getitem__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":54 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":54 * * def __getitem__(self, loc): * return self.id2word[self.data.arr[loc]] # <<<<<<<<<<<<<< @@ -8777,7 +8778,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_10__getitem__(struct __pyx_o __pyx_t_2 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":53 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":53 * return self.word2id[word] * * def __getitem__(self, loc): # <<<<<<<<<<<<<< @@ -8796,7 +8797,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_10__getitem__(struct __pyx_o return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":56 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":56 * return self.id2word[self.data.arr[loc]] * * def get_sentence_bounds(self, loc): # <<<<<<<<<<<<<< @@ -8830,7 +8831,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_12get_sentence_bounds(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_sentence_bounds", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":57 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":57 * * def get_sentence_bounds(self, loc): * cdef int sid = self.sent_id.arr[loc] # <<<<<<<<<<<<<< @@ -8840,7 +8841,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_12get_sentence_bounds(struct __pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_v_loc); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_sid = (__pyx_v_self->sent_id->arr[__pyx_t_1]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":58 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":58 * def get_sentence_bounds(self, loc): * cdef int sid = self.sent_id.arr[loc] * return (self.sent_index.arr[sid], self.sent_index.arr[sid+1]) # <<<<<<<<<<<<<< @@ -8864,7 +8865,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_12get_sentence_bounds(struct __pyx_t_4 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":56 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":56 * return self.id2word[self.data.arr[loc]] * * def get_sentence_bounds(self, loc): # <<<<<<<<<<<<<< @@ -8885,7 +8886,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_12get_sentence_bounds(struct return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":60 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":60 * return (self.sent_index.arr[sid], self.sent_index.arr[sid+1]) * * def write_text(self, char* filename): # <<<<<<<<<<<<<< @@ -8943,7 +8944,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_14write_text(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("write_text", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":61 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":61 * * def write_text(self, char* filename): * with open(filename, "w") as f: # <<<<<<<<<<<<<< @@ -8983,7 +8984,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_14write_text(struct __pyx_ob __pyx_v_f = __pyx_t_4; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":62 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":62 * def write_text(self, char* filename): * with open(filename, "w") as f: * for w_id in self.data: # <<<<<<<<<<<<<< @@ -9028,7 +9029,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_14write_text(struct __pyx_ob __Pyx_XDECREF_SET(__pyx_v_w_id, __pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":63 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":63 * with open(filename, "w") as f: * for w_id in self.data: * if w_id > 1: # <<<<<<<<<<<<<< @@ -9040,7 +9041,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_14write_text(struct __pyx_ob __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_10) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":64 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":64 * for w_id in self.data: * if w_id > 1: * f.write("%s " % self.get_word(w_id)) # <<<<<<<<<<<<<< @@ -9077,7 +9078,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_14write_text(struct __pyx_ob } __pyx_L18:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":65 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":65 * if w_id > 1: * f.write("%s " % self.get_word(w_id)) * if w_id == 1: # <<<<<<<<<<<<<< @@ -9089,7 +9090,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_14write_text(struct __pyx_ob __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (__pyx_t_10) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":66 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":66 * f.write("%s " % self.get_word(w_id)) * if w_id == 1: * f.write("\n") # <<<<<<<<<<<<<< @@ -9119,7 +9120,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_14write_text(struct __pyx_ob __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":61 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":61 * * def write_text(self, char* filename): * with open(filename, "w") as f: # <<<<<<<<<<<<<< @@ -9190,7 +9191,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_14write_text(struct __pyx_ob __pyx_L23:; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":60 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":60 * return (self.sent_index.arr[sid], self.sent_index.arr[sid+1]) * * def write_text(self, char* filename): # <<<<<<<<<<<<<< @@ -9217,7 +9218,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_14write_text(struct __pyx_ob return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":68 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":68 * f.write("\n") * * def read_text(self, char* filename): # <<<<<<<<<<<<<< @@ -9271,7 +9272,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_16read_text(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("read_text", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":69 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":69 * * def read_text(self, char* filename): * with gzip_or_text(filename) as fp: # <<<<<<<<<<<<<< @@ -9311,7 +9312,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_16read_text(struct __pyx_obj __pyx_v_fp = __pyx_t_1; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":70 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":70 * def read_text(self, char* filename): * with gzip_or_text(filename) as fp: * self.read_text_data(fp) # <<<<<<<<<<<<<< @@ -9340,7 +9341,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_16read_text(struct __pyx_obj __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":69 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":69 * * def read_text(self, char* filename): * with gzip_or_text(filename) as fp: # <<<<<<<<<<<<<< @@ -9411,7 +9412,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_16read_text(struct __pyx_obj __pyx_L19:; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":68 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":68 * f.write("\n") * * def read_text(self, char* filename): # <<<<<<<<<<<<<< @@ -9436,7 +9437,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_16read_text(struct __pyx_obj return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":72 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":72 * self.read_text_data(fp) * * def read_bitext(self, char* filename, int side): # <<<<<<<<<<<<<< @@ -9506,7 +9507,7 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_9DataArray_19read_bitext(PyObject *__py } static PyObject *__pyx_gb_4cdec_2sa_3_sa_9DataArray_11read_bitext_2generator6(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":74 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":74 * def read_bitext(self, char* filename, int side): * with gzip_or_text(filename) as fp: * data = (line.split(' ||| ')[side] for line in fp) # <<<<<<<<<<<<<< @@ -9659,7 +9660,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_9DataArray_11read_bitext_2generator6(__ return NULL; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":72 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":72 * self.read_text_data(fp) * * def read_bitext(self, char* filename, int side): # <<<<<<<<<<<<<< @@ -9695,7 +9696,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_18read_bitext(struct __pyx_o __Pyx_GOTREF(__pyx_cur_scope); __pyx_cur_scope->__pyx_v_side = __pyx_v_side; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":73 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":73 * * def read_bitext(self, char* filename, int side): * with gzip_or_text(filename) as fp: # <<<<<<<<<<<<<< @@ -9736,7 +9737,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_18read_bitext(struct __pyx_o __pyx_cur_scope->__pyx_v_fp = __pyx_t_1; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":74 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":74 * def read_bitext(self, char* filename, int side): * with gzip_or_text(filename) as fp: * data = (line.split(' ||| ')[side] for line in fp) # <<<<<<<<<<<<<< @@ -9748,7 +9749,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_18read_bitext(struct __pyx_o __pyx_v_data = __pyx_t_1; __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":75 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":75 * with gzip_or_text(filename) as fp: * data = (line.split(' ||| ')[side] for line in fp) * self.read_text_data(data) # <<<<<<<<<<<<<< @@ -9777,7 +9778,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_18read_bitext(struct __pyx_o __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":73 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":73 * * def read_bitext(self, char* filename, int side): * with gzip_or_text(filename) as fp: # <<<<<<<<<<<<<< @@ -9848,7 +9849,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_18read_bitext(struct __pyx_o __pyx_L19:; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":72 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":72 * self.read_text_data(fp) * * def read_bitext(self, char* filename, int side): # <<<<<<<<<<<<<< @@ -9874,7 +9875,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_18read_bitext(struct __pyx_o return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":77 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":77 * self.read_text_data(data) * * def read_text_data(self, data): # <<<<<<<<<<<<<< @@ -9919,7 +9920,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_20read_text_data(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("read_text_data", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":78 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":78 * * def read_text_data(self, data): * cdef int word_count = 0 # <<<<<<<<<<<<<< @@ -9928,7 +9929,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_20read_text_data(struct __py */ __pyx_v_word_count = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":79 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":79 * def read_text_data(self, data): * cdef int word_count = 0 * for line_num, line in enumerate(data): # <<<<<<<<<<<<<< @@ -9982,7 +9983,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_20read_text_data(struct __py __pyx_t_1 = __pyx_t_5; __pyx_t_5 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":80 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":80 * cdef int word_count = 0 * for line_num, line in enumerate(data): * self.sent_index.append(word_count) # <<<<<<<<<<<<<< @@ -9994,7 +9995,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_20read_text_data(struct __py __pyx_t_6 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_self->sent_index), __pyx_t_5); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":81 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":81 * for line_num, line in enumerate(data): * self.sent_index.append(word_count) * for word in line.split(): # <<<<<<<<<<<<<< @@ -10045,7 +10046,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_20read_text_data(struct __py __Pyx_XDECREF_SET(__pyx_v_word, __pyx_t_7); __pyx_t_7 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":82 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":82 * self.sent_index.append(word_count) * for word in line.split(): * self.data.append(self.get_id(word)) # <<<<<<<<<<<<<< @@ -10066,7 +10067,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_20read_text_data(struct __py __pyx_t_6 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_self->data), __pyx_t_11); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":83 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":83 * for word in line.split(): * self.data.append(self.get_id(word)) * if self.use_sent_id: # <<<<<<<<<<<<<< @@ -10076,7 +10077,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_20read_text_data(struct __py __pyx_t_12 = (__pyx_v_self->use_sent_id != 0); if (__pyx_t_12) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":84 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":84 * self.data.append(self.get_id(word)) * if self.use_sent_id: * self.sent_id.append(line_num) # <<<<<<<<<<<<<< @@ -10088,7 +10089,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_20read_text_data(struct __py } __pyx_L7:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":85 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":85 * if self.use_sent_id: * self.sent_id.append(line_num) * word_count = word_count + 1 # <<<<<<<<<<<<<< @@ -10099,7 +10100,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_20read_text_data(struct __py } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":86 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":86 * self.sent_id.append(line_num) * word_count = word_count + 1 * self.data.append(1) # <<<<<<<<<<<<<< @@ -10108,7 +10109,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_20read_text_data(struct __py */ __pyx_t_6 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_self->data), __pyx_int_1); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":87 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":87 * word_count = word_count + 1 * self.data.append(1) * if self.use_sent_id: # <<<<<<<<<<<<<< @@ -10118,7 +10119,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_20read_text_data(struct __py __pyx_t_12 = (__pyx_v_self->use_sent_id != 0); if (__pyx_t_12) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":88 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":88 * self.data.append(1) * if self.use_sent_id: * self.sent_id.append(line_num) # <<<<<<<<<<<<<< @@ -10130,7 +10131,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_20read_text_data(struct __py } __pyx_L8:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":89 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":89 * if self.use_sent_id: * self.sent_id.append(line_num) * word_count = word_count + 1 # <<<<<<<<<<<<<< @@ -10142,7 +10143,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_20read_text_data(struct __py __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":90 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":90 * self.sent_id.append(line_num) * word_count = word_count + 1 * self.data.append(0) # <<<<<<<<<<<<<< @@ -10151,7 +10152,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_20read_text_data(struct __py */ __pyx_t_6 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_self->data), __pyx_int_0); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":91 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":91 * word_count = word_count + 1 * self.data.append(0) * self.sent_index.append(word_count) # <<<<<<<<<<<<<< @@ -10163,7 +10164,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_20read_text_data(struct __py __pyx_t_6 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_self->sent_index), __pyx_t_1); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":77 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":77 * self.read_text_data(data) * * def read_text_data(self, data): # <<<<<<<<<<<<<< @@ -10192,7 +10193,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_20read_text_data(struct __py return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":94 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":94 * * * def read_binary(self, char* filename): # <<<<<<<<<<<<<< @@ -10232,7 +10233,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_22read_binary(struct __pyx_o __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("read_binary", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":96 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":96 * def read_binary(self, char* filename): * cdef FILE* f * f = fopen(filename, "r") # <<<<<<<<<<<<<< @@ -10241,7 +10242,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_22read_binary(struct __pyx_o */ __pyx_v_f = fopen(__pyx_v_filename, __pyx_k_r); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":97 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":97 * cdef FILE* f * f = fopen(filename, "r") * self.read_handle(f) # <<<<<<<<<<<<<< @@ -10250,7 +10251,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_22read_binary(struct __pyx_o */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_DataArray *)__pyx_v_self->__pyx_vtab)->read_handle(__pyx_v_self, __pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":98 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":98 * f = fopen(filename, "r") * self.read_handle(f) * fclose(f) # <<<<<<<<<<<<<< @@ -10259,7 +10260,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_22read_binary(struct __pyx_o */ fclose(__pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":94 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":94 * * * def read_binary(self, char* filename): # <<<<<<<<<<<<<< @@ -10274,7 +10275,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_22read_binary(struct __pyx_o return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":100 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":100 * fclose(f) * * cdef void read_handle(self, FILE* f): # <<<<<<<<<<<<<< @@ -10300,7 +10301,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9DataArray_read_handle(struct __pyx_obj_4cdec int __pyx_clineno = 0; __Pyx_RefNannySetupContext("read_handle", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":105 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":105 * cdef char* word * * self.data.read_handle(f) # <<<<<<<<<<<<<< @@ -10309,7 +10310,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9DataArray_read_handle(struct __pyx_obj_4cdec */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->data->__pyx_vtab)->read_handle(__pyx_v_self->data, __pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":106 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":106 * * self.data.read_handle(f) * self.sent_index.read_handle(f) # <<<<<<<<<<<<<< @@ -10318,7 +10319,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9DataArray_read_handle(struct __pyx_obj_4cdec */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->sent_index->__pyx_vtab)->read_handle(__pyx_v_self->sent_index, __pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":107 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":107 * self.data.read_handle(f) * self.sent_index.read_handle(f) * self.sent_id.read_handle(f) # <<<<<<<<<<<<<< @@ -10327,7 +10328,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9DataArray_read_handle(struct __pyx_obj_4cdec */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->sent_id->__pyx_vtab)->read_handle(__pyx_v_self->sent_id, __pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":108 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":108 * self.sent_index.read_handle(f) * self.sent_id.read_handle(f) * fread(&(num_words), sizeof(int), 1, f) # <<<<<<<<<<<<<< @@ -10336,7 +10337,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9DataArray_read_handle(struct __pyx_obj_4cdec */ fread((&__pyx_v_num_words), (sizeof(int)), 1, __pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":109 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":109 * self.sent_id.read_handle(f) * fread(&(num_words), sizeof(int), 1, f) * for i in range(num_words): # <<<<<<<<<<<<<< @@ -10347,7 +10348,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9DataArray_read_handle(struct __pyx_obj_4cdec for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":110 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":110 * fread(&(num_words), sizeof(int), 1, f) * for i in range(num_words): * fread(&(word_len), sizeof(int), 1, f) # <<<<<<<<<<<<<< @@ -10356,7 +10357,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9DataArray_read_handle(struct __pyx_obj_4cdec */ fread((&__pyx_v_word_len), (sizeof(int)), 1, __pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":111 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":111 * for i in range(num_words): * fread(&(word_len), sizeof(int), 1, f) * word = malloc (word_len * sizeof(char)) # <<<<<<<<<<<<<< @@ -10365,7 +10366,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9DataArray_read_handle(struct __pyx_obj_4cdec */ __pyx_v_word = ((char *)malloc((__pyx_v_word_len * (sizeof(char))))); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":112 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":112 * fread(&(word_len), sizeof(int), 1, f) * word = malloc (word_len * sizeof(char)) * fread(word, sizeof(char), word_len, f) # <<<<<<<<<<<<<< @@ -10374,7 +10375,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9DataArray_read_handle(struct __pyx_obj_4cdec */ fread(__pyx_v_word, (sizeof(char)), __pyx_v_word_len, __pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":113 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":113 * word = malloc (word_len * sizeof(char)) * fread(word, sizeof(char), word_len, f) * self.word2id[word] = len(self.id2word) # <<<<<<<<<<<<<< @@ -10393,7 +10394,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9DataArray_read_handle(struct __pyx_obj_4cdec __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":114 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":114 * fread(word, sizeof(char), word_len, f) * self.word2id[word] = len(self.id2word) * self.id2word.append(word) # <<<<<<<<<<<<<< @@ -10405,7 +10406,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9DataArray_read_handle(struct __pyx_obj_4cdec __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_self->id2word, __pyx_t_3); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":115 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":115 * self.word2id[word] = len(self.id2word) * self.id2word.append(word) * free(word) # <<<<<<<<<<<<<< @@ -10415,7 +10416,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9DataArray_read_handle(struct __pyx_obj_4cdec free(__pyx_v_word); } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":116 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":116 * self.id2word.append(word) * free(word) * if len(self.sent_id) == 0: # <<<<<<<<<<<<<< @@ -10429,7 +10430,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9DataArray_read_handle(struct __pyx_obj_4cdec __pyx_t_7 = ((__pyx_t_4 == 0) != 0); if (__pyx_t_7) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":117 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":117 * free(word) * if len(self.sent_id) == 0: * self.use_sent_id = False # <<<<<<<<<<<<<< @@ -10441,7 +10442,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9DataArray_read_handle(struct __pyx_obj_4cdec } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":119 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":119 * self.use_sent_id = False * else: * self.use_sent_id = True # <<<<<<<<<<<<<< @@ -10452,7 +10453,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9DataArray_read_handle(struct __pyx_obj_4cdec } __pyx_L5:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":100 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":100 * fclose(f) * * cdef void read_handle(self, FILE* f): # <<<<<<<<<<<<<< @@ -10470,7 +10471,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9DataArray_read_handle(struct __pyx_obj_4cdec __Pyx_RefNannyFinishContext(); } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":121 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":121 * self.use_sent_id = True * * cdef void write_handle(self, FILE* f): # <<<<<<<<<<<<<< @@ -10494,7 +10495,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9DataArray_write_handle(struct __pyx_obj_4cde int __pyx_clineno = 0; __Pyx_RefNannySetupContext("write_handle", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":125 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":125 * cdef int num_words * * self.data.write_handle(f) # <<<<<<<<<<<<<< @@ -10503,7 +10504,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9DataArray_write_handle(struct __pyx_obj_4cde */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->data->__pyx_vtab)->write_handle(__pyx_v_self->data, __pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":126 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":126 * * self.data.write_handle(f) * self.sent_index.write_handle(f) # <<<<<<<<<<<<<< @@ -10512,7 +10513,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9DataArray_write_handle(struct __pyx_obj_4cde */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->sent_index->__pyx_vtab)->write_handle(__pyx_v_self->sent_index, __pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":127 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":127 * self.data.write_handle(f) * self.sent_index.write_handle(f) * self.sent_id.write_handle(f) # <<<<<<<<<<<<<< @@ -10521,7 +10522,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9DataArray_write_handle(struct __pyx_obj_4cde */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->sent_id->__pyx_vtab)->write_handle(__pyx_v_self->sent_id, __pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":128 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":128 * self.sent_index.write_handle(f) * self.sent_id.write_handle(f) * num_words = len(self.id2word) - 2 # <<<<<<<<<<<<<< @@ -10534,7 +10535,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9DataArray_write_handle(struct __pyx_obj_4cde __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_num_words = (__pyx_t_2 - 2); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":129 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":129 * self.sent_id.write_handle(f) * num_words = len(self.id2word) - 2 * fwrite(&(num_words), sizeof(int), 1, f) # <<<<<<<<<<<<<< @@ -10543,7 +10544,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9DataArray_write_handle(struct __pyx_obj_4cde */ fwrite((&__pyx_v_num_words), (sizeof(int)), 1, __pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":130 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":130 * num_words = len(self.id2word) - 2 * fwrite(&(num_words), sizeof(int), 1, f) * for word in self.id2word[2:]: # <<<<<<<<<<<<<< @@ -10591,7 +10592,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9DataArray_write_handle(struct __pyx_obj_4cde __Pyx_XDECREF_SET(__pyx_v_word, __pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":131 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":131 * fwrite(&(num_words), sizeof(int), 1, f) * for word in self.id2word[2:]: * word_len = len(word) + 1 # <<<<<<<<<<<<<< @@ -10601,7 +10602,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9DataArray_write_handle(struct __pyx_obj_4cde __pyx_t_5 = PyObject_Length(__pyx_v_word); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_word_len = (__pyx_t_5 + 1); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":132 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":132 * for word in self.id2word[2:]: * word_len = len(word) + 1 * fwrite(&(word_len), sizeof(int), 1, f) # <<<<<<<<<<<<<< @@ -10610,7 +10611,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9DataArray_write_handle(struct __pyx_obj_4cde */ fwrite((&__pyx_v_word_len), (sizeof(int)), 1, __pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":133 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":133 * word_len = len(word) + 1 * fwrite(&(word_len), sizeof(int), 1, f) * fwrite(word, sizeof(char), word_len, f) # <<<<<<<<<<<<<< @@ -10622,7 +10623,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9DataArray_write_handle(struct __pyx_obj_4cde } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":121 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":121 * self.use_sent_id = True * * cdef void write_handle(self, FILE* f): # <<<<<<<<<<<<<< @@ -10641,7 +10642,7 @@ static void __pyx_f_4cdec_2sa_3_sa_9DataArray_write_handle(struct __pyx_obj_4cde __Pyx_RefNannyFinishContext(); } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":135 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":135 * fwrite(word, sizeof(char), word_len, f) * * def write_binary(self, char* filename): # <<<<<<<<<<<<<< @@ -10681,7 +10682,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_24write_binary(struct __pyx_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("write_binary", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":137 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":137 * def write_binary(self, char* filename): * cdef FILE* f * f = fopen(filename, "w") # <<<<<<<<<<<<<< @@ -10690,7 +10691,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_24write_binary(struct __pyx_ */ __pyx_v_f = fopen(__pyx_v_filename, __pyx_k_w); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":138 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":138 * cdef FILE* f * f = fopen(filename, "w") * self.write_handle(f) # <<<<<<<<<<<<<< @@ -10699,7 +10700,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_24write_binary(struct __pyx_ */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_DataArray *)__pyx_v_self->__pyx_vtab)->write_handle(__pyx_v_self, __pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":139 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":139 * f = fopen(filename, "w") * self.write_handle(f) * fclose(f) # <<<<<<<<<<<<<< @@ -10708,7 +10709,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_24write_binary(struct __pyx_ */ fclose(__pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":135 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":135 * fwrite(word, sizeof(char), word_len, f) * * def write_binary(self, char* filename): # <<<<<<<<<<<<<< @@ -10723,7 +10724,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_24write_binary(struct __pyx_ return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":141 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":141 * fclose(f) * * def write_enhanced_handle(self, f): # <<<<<<<<<<<<<< @@ -10760,7 +10761,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_26write_enhanced_handle(stru int __pyx_clineno = 0; __Pyx_RefNannySetupContext("write_enhanced_handle", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":142 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":142 * * def write_enhanced_handle(self, f): * for i in self.data: # <<<<<<<<<<<<<< @@ -10805,7 +10806,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_26write_enhanced_handle(stru __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":143 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":143 * def write_enhanced_handle(self, f): * for i in self.data: * f.write("%d " %i) # <<<<<<<<<<<<<< @@ -10829,7 +10830,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_26write_enhanced_handle(stru } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":144 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":144 * for i in self.data: * f.write("%d " %i) * f.write("\n") # <<<<<<<<<<<<<< @@ -10843,7 +10844,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_26write_enhanced_handle(stru __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":145 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":145 * f.write("%d " %i) * f.write("\n") * for i in self.sent_index: # <<<<<<<<<<<<<< @@ -10888,7 +10889,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_26write_enhanced_handle(stru __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":146 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":146 * f.write("\n") * for i in self.sent_index: * f.write("%d " %i) # <<<<<<<<<<<<<< @@ -10912,7 +10913,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_26write_enhanced_handle(stru } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":147 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":147 * for i in self.sent_index: * f.write("%d " %i) * f.write("\n") # <<<<<<<<<<<<<< @@ -10926,7 +10927,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_26write_enhanced_handle(stru __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":148 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":148 * f.write("%d " %i) * f.write("\n") * for i in self.sent_id: # <<<<<<<<<<<<<< @@ -10971,7 +10972,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_26write_enhanced_handle(stru __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_5); __pyx_t_5 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":149 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":149 * f.write("\n") * for i in self.sent_id: * f.write("%d " %i) # <<<<<<<<<<<<<< @@ -10995,7 +10996,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_26write_enhanced_handle(stru } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":150 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":150 * for i in self.sent_id: * f.write("%d " %i) * f.write("\n") # <<<<<<<<<<<<<< @@ -11009,7 +11010,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_26write_enhanced_handle(stru __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":151 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":151 * f.write("%d " %i) * f.write("\n") * for word in self.id2word: # <<<<<<<<<<<<<< @@ -11054,7 +11055,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_26write_enhanced_handle(stru __Pyx_XDECREF_SET(__pyx_v_word, __pyx_t_6); __pyx_t_6 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":152 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":152 * f.write("\n") * for word in self.id2word: * f.write("%s %d " % (word, self.word2id[word])) # <<<<<<<<<<<<<< @@ -11089,7 +11090,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_26write_enhanced_handle(stru } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":153 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":153 * for word in self.id2word: * f.write("%s %d " % (word, self.word2id[word])) * f.write("\n") # <<<<<<<<<<<<<< @@ -11103,7 +11104,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_26write_enhanced_handle(stru __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":141 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":141 * fclose(f) * * def write_enhanced_handle(self, f): # <<<<<<<<<<<<<< @@ -11129,7 +11130,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_26write_enhanced_handle(stru return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":155 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":155 * f.write("\n") * * def write_enhanced(self, char* filename): # <<<<<<<<<<<<<< @@ -11183,7 +11184,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_28write_enhanced(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("write_enhanced", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":156 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":156 * * def write_enhanced(self, char* filename): * with open(filename, "w") as f: # <<<<<<<<<<<<<< @@ -11222,7 +11223,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_28write_enhanced(struct __py __pyx_v_f = __pyx_t_4; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":157 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":157 * def write_enhanced(self, char* filename): * with open(filename, "w") as f: * self.write_enhanced_handle(self, f) # <<<<<<<<<<<<<< @@ -11252,7 +11253,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_28write_enhanced(struct __py __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":156 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":156 * * def write_enhanced(self, char* filename): * with open(filename, "w") as f: # <<<<<<<<<<<<<< @@ -11322,7 +11323,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_28write_enhanced(struct __py __pyx_L19:; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":155 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":155 * f.write("\n") * * def write_enhanced(self, char* filename): # <<<<<<<<<<<<<< @@ -11347,7 +11348,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9DataArray_28write_enhanced(struct __py return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":10 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":10 * * cdef class DataArray: * cdef public word2id # <<<<<<<<<<<<<< @@ -11442,7 +11443,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9DataArray_7word2id_4__del__(struct __pyx_obj return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":11 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":11 * cdef class DataArray: * cdef public word2id * cdef public id2word # <<<<<<<<<<<<<< @@ -11537,7 +11538,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9DataArray_7id2word_4__del__(struct __pyx_obj return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":12 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":12 * cdef public word2id * cdef public id2word * cdef public IntList data # <<<<<<<<<<<<<< @@ -11645,7 +11646,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9DataArray_4data_4__del__(struct __pyx_obj_4c return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":13 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":13 * cdef public id2word * cdef public IntList data * cdef public IntList sent_id # <<<<<<<<<<<<<< @@ -11753,7 +11754,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9DataArray_7sent_id_4__del__(struct __pyx_obj return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":14 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":14 * cdef public IntList data * cdef public IntList sent_id * cdef public IntList sent_index # <<<<<<<<<<<<<< @@ -11866,7 +11867,7 @@ static int __pyx_f_4cdec_2sa_3_sa_9Alignment_link(CYTHON_UNUSED struct __pyx_obj __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("link", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":16 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":16 * cdef int link(self, int i, int j): * """Integerizes an alignment link pair""" * return i * ALIGNMENT_CODE + j # <<<<<<<<<<<<<< @@ -11876,7 +11877,7 @@ static int __pyx_f_4cdec_2sa_3_sa_9Alignment_link(CYTHON_UNUSED struct __pyx_obj __pyx_r = ((__pyx_v_i * __pyx_v_4cdec_2sa_3_sa_ALIGNMENT_CODE) + __pyx_v_j); goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":14 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":14 * cdef IntList sent_index * * cdef int link(self, int i, int j): # <<<<<<<<<<<<<< @@ -11890,7 +11891,7 @@ static int __pyx_f_4cdec_2sa_3_sa_9Alignment_link(CYTHON_UNUSED struct __pyx_obj return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":18 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":18 * return i * ALIGNMENT_CODE + j * * def unlink(self, link): # <<<<<<<<<<<<<< @@ -11923,7 +11924,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_unlink(CYTHON_UNUSED struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("unlink", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":20 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":20 * def unlink(self, link): * """De-integerizes an alignment link pair""" * return (link / ALIGNMENT_CODE, link % ALIGNMENT_CODE) # <<<<<<<<<<<<<< @@ -11953,7 +11954,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_unlink(CYTHON_UNUSED struct __pyx_t_1 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":18 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":18 * return i * ALIGNMENT_CODE + j * * def unlink(self, link): # <<<<<<<<<<<<<< @@ -11974,7 +11975,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_unlink(CYTHON_UNUSED struct return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":22 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":22 * return (link / ALIGNMENT_CODE, link % ALIGNMENT_CODE) * * cdef _unlink(self, int link, int* f, int* e): # <<<<<<<<<<<<<< @@ -11990,7 +11991,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_9Alignment__unlink(CYTHON_UNUSED struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_unlink", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":23 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":23 * * cdef _unlink(self, int link, int* f, int* e): * f[0] = link / ALIGNMENT_CODE # <<<<<<<<<<<<<< @@ -12019,7 +12020,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_9Alignment__unlink(CYTHON_UNUSED struct } (__pyx_v_f[0]) = __Pyx_div_int(__pyx_v_link, __pyx_v_4cdec_2sa_3_sa_ALIGNMENT_CODE); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":24 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":24 * cdef _unlink(self, int link, int* f, int* e): * f[0] = link / ALIGNMENT_CODE * e[0] = link % ALIGNMENT_CODE # <<<<<<<<<<<<<< @@ -12038,7 +12039,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_9Alignment__unlink(CYTHON_UNUSED struct } (__pyx_v_e[0]) = __Pyx_mod_int(__pyx_v_link, __pyx_v_4cdec_2sa_3_sa_ALIGNMENT_CODE); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":22 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":22 * return (link / ALIGNMENT_CODE, link % ALIGNMENT_CODE) * * cdef _unlink(self, int link, int* f, int* e): # <<<<<<<<<<<<<< @@ -12058,7 +12059,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_9Alignment__unlink(CYTHON_UNUSED struct return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":26 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":26 * e[0] = link % ALIGNMENT_CODE * * def get_sent_links(self, int sent_id): # <<<<<<<<<<<<<< @@ -12104,7 +12105,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_2get_sent_links(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_sent_links", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":30 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":30 * cdef int* arr * cdef int arr_len * sent_links = IntList() # <<<<<<<<<<<<<< @@ -12116,7 +12117,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_2get_sent_links(struct __pyx __pyx_v_sent_links = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":31 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":31 * cdef int arr_len * sent_links = IntList() * arr = self._get_sent_links(sent_id, &arr_len) # <<<<<<<<<<<<<< @@ -12125,7 +12126,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_2get_sent_links(struct __pyx */ __pyx_v_arr = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Alignment *)__pyx_v_self->__pyx_vtab)->_get_sent_links(__pyx_v_self, __pyx_v_sent_id, (&__pyx_v_arr_len)); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":32 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":32 * sent_links = IntList() * arr = self._get_sent_links(sent_id, &arr_len) * sent_links._extend_arr(arr, arr_len*2) # <<<<<<<<<<<<<< @@ -12134,7 +12135,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_2get_sent_links(struct __pyx */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_sent_links->__pyx_vtab)->_extend_arr(__pyx_v_sent_links, __pyx_v_arr, (__pyx_v_arr_len * 2)); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":33 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":33 * arr = self._get_sent_links(sent_id, &arr_len) * sent_links._extend_arr(arr, arr_len*2) * free(arr) # <<<<<<<<<<<<<< @@ -12143,7 +12144,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_2get_sent_links(struct __pyx */ free(__pyx_v_arr); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":34 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":34 * sent_links._extend_arr(arr, arr_len*2) * free(arr) * return sent_links # <<<<<<<<<<<<<< @@ -12155,7 +12156,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_2get_sent_links(struct __pyx __pyx_r = ((PyObject *)__pyx_v_sent_links); goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":26 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":26 * e[0] = link % ALIGNMENT_CODE * * def get_sent_links(self, int sent_id): # <<<<<<<<<<<<<< @@ -12175,7 +12176,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_2get_sent_links(struct __pyx return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":36 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":36 * return sent_links * * cdef int* _get_sent_links(self, int sent_id, int* num_links): # <<<<<<<<<<<<<< @@ -12197,7 +12198,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_9Alignment__get_sent_links(struct __pyx_obj_4 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_get_sent_links", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":39 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":39 * cdef int* sent_links * cdef int i, start, end * start = self.sent_index.arr[sent_id] # <<<<<<<<<<<<<< @@ -12206,7 +12207,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_9Alignment__get_sent_links(struct __pyx_obj_4 */ __pyx_v_start = (__pyx_v_self->sent_index->arr[__pyx_v_sent_id]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":40 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":40 * cdef int i, start, end * start = self.sent_index.arr[sent_id] * end = self.sent_index.arr[sent_id+1] # <<<<<<<<<<<<<< @@ -12215,7 +12216,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_9Alignment__get_sent_links(struct __pyx_obj_4 */ __pyx_v_end = (__pyx_v_self->sent_index->arr[(__pyx_v_sent_id + 1)]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":41 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":41 * start = self.sent_index.arr[sent_id] * end = self.sent_index.arr[sent_id+1] * num_links[0] = end - start # <<<<<<<<<<<<<< @@ -12224,7 +12225,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_9Alignment__get_sent_links(struct __pyx_obj_4 */ (__pyx_v_num_links[0]) = (__pyx_v_end - __pyx_v_start); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":42 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":42 * end = self.sent_index.arr[sent_id+1] * num_links[0] = end - start * sent_links = malloc(2*num_links[0]*sizeof(int)) # <<<<<<<<<<<<<< @@ -12233,7 +12234,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_9Alignment__get_sent_links(struct __pyx_obj_4 */ __pyx_v_sent_links = ((int *)malloc(((2 * (__pyx_v_num_links[0])) * (sizeof(int))))); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":43 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":43 * num_links[0] = end - start * sent_links = malloc(2*num_links[0]*sizeof(int)) * for i from 0 <= i < num_links[0]: # <<<<<<<<<<<<<< @@ -12243,7 +12244,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_9Alignment__get_sent_links(struct __pyx_obj_4 __pyx_t_1 = (__pyx_v_num_links[0]); for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":44 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":44 * sent_links = malloc(2*num_links[0]*sizeof(int)) * for i from 0 <= i < num_links[0]: * self._unlink(self.links.arr[start + i], sent_links + (2*i), sent_links + (2*i) + 1) # <<<<<<<<<<<<<< @@ -12255,7 +12256,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_9Alignment__get_sent_links(struct __pyx_obj_4 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":45 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":45 * for i from 0 <= i < num_links[0]: * self._unlink(self.links.arr[start + i], sent_links + (2*i), sent_links + (2*i) + 1) * return sent_links # <<<<<<<<<<<<<< @@ -12265,7 +12266,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_9Alignment__get_sent_links(struct __pyx_obj_4 __pyx_r = __pyx_v_sent_links; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":36 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":36 * return sent_links * * cdef int* _get_sent_links(self, int sent_id, int* num_links): # <<<<<<<<<<<<<< @@ -12283,7 +12284,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_9Alignment__get_sent_links(struct __pyx_obj_4 return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":47 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":47 * return sent_links * * def __cinit__(self, from_binary=None, from_text=None): # <<<<<<<<<<<<<< @@ -12370,7 +12371,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9Alignment_4__cinit__(struct __pyx_obj_4cdec_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":48 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":48 * * def __cinit__(self, from_binary=None, from_text=None): * self.links = IntList(1000,1000) # <<<<<<<<<<<<<< @@ -12385,7 +12386,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9Alignment_4__cinit__(struct __pyx_obj_4cdec_ __pyx_v_self->links = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":49 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":49 * def __cinit__(self, from_binary=None, from_text=None): * self.links = IntList(1000,1000) * self.sent_index = IntList(1000,1000) # <<<<<<<<<<<<<< @@ -12400,7 +12401,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9Alignment_4__cinit__(struct __pyx_obj_4cdec_ __pyx_v_self->sent_index = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":50 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":50 * self.links = IntList(1000,1000) * self.sent_index = IntList(1000,1000) * if from_binary: # <<<<<<<<<<<<<< @@ -12410,7 +12411,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9Alignment_4__cinit__(struct __pyx_obj_4cdec_ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_from_binary); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":51 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":51 * self.sent_index = IntList(1000,1000) * if from_binary: * self.read_binary(from_binary) # <<<<<<<<<<<<<< @@ -12432,7 +12433,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9Alignment_4__cinit__(struct __pyx_obj_4cdec_ goto __pyx_L3; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":52 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":52 * if from_binary: * self.read_binary(from_binary) * elif from_text: # <<<<<<<<<<<<<< @@ -12442,7 +12443,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9Alignment_4__cinit__(struct __pyx_obj_4cdec_ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_from_text); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":53 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":53 * self.read_binary(from_binary) * elif from_text: * self.read_text(from_text) # <<<<<<<<<<<<<< @@ -12465,7 +12466,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9Alignment_4__cinit__(struct __pyx_obj_4cdec_ } __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":47 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":47 * return sent_links * * def __cinit__(self, from_binary=None, from_text=None): # <<<<<<<<<<<<<< @@ -12487,7 +12488,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9Alignment_4__cinit__(struct __pyx_obj_4cdec_ return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":55 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":55 * self.read_text(from_text) * * def read_text(self, char* filename): # <<<<<<<<<<<<<< @@ -12556,7 +12557,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_6read_text(struct __pyx_obj_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("read_text", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":56 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":56 * * def read_text(self, char* filename): * with gzip_or_text(filename) as f: # <<<<<<<<<<<<<< @@ -12596,7 +12597,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_6read_text(struct __pyx_obj_ __pyx_v_f = __pyx_t_1; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":57 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":57 * def read_text(self, char* filename): * with gzip_or_text(filename) as f: * for line in f: # <<<<<<<<<<<<<< @@ -12641,7 +12642,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_6read_text(struct __pyx_obj_ __Pyx_XDECREF_SET(__pyx_v_line, __pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":58 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":58 * with gzip_or_text(filename) as f: * for line in f: * self.sent_index.append(len(self.links)) # <<<<<<<<<<<<<< @@ -12657,7 +12658,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_6read_text(struct __pyx_obj_ __pyx_t_11 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_self->sent_index), __pyx_t_2); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":59 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":59 * for line in f: * self.sent_index.append(len(self.links)) * pairs = line.split() # <<<<<<<<<<<<<< @@ -12672,7 +12673,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_6read_text(struct __pyx_obj_ __Pyx_XDECREF_SET(__pyx_v_pairs, __pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":60 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":60 * self.sent_index.append(len(self.links)) * pairs = line.split() * for pair in pairs: # <<<<<<<<<<<<<< @@ -12717,7 +12718,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_6read_text(struct __pyx_obj_ __Pyx_XDECREF_SET(__pyx_v_pair, __pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":61 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":61 * pairs = line.split() * for pair in pairs: * (i, j) = map(int, pair.split('-')) # <<<<<<<<<<<<<< @@ -12795,7 +12796,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_6read_text(struct __pyx_obj_ __Pyx_XDECREF_SET(__pyx_v_j, __pyx_t_14); __pyx_t_14 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":62 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":62 * for pair in pairs: * (i, j) = map(int, pair.split('-')) * self.links.append(self.link(i, j)) # <<<<<<<<<<<<<< @@ -12813,7 +12814,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_6read_text(struct __pyx_obj_ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":63 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":63 * (i, j) = map(int, pair.split('-')) * self.links.append(self.link(i, j)) * self.sent_index.append(len(self.links)) # <<<<<<<<<<<<<< @@ -12841,7 +12842,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_6read_text(struct __pyx_obj_ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":56 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":56 * * def read_text(self, char* filename): * with gzip_or_text(filename) as f: # <<<<<<<<<<<<<< @@ -12912,7 +12913,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_6read_text(struct __pyx_obj_ __pyx_L25:; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":55 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":55 * self.read_text(from_text) * * def read_text(self, char* filename): # <<<<<<<<<<<<<< @@ -12944,7 +12945,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_6read_text(struct __pyx_obj_ return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":65 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":65 * self.sent_index.append(len(self.links)) * * def read_binary(self, char* filename): # <<<<<<<<<<<<<< @@ -12984,7 +12985,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_8read_binary(struct __pyx_ob __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("read_binary", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":67 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":67 * def read_binary(self, char* filename): * cdef FILE* f * f = fopen(filename, "r") # <<<<<<<<<<<<<< @@ -12993,7 +12994,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_8read_binary(struct __pyx_ob */ __pyx_v_f = fopen(__pyx_v_filename, __pyx_k_r); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":68 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":68 * cdef FILE* f * f = fopen(filename, "r") * self.links.read_handle(f) # <<<<<<<<<<<<<< @@ -13002,7 +13003,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_8read_binary(struct __pyx_ob */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->links->__pyx_vtab)->read_handle(__pyx_v_self->links, __pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":69 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":69 * f = fopen(filename, "r") * self.links.read_handle(f) * self.sent_index.read_handle(f) # <<<<<<<<<<<<<< @@ -13011,7 +13012,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_8read_binary(struct __pyx_ob */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->sent_index->__pyx_vtab)->read_handle(__pyx_v_self->sent_index, __pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":70 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":70 * self.links.read_handle(f) * self.sent_index.read_handle(f) * fclose(f) # <<<<<<<<<<<<<< @@ -13020,7 +13021,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_8read_binary(struct __pyx_ob */ fclose(__pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":65 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":65 * self.sent_index.append(len(self.links)) * * def read_binary(self, char* filename): # <<<<<<<<<<<<<< @@ -13035,7 +13036,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_8read_binary(struct __pyx_ob return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":72 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":72 * fclose(f) * * def write_text(self, char* filename): # <<<<<<<<<<<<<< @@ -13096,7 +13097,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_10write_text(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("write_text", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":73 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":73 * * def write_text(self, char* filename): * with open(filename, "w") as f: # <<<<<<<<<<<<<< @@ -13136,7 +13137,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_10write_text(struct __pyx_ob __pyx_v_f = __pyx_t_4; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":74 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":74 * def write_text(self, char* filename): * with open(filename, "w") as f: * sent_num = 0 # <<<<<<<<<<<<<< @@ -13146,7 +13147,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_10write_text(struct __pyx_ob __Pyx_INCREF(__pyx_int_0); __pyx_v_sent_num = __pyx_int_0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":75 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":75 * with open(filename, "w") as f: * sent_num = 0 * for i, link in enumerate(self.links): # <<<<<<<<<<<<<< @@ -13200,7 +13201,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_10write_text(struct __pyx_ob __pyx_t_4 = __pyx_t_2; __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":76 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":76 * sent_num = 0 * for i, link in enumerate(self.links): * while i >= self.sent_index[sent_num]: # <<<<<<<<<<<<<< @@ -13216,7 +13217,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_10write_text(struct __pyx_ob __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (!__pyx_t_11) break; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":77 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":77 * for i, link in enumerate(self.links): * while i >= self.sent_index[sent_num]: * f.write("\n") # <<<<<<<<<<<<<< @@ -13230,7 +13231,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_10write_text(struct __pyx_ob __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":78 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":78 * while i >= self.sent_index[sent_num]: * f.write("\n") * sent_num = sent_num + 1 # <<<<<<<<<<<<<< @@ -13243,7 +13244,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_10write_text(struct __pyx_ob __pyx_t_2 = 0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":79 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":79 * f.write("\n") * sent_num = sent_num + 1 * f.write("%d-%d " % self.unlink(link)) # <<<<<<<<<<<<<< @@ -13280,7 +13281,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_10write_text(struct __pyx_ob __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":80 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":80 * sent_num = sent_num + 1 * f.write("%d-%d " % self.unlink(link)) * f.write("\n") # <<<<<<<<<<<<<< @@ -13306,7 +13307,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_10write_text(struct __pyx_ob __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":73 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":73 * * def write_text(self, char* filename): * with open(filename, "w") as f: # <<<<<<<<<<<<<< @@ -13377,7 +13378,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_10write_text(struct __pyx_ob __pyx_L23:; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":72 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":72 * fclose(f) * * def write_text(self, char* filename): # <<<<<<<<<<<<<< @@ -13407,7 +13408,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_10write_text(struct __pyx_ob return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":82 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":82 * f.write("\n") * * def write_binary(self, char* filename): # <<<<<<<<<<<<<< @@ -13447,7 +13448,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_12write_binary(struct __pyx_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("write_binary", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":84 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":84 * def write_binary(self, char* filename): * cdef FILE* f * f = fopen(filename, "w") # <<<<<<<<<<<<<< @@ -13456,7 +13457,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_12write_binary(struct __pyx_ */ __pyx_v_f = fopen(__pyx_v_filename, __pyx_k_w); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":85 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":85 * cdef FILE* f * f = fopen(filename, "w") * self.links.write_handle(f) # <<<<<<<<<<<<<< @@ -13465,7 +13466,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_12write_binary(struct __pyx_ */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->links->__pyx_vtab)->write_handle(__pyx_v_self->links, __pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":86 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":86 * f = fopen(filename, "w") * self.links.write_handle(f) * self.sent_index.write_handle(f) # <<<<<<<<<<<<<< @@ -13474,7 +13475,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_12write_binary(struct __pyx_ */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->sent_index->__pyx_vtab)->write_handle(__pyx_v_self->sent_index, __pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":87 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":87 * self.links.write_handle(f) * self.sent_index.write_handle(f) * fclose(f) # <<<<<<<<<<<<<< @@ -13483,7 +13484,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_12write_binary(struct __pyx_ */ fclose(__pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":82 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":82 * f.write("\n") * * def write_binary(self, char* filename): # <<<<<<<<<<<<<< @@ -13498,7 +13499,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_12write_binary(struct __pyx_ return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":89 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":89 * fclose(f) * * def write_enhanced(self, char* filename): # <<<<<<<<<<<<<< @@ -13556,7 +13557,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_14write_enhanced(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("write_enhanced", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":90 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":90 * * def write_enhanced(self, char* filename): * with open(filename, "w") as f: # <<<<<<<<<<<<<< @@ -13596,7 +13597,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_14write_enhanced(struct __py __pyx_v_f = __pyx_t_4; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":91 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":91 * def write_enhanced(self, char* filename): * with open(filename, "w") as f: * for link in self.links: # <<<<<<<<<<<<<< @@ -13641,7 +13642,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_14write_enhanced(struct __py __Pyx_XDECREF_SET(__pyx_v_link, __pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":92 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":92 * with open(filename, "w") as f: * for link in self.links: * f.write("%d " % link) # <<<<<<<<<<<<<< @@ -13665,7 +13666,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_14write_enhanced(struct __py } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":93 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":93 * for link in self.links: * f.write("%d " % link) * f.write("\n") # <<<<<<<<<<<<<< @@ -13679,7 +13680,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_14write_enhanced(struct __py __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":94 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":94 * f.write("%d " % link) * f.write("\n") * for i in self.sent_index: # <<<<<<<<<<<<<< @@ -13724,7 +13725,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_14write_enhanced(struct __py __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":95 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":95 * f.write("\n") * for i in self.sent_index: * f.write("%d " % i) # <<<<<<<<<<<<<< @@ -13748,7 +13749,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_14write_enhanced(struct __py } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":96 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":96 * for i in self.sent_index: * f.write("%d " % i) * f.write("\n") # <<<<<<<<<<<<<< @@ -13772,7 +13773,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_14write_enhanced(struct __py __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":90 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":90 * * def write_enhanced(self, char* filename): * with open(filename, "w") as f: # <<<<<<<<<<<<<< @@ -13843,7 +13844,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_14write_enhanced(struct __py __pyx_L23:; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":89 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":89 * fclose(f) * * def write_enhanced(self, char* filename): # <<<<<<<<<<<<<< @@ -13870,7 +13871,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_14write_enhanced(struct __py return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":98 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":98 * f.write("\n") * * def alignment(self, i): # <<<<<<<<<<<<<< @@ -13910,7 +13911,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_16alignment(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("alignment", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":101 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":101 * """Return all (e,f) pairs for sentence i""" * cdef int j, start, end * result = [] # <<<<<<<<<<<<<< @@ -13922,7 +13923,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_16alignment(struct __pyx_obj __pyx_v_result = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":102 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":102 * cdef int j, start, end * result = [] * start = self.sent_index.arr[i] # <<<<<<<<<<<<<< @@ -13932,7 +13933,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_16alignment(struct __pyx_obj __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_start = (__pyx_v_self->sent_index->arr[__pyx_t_2]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":103 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":103 * result = [] * start = self.sent_index.arr[i] * end = self.sent_index.arr[i+1] # <<<<<<<<<<<<<< @@ -13945,7 +13946,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_16alignment(struct __pyx_obj __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_end = (__pyx_v_self->sent_index->arr[__pyx_t_2]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":104 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":104 * start = self.sent_index.arr[i] * end = self.sent_index.arr[i+1] * for j from start <= j < end: # <<<<<<<<<<<<<< @@ -13955,7 +13956,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_16alignment(struct __pyx_obj __pyx_t_3 = __pyx_v_end; for (__pyx_v_j = __pyx_v_start; __pyx_v_j < __pyx_t_3; __pyx_v_j++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":105 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":105 * end = self.sent_index.arr[i+1] * for j from start <= j < end: * result.append(self.unlink(self.links.arr[j])) # <<<<<<<<<<<<<< @@ -13978,7 +13979,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_16alignment(struct __pyx_obj __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":106 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":106 * for j from start <= j < end: * result.append(self.unlink(self.links.arr[j])) * return result # <<<<<<<<<<<<<< @@ -13988,7 +13989,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_16alignment(struct __pyx_obj __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":98 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":98 * f.write("\n") * * def alignment(self, i): # <<<<<<<<<<<<<< @@ -14010,7 +14011,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9Alignment_16alignment(struct __pyx_obj return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":15 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":15 * int val * * cdef _node* new_node(int key): # <<<<<<<<<<<<<< @@ -14024,7 +14025,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__node *__pyx_f_4cdec_2sa_3_sa_new_node(int __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("new_node", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":17 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":17 * cdef _node* new_node(int key): * cdef _node* n * n = <_node*> malloc(sizeof(_node)) # <<<<<<<<<<<<<< @@ -14033,7 +14034,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__node *__pyx_f_4cdec_2sa_3_sa_new_node(int */ __pyx_v_n = ((struct __pyx_t_4cdec_2sa_3_sa__node *)malloc((sizeof(struct __pyx_t_4cdec_2sa_3_sa__node)))); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":18 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":18 * cdef _node* n * n = <_node*> malloc(sizeof(_node)) * n.smaller = NULL # <<<<<<<<<<<<<< @@ -14042,7 +14043,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__node *__pyx_f_4cdec_2sa_3_sa_new_node(int */ __pyx_v_n->smaller = NULL; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":19 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":19 * n = <_node*> malloc(sizeof(_node)) * n.smaller = NULL * n.bigger = NULL # <<<<<<<<<<<<<< @@ -14051,7 +14052,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__node *__pyx_f_4cdec_2sa_3_sa_new_node(int */ __pyx_v_n->bigger = NULL; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":20 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":20 * n.smaller = NULL * n.bigger = NULL * n.key = key # <<<<<<<<<<<<<< @@ -14060,7 +14061,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__node *__pyx_f_4cdec_2sa_3_sa_new_node(int */ __pyx_v_n->key = __pyx_v_key; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":21 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":21 * n.bigger = NULL * n.key = key * n.val = 0 # <<<<<<<<<<<<<< @@ -14069,7 +14070,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__node *__pyx_f_4cdec_2sa_3_sa_new_node(int */ __pyx_v_n->val = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":22 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":22 * n.key = key * n.val = 0 * return n # <<<<<<<<<<<<<< @@ -14079,7 +14080,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__node *__pyx_f_4cdec_2sa_3_sa_new_node(int __pyx_r = __pyx_v_n; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":15 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":15 * int val * * cdef _node* new_node(int key): # <<<<<<<<<<<<<< @@ -14093,7 +14094,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__node *__pyx_f_4cdec_2sa_3_sa_new_node(int return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":25 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":25 * * * cdef del_node(_node* n): # <<<<<<<<<<<<<< @@ -14111,7 +14112,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_del_node(struct __pyx_t_4cdec_2sa_3_sa__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("del_node", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":26 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":26 * * cdef del_node(_node* n): * if n.smaller != NULL: # <<<<<<<<<<<<<< @@ -14121,7 +14122,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_del_node(struct __pyx_t_4cdec_2sa_3_sa__ __pyx_t_1 = ((__pyx_v_n->smaller != NULL) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":27 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":27 * cdef del_node(_node* n): * if n.smaller != NULL: * del_node(n.smaller) # <<<<<<<<<<<<<< @@ -14135,7 +14136,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_del_node(struct __pyx_t_4cdec_2sa_3_sa__ } __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":28 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":28 * if n.smaller != NULL: * del_node(n.smaller) * if n.bigger != NULL: # <<<<<<<<<<<<<< @@ -14145,7 +14146,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_del_node(struct __pyx_t_4cdec_2sa_3_sa__ __pyx_t_1 = ((__pyx_v_n->bigger != NULL) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":29 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":29 * del_node(n.smaller) * if n.bigger != NULL: * del_node(n.bigger) # <<<<<<<<<<<<<< @@ -14159,7 +14160,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_del_node(struct __pyx_t_4cdec_2sa_3_sa__ } __pyx_L4:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":30 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":30 * if n.bigger != NULL: * del_node(n.bigger) * free(n) # <<<<<<<<<<<<<< @@ -14168,7 +14169,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_del_node(struct __pyx_t_4cdec_2sa_3_sa__ */ free(__pyx_v_n); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":25 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":25 * * * cdef del_node(_node* n): # <<<<<<<<<<<<<< @@ -14189,7 +14190,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_del_node(struct __pyx_t_4cdec_2sa_3_sa__ return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":32 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":32 * free(n) * * cdef int* get_val(_node* n, int key): # <<<<<<<<<<<<<< @@ -14203,7 +14204,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_get_val(struct __pyx_t_4cdec_2sa_3_sa__node * int __pyx_t_1; __Pyx_RefNannySetupContext("get_val", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":33 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":33 * * cdef int* get_val(_node* n, int key): * if key == n.key: # <<<<<<<<<<<<<< @@ -14213,7 +14214,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_get_val(struct __pyx_t_4cdec_2sa_3_sa__node * __pyx_t_1 = ((__pyx_v_key == __pyx_v_n->key) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":34 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":34 * cdef int* get_val(_node* n, int key): * if key == n.key: * return &n.val # <<<<<<<<<<<<<< @@ -14224,7 +14225,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_get_val(struct __pyx_t_4cdec_2sa_3_sa__node * goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":35 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":35 * if key == n.key: * return &n.val * elif key < n.key: # <<<<<<<<<<<<<< @@ -14234,7 +14235,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_get_val(struct __pyx_t_4cdec_2sa_3_sa__node * __pyx_t_1 = ((__pyx_v_key < __pyx_v_n->key) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":36 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":36 * return &n.val * elif key < n.key: * if n.smaller == NULL: # <<<<<<<<<<<<<< @@ -14244,7 +14245,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_get_val(struct __pyx_t_4cdec_2sa_3_sa__node * __pyx_t_1 = ((__pyx_v_n->smaller == NULL) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":37 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":37 * elif key < n.key: * if n.smaller == NULL: * n.smaller = new_node(key) # <<<<<<<<<<<<<< @@ -14253,7 +14254,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_get_val(struct __pyx_t_4cdec_2sa_3_sa__node * */ __pyx_v_n->smaller = __pyx_f_4cdec_2sa_3_sa_new_node(__pyx_v_key); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":38 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":38 * if n.smaller == NULL: * n.smaller = new_node(key) * return &(n.smaller.val) # <<<<<<<<<<<<<< @@ -14264,7 +14265,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_get_val(struct __pyx_t_4cdec_2sa_3_sa__node * goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":39 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":39 * n.smaller = new_node(key) * return &(n.smaller.val) * return get_val(n.smaller, key) # <<<<<<<<<<<<<< @@ -14276,7 +14277,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_get_val(struct __pyx_t_4cdec_2sa_3_sa__node * } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":41 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":41 * return get_val(n.smaller, key) * else: * if n.bigger == NULL: # <<<<<<<<<<<<<< @@ -14286,7 +14287,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_get_val(struct __pyx_t_4cdec_2sa_3_sa__node * __pyx_t_1 = ((__pyx_v_n->bigger == NULL) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":42 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":42 * else: * if n.bigger == NULL: * n.bigger = new_node(key) # <<<<<<<<<<<<<< @@ -14295,7 +14296,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_get_val(struct __pyx_t_4cdec_2sa_3_sa__node * */ __pyx_v_n->bigger = __pyx_f_4cdec_2sa_3_sa_new_node(__pyx_v_key); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":43 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":43 * if n.bigger == NULL: * n.bigger = new_node(key) * return &(n.bigger.val) # <<<<<<<<<<<<<< @@ -14306,7 +14307,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_get_val(struct __pyx_t_4cdec_2sa_3_sa__node * goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":44 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":44 * n.bigger = new_node(key) * return &(n.bigger.val) * return get_val(n.bigger, key) # <<<<<<<<<<<<<< @@ -14317,7 +14318,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_get_val(struct __pyx_t_4cdec_2sa_3_sa__node * goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":32 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":32 * free(n) * * cdef int* get_val(_node* n, int key): # <<<<<<<<<<<<<< @@ -14331,7 +14332,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_get_val(struct __pyx_t_4cdec_2sa_3_sa__node * return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":54 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":54 * cdef id2eword, id2fword, eword2id, fword2id * * def __cinit__(self, from_text=None, from_data=False, from_binary=None, # <<<<<<<<<<<<<< @@ -14361,7 +14362,7 @@ static int __pyx_pw_4cdec_2sa_3_sa_5BiLex_1__cinit__(PyObject *__pyx_v_self, PyO values[1] = ((PyObject *)Py_False); values[2] = ((PyObject *)Py_None); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":55 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":55 * * def __cinit__(self, from_text=None, from_data=False, from_binary=None, * earray=None, fsarray=None, alignment=None): # <<<<<<<<<<<<<< @@ -14449,7 +14450,7 @@ static int __pyx_pw_4cdec_2sa_3_sa_5BiLex_1__cinit__(PyObject *__pyx_v_self, PyO __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4cdec_2sa_3_sa_5BiLex___cinit__(((struct __pyx_obj_4cdec_2sa_3_sa_BiLex *)__pyx_v_self), __pyx_v_from_text, __pyx_v_from_data, __pyx_v_from_binary, __pyx_v_earray, __pyx_v_fsarray, __pyx_v_alignment); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":54 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":54 * cdef id2eword, id2fword, eword2id, fword2id * * def __cinit__(self, from_text=None, from_data=False, from_binary=None, # <<<<<<<<<<<<<< @@ -14474,7 +14475,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_5BiLex___cinit__(struct __pyx_obj_4cdec_2sa_3 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":56 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":56 * def __cinit__(self, from_text=None, from_data=False, from_binary=None, * earray=None, fsarray=None, alignment=None): * self.id2eword = [] # <<<<<<<<<<<<<< @@ -14489,7 +14490,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_5BiLex___cinit__(struct __pyx_obj_4cdec_2sa_3 __pyx_v_self->id2eword = __pyx_t_1; __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":57 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":57 * earray=None, fsarray=None, alignment=None): * self.id2eword = [] * self.id2fword = [] # <<<<<<<<<<<<<< @@ -14504,7 +14505,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_5BiLex___cinit__(struct __pyx_obj_4cdec_2sa_3 __pyx_v_self->id2fword = __pyx_t_1; __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":58 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":58 * self.id2eword = [] * self.id2fword = [] * self.eword2id = {} # <<<<<<<<<<<<<< @@ -14519,7 +14520,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_5BiLex___cinit__(struct __pyx_obj_4cdec_2sa_3 __pyx_v_self->eword2id = __pyx_t_1; __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":59 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":59 * self.id2fword = [] * self.eword2id = {} * self.fword2id = {} # <<<<<<<<<<<<<< @@ -14534,7 +14535,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_5BiLex___cinit__(struct __pyx_obj_4cdec_2sa_3 __pyx_v_self->fword2id = __pyx_t_1; __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":60 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":60 * self.eword2id = {} * self.fword2id = {} * self.e_index = IntList() # <<<<<<<<<<<<<< @@ -14549,7 +14550,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_5BiLex___cinit__(struct __pyx_obj_4cdec_2sa_3 __pyx_v_self->e_index = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":61 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":61 * self.fword2id = {} * self.e_index = IntList() * self.f_index = IntList() # <<<<<<<<<<<<<< @@ -14564,7 +14565,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_5BiLex___cinit__(struct __pyx_obj_4cdec_2sa_3 __pyx_v_self->f_index = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":62 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":62 * self.e_index = IntList() * self.f_index = IntList() * self.col1 = FloatList() # <<<<<<<<<<<<<< @@ -14579,7 +14580,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_5BiLex___cinit__(struct __pyx_obj_4cdec_2sa_3 __pyx_v_self->col1 = ((struct __pyx_obj_4cdec_2sa_3_sa_FloatList *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":63 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":63 * self.f_index = IntList() * self.col1 = FloatList() * self.col2 = FloatList() # <<<<<<<<<<<<<< @@ -14594,7 +14595,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_5BiLex___cinit__(struct __pyx_obj_4cdec_2sa_3 __pyx_v_self->col2 = ((struct __pyx_obj_4cdec_2sa_3_sa_FloatList *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":64 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":64 * self.col1 = FloatList() * self.col2 = FloatList() * if from_binary: # <<<<<<<<<<<<<< @@ -14604,7 +14605,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_5BiLex___cinit__(struct __pyx_obj_4cdec_2sa_3 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_from_binary); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":65 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":65 * self.col2 = FloatList() * if from_binary: * self.read_binary(from_binary) # <<<<<<<<<<<<<< @@ -14626,7 +14627,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_5BiLex___cinit__(struct __pyx_obj_4cdec_2sa_3 goto __pyx_L3; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":66 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":66 * if from_binary: * self.read_binary(from_binary) * elif from_data: # <<<<<<<<<<<<<< @@ -14636,7 +14637,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_5BiLex___cinit__(struct __pyx_obj_4cdec_2sa_3 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_from_data); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":67 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":67 * self.read_binary(from_binary) * elif from_data: * self.compute_from_data(fsarray, earray, alignment) # <<<<<<<<<<<<<< @@ -14653,7 +14654,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_5BiLex___cinit__(struct __pyx_obj_4cdec_2sa_3 } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":69 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":69 * self.compute_from_data(fsarray, earray, alignment) * else: * self.read_text(from_text) # <<<<<<<<<<<<<< @@ -14675,7 +14676,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_5BiLex___cinit__(struct __pyx_obj_4cdec_2sa_3 } __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":54 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":54 * cdef id2eword, id2fword, eword2id, fword2id * * def __cinit__(self, from_text=None, from_data=False, from_binary=None, # <<<<<<<<<<<<<< @@ -14697,7 +14698,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_5BiLex___cinit__(struct __pyx_obj_4cdec_2sa_3 return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":72 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":72 * * * cdef compute_from_data(self, SuffixArray fsa, DataArray eda, Alignment aa): # <<<<<<<<<<<<<< @@ -14752,7 +14753,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("compute_from_data", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":79 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":79 * cdef int null_word * * null_word = 0 # <<<<<<<<<<<<<< @@ -14761,7 +14762,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ __pyx_v_null_word = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":80 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":80 * * null_word = 0 * for word in fsa.darray.id2word: # I miss list comprehensions # <<<<<<<<<<<<<< @@ -14806,7 +14807,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob __Pyx_XDECREF_SET(__pyx_v_word, __pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":81 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":81 * null_word = 0 * for word in fsa.darray.id2word: # I miss list comprehensions * self.id2fword.append(word) # <<<<<<<<<<<<<< @@ -14817,7 +14818,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":82 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":82 * for word in fsa.darray.id2word: # I miss list comprehensions * self.id2fword.append(word) * self.id2fword[null_word] = "NULL" # <<<<<<<<<<<<<< @@ -14826,7 +14827,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ if (unlikely(__Pyx_SetItemInt(__pyx_v_self->id2fword, __pyx_v_null_word, __pyx_n_s_NULL, int, 1, __Pyx_PyInt_From_int, 0, 1, 1) < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":83 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":83 * self.id2fword.append(word) * self.id2fword[null_word] = "NULL" * for id, word in enumerate(self.id2fword): # <<<<<<<<<<<<<< @@ -14880,7 +14881,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob __pyx_t_1 = __pyx_t_6; __pyx_t_6 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":84 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":84 * self.id2fword[null_word] = "NULL" * for id, word in enumerate(self.id2fword): * self.fword2id[word] = id # <<<<<<<<<<<<<< @@ -14892,7 +14893,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":86 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":86 * self.fword2id[word] = id * * for word in eda.id2word: # <<<<<<<<<<<<<< @@ -14937,7 +14938,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob __Pyx_XDECREF_SET(__pyx_v_word, __pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":87 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":87 * * for word in eda.id2word: * self.id2eword.append(word) # <<<<<<<<<<<<<< @@ -14948,7 +14949,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":88 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":88 * for word in eda.id2word: * self.id2eword.append(word) * self.id2eword[null_word] = "NULL" # <<<<<<<<<<<<<< @@ -14957,7 +14958,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ if (unlikely(__Pyx_SetItemInt(__pyx_v_self->id2eword, __pyx_v_null_word, __pyx_n_s_NULL, int, 1, __Pyx_PyInt_From_int, 0, 1, 1) < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":89 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":89 * self.id2eword.append(word) * self.id2eword[null_word] = "NULL" * for id, word in enumerate(self.id2eword): # <<<<<<<<<<<<<< @@ -15011,7 +15012,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob __pyx_t_1 = __pyx_t_6; __pyx_t_6 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":90 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":90 * self.id2eword[null_word] = "NULL" * for id, word in enumerate(self.id2eword): * self.eword2id[word] = id # <<<<<<<<<<<<<< @@ -15023,7 +15024,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":92 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":92 * self.eword2id[word] = id * * num_pairs = 0 # <<<<<<<<<<<<<< @@ -15032,7 +15033,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ __pyx_v_num_pairs = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":94 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":94 * num_pairs = 0 * * V_E = len(eda.id2word) # <<<<<<<<<<<<<< @@ -15045,7 +15046,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_V_E = __pyx_t_2; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":95 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":95 * * V_E = len(eda.id2word) * V_F = len(fsa.darray.id2word) # <<<<<<<<<<<<<< @@ -15058,7 +15059,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_V_F = __pyx_t_2; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":96 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":96 * V_E = len(eda.id2word) * V_F = len(fsa.darray.id2word) * fmargin = malloc(V_F*sizeof(int)) # <<<<<<<<<<<<<< @@ -15067,7 +15068,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ __pyx_v_fmargin = ((int *)malloc((__pyx_v_V_F * (sizeof(int))))); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":97 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":97 * V_F = len(fsa.darray.id2word) * fmargin = malloc(V_F*sizeof(int)) * emargin = malloc(V_E*sizeof(int)) # <<<<<<<<<<<<<< @@ -15076,7 +15077,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ __pyx_v_emargin = ((int *)malloc((__pyx_v_V_E * (sizeof(int))))); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":98 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":98 * fmargin = malloc(V_F*sizeof(int)) * emargin = malloc(V_E*sizeof(int)) * memset(fmargin, 0, V_F*sizeof(int)) # <<<<<<<<<<<<<< @@ -15085,7 +15086,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ memset(__pyx_v_fmargin, 0, (__pyx_v_V_F * (sizeof(int)))); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":99 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":99 * emargin = malloc(V_E*sizeof(int)) * memset(fmargin, 0, V_F*sizeof(int)) * memset(emargin, 0, V_E*sizeof(int)) # <<<<<<<<<<<<<< @@ -15094,7 +15095,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ memset(__pyx_v_emargin, 0, (__pyx_v_V_E * (sizeof(int)))); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":101 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":101 * memset(emargin, 0, V_E*sizeof(int)) * * dict = <_node**> malloc(V_F*sizeof(_node*)) # <<<<<<<<<<<<<< @@ -15103,7 +15104,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ __pyx_v_dict = ((struct __pyx_t_4cdec_2sa_3_sa__node **)malloc((__pyx_v_V_F * (sizeof(struct __pyx_t_4cdec_2sa_3_sa__node *))))); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":102 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":102 * * dict = <_node**> malloc(V_F*sizeof(_node*)) * memset(dict, 0, V_F*sizeof(_node*)) # <<<<<<<<<<<<<< @@ -15112,7 +15113,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ memset(__pyx_v_dict, 0, (__pyx_v_V_F * (sizeof(struct __pyx_t_4cdec_2sa_3_sa__node *)))); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":104 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":104 * memset(dict, 0, V_F*sizeof(_node*)) * * num_sents = len(fsa.darray.sent_index) # <<<<<<<<<<<<<< @@ -15128,7 +15129,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob __pyx_v_num_sents = __pyx_t_1; __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":105 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":105 * * num_sents = len(fsa.darray.sent_index) * for sent_id from 0 <= sent_id < num_sents-1: # <<<<<<<<<<<<<< @@ -15141,7 +15142,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (__pyx_v_sent_id = 0; __pyx_v_sent_id < __pyx_t_7; __pyx_v_sent_id++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":107 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":107 * for sent_id from 0 <= sent_id < num_sents-1: * * fsent = fsa.darray.data.arr + fsa.darray.sent_index.arr[sent_id] # <<<<<<<<<<<<<< @@ -15150,7 +15151,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ __pyx_v_fsent = (__pyx_v_fsa->darray->data->arr + (__pyx_v_fsa->darray->sent_index->arr[__pyx_v_sent_id])); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":108 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":108 * * fsent = fsa.darray.data.arr + fsa.darray.sent_index.arr[sent_id] * I = fsa.darray.sent_index.arr[sent_id+1] - fsa.darray.sent_index.arr[sent_id] - 1 # <<<<<<<<<<<<<< @@ -15159,7 +15160,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ __pyx_v_I = (((__pyx_v_fsa->darray->sent_index->arr[(__pyx_v_sent_id + 1)]) - (__pyx_v_fsa->darray->sent_index->arr[__pyx_v_sent_id])) - 1); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":109 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":109 * fsent = fsa.darray.data.arr + fsa.darray.sent_index.arr[sent_id] * I = fsa.darray.sent_index.arr[sent_id+1] - fsa.darray.sent_index.arr[sent_id] - 1 * faligned = malloc(I*sizeof(int)) # <<<<<<<<<<<<<< @@ -15168,7 +15169,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ __pyx_v_faligned = ((int *)malloc((__pyx_v_I * (sizeof(int))))); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":110 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":110 * I = fsa.darray.sent_index.arr[sent_id+1] - fsa.darray.sent_index.arr[sent_id] - 1 * faligned = malloc(I*sizeof(int)) * memset(faligned, 0, I*sizeof(int)) # <<<<<<<<<<<<<< @@ -15177,7 +15178,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ memset(__pyx_v_faligned, 0, (__pyx_v_I * (sizeof(int)))); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":112 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":112 * memset(faligned, 0, I*sizeof(int)) * * esent = eda.data.arr + eda.sent_index.arr[sent_id] # <<<<<<<<<<<<<< @@ -15186,7 +15187,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ __pyx_v_esent = (__pyx_v_eda->data->arr + (__pyx_v_eda->sent_index->arr[__pyx_v_sent_id])); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":113 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":113 * * esent = eda.data.arr + eda.sent_index.arr[sent_id] * J = eda.sent_index.arr[sent_id+1] - eda.sent_index.arr[sent_id] - 1 # <<<<<<<<<<<<<< @@ -15195,7 +15196,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ __pyx_v_J = (((__pyx_v_eda->sent_index->arr[(__pyx_v_sent_id + 1)]) - (__pyx_v_eda->sent_index->arr[__pyx_v_sent_id])) - 1); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":114 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":114 * esent = eda.data.arr + eda.sent_index.arr[sent_id] * J = eda.sent_index.arr[sent_id+1] - eda.sent_index.arr[sent_id] - 1 * ealigned = malloc(J*sizeof(int)) # <<<<<<<<<<<<<< @@ -15204,7 +15205,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ __pyx_v_ealigned = ((int *)malloc((__pyx_v_J * (sizeof(int))))); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":115 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":115 * J = eda.sent_index.arr[sent_id+1] - eda.sent_index.arr[sent_id] - 1 * ealigned = malloc(J*sizeof(int)) * memset(ealigned, 0, J*sizeof(int)) # <<<<<<<<<<<<<< @@ -15213,7 +15214,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ memset(__pyx_v_ealigned, 0, (__pyx_v_J * (sizeof(int)))); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":117 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":117 * memset(ealigned, 0, J*sizeof(int)) * * links = aa._get_sent_links(sent_id, &num_links) # <<<<<<<<<<<<<< @@ -15222,7 +15223,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ __pyx_v_links = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Alignment *)__pyx_v_aa->__pyx_vtab)->_get_sent_links(__pyx_v_aa, __pyx_v_sent_id, (&__pyx_v_num_links)); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":119 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":119 * links = aa._get_sent_links(sent_id, &num_links) * * for l from 0 <= l < num_links: # <<<<<<<<<<<<<< @@ -15232,7 +15233,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob __pyx_t_8 = __pyx_v_num_links; for (__pyx_v_l = 0; __pyx_v_l < __pyx_t_8; __pyx_v_l++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":120 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":120 * * for l from 0 <= l < num_links: * i = links[l*2] # <<<<<<<<<<<<<< @@ -15241,7 +15242,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ __pyx_v_i = (__pyx_v_links[(__pyx_v_l * 2)]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":121 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":121 * for l from 0 <= l < num_links: * i = links[l*2] * j = links[l*2+1] # <<<<<<<<<<<<<< @@ -15250,7 +15251,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ __pyx_v_j = (__pyx_v_links[((__pyx_v_l * 2) + 1)]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":122 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":122 * i = links[l*2] * j = links[l*2+1] * if i >= I or j >= J: # <<<<<<<<<<<<<< @@ -15266,7 +15267,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob } if (__pyx_t_11) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":123 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":123 * j = links[l*2+1] * if i >= I or j >= J: * raise Exception("%d-%d out of bounds (I=%d,J=%d) in line %d\n" % (i,j,I,J,sent_id+1)) # <<<<<<<<<<<<<< @@ -15316,7 +15317,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob {__pyx_filename = __pyx_f[5]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":124 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":124 * if i >= I or j >= J: * raise Exception("%d-%d out of bounds (I=%d,J=%d) in line %d\n" % (i,j,I,J,sent_id+1)) * f_i = fsent[i] # <<<<<<<<<<<<<< @@ -15325,7 +15326,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ __pyx_v_f_i = (__pyx_v_fsent[__pyx_v_i]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":125 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":125 * raise Exception("%d-%d out of bounds (I=%d,J=%d) in line %d\n" % (i,j,I,J,sent_id+1)) * f_i = fsent[i] * e_j = esent[j] # <<<<<<<<<<<<<< @@ -15334,7 +15335,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ __pyx_v_e_j = (__pyx_v_esent[__pyx_v_j]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":126 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":126 * f_i = fsent[i] * e_j = esent[j] * fmargin[f_i] = fmargin[f_i]+1 # <<<<<<<<<<<<<< @@ -15343,7 +15344,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ (__pyx_v_fmargin[__pyx_v_f_i]) = ((__pyx_v_fmargin[__pyx_v_f_i]) + 1); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":127 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":127 * e_j = esent[j] * fmargin[f_i] = fmargin[f_i]+1 * emargin[e_j] = emargin[e_j]+1 # <<<<<<<<<<<<<< @@ -15352,7 +15353,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ (__pyx_v_emargin[__pyx_v_e_j]) = ((__pyx_v_emargin[__pyx_v_e_j]) + 1); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":128 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":128 * fmargin[f_i] = fmargin[f_i]+1 * emargin[e_j] = emargin[e_j]+1 * if dict[f_i] == NULL: # <<<<<<<<<<<<<< @@ -15362,7 +15363,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob __pyx_t_11 = (((__pyx_v_dict[__pyx_v_f_i]) == NULL) != 0); if (__pyx_t_11) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":129 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":129 * emargin[e_j] = emargin[e_j]+1 * if dict[f_i] == NULL: * dict[f_i] = new_node(e_j) # <<<<<<<<<<<<<< @@ -15371,7 +15372,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ (__pyx_v_dict[__pyx_v_f_i]) = __pyx_f_4cdec_2sa_3_sa_new_node(__pyx_v_e_j); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":130 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":130 * if dict[f_i] == NULL: * dict[f_i] = new_node(e_j) * dict[f_i].val = 1 # <<<<<<<<<<<<<< @@ -15380,7 +15381,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ (__pyx_v_dict[__pyx_v_f_i])->val = 1; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":131 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":131 * dict[f_i] = new_node(e_j) * dict[f_i].val = 1 * num_pairs = num_pairs + 1 # <<<<<<<<<<<<<< @@ -15392,7 +15393,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":133 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":133 * num_pairs = num_pairs + 1 * else: * count = get_val(dict[f_i], e_j) # <<<<<<<<<<<<<< @@ -15401,7 +15402,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ __pyx_v_count = __pyx_f_4cdec_2sa_3_sa_get_val((__pyx_v_dict[__pyx_v_f_i]), __pyx_v_e_j); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":134 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":134 * else: * count = get_val(dict[f_i], e_j) * if count[0] == 0: # <<<<<<<<<<<<<< @@ -15411,7 +15412,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob __pyx_t_11 = (((__pyx_v_count[0]) == 0) != 0); if (__pyx_t_11) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":135 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":135 * count = get_val(dict[f_i], e_j) * if count[0] == 0: * num_pairs = num_pairs + 1 # <<<<<<<<<<<<<< @@ -15423,7 +15424,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob } __pyx_L17:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":136 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":136 * if count[0] == 0: * num_pairs = num_pairs + 1 * count[0] = count[0] + 1 # <<<<<<<<<<<<<< @@ -15434,7 +15435,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob } __pyx_L16:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":138 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":138 * count[0] = count[0] + 1 * # add count * faligned[i] = 1 # <<<<<<<<<<<<<< @@ -15443,7 +15444,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ (__pyx_v_faligned[__pyx_v_i]) = 1; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":139 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":139 * # add count * faligned[i] = 1 * ealigned[j] = 1 # <<<<<<<<<<<<<< @@ -15453,7 +15454,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob (__pyx_v_ealigned[__pyx_v_j]) = 1; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":140 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":140 * faligned[i] = 1 * ealigned[j] = 1 * for i from 0 <= i < I: # <<<<<<<<<<<<<< @@ -15463,7 +15464,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob __pyx_t_8 = __pyx_v_I; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_8; __pyx_v_i++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":141 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":141 * ealigned[j] = 1 * for i from 0 <= i < I: * if faligned[i] == 0: # <<<<<<<<<<<<<< @@ -15473,7 +15474,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob __pyx_t_11 = (((__pyx_v_faligned[__pyx_v_i]) == 0) != 0); if (__pyx_t_11) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":142 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":142 * for i from 0 <= i < I: * if faligned[i] == 0: * f_i = fsent[i] # <<<<<<<<<<<<<< @@ -15482,7 +15483,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ __pyx_v_f_i = (__pyx_v_fsent[__pyx_v_i]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":143 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":143 * if faligned[i] == 0: * f_i = fsent[i] * fmargin[f_i] = fmargin[f_i] + 1 # <<<<<<<<<<<<<< @@ -15491,7 +15492,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ (__pyx_v_fmargin[__pyx_v_f_i]) = ((__pyx_v_fmargin[__pyx_v_f_i]) + 1); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":144 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":144 * f_i = fsent[i] * fmargin[f_i] = fmargin[f_i] + 1 * emargin[null_word] = emargin[null_word] + 1 # <<<<<<<<<<<<<< @@ -15500,7 +15501,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ (__pyx_v_emargin[__pyx_v_null_word]) = ((__pyx_v_emargin[__pyx_v_null_word]) + 1); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":145 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":145 * fmargin[f_i] = fmargin[f_i] + 1 * emargin[null_word] = emargin[null_word] + 1 * if dict[f_i] == NULL: # <<<<<<<<<<<<<< @@ -15510,7 +15511,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob __pyx_t_11 = (((__pyx_v_dict[__pyx_v_f_i]) == NULL) != 0); if (__pyx_t_11) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":146 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":146 * emargin[null_word] = emargin[null_word] + 1 * if dict[f_i] == NULL: * dict[f_i] = new_node(null_word) # <<<<<<<<<<<<<< @@ -15519,7 +15520,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ (__pyx_v_dict[__pyx_v_f_i]) = __pyx_f_4cdec_2sa_3_sa_new_node(__pyx_v_null_word); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":147 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":147 * if dict[f_i] == NULL: * dict[f_i] = new_node(null_word) * dict[f_i].val = 1 # <<<<<<<<<<<<<< @@ -15528,7 +15529,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ (__pyx_v_dict[__pyx_v_f_i])->val = 1; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":148 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":148 * dict[f_i] = new_node(null_word) * dict[f_i].val = 1 * num_pairs = num_pairs + 1 # <<<<<<<<<<<<<< @@ -15540,7 +15541,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":150 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":150 * num_pairs = num_pairs + 1 * else: * count = get_val(dict[f_i], null_word) # <<<<<<<<<<<<<< @@ -15549,7 +15550,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ __pyx_v_count = __pyx_f_4cdec_2sa_3_sa_get_val((__pyx_v_dict[__pyx_v_f_i]), __pyx_v_null_word); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":151 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":151 * else: * count = get_val(dict[f_i], null_word) * if count[0] == 0: # <<<<<<<<<<<<<< @@ -15559,7 +15560,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob __pyx_t_11 = (((__pyx_v_count[0]) == 0) != 0); if (__pyx_t_11) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":152 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":152 * count = get_val(dict[f_i], null_word) * if count[0] == 0: * num_pairs = num_pairs + 1 # <<<<<<<<<<<<<< @@ -15571,7 +15572,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob } __pyx_L22:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":153 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":153 * if count[0] == 0: * num_pairs = num_pairs + 1 * count[0] = count[0] + 1 # <<<<<<<<<<<<<< @@ -15586,7 +15587,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob __pyx_L20:; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":154 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":154 * num_pairs = num_pairs + 1 * count[0] = count[0] + 1 * for j from 0 <= j < J: # <<<<<<<<<<<<<< @@ -15596,7 +15597,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob __pyx_t_8 = __pyx_v_J; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_8; __pyx_v_j++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":155 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":155 * count[0] = count[0] + 1 * for j from 0 <= j < J: * if ealigned[j] == 0: # <<<<<<<<<<<<<< @@ -15606,7 +15607,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob __pyx_t_11 = (((__pyx_v_ealigned[__pyx_v_j]) == 0) != 0); if (__pyx_t_11) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":156 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":156 * for j from 0 <= j < J: * if ealigned[j] == 0: * e_j = esent[j] # <<<<<<<<<<<<<< @@ -15615,7 +15616,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ __pyx_v_e_j = (__pyx_v_esent[__pyx_v_j]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":157 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":157 * if ealigned[j] == 0: * e_j = esent[j] * fmargin[null_word] = fmargin[null_word] + 1 # <<<<<<<<<<<<<< @@ -15624,7 +15625,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ (__pyx_v_fmargin[__pyx_v_null_word]) = ((__pyx_v_fmargin[__pyx_v_null_word]) + 1); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":158 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":158 * e_j = esent[j] * fmargin[null_word] = fmargin[null_word] + 1 * emargin[e_j] = emargin[e_j] + 1 # <<<<<<<<<<<<<< @@ -15633,7 +15634,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ (__pyx_v_emargin[__pyx_v_e_j]) = ((__pyx_v_emargin[__pyx_v_e_j]) + 1); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":159 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":159 * fmargin[null_word] = fmargin[null_word] + 1 * emargin[e_j] = emargin[e_j] + 1 * if dict[null_word] == NULL: # <<<<<<<<<<<<<< @@ -15643,7 +15644,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob __pyx_t_11 = (((__pyx_v_dict[__pyx_v_null_word]) == NULL) != 0); if (__pyx_t_11) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":160 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":160 * emargin[e_j] = emargin[e_j] + 1 * if dict[null_word] == NULL: * dict[null_word] = new_node(e_j) # <<<<<<<<<<<<<< @@ -15652,7 +15653,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ (__pyx_v_dict[__pyx_v_null_word]) = __pyx_f_4cdec_2sa_3_sa_new_node(__pyx_v_e_j); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":161 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":161 * if dict[null_word] == NULL: * dict[null_word] = new_node(e_j) * dict[null_word].val = 1 # <<<<<<<<<<<<<< @@ -15661,7 +15662,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ (__pyx_v_dict[__pyx_v_null_word])->val = 1; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":162 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":162 * dict[null_word] = new_node(e_j) * dict[null_word].val = 1 * num_pairs = num_pairs + 1 # <<<<<<<<<<<<<< @@ -15673,7 +15674,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":164 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":164 * num_pairs = num_pairs + 1 * else: * count = get_val(dict[null_word], e_j) # <<<<<<<<<<<<<< @@ -15682,7 +15683,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ __pyx_v_count = __pyx_f_4cdec_2sa_3_sa_get_val((__pyx_v_dict[__pyx_v_null_word]), __pyx_v_e_j); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":165 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":165 * else: * count = get_val(dict[null_word], e_j) * if count[0] == 0: # <<<<<<<<<<<<<< @@ -15692,7 +15693,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob __pyx_t_11 = (((__pyx_v_count[0]) == 0) != 0); if (__pyx_t_11) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":166 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":166 * count = get_val(dict[null_word], e_j) * if count[0] == 0: * num_pairs = num_pairs + 1 # <<<<<<<<<<<<<< @@ -15704,7 +15705,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob } __pyx_L27:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":167 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":167 * if count[0] == 0: * num_pairs = num_pairs + 1 * count[0] = count[0] + 1 # <<<<<<<<<<<<<< @@ -15719,7 +15720,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob __pyx_L25:; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":168 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":168 * num_pairs = num_pairs + 1 * count[0] = count[0] + 1 * free(links) # <<<<<<<<<<<<<< @@ -15728,7 +15729,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ free(__pyx_v_links); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":169 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":169 * count[0] = count[0] + 1 * free(links) * free(faligned) # <<<<<<<<<<<<<< @@ -15737,7 +15738,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ free(__pyx_v_faligned); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":170 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":170 * free(links) * free(faligned) * free(ealigned) # <<<<<<<<<<<<<< @@ -15747,7 +15748,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob free(__pyx_v_ealigned); } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":171 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":171 * free(faligned) * free(ealigned) * self.f_index = IntList(initial_len=V_F) # <<<<<<<<<<<<<< @@ -15769,7 +15770,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob __pyx_v_self->f_index = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_14); __pyx_t_14 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":172 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":172 * free(ealigned) * self.f_index = IntList(initial_len=V_F) * self.e_index = IntList(initial_len=num_pairs) # <<<<<<<<<<<<<< @@ -15791,7 +15792,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob __pyx_v_self->e_index = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_13); __pyx_t_13 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":173 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":173 * self.f_index = IntList(initial_len=V_F) * self.e_index = IntList(initial_len=num_pairs) * self.col1 = FloatList(initial_len=num_pairs) # <<<<<<<<<<<<<< @@ -15813,7 +15814,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob __pyx_v_self->col1 = ((struct __pyx_obj_4cdec_2sa_3_sa_FloatList *)__pyx_t_14); __pyx_t_14 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":174 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":174 * self.e_index = IntList(initial_len=num_pairs) * self.col1 = FloatList(initial_len=num_pairs) * self.col2 = FloatList(initial_len=num_pairs) # <<<<<<<<<<<<<< @@ -15835,7 +15836,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob __pyx_v_self->col2 = ((struct __pyx_obj_4cdec_2sa_3_sa_FloatList *)__pyx_t_13); __pyx_t_13 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":176 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":176 * self.col2 = FloatList(initial_len=num_pairs) * * num_pairs = 0 # <<<<<<<<<<<<<< @@ -15844,7 +15845,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ __pyx_v_num_pairs = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":177 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":177 * * num_pairs = 0 * for i from 0 <= i < V_F: # <<<<<<<<<<<<<< @@ -15854,7 +15855,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob __pyx_t_7 = __pyx_v_V_F; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_7; __pyx_v_i++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":179 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":179 * for i from 0 <= i < V_F: * #self.f_index[i] = num_pairs * self.f_index.set(i, num_pairs) # <<<<<<<<<<<<<< @@ -15863,7 +15864,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->f_index->__pyx_vtab)->set(__pyx_v_self->f_index, __pyx_v_i, __pyx_v_num_pairs); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":180 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":180 * #self.f_index[i] = num_pairs * self.f_index.set(i, num_pairs) * if dict[i] != NULL: # <<<<<<<<<<<<<< @@ -15873,7 +15874,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob __pyx_t_11 = (((__pyx_v_dict[__pyx_v_i]) != NULL) != 0); if (__pyx_t_11) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":181 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":181 * self.f_index.set(i, num_pairs) * if dict[i] != NULL: * self._add_node(dict[i], &num_pairs, float(fmargin[i]), emargin) # <<<<<<<<<<<<<< @@ -15884,7 +15885,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":182 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":182 * if dict[i] != NULL: * self._add_node(dict[i], &num_pairs, float(fmargin[i]), emargin) * del_node(dict[i]) # <<<<<<<<<<<<<< @@ -15899,7 +15900,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob __pyx_L30:; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":183 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":183 * self._add_node(dict[i], &num_pairs, float(fmargin[i]), emargin) * del_node(dict[i]) * free(fmargin) # <<<<<<<<<<<<<< @@ -15908,7 +15909,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ free(__pyx_v_fmargin); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":184 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":184 * del_node(dict[i]) * free(fmargin) * free(emargin) # <<<<<<<<<<<<<< @@ -15917,7 +15918,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ free(__pyx_v_emargin); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":185 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":185 * free(fmargin) * free(emargin) * free(dict) # <<<<<<<<<<<<<< @@ -15926,7 +15927,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob */ free(__pyx_v_dict); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":186 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":186 * free(emargin) * free(dict) * return # <<<<<<<<<<<<<< @@ -15937,7 +15938,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":72 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":72 * * * cdef compute_from_data(self, SuffixArray fsa, DataArray eda, Alignment aa): # <<<<<<<<<<<<<< @@ -15964,7 +15965,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_compute_from_data(struct __pyx_ob return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":189 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":189 * * * cdef _add_node(self, _node* n, int* num_pairs, float fmargin, int* emargin): # <<<<<<<<<<<<<< @@ -15983,7 +15984,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex__add_node(struct __pyx_obj_4cdec_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_add_node", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":191 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":191 * cdef _add_node(self, _node* n, int* num_pairs, float fmargin, int* emargin): * cdef int loc * if n.smaller != NULL: # <<<<<<<<<<<<<< @@ -15993,7 +15994,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex__add_node(struct __pyx_obj_4cdec_ __pyx_t_1 = ((__pyx_v_n->smaller != NULL) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":192 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":192 * cdef int loc * if n.smaller != NULL: * self._add_node(n.smaller, num_pairs, fmargin, emargin) # <<<<<<<<<<<<<< @@ -16007,7 +16008,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex__add_node(struct __pyx_obj_4cdec_ } __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":193 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":193 * if n.smaller != NULL: * self._add_node(n.smaller, num_pairs, fmargin, emargin) * loc = num_pairs[0] # <<<<<<<<<<<<<< @@ -16016,7 +16017,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex__add_node(struct __pyx_obj_4cdec_ */ __pyx_v_loc = (__pyx_v_num_pairs[0]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":194 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":194 * self._add_node(n.smaller, num_pairs, fmargin, emargin) * loc = num_pairs[0] * self.e_index.set(loc, n.key) # <<<<<<<<<<<<<< @@ -16025,7 +16026,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex__add_node(struct __pyx_obj_4cdec_ */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->e_index->__pyx_vtab)->set(__pyx_v_self->e_index, __pyx_v_loc, __pyx_v_n->key); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":195 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":195 * loc = num_pairs[0] * self.e_index.set(loc, n.key) * self.col1.set(loc, float(n.val)/fmargin) # <<<<<<<<<<<<<< @@ -16044,7 +16045,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex__add_node(struct __pyx_obj_4cdec_ } ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_FloatList *)__pyx_v_self->col1->__pyx_vtab)->set(__pyx_v_self->col1, __pyx_v_loc, (((double)__pyx_v_n->val) / __pyx_v_fmargin)); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":196 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":196 * self.e_index.set(loc, n.key) * self.col1.set(loc, float(n.val)/fmargin) * self.col2.set(loc, float(n.val)/float(emargin[n.key])) # <<<<<<<<<<<<<< @@ -16063,7 +16064,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex__add_node(struct __pyx_obj_4cdec_ } ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_FloatList *)__pyx_v_self->col2->__pyx_vtab)->set(__pyx_v_self->col2, __pyx_v_loc, (((double)__pyx_v_n->val) / ((double)(__pyx_v_emargin[__pyx_v_n->key])))); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":197 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":197 * self.col1.set(loc, float(n.val)/fmargin) * self.col2.set(loc, float(n.val)/float(emargin[n.key])) * num_pairs[0] = loc + 1 # <<<<<<<<<<<<<< @@ -16072,7 +16073,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex__add_node(struct __pyx_obj_4cdec_ */ (__pyx_v_num_pairs[0]) = (__pyx_v_loc + 1); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":198 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":198 * self.col2.set(loc, float(n.val)/float(emargin[n.key])) * num_pairs[0] = loc + 1 * if n.bigger != NULL: # <<<<<<<<<<<<<< @@ -16082,7 +16083,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex__add_node(struct __pyx_obj_4cdec_ __pyx_t_1 = ((__pyx_v_n->bigger != NULL) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":199 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":199 * num_pairs[0] = loc + 1 * if n.bigger != NULL: * self._add_node(n.bigger, num_pairs, fmargin, emargin) # <<<<<<<<<<<<<< @@ -16096,7 +16097,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex__add_node(struct __pyx_obj_4cdec_ } __pyx_L4:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":189 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":189 * * * cdef _add_node(self, _node* n, int* num_pairs, float fmargin, int* emargin): # <<<<<<<<<<<<<< @@ -16117,7 +16118,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex__add_node(struct __pyx_obj_4cdec_ return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":202 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":202 * * * def write_binary(self, char* filename): # <<<<<<<<<<<<<< @@ -16162,7 +16163,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_2write_binary(struct __pyx_obj_4 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("write_binary", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":204 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":204 * def write_binary(self, char* filename): * cdef FILE* f * f = fopen(filename, "w") # <<<<<<<<<<<<<< @@ -16171,7 +16172,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_2write_binary(struct __pyx_obj_4 */ __pyx_v_f = fopen(__pyx_v_filename, __pyx_k_w); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":205 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":205 * cdef FILE* f * f = fopen(filename, "w") * self.f_index.write_handle(f) # <<<<<<<<<<<<<< @@ -16180,7 +16181,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_2write_binary(struct __pyx_obj_4 */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->f_index->__pyx_vtab)->write_handle(__pyx_v_self->f_index, __pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":206 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":206 * f = fopen(filename, "w") * self.f_index.write_handle(f) * self.e_index.write_handle(f) # <<<<<<<<<<<<<< @@ -16189,7 +16190,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_2write_binary(struct __pyx_obj_4 */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->e_index->__pyx_vtab)->write_handle(__pyx_v_self->e_index, __pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":207 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":207 * self.f_index.write_handle(f) * self.e_index.write_handle(f) * self.col1.write_handle(f) # <<<<<<<<<<<<<< @@ -16198,7 +16199,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_2write_binary(struct __pyx_obj_4 */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_FloatList *)__pyx_v_self->col1->__pyx_vtab)->write_handle(__pyx_v_self->col1, __pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":208 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":208 * self.e_index.write_handle(f) * self.col1.write_handle(f) * self.col2.write_handle(f) # <<<<<<<<<<<<<< @@ -16207,7 +16208,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_2write_binary(struct __pyx_obj_4 */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_FloatList *)__pyx_v_self->col2->__pyx_vtab)->write_handle(__pyx_v_self->col2, __pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":209 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":209 * self.col1.write_handle(f) * self.col2.write_handle(f) * self.write_wordlist(self.id2fword, f) # <<<<<<<<<<<<<< @@ -16221,7 +16222,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_2write_binary(struct __pyx_obj_4 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":210 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":210 * self.col2.write_handle(f) * self.write_wordlist(self.id2fword, f) * self.write_wordlist(self.id2eword, f) # <<<<<<<<<<<<<< @@ -16235,7 +16236,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_2write_binary(struct __pyx_obj_4 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":211 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":211 * self.write_wordlist(self.id2fword, f) * self.write_wordlist(self.id2eword, f) * fclose(f) # <<<<<<<<<<<<<< @@ -16244,7 +16245,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_2write_binary(struct __pyx_obj_4 */ fclose(__pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":202 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":202 * * * def write_binary(self, char* filename): # <<<<<<<<<<<<<< @@ -16266,7 +16267,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_2write_binary(struct __pyx_obj_4 return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":214 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":214 * * * cdef write_wordlist(self, wordlist, FILE* f): # <<<<<<<<<<<<<< @@ -16291,7 +16292,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_write_wordlist(CYTHON_UNUSED stru int __pyx_clineno = 0; __Pyx_RefNannySetupContext("write_wordlist", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":218 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":218 * cdef int num_words * * num_words = len(wordlist) # <<<<<<<<<<<<<< @@ -16301,7 +16302,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_write_wordlist(CYTHON_UNUSED stru __pyx_t_1 = PyObject_Length(__pyx_v_wordlist); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_num_words = __pyx_t_1; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":219 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":219 * * num_words = len(wordlist) * fwrite(&(num_words), sizeof(int), 1, f) # <<<<<<<<<<<<<< @@ -16310,7 +16311,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_write_wordlist(CYTHON_UNUSED stru */ fwrite((&__pyx_v_num_words), (sizeof(int)), 1, __pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":220 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":220 * num_words = len(wordlist) * fwrite(&(num_words), sizeof(int), 1, f) * for word in wordlist: # <<<<<<<<<<<<<< @@ -16355,7 +16356,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_write_wordlist(CYTHON_UNUSED stru __Pyx_XDECREF_SET(__pyx_v_word, __pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":221 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":221 * fwrite(&(num_words), sizeof(int), 1, f) * for word in wordlist: * word_len = len(word) + 1 # <<<<<<<<<<<<<< @@ -16365,7 +16366,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_write_wordlist(CYTHON_UNUSED stru __pyx_t_5 = PyObject_Length(__pyx_v_word); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_word_len = (__pyx_t_5 + 1); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":222 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":222 * for word in wordlist: * word_len = len(word) + 1 * fwrite(&(word_len), sizeof(int), 1, f) # <<<<<<<<<<<<<< @@ -16374,7 +16375,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_write_wordlist(CYTHON_UNUSED stru */ fwrite((&__pyx_v_word_len), (sizeof(int)), 1, __pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":223 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":223 * word_len = len(word) + 1 * fwrite(&(word_len), sizeof(int), 1, f) * fwrite(word, sizeof(char), word_len, f) # <<<<<<<<<<<<<< @@ -16386,7 +16387,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_write_wordlist(CYTHON_UNUSED stru } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":214 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":214 * * * cdef write_wordlist(self, wordlist, FILE* f): # <<<<<<<<<<<<<< @@ -16409,7 +16410,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_write_wordlist(CYTHON_UNUSED stru return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":226 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":226 * * * cdef read_wordlist(self, word2id, id2word, FILE* f): # <<<<<<<<<<<<<< @@ -16434,7 +16435,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_read_wordlist(CYTHON_UNUSED struc int __pyx_clineno = 0; __Pyx_RefNannySetupContext("read_wordlist", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":231 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":231 * cdef char* word * * fread(&(num_words), sizeof(int), 1, f) # <<<<<<<<<<<<<< @@ -16443,7 +16444,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_read_wordlist(CYTHON_UNUSED struc */ fread((&__pyx_v_num_words), (sizeof(int)), 1, __pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":232 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":232 * * fread(&(num_words), sizeof(int), 1, f) * for i from 0 <= i < num_words: # <<<<<<<<<<<<<< @@ -16453,7 +16454,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_read_wordlist(CYTHON_UNUSED struc __pyx_t_1 = __pyx_v_num_words; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":233 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":233 * fread(&(num_words), sizeof(int), 1, f) * for i from 0 <= i < num_words: * fread(&(word_len), sizeof(int), 1, f) # <<<<<<<<<<<<<< @@ -16462,7 +16463,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_read_wordlist(CYTHON_UNUSED struc */ fread((&__pyx_v_word_len), (sizeof(int)), 1, __pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":234 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":234 * for i from 0 <= i < num_words: * fread(&(word_len), sizeof(int), 1, f) * word = malloc (word_len * sizeof(char)) # <<<<<<<<<<<<<< @@ -16471,7 +16472,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_read_wordlist(CYTHON_UNUSED struc */ __pyx_v_word = ((char *)malloc((__pyx_v_word_len * (sizeof(char))))); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":235 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":235 * fread(&(word_len), sizeof(int), 1, f) * word = malloc (word_len * sizeof(char)) * fread(word, sizeof(char), word_len, f) # <<<<<<<<<<<<<< @@ -16480,7 +16481,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_read_wordlist(CYTHON_UNUSED struc */ fread(__pyx_v_word, (sizeof(char)), __pyx_v_word_len, __pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":236 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":236 * word = malloc (word_len * sizeof(char)) * fread(word, sizeof(char), word_len, f) * word2id[word] = len(id2word) # <<<<<<<<<<<<<< @@ -16496,7 +16497,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_read_wordlist(CYTHON_UNUSED struc __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":237 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":237 * fread(word, sizeof(char), word_len, f) * word2id[word] = len(id2word) * id2word.append(word) # <<<<<<<<<<<<<< @@ -16508,7 +16509,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_read_wordlist(CYTHON_UNUSED struc __pyx_t_5 = __Pyx_PyObject_Append(__pyx_v_id2word, __pyx_t_3); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":238 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":238 * word2id[word] = len(id2word) * id2word.append(word) * free(word) # <<<<<<<<<<<<<< @@ -16518,7 +16519,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_read_wordlist(CYTHON_UNUSED struc free(__pyx_v_word); } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":226 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":226 * * * cdef read_wordlist(self, word2id, id2word, FILE* f): # <<<<<<<<<<<<<< @@ -16540,7 +16541,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_read_wordlist(CYTHON_UNUSED struc return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":240 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":240 * free(word) * * def read_binary(self, char* filename): # <<<<<<<<<<<<<< @@ -16586,7 +16587,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_4read_binary(struct __pyx_obj_4c int __pyx_clineno = 0; __Pyx_RefNannySetupContext("read_binary", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":242 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":242 * def read_binary(self, char* filename): * cdef FILE* f * f = fopen(filename, "r") # <<<<<<<<<<<<<< @@ -16595,7 +16596,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_4read_binary(struct __pyx_obj_4c */ __pyx_v_f = fopen(__pyx_v_filename, __pyx_k_r); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":243 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":243 * cdef FILE* f * f = fopen(filename, "r") * self.f_index.read_handle(f) # <<<<<<<<<<<<<< @@ -16604,7 +16605,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_4read_binary(struct __pyx_obj_4c */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->f_index->__pyx_vtab)->read_handle(__pyx_v_self->f_index, __pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":244 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":244 * f = fopen(filename, "r") * self.f_index.read_handle(f) * self.e_index.read_handle(f) # <<<<<<<<<<<<<< @@ -16613,7 +16614,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_4read_binary(struct __pyx_obj_4c */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->e_index->__pyx_vtab)->read_handle(__pyx_v_self->e_index, __pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":245 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":245 * self.f_index.read_handle(f) * self.e_index.read_handle(f) * self.col1.read_handle(f) # <<<<<<<<<<<<<< @@ -16622,7 +16623,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_4read_binary(struct __pyx_obj_4c */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_FloatList *)__pyx_v_self->col1->__pyx_vtab)->read_handle(__pyx_v_self->col1, __pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":246 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":246 * self.e_index.read_handle(f) * self.col1.read_handle(f) * self.col2.read_handle(f) # <<<<<<<<<<<<<< @@ -16631,7 +16632,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_4read_binary(struct __pyx_obj_4c */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_FloatList *)__pyx_v_self->col2->__pyx_vtab)->read_handle(__pyx_v_self->col2, __pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":247 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":247 * self.col1.read_handle(f) * self.col2.read_handle(f) * self.read_wordlist(self.fword2id, self.id2fword, f) # <<<<<<<<<<<<<< @@ -16648,7 +16649,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_4read_binary(struct __pyx_obj_4c __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":248 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":248 * self.col2.read_handle(f) * self.read_wordlist(self.fword2id, self.id2fword, f) * self.read_wordlist(self.eword2id, self.id2eword, f) # <<<<<<<<<<<<<< @@ -16665,7 +16666,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_4read_binary(struct __pyx_obj_4c __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":249 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":249 * self.read_wordlist(self.fword2id, self.id2fword, f) * self.read_wordlist(self.eword2id, self.id2eword, f) * fclose(f) # <<<<<<<<<<<<<< @@ -16674,7 +16675,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_4read_binary(struct __pyx_obj_4c */ fclose(__pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":240 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":240 * free(word) * * def read_binary(self, char* filename): # <<<<<<<<<<<<<< @@ -16697,7 +16698,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_4read_binary(struct __pyx_obj_4c return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":252 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":252 * * * def contains_e_word(self, eword): # <<<<<<<<<<<<<< @@ -16728,7 +16729,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_6contains_e_word(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("contains_e_word", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":253 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":253 * * def contains_e_word(self, eword): * return (eword in self.eword2id) # <<<<<<<<<<<<<< @@ -16743,7 +16744,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_6contains_e_word(struct __pyx_ob __pyx_t_2 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":252 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":252 * * * def contains_e_word(self, eword): # <<<<<<<<<<<<<< @@ -16762,7 +16763,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_6contains_e_word(struct __pyx_ob return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":256 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":256 * * * def contains_f_word(self, fword): # <<<<<<<<<<<<<< @@ -16793,7 +16794,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_8contains_f_word(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("contains_f_word", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":257 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":257 * * def contains_f_word(self, fword): * return (fword in self.fword2id) # <<<<<<<<<<<<<< @@ -16808,7 +16809,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_8contains_f_word(struct __pyx_ob __pyx_t_2 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":256 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":256 * * * def contains_f_word(self, fword): # <<<<<<<<<<<<<< @@ -16827,7 +16828,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_8contains_f_word(struct __pyx_ob return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":260 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":260 * * * def get_e_id(self, eword): # <<<<<<<<<<<<<< @@ -16862,7 +16863,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_10get_e_id(struct __pyx_obj_4cde int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_e_id", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":261 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":261 * * def get_e_id(self, eword): * if eword not in self.eword2id: # <<<<<<<<<<<<<< @@ -16873,7 +16874,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_10get_e_id(struct __pyx_obj_4cde __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":262 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":262 * def get_e_id(self, eword): * if eword not in self.eword2id: * e_id = len(self.id2eword) # <<<<<<<<<<<<<< @@ -16886,7 +16887,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_10get_e_id(struct __pyx_obj_4cde __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_e_id = __pyx_t_4; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":263 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":263 * if eword not in self.eword2id: * e_id = len(self.id2eword) * self.id2eword.append(eword) # <<<<<<<<<<<<<< @@ -16895,7 +16896,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_10get_e_id(struct __pyx_obj_4cde */ __pyx_t_5 = __Pyx_PyObject_Append(__pyx_v_self->id2eword, __pyx_v_eword); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":264 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":264 * e_id = len(self.id2eword) * self.id2eword.append(eword) * self.eword2id[eword] = e_id # <<<<<<<<<<<<<< @@ -16910,7 +16911,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_10get_e_id(struct __pyx_obj_4cde } __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":265 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":265 * self.id2eword.append(eword) * self.eword2id[eword] = e_id * return self.eword2id[eword] # <<<<<<<<<<<<<< @@ -16924,7 +16925,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_10get_e_id(struct __pyx_obj_4cde __pyx_t_3 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":260 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":260 * * * def get_e_id(self, eword): # <<<<<<<<<<<<<< @@ -16943,7 +16944,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_10get_e_id(struct __pyx_obj_4cde return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":268 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":268 * * * def get_f_id(self, fword): # <<<<<<<<<<<<<< @@ -16978,7 +16979,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_12get_f_id(struct __pyx_obj_4cde int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_f_id", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":269 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":269 * * def get_f_id(self, fword): * if fword not in self.fword2id: # <<<<<<<<<<<<<< @@ -16989,7 +16990,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_12get_f_id(struct __pyx_obj_4cde __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":270 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":270 * def get_f_id(self, fword): * if fword not in self.fword2id: * f_id = len(self.id2fword) # <<<<<<<<<<<<<< @@ -17002,7 +17003,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_12get_f_id(struct __pyx_obj_4cde __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_f_id = __pyx_t_4; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":271 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":271 * if fword not in self.fword2id: * f_id = len(self.id2fword) * self.id2fword.append(fword) # <<<<<<<<<<<<<< @@ -17011,7 +17012,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_12get_f_id(struct __pyx_obj_4cde */ __pyx_t_5 = __Pyx_PyObject_Append(__pyx_v_self->id2fword, __pyx_v_fword); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":272 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":272 * f_id = len(self.id2fword) * self.id2fword.append(fword) * self.fword2id[fword] = f_id # <<<<<<<<<<<<<< @@ -17026,7 +17027,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_12get_f_id(struct __pyx_obj_4cde } __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":273 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":273 * self.id2fword.append(fword) * self.fword2id[fword] = f_id * return self.fword2id[fword] # <<<<<<<<<<<<<< @@ -17040,7 +17041,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_12get_f_id(struct __pyx_obj_4cde __pyx_t_3 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":268 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":268 * * * def get_f_id(self, fword): # <<<<<<<<<<<<<< @@ -17059,7 +17060,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_12get_f_id(struct __pyx_obj_4cde return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":276 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":276 * * * def read_text(self, char* filename): # <<<<<<<<<<<<<< @@ -17141,7 +17142,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd int __pyx_clineno = 0; __Pyx_RefNannySetupContext("read_text", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":280 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":280 * cdef IntList fcount * * fcount = IntList() # <<<<<<<<<<<<<< @@ -17153,7 +17154,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __pyx_v_fcount = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":281 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":281 * * fcount = IntList() * with gzip_or_text(filename) as f: # <<<<<<<<<<<<<< @@ -17193,7 +17194,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __pyx_v_f = __pyx_t_1; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":283 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":283 * with gzip_or_text(filename) as f: * # first loop merely establishes size of array objects * for line in f: # <<<<<<<<<<<<<< @@ -17238,7 +17239,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __Pyx_XDECREF_SET(__pyx_v_line, __pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":284 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":284 * # first loop merely establishes size of array objects * for line in f: * (fword, eword, score1, score2) = line.split() # <<<<<<<<<<<<<< @@ -17322,7 +17323,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __Pyx_XDECREF_SET(__pyx_v_score2, __pyx_t_12); __pyx_t_12 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":285 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":285 * for line in f: * (fword, eword, score1, score2) = line.split() * f_id = self.get_f_id(fword) # <<<<<<<<<<<<<< @@ -17343,7 +17344,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __Pyx_XDECREF_SET(__pyx_v_f_id, __pyx_t_11); __pyx_t_11 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":286 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":286 * (fword, eword, score1, score2) = line.split() * f_id = self.get_f_id(fword) * e_id = self.get_e_id(eword) # <<<<<<<<<<<<<< @@ -17364,7 +17365,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __Pyx_XDECREF_SET(__pyx_v_e_id, __pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":287 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":287 * f_id = self.get_f_id(fword) * e_id = self.get_e_id(eword) * while f_id >= len(fcount): # <<<<<<<<<<<<<< @@ -17381,7 +17382,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; if (!__pyx_t_16) break; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":288 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":288 * e_id = self.get_e_id(eword) * while f_id >= len(fcount): * fcount.append(0) # <<<<<<<<<<<<<< @@ -17391,7 +17392,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __pyx_t_17 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_fcount), __pyx_int_0); if (unlikely(__pyx_t_17 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 288; __pyx_clineno = __LINE__; goto __pyx_L7_error;} } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":289 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":289 * while f_id >= len(fcount): * fcount.append(0) * fcount.arr[f_id] = fcount.arr[f_id] + 1 # <<<<<<<<<<<<<< @@ -17404,7 +17405,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":292 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":292 * * # Allocate space for dictionary in arrays * N = 0 # <<<<<<<<<<<<<< @@ -17414,7 +17415,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __Pyx_INCREF(__pyx_int_0); __pyx_v_N = __pyx_int_0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":293 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":293 * # Allocate space for dictionary in arrays * N = 0 * n_f = len(fcount) # <<<<<<<<<<<<<< @@ -17427,7 +17428,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __pyx_v_n_f = __pyx_t_1; __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":294 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":294 * N = 0 * n_f = len(fcount) * self.f_index = IntList(initial_len=n_f+1) # <<<<<<<<<<<<<< @@ -17449,7 +17450,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __pyx_v_self->f_index = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_12); __pyx_t_12 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":295 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":295 * n_f = len(fcount) * self.f_index = IntList(initial_len=n_f+1) * for i from 0 <= i < n_f: # <<<<<<<<<<<<<< @@ -17463,7 +17464,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_12); __pyx_t_12 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":296 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":296 * self.f_index = IntList(initial_len=n_f+1) * for i from 0 <= i < n_f: * self.f_index.arr[i] = N # <<<<<<<<<<<<<< @@ -17474,7 +17475,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L7_error;} (__pyx_v_self->f_index->arr[__pyx_t_8]) = __pyx_t_21; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":297 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":297 * for i from 0 <= i < n_f: * self.f_index.arr[i] = N * N = N + fcount.arr[i] # <<<<<<<<<<<<<< @@ -17490,7 +17491,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __Pyx_DECREF_SET(__pyx_v_N, __pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":298 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":298 * self.f_index.arr[i] = N * N = N + fcount.arr[i] * fcount.arr[i] = 0 # <<<<<<<<<<<<<< @@ -17502,7 +17503,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __pyx_t_20 = __Pyx_PyInt_As_long(__pyx_v_i); if (unlikely((__pyx_t_20 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L7_error;} } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":295 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":295 * n_f = len(fcount) * self.f_index = IntList(initial_len=n_f+1) * for i from 0 <= i < n_f: # <<<<<<<<<<<<<< @@ -17514,7 +17515,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":299 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":299 * N = N + fcount.arr[i] * fcount.arr[i] = 0 * self.f_index.arr[n_f] = N # <<<<<<<<<<<<<< @@ -17525,7 +17526,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n_f); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L7_error;} (__pyx_v_self->f_index->arr[__pyx_t_8]) = __pyx_t_21; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":300 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":300 * fcount.arr[i] = 0 * self.f_index.arr[n_f] = N * self.e_index = IntList(initial_len=N) # <<<<<<<<<<<<<< @@ -17544,7 +17545,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __pyx_v_self->e_index = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_12); __pyx_t_12 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":301 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":301 * self.f_index.arr[n_f] = N * self.e_index = IntList(initial_len=N) * self.col1 = FloatList(initial_len=N) # <<<<<<<<<<<<<< @@ -17563,7 +17564,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __pyx_v_self->col1 = ((struct __pyx_obj_4cdec_2sa_3_sa_FloatList *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":302 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":302 * self.e_index = IntList(initial_len=N) * self.col1 = FloatList(initial_len=N) * self.col2 = FloatList(initial_len=N) # <<<<<<<<<<<<<< @@ -17582,7 +17583,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __pyx_v_self->col2 = ((struct __pyx_obj_4cdec_2sa_3_sa_FloatList *)__pyx_t_12); __pyx_t_12 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":305 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":305 * * # Re-read file, placing words into buckets * f.seek(0) # <<<<<<<<<<<<<< @@ -17596,7 +17597,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":306 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":306 * # Re-read file, placing words into buckets * f.seek(0) * for line in f: # <<<<<<<<<<<<<< @@ -17641,7 +17642,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __Pyx_XDECREF_SET(__pyx_v_line, __pyx_t_12); __pyx_t_12 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":307 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":307 * f.seek(0) * for line in f: * (fword, eword, score1, score2) = line.split() # <<<<<<<<<<<<<< @@ -17725,7 +17726,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __Pyx_XDECREF_SET(__pyx_v_score2, __pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":308 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":308 * for line in f: * (fword, eword, score1, score2) = line.split() * f_id = self.get_f_id(fword) # <<<<<<<<<<<<<< @@ -17746,7 +17747,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __Pyx_XDECREF_SET(__pyx_v_f_id, __pyx_t_10); __pyx_t_10 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":309 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":309 * (fword, eword, score1, score2) = line.split() * f_id = self.get_f_id(fword) * e_id = self.get_e_id(eword) # <<<<<<<<<<<<<< @@ -17767,7 +17768,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __Pyx_XDECREF_SET(__pyx_v_e_id, __pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":310 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":310 * f_id = self.get_f_id(fword) * e_id = self.get_e_id(eword) * index = self.f_index.arr[f_id] + fcount.arr[f_id] # <<<<<<<<<<<<<< @@ -17781,7 +17782,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":311 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":311 * e_id = self.get_e_id(eword) * index = self.f_index.arr[f_id] + fcount.arr[f_id] * fcount.arr[f_id] = fcount.arr[f_id] + 1 # <<<<<<<<<<<<<< @@ -17792,7 +17793,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __pyx_t_15 = __Pyx_PyIndex_AsSsize_t(__pyx_v_f_id); if (unlikely((__pyx_t_15 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L7_error;} (__pyx_v_fcount->arr[__pyx_t_15]) = ((__pyx_v_fcount->arr[__pyx_t_18]) + 1); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":312 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":312 * index = self.f_index.arr[f_id] + fcount.arr[f_id] * fcount.arr[f_id] = fcount.arr[f_id] + 1 * self.e_index.arr[index] = int(e_id) # <<<<<<<<<<<<<< @@ -17806,7 +17807,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __pyx_t_18 = __Pyx_PyIndex_AsSsize_t(__pyx_v_index); if (unlikely((__pyx_t_18 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L7_error;} (__pyx_v_self->e_index->arr[__pyx_t_18]) = __pyx_t_21; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":313 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":313 * fcount.arr[f_id] = fcount.arr[f_id] + 1 * self.e_index.arr[index] = int(e_id) * self.col1[index] = float(score1) # <<<<<<<<<<<<<< @@ -17819,7 +17820,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_self->col1), __pyx_v_index, __pyx_t_3) < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":314 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":314 * self.e_index.arr[index] = int(e_id) * self.col1[index] = float(score1) * self.col2[index] = float(score2) # <<<<<<<<<<<<<< @@ -17847,7 +17848,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":281 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":281 * * fcount = IntList() * with gzip_or_text(filename) as f: # <<<<<<<<<<<<<< @@ -17918,7 +17919,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __pyx_L31:; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":317 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":317 * * # Sort buckets by eword * for b from 0 <= b < n_f: # <<<<<<<<<<<<<< @@ -17933,7 +17934,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __Pyx_XDECREF_SET(__pyx_v_b, __pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":318 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":318 * # Sort buckets by eword * for b from 0 <= b < n_f: * i = self.f_index.arr[b] # <<<<<<<<<<<<<< @@ -17946,7 +17947,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":319 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":319 * for b from 0 <= b < n_f: * i = self.f_index.arr[b] * j = self.f_index.arr[b+1] # <<<<<<<<<<<<<< @@ -17962,7 +17963,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __Pyx_XDECREF_SET(__pyx_v_j, __pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":320 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":320 * i = self.f_index.arr[b] * j = self.f_index.arr[b+1] * self.qsort(i,j, "") # <<<<<<<<<<<<<< @@ -17977,7 +17978,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __pyx_t_19 = __Pyx_PyInt_As_long(__pyx_v_b); if (unlikely((__pyx_t_19 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":317 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":317 * * # Sort buckets by eword * for b from 0 <= b < n_f: # <<<<<<<<<<<<<< @@ -17989,7 +17990,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd __Pyx_XDECREF_SET(__pyx_v_b, __pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":276 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":276 * * * def read_text(self, char* filename): # <<<<<<<<<<<<<< @@ -18031,7 +18032,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_14read_text(struct __pyx_obj_4cd return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":323 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":323 * * * cdef swap(self, int i, int j): # <<<<<<<<<<<<<< @@ -18047,7 +18048,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_swap(struct __pyx_obj_4cdec_2sa_3 int __pyx_t_1; __Pyx_RefNannySetupContext("swap", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":327 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":327 * cdef float ftmp * * if i == j: # <<<<<<<<<<<<<< @@ -18057,7 +18058,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_swap(struct __pyx_obj_4cdec_2sa_3 __pyx_t_1 = ((__pyx_v_i == __pyx_v_j) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":328 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":328 * * if i == j: * return # <<<<<<<<<<<<<< @@ -18069,7 +18070,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_swap(struct __pyx_obj_4cdec_2sa_3 goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":330 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":330 * return * * itmp = self.e_index.arr[i] # <<<<<<<<<<<<<< @@ -18078,7 +18079,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_swap(struct __pyx_obj_4cdec_2sa_3 */ __pyx_v_itmp = (__pyx_v_self->e_index->arr[__pyx_v_i]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":331 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":331 * * itmp = self.e_index.arr[i] * self.e_index.arr[i] = self.e_index.arr[j] # <<<<<<<<<<<<<< @@ -18087,7 +18088,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_swap(struct __pyx_obj_4cdec_2sa_3 */ (__pyx_v_self->e_index->arr[__pyx_v_i]) = (__pyx_v_self->e_index->arr[__pyx_v_j]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":332 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":332 * itmp = self.e_index.arr[i] * self.e_index.arr[i] = self.e_index.arr[j] * self.e_index.arr[j] = itmp # <<<<<<<<<<<<<< @@ -18096,7 +18097,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_swap(struct __pyx_obj_4cdec_2sa_3 */ (__pyx_v_self->e_index->arr[__pyx_v_j]) = __pyx_v_itmp; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":334 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":334 * self.e_index.arr[j] = itmp * * ftmp = self.col1.arr[i] # <<<<<<<<<<<<<< @@ -18105,7 +18106,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_swap(struct __pyx_obj_4cdec_2sa_3 */ __pyx_v_ftmp = (__pyx_v_self->col1->arr[__pyx_v_i]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":335 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":335 * * ftmp = self.col1.arr[i] * self.col1.arr[i] = self.col1.arr[j] # <<<<<<<<<<<<<< @@ -18114,7 +18115,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_swap(struct __pyx_obj_4cdec_2sa_3 */ (__pyx_v_self->col1->arr[__pyx_v_i]) = (__pyx_v_self->col1->arr[__pyx_v_j]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":336 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":336 * ftmp = self.col1.arr[i] * self.col1.arr[i] = self.col1.arr[j] * self.col1.arr[j] = ftmp # <<<<<<<<<<<<<< @@ -18123,7 +18124,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_swap(struct __pyx_obj_4cdec_2sa_3 */ (__pyx_v_self->col1->arr[__pyx_v_j]) = __pyx_v_ftmp; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":338 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":338 * self.col1.arr[j] = ftmp * * ftmp = self.col2.arr[i] # <<<<<<<<<<<<<< @@ -18132,7 +18133,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_swap(struct __pyx_obj_4cdec_2sa_3 */ __pyx_v_ftmp = (__pyx_v_self->col2->arr[__pyx_v_i]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":339 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":339 * * ftmp = self.col2.arr[i] * self.col2.arr[i] = self.col2.arr[j] # <<<<<<<<<<<<<< @@ -18141,7 +18142,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_swap(struct __pyx_obj_4cdec_2sa_3 */ (__pyx_v_self->col2->arr[__pyx_v_i]) = (__pyx_v_self->col2->arr[__pyx_v_j]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":340 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":340 * ftmp = self.col2.arr[i] * self.col2.arr[i] = self.col2.arr[j] * self.col2.arr[j] = ftmp # <<<<<<<<<<<<<< @@ -18150,7 +18151,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_swap(struct __pyx_obj_4cdec_2sa_3 */ (__pyx_v_self->col2->arr[__pyx_v_j]) = __pyx_v_ftmp; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":323 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":323 * * * cdef swap(self, int i, int j): # <<<<<<<<<<<<<< @@ -18166,7 +18167,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_swap(struct __pyx_obj_4cdec_2sa_3 return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":343 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":343 * * * cdef qsort(self, int i, int j, pad): # <<<<<<<<<<<<<< @@ -18189,7 +18190,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_qsort(struct __pyx_obj_4cdec_2sa_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("qsort", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":346 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":346 * cdef int pval, p * * if i > j: # <<<<<<<<<<<<<< @@ -18199,7 +18200,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_qsort(struct __pyx_obj_4cdec_2sa_ __pyx_t_1 = ((__pyx_v_i > __pyx_v_j) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":347 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":347 * * if i > j: * raise Exception("Sort error in CLex") # <<<<<<<<<<<<<< @@ -18213,7 +18214,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_qsort(struct __pyx_obj_4cdec_2sa_ {__pyx_filename = __pyx_f[5]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":348 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":348 * if i > j: * raise Exception("Sort error in CLex") * if i == j: #empty interval # <<<<<<<<<<<<<< @@ -18223,7 +18224,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_qsort(struct __pyx_obj_4cdec_2sa_ __pyx_t_1 = ((__pyx_v_i == __pyx_v_j) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":349 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":349 * raise Exception("Sort error in CLex") * if i == j: #empty interval * return # <<<<<<<<<<<<<< @@ -18235,7 +18236,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_qsort(struct __pyx_obj_4cdec_2sa_ goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":350 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":350 * if i == j: #empty interval * return * if i == j-1: # singleton interval # <<<<<<<<<<<<<< @@ -18245,7 +18246,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_qsort(struct __pyx_obj_4cdec_2sa_ __pyx_t_1 = ((__pyx_v_i == (__pyx_v_j - 1)) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":351 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":351 * return * if i == j-1: # singleton interval * return # <<<<<<<<<<<<<< @@ -18257,7 +18258,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_qsort(struct __pyx_obj_4cdec_2sa_ goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":353 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":353 * return * * p = (i+j)/2 # <<<<<<<<<<<<<< @@ -18266,7 +18267,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_qsort(struct __pyx_obj_4cdec_2sa_ */ __pyx_v_p = __Pyx_div_long((__pyx_v_i + __pyx_v_j), 2); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":354 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":354 * * p = (i+j)/2 * pval = self.e_index.arr[p] # <<<<<<<<<<<<<< @@ -18275,7 +18276,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_qsort(struct __pyx_obj_4cdec_2sa_ */ __pyx_v_pval = (__pyx_v_self->e_index->arr[__pyx_v_p]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":355 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":355 * p = (i+j)/2 * pval = self.e_index.arr[p] * self.swap(i, p) # <<<<<<<<<<<<<< @@ -18286,7 +18287,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_qsort(struct __pyx_obj_4cdec_2sa_ __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":356 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":356 * pval = self.e_index.arr[p] * self.swap(i, p) * p = i # <<<<<<<<<<<<<< @@ -18295,7 +18296,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_qsort(struct __pyx_obj_4cdec_2sa_ */ __pyx_v_p = __pyx_v_i; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":357 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":357 * self.swap(i, p) * p = i * for k from i+1 <= k < j: # <<<<<<<<<<<<<< @@ -18305,7 +18306,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_qsort(struct __pyx_obj_4cdec_2sa_ __pyx_t_3 = __pyx_v_j; for (__pyx_v_k = (__pyx_v_i + 1); __pyx_v_k < __pyx_t_3; __pyx_v_k++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":358 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":358 * p = i * for k from i+1 <= k < j: * if pval >= self.e_index.arr[k]: # <<<<<<<<<<<<<< @@ -18315,7 +18316,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_qsort(struct __pyx_obj_4cdec_2sa_ __pyx_t_1 = ((__pyx_v_pval >= (__pyx_v_self->e_index->arr[__pyx_v_k])) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":359 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":359 * for k from i+1 <= k < j: * if pval >= self.e_index.arr[k]: * self.swap(p+1, k) # <<<<<<<<<<<<<< @@ -18326,7 +18327,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_qsort(struct __pyx_obj_4cdec_2sa_ __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":360 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":360 * if pval >= self.e_index.arr[k]: * self.swap(p+1, k) * self.swap(p, p+1) # <<<<<<<<<<<<<< @@ -18337,7 +18338,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_qsort(struct __pyx_obj_4cdec_2sa_ __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":361 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":361 * self.swap(p+1, k) * self.swap(p, p+1) * p = p + 1 # <<<<<<<<<<<<<< @@ -18350,7 +18351,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_qsort(struct __pyx_obj_4cdec_2sa_ __pyx_L8:; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":362 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":362 * self.swap(p, p+1) * p = p + 1 * self.qsort(i,p, pad+" ") # <<<<<<<<<<<<<< @@ -18364,7 +18365,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_qsort(struct __pyx_obj_4cdec_2sa_ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":363 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":363 * p = p + 1 * self.qsort(i,p, pad+" ") * self.qsort(p+1,j, pad+" ") # <<<<<<<<<<<<<< @@ -18378,7 +18379,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_qsort(struct __pyx_obj_4cdec_2sa_ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":343 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":343 * * * cdef qsort(self, int i, int j, pad): # <<<<<<<<<<<<<< @@ -18400,7 +18401,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_5BiLex_qsort(struct __pyx_obj_4cdec_2sa_ return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":366 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":366 * * * def write_enhanced(self, char* filename): # <<<<<<<<<<<<<< @@ -18463,7 +18464,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_16write_enhanced(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("write_enhanced", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":367 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":367 * * def write_enhanced(self, char* filename): * with open(filename, "w") as f: # <<<<<<<<<<<<<< @@ -18503,7 +18504,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_16write_enhanced(struct __pyx_ob __pyx_v_f = __pyx_t_4; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":368 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":368 * def write_enhanced(self, char* filename): * with open(filename, "w") as f: * for i in self.f_index: # <<<<<<<<<<<<<< @@ -18548,7 +18549,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_16write_enhanced(struct __pyx_ob __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":369 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":369 * with open(filename, "w") as f: * for i in self.f_index: * f.write("%d " % i) # <<<<<<<<<<<<<< @@ -18572,7 +18573,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_16write_enhanced(struct __pyx_ob } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":370 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":370 * for i in self.f_index: * f.write("%d " % i) * f.write("\n") # <<<<<<<<<<<<<< @@ -18586,7 +18587,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_16write_enhanced(struct __pyx_ob __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":371 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":371 * f.write("%d " % i) * f.write("\n") * for i, s1, s2 in zip(self.e_index, self.col1, self.col2): # <<<<<<<<<<<<<< @@ -18707,7 +18708,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_16write_enhanced(struct __pyx_ob __Pyx_XDECREF_SET(__pyx_v_s2, __pyx_t_11); __pyx_t_11 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":372 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":372 * f.write("\n") * for i, s1, s2 in zip(self.e_index, self.col1, self.col2): * f.write("%d %f %f " % (i, s1, s2)) # <<<<<<<<<<<<<< @@ -18743,7 +18744,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_16write_enhanced(struct __pyx_ob } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":373 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":373 * for i, s1, s2 in zip(self.e_index, self.col1, self.col2): * f.write("%d %f %f " % (i, s1, s2)) * f.write("\n") # <<<<<<<<<<<<<< @@ -18757,7 +18758,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_16write_enhanced(struct __pyx_ob __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":374 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":374 * f.write("%d %f %f " % (i, s1, s2)) * f.write("\n") * for i, w in enumerate(self.id2fword): # <<<<<<<<<<<<<< @@ -18811,7 +18812,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_16write_enhanced(struct __pyx_ob __pyx_t_1 = __pyx_t_11; __pyx_t_11 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":375 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":375 * f.write("\n") * for i, w in enumerate(self.id2fword): * f.write("%d %s " % (i, w)) # <<<<<<<<<<<<<< @@ -18845,7 +18846,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_16write_enhanced(struct __pyx_ob __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":376 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":376 * for i, w in enumerate(self.id2fword): * f.write("%d %s " % (i, w)) * f.write("\n") # <<<<<<<<<<<<<< @@ -18859,7 +18860,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_16write_enhanced(struct __pyx_ob __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":377 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":377 * f.write("%d %s " % (i, w)) * f.write("\n") * for i, w in enumerate(self.id2eword): # <<<<<<<<<<<<<< @@ -18913,7 +18914,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_16write_enhanced(struct __pyx_ob __pyx_t_2 = __pyx_t_10; __pyx_t_10 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":378 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":378 * f.write("\n") * for i, w in enumerate(self.id2eword): * f.write("%d %s " % (i, w)) # <<<<<<<<<<<<<< @@ -18947,7 +18948,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_16write_enhanced(struct __pyx_ob __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":379 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":379 * for i, w in enumerate(self.id2eword): * f.write("%d %s " % (i, w)) * f.write("\n") # <<<<<<<<<<<<<< @@ -18973,7 +18974,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_16write_enhanced(struct __pyx_ob __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":367 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":367 * * def write_enhanced(self, char* filename): * with open(filename, "w") as f: # <<<<<<<<<<<<<< @@ -19044,7 +19045,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_16write_enhanced(struct __pyx_ob __pyx_L29:; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":366 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":366 * * * def write_enhanced(self, char* filename): # <<<<<<<<<<<<<< @@ -19075,7 +19076,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_16write_enhanced(struct __pyx_ob return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":382 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":382 * * * def get_score(self, fword, eword, col): # <<<<<<<<<<<<<< @@ -19172,7 +19173,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_18get_score(struct __pyx_obj_4cd int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_score", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":385 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":385 * cdef e_id, f_id, low, high, midpoint, val * * if eword not in self.eword2id: # <<<<<<<<<<<<<< @@ -19183,7 +19184,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_18get_score(struct __pyx_obj_4cd __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":386 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":386 * * if eword not in self.eword2id: * return None # <<<<<<<<<<<<<< @@ -19196,7 +19197,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_18get_score(struct __pyx_obj_4cd goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":387 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":387 * if eword not in self.eword2id: * return None * if fword not in self.fword2id: # <<<<<<<<<<<<<< @@ -19207,7 +19208,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_18get_score(struct __pyx_obj_4cd __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":388 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":388 * return None * if fword not in self.fword2id: * return None # <<<<<<<<<<<<<< @@ -19220,7 +19221,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_18get_score(struct __pyx_obj_4cd goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":389 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":389 * if fword not in self.fword2id: * return None * f_id = self.fword2id[fword] # <<<<<<<<<<<<<< @@ -19232,7 +19233,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_18get_score(struct __pyx_obj_4cd __pyx_v_f_id = __pyx_t_3; __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":390 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":390 * return None * f_id = self.fword2id[fword] * e_id = self.eword2id[eword] # <<<<<<<<<<<<<< @@ -19244,7 +19245,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_18get_score(struct __pyx_obj_4cd __pyx_v_e_id = __pyx_t_3; __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":391 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":391 * f_id = self.fword2id[fword] * e_id = self.eword2id[eword] * low = self.f_index.arr[f_id] # <<<<<<<<<<<<<< @@ -19257,7 +19258,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_18get_score(struct __pyx_obj_4cd __pyx_v_low = __pyx_t_3; __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":392 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":392 * e_id = self.eword2id[eword] * low = self.f_index.arr[f_id] * high = self.f_index.arr[f_id+1] # <<<<<<<<<<<<<< @@ -19273,7 +19274,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_18get_score(struct __pyx_obj_4cd __pyx_v_high = __pyx_t_3; __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":393 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":393 * low = self.f_index.arr[f_id] * high = self.f_index.arr[f_id+1] * while high - low > 0: # <<<<<<<<<<<<<< @@ -19289,7 +19290,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_18get_score(struct __pyx_obj_4cd __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!__pyx_t_1) break; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":394 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":394 * high = self.f_index.arr[f_id+1] * while high - low > 0: * midpoint = (low+high)/2 # <<<<<<<<<<<<<< @@ -19304,7 +19305,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_18get_score(struct __pyx_obj_4cd __Pyx_XDECREF_SET(__pyx_v_midpoint, __pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":395 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":395 * while high - low > 0: * midpoint = (low+high)/2 * val = self.e_index.arr[midpoint] # <<<<<<<<<<<<<< @@ -19317,7 +19318,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_18get_score(struct __pyx_obj_4cd __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":396 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":396 * midpoint = (low+high)/2 * val = self.e_index.arr[midpoint] * if val == e_id: # <<<<<<<<<<<<<< @@ -19329,7 +19330,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_18get_score(struct __pyx_obj_4cd __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":397 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":397 * val = self.e_index.arr[midpoint] * if val == e_id: * if col == 0: # <<<<<<<<<<<<<< @@ -19341,7 +19342,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_18get_score(struct __pyx_obj_4cd __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":398 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":398 * if val == e_id: * if col == 0: * return self.col1.arr[midpoint] # <<<<<<<<<<<<<< @@ -19357,7 +19358,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_18get_score(struct __pyx_obj_4cd goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":399 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":399 * if col == 0: * return self.col1.arr[midpoint] * if col == 1: # <<<<<<<<<<<<<< @@ -19369,7 +19370,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_18get_score(struct __pyx_obj_4cd __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":400 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":400 * return self.col1.arr[midpoint] * if col == 1: * return self.col2.arr[midpoint] # <<<<<<<<<<<<<< @@ -19388,7 +19389,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_18get_score(struct __pyx_obj_4cd } __pyx_L7:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":401 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":401 * if col == 1: * return self.col2.arr[midpoint] * if val > e_id: # <<<<<<<<<<<<<< @@ -19400,7 +19401,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_18get_score(struct __pyx_obj_4cd __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":402 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":402 * return self.col2.arr[midpoint] * if val > e_id: * high = midpoint # <<<<<<<<<<<<<< @@ -19413,7 +19414,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_18get_score(struct __pyx_obj_4cd } __pyx_L10:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":403 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":403 * if val > e_id: * high = midpoint * if val < e_id: # <<<<<<<<<<<<<< @@ -19425,7 +19426,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_18get_score(struct __pyx_obj_4cd __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":404 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":404 * high = midpoint * if val < e_id: * low = midpoint + 1 # <<<<<<<<<<<<<< @@ -19441,7 +19442,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_18get_score(struct __pyx_obj_4cd __pyx_L11:; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":405 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":405 * if val < e_id: * low = midpoint + 1 * return None # <<<<<<<<<<<<<< @@ -19453,7 +19454,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_18get_score(struct __pyx_obj_4cd __pyx_r = Py_None; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":382 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":382 * * * def get_score(self, fword, eword, col): # <<<<<<<<<<<<<< @@ -19479,7 +19480,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_18get_score(struct __pyx_obj_4cd return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":408 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":408 * * * def write_text(self, char* filename): # <<<<<<<<<<<<<< @@ -19543,7 +19544,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_20write_text(struct __pyx_obj_4c int __pyx_clineno = 0; __Pyx_RefNannySetupContext("write_text", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":412 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":412 * cdef i, N, e_id, f_id * * with open(filename, "w") as f: # <<<<<<<<<<<<<< @@ -19583,7 +19584,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_20write_text(struct __pyx_obj_4c __pyx_v_f = __pyx_t_4; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":413 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":413 * * with open(filename, "w") as f: * N = len(self.e_index) # <<<<<<<<<<<<<< @@ -19599,7 +19600,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_20write_text(struct __pyx_obj_4c __pyx_v_N = __pyx_t_4; __pyx_t_4 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":414 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":414 * with open(filename, "w") as f: * N = len(self.e_index) * f_id = 0 # <<<<<<<<<<<<<< @@ -19609,7 +19610,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_20write_text(struct __pyx_obj_4c __Pyx_INCREF(__pyx_int_0); __pyx_v_f_id = __pyx_int_0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":415 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":415 * N = len(self.e_index) * f_id = 0 * for i from 0 <= i < N: # <<<<<<<<<<<<<< @@ -19623,7 +19624,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_20write_text(struct __pyx_obj_4c __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":416 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":416 * f_id = 0 * for i from 0 <= i < N: * while self.f_index.arr[f_id+1] == i: # <<<<<<<<<<<<<< @@ -19643,7 +19644,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_20write_text(struct __pyx_obj_4c __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!__pyx_t_11) break; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":417 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":417 * for i from 0 <= i < N: * while self.f_index.arr[f_id+1] == i: * f_id = f_id + 1 # <<<<<<<<<<<<<< @@ -19656,7 +19657,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_20write_text(struct __pyx_obj_4c __pyx_t_1 = 0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":418 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":418 * while self.f_index.arr[f_id+1] == i: * f_id = f_id + 1 * e_id = self.e_index.arr[i] # <<<<<<<<<<<<<< @@ -19669,7 +19670,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_20write_text(struct __pyx_obj_4c __Pyx_XDECREF_SET(__pyx_v_e_id, __pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":419 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":419 * f_id = f_id + 1 * e_id = self.e_index.arr[i] * score1 = self.col1.arr[i] # <<<<<<<<<<<<<< @@ -19682,7 +19683,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_20write_text(struct __pyx_obj_4c __Pyx_XDECREF_SET(__pyx_v_score1, __pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":420 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":420 * e_id = self.e_index.arr[i] * score1 = self.col1.arr[i] * score2 = self.col2.arr[i] # <<<<<<<<<<<<<< @@ -19694,7 +19695,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_20write_text(struct __pyx_obj_4c __Pyx_XDECREF_SET(__pyx_v_score2, __pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":421 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":421 * score1 = self.col1.arr[i] * score2 = self.col2.arr[i] * f.write("%s %s %.6f %.6f\n" % (self.id2fword[f_id], self.id2eword[e_id], score1, score2)) # <<<<<<<<<<<<<< @@ -19735,7 +19736,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_20write_text(struct __pyx_obj_4c __pyx_t_10 = __Pyx_PyInt_As_long(__pyx_v_i); if (unlikely((__pyx_t_10 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L7_error;} } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":415 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":415 * N = len(self.e_index) * f_id = 0 * for i from 0 <= i < N: # <<<<<<<<<<<<<< @@ -19757,7 +19758,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_20write_text(struct __pyx_obj_4c __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":412 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":412 * cdef i, N, e_id, f_id * * with open(filename, "w") as f: # <<<<<<<<<<<<<< @@ -19828,7 +19829,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_20write_text(struct __pyx_obj_4c __pyx_L23:; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":408 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":408 * * * def write_text(self, char* filename): # <<<<<<<<<<<<<< @@ -19859,7 +19860,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_5BiLex_20write_text(struct __pyx_obj_4c return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":21 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":21 * cdef int LOWER_MASK[32] * * cdef void _init_lower_mask(): # <<<<<<<<<<<<<< @@ -19875,7 +19876,7 @@ static void __pyx_f_4cdec_2sa_3_sa__init_lower_mask(void) { unsigned int __pyx_t_2; __Pyx_RefNannySetupContext("_init_lower_mask", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":23 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":23 * cdef void _init_lower_mask(): * cdef unsigned i * cdef int mask = 0 # <<<<<<<<<<<<<< @@ -19884,7 +19885,7 @@ static void __pyx_f_4cdec_2sa_3_sa__init_lower_mask(void) { */ __pyx_v_mask = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":24 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":24 * cdef unsigned i * cdef int mask = 0 * for i in range(MIN_BOTTOM_SIZE): # <<<<<<<<<<<<<< @@ -19895,7 +19896,7 @@ static void __pyx_f_4cdec_2sa_3_sa__init_lower_mask(void) { for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":25 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":25 * cdef int mask = 0 * for i in range(MIN_BOTTOM_SIZE): * mask = (mask << 1) + 1 # <<<<<<<<<<<<<< @@ -19904,7 +19905,7 @@ static void __pyx_f_4cdec_2sa_3_sa__init_lower_mask(void) { */ __pyx_v_mask = ((__pyx_v_mask << 1) + 1); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":26 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":26 * for i in range(MIN_BOTTOM_SIZE): * mask = (mask << 1) + 1 * LOWER_MASK[i] = mask # <<<<<<<<<<<<<< @@ -19914,7 +19915,7 @@ static void __pyx_f_4cdec_2sa_3_sa__init_lower_mask(void) { (__pyx_v_4cdec_2sa_3_sa_LOWER_MASK[__pyx_v_i]) = __pyx_v_mask; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":21 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":21 * cdef int LOWER_MASK[32] * * cdef void _init_lower_mask(): # <<<<<<<<<<<<<< @@ -19926,7 +19927,7 @@ static void __pyx_f_4cdec_2sa_3_sa__init_lower_mask(void) { __Pyx_RefNannyFinishContext(); } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":37 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":37 * * * cdef _BitSet* new_BitSet(): # <<<<<<<<<<<<<< @@ -19940,7 +19941,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__BitSet *__pyx_f_4cdec_2sa_3_sa_new_BitSet( __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("new_BitSet", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":40 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":40 * cdef _BitSet* b * * b = <_BitSet*> malloc(sizeof(_BitSet)) # <<<<<<<<<<<<<< @@ -19949,7 +19950,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__BitSet *__pyx_f_4cdec_2sa_3_sa_new_BitSet( */ __pyx_v_b = ((struct __pyx_t_4cdec_2sa_3_sa__BitSet *)malloc((sizeof(struct __pyx_t_4cdec_2sa_3_sa__BitSet)))); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":41 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":41 * * b = <_BitSet*> malloc(sizeof(_BitSet)) * b.bitset = 0 # <<<<<<<<<<<<<< @@ -19958,7 +19959,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__BitSet *__pyx_f_4cdec_2sa_3_sa_new_BitSet( */ __pyx_v_b->bitset = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":42 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":42 * b = <_BitSet*> malloc(sizeof(_BitSet)) * b.bitset = 0 * b.min_val = -1 # <<<<<<<<<<<<<< @@ -19967,7 +19968,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__BitSet *__pyx_f_4cdec_2sa_3_sa_new_BitSet( */ __pyx_v_b->min_val = -1; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":43 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":43 * b.bitset = 0 * b.min_val = -1 * b.max_val = -1 # <<<<<<<<<<<<<< @@ -19976,7 +19977,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__BitSet *__pyx_f_4cdec_2sa_3_sa_new_BitSet( */ __pyx_v_b->max_val = -1; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":44 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":44 * b.min_val = -1 * b.max_val = -1 * b.size = 0 # <<<<<<<<<<<<<< @@ -19985,7 +19986,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__BitSet *__pyx_f_4cdec_2sa_3_sa_new_BitSet( */ __pyx_v_b->size = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":45 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":45 * b.max_val = -1 * b.size = 0 * return b # <<<<<<<<<<<<<< @@ -19995,7 +19996,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__BitSet *__pyx_f_4cdec_2sa_3_sa_new_BitSet( __pyx_r = __pyx_v_b; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":37 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":37 * * * cdef _BitSet* new_BitSet(): # <<<<<<<<<<<<<< @@ -20009,7 +20010,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__BitSet *__pyx_f_4cdec_2sa_3_sa_new_BitSet( return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":48 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":48 * * * cdef int bitset_findsucc(_BitSet* b, int i): # <<<<<<<<<<<<<< @@ -20030,7 +20031,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_findsucc(struct __pyx_t_4cdec_2sa_3_sa_ int __pyx_t_3; __Pyx_RefNannySetupContext("bitset_findsucc", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":52 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":52 * cdef int low, high, mid * * if b.max_val == -1 or i >= b.max_val: # <<<<<<<<<<<<<< @@ -20046,7 +20047,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_findsucc(struct __pyx_t_4cdec_2sa_3_sa_ } if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":53 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":53 * * if b.max_val == -1 or i >= b.max_val: * return -1 # <<<<<<<<<<<<<< @@ -20057,7 +20058,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_findsucc(struct __pyx_t_4cdec_2sa_3_sa_ goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":54 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":54 * if b.max_val == -1 or i >= b.max_val: * return -1 * if i < b.min_val: # <<<<<<<<<<<<<< @@ -20067,7 +20068,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_findsucc(struct __pyx_t_4cdec_2sa_3_sa_ __pyx_t_3 = ((__pyx_v_i < __pyx_v_b->min_val) != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":55 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":55 * return -1 * if i < b.min_val: * return b.min_val # <<<<<<<<<<<<<< @@ -20078,7 +20079,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_findsucc(struct __pyx_t_4cdec_2sa_3_sa_ goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":57 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":57 * return b.min_val * * bitset = b.bitset & ~LOWER_MASK[i] # <<<<<<<<<<<<<< @@ -20087,7 +20088,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_findsucc(struct __pyx_t_4cdec_2sa_3_sa_ */ __pyx_v_bitset = (__pyx_v_b->bitset & (~(__pyx_v_4cdec_2sa_3_sa_LOWER_MASK[__pyx_v_i]))); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":58 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":58 * * bitset = b.bitset & ~LOWER_MASK[i] * low = i+1 # <<<<<<<<<<<<<< @@ -20096,7 +20097,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_findsucc(struct __pyx_t_4cdec_2sa_3_sa_ */ __pyx_v_low = (__pyx_v_i + 1); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":59 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":59 * bitset = b.bitset & ~LOWER_MASK[i] * low = i+1 * high = b.max_val+1 # <<<<<<<<<<<<<< @@ -20105,7 +20106,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_findsucc(struct __pyx_t_4cdec_2sa_3_sa_ */ __pyx_v_high = (__pyx_v_b->max_val + 1); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":60 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":60 * low = i+1 * high = b.max_val+1 * while low < high-1: # <<<<<<<<<<<<<< @@ -20116,7 +20117,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_findsucc(struct __pyx_t_4cdec_2sa_3_sa_ __pyx_t_3 = ((__pyx_v_low < (__pyx_v_high - 1)) != 0); if (!__pyx_t_3) break; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":61 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":61 * high = b.max_val+1 * while low < high-1: * mid = (high + low)/2 # <<<<<<<<<<<<<< @@ -20125,7 +20126,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_findsucc(struct __pyx_t_4cdec_2sa_3_sa_ */ __pyx_v_mid = __Pyx_div_long((__pyx_v_high + __pyx_v_low), 2); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":62 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":62 * while low < high-1: * mid = (high + low)/2 * mask = ~(LOWER_MASK[high-1] ^ LOWER_MASK[mid-1]) # <<<<<<<<<<<<<< @@ -20134,7 +20135,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_findsucc(struct __pyx_t_4cdec_2sa_3_sa_ */ __pyx_v_mask = (~((__pyx_v_4cdec_2sa_3_sa_LOWER_MASK[(__pyx_v_high - 1)]) ^ (__pyx_v_4cdec_2sa_3_sa_LOWER_MASK[(__pyx_v_mid - 1)]))); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":63 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":63 * mid = (high + low)/2 * mask = ~(LOWER_MASK[high-1] ^ LOWER_MASK[mid-1]) * if bitset & mask == 0: # <<<<<<<<<<<<<< @@ -20144,7 +20145,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_findsucc(struct __pyx_t_4cdec_2sa_3_sa_ __pyx_t_3 = (((__pyx_v_bitset & __pyx_v_mask) == 0) != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":64 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":64 * mask = ~(LOWER_MASK[high-1] ^ LOWER_MASK[mid-1]) * if bitset & mask == 0: * low = mid # <<<<<<<<<<<<<< @@ -20156,7 +20157,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_findsucc(struct __pyx_t_4cdec_2sa_3_sa_ } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":66 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":66 * low = mid * else: * bitset = bitset & mask # <<<<<<<<<<<<<< @@ -20165,7 +20166,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_findsucc(struct __pyx_t_4cdec_2sa_3_sa_ */ __pyx_v_bitset = (__pyx_v_bitset & __pyx_v_mask); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":67 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":67 * else: * bitset = bitset & mask * high = mid # <<<<<<<<<<<<<< @@ -20177,7 +20178,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_findsucc(struct __pyx_t_4cdec_2sa_3_sa_ __pyx_L7:; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":68 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":68 * bitset = bitset & mask * high = mid * return low # <<<<<<<<<<<<<< @@ -20187,7 +20188,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_findsucc(struct __pyx_t_4cdec_2sa_3_sa_ __pyx_r = __pyx_v_low; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":48 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":48 * * * cdef int bitset_findsucc(_BitSet* b, int i): # <<<<<<<<<<<<<< @@ -20201,7 +20202,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_findsucc(struct __pyx_t_4cdec_2sa_3_sa_ return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":71 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":71 * * * cdef int bitset_insert(_BitSet* b, int i): # <<<<<<<<<<<<<< @@ -20216,7 +20217,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_insert(struct __pyx_t_4cdec_2sa_3_sa__B int __pyx_t_1; __Pyx_RefNannySetupContext("bitset_insert", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":74 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":74 * cdef int val * * val = 1 << i # <<<<<<<<<<<<<< @@ -20225,7 +20226,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_insert(struct __pyx_t_4cdec_2sa_3_sa__B */ __pyx_v_val = (1 << __pyx_v_i); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":75 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":75 * * val = 1 << i * if b.bitset & val == 0: # <<<<<<<<<<<<<< @@ -20235,7 +20236,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_insert(struct __pyx_t_4cdec_2sa_3_sa__B __pyx_t_1 = (((__pyx_v_b->bitset & __pyx_v_val) == 0) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":76 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":76 * val = 1 << i * if b.bitset & val == 0: * b.bitset = b.bitset | val # <<<<<<<<<<<<<< @@ -20244,7 +20245,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_insert(struct __pyx_t_4cdec_2sa_3_sa__B */ __pyx_v_b->bitset = (__pyx_v_b->bitset | __pyx_v_val); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":77 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":77 * if b.bitset & val == 0: * b.bitset = b.bitset | val * if b.size == 0: # <<<<<<<<<<<<<< @@ -20254,7 +20255,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_insert(struct __pyx_t_4cdec_2sa_3_sa__B __pyx_t_1 = ((__pyx_v_b->size == 0) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":78 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":78 * b.bitset = b.bitset | val * if b.size == 0: * b.min_val = i # <<<<<<<<<<<<<< @@ -20263,7 +20264,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_insert(struct __pyx_t_4cdec_2sa_3_sa__B */ __pyx_v_b->min_val = __pyx_v_i; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":79 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":79 * if b.size == 0: * b.min_val = i * b.max_val = i # <<<<<<<<<<<<<< @@ -20275,7 +20276,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_insert(struct __pyx_t_4cdec_2sa_3_sa__B } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":81 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":81 * b.max_val = i * else: * if i < b.min_val: # <<<<<<<<<<<<<< @@ -20285,7 +20286,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_insert(struct __pyx_t_4cdec_2sa_3_sa__B __pyx_t_1 = ((__pyx_v_i < __pyx_v_b->min_val) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":82 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":82 * else: * if i < b.min_val: * b.min_val = i # <<<<<<<<<<<<<< @@ -20297,7 +20298,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_insert(struct __pyx_t_4cdec_2sa_3_sa__B } __pyx_L5:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":83 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":83 * if i < b.min_val: * b.min_val = i * if i > b.max_val: # <<<<<<<<<<<<<< @@ -20307,7 +20308,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_insert(struct __pyx_t_4cdec_2sa_3_sa__B __pyx_t_1 = ((__pyx_v_i > __pyx_v_b->max_val) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":84 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":84 * b.min_val = i * if i > b.max_val: * b.max_val = i # <<<<<<<<<<<<<< @@ -20321,7 +20322,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_insert(struct __pyx_t_4cdec_2sa_3_sa__B } __pyx_L4:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":85 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":85 * if i > b.max_val: * b.max_val = i * b.size = b.size + 1 # <<<<<<<<<<<<<< @@ -20330,7 +20331,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_insert(struct __pyx_t_4cdec_2sa_3_sa__B */ __pyx_v_b->size = (__pyx_v_b->size + 1); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":86 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":86 * b.max_val = i * b.size = b.size + 1 * return 1 # <<<<<<<<<<<<<< @@ -20341,7 +20342,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_insert(struct __pyx_t_4cdec_2sa_3_sa__B goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":87 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":87 * b.size = b.size + 1 * return 1 * return 0 # <<<<<<<<<<<<<< @@ -20351,7 +20352,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_insert(struct __pyx_t_4cdec_2sa_3_sa__B __pyx_r = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":71 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":71 * * * cdef int bitset_insert(_BitSet* b, int i): # <<<<<<<<<<<<<< @@ -20365,7 +20366,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_insert(struct __pyx_t_4cdec_2sa_3_sa__B return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":90 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":90 * * * cdef int bitset_contains(_BitSet* b, int i): # <<<<<<<<<<<<<< @@ -20380,7 +20381,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_contains(struct __pyx_t_4cdec_2sa_3_sa_ int __pyx_t_1; __Pyx_RefNannySetupContext("bitset_contains", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":93 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":93 * cdef int val * * val = 1 << i # <<<<<<<<<<<<<< @@ -20389,7 +20390,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_contains(struct __pyx_t_4cdec_2sa_3_sa_ */ __pyx_v_val = (1 << __pyx_v_i); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":94 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":94 * * val = 1 << i * if b.bitset & val == 0: # <<<<<<<<<<<<<< @@ -20399,7 +20400,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_contains(struct __pyx_t_4cdec_2sa_3_sa_ __pyx_t_1 = (((__pyx_v_b->bitset & __pyx_v_val) == 0) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":95 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":95 * val = 1 << i * if b.bitset & val == 0: * return 0 # <<<<<<<<<<<<<< @@ -20411,7 +20412,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_contains(struct __pyx_t_4cdec_2sa_3_sa_ } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":97 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":97 * return 0 * else: * return 1 # <<<<<<<<<<<<<< @@ -20422,7 +20423,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_contains(struct __pyx_t_4cdec_2sa_3_sa_ goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":90 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":90 * * * cdef int bitset_contains(_BitSet* b, int i): # <<<<<<<<<<<<<< @@ -20436,7 +20437,7 @@ static int __pyx_f_4cdec_2sa_3_sa_bitset_contains(struct __pyx_t_4cdec_2sa_3_sa_ return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":104 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":104 * cdef int next_val * * def __next__(self): # <<<<<<<<<<<<<< @@ -20469,7 +20470,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14BitSetIterator___next__(struct __pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__next__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":107 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":107 * cdef int ret_val * * if self.next_val == -1: # <<<<<<<<<<<<<< @@ -20479,7 +20480,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14BitSetIterator___next__(struct __pyx_ __pyx_t_1 = ((__pyx_v_self->next_val == -1) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":108 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":108 * * if self.next_val == -1: * raise StopIteration() # <<<<<<<<<<<<<< @@ -20493,7 +20494,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14BitSetIterator___next__(struct __pyx_ {__pyx_filename = __pyx_f[6]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":109 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":109 * if self.next_val == -1: * raise StopIteration() * ret_val = self.next_val # <<<<<<<<<<<<<< @@ -20503,7 +20504,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14BitSetIterator___next__(struct __pyx_ __pyx_t_3 = __pyx_v_self->next_val; __pyx_v_ret_val = __pyx_t_3; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":110 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":110 * raise StopIteration() * ret_val = self.next_val * self.next_val = bitset_findsucc(self.b, ret_val) # <<<<<<<<<<<<<< @@ -20512,7 +20513,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14BitSetIterator___next__(struct __pyx_ */ __pyx_v_self->next_val = __pyx_f_4cdec_2sa_3_sa_bitset_findsucc(__pyx_v_self->b, __pyx_v_ret_val); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":111 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":111 * ret_val = self.next_val * self.next_val = bitset_findsucc(self.b, ret_val) * return ret_val # <<<<<<<<<<<<<< @@ -20526,7 +20527,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14BitSetIterator___next__(struct __pyx_ __pyx_t_2 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":104 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":104 * cdef int next_val * * def __next__(self): # <<<<<<<<<<<<<< @@ -20545,7 +20546,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14BitSetIterator___next__(struct __pyx_ return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":122 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":122 * cdef _BitSet* b * * def __cinit__(self): # <<<<<<<<<<<<<< @@ -20574,7 +20575,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6BitSet___cinit__(struct __pyx_obj_4cdec_2sa_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":123 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":123 * * def __cinit__(self): * self.b = new_BitSet() # <<<<<<<<<<<<<< @@ -20583,7 +20584,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6BitSet___cinit__(struct __pyx_obj_4cdec_2sa_ */ __pyx_v_self->b = __pyx_f_4cdec_2sa_3_sa_new_BitSet(); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":122 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":122 * cdef _BitSet* b * * def __cinit__(self): # <<<<<<<<<<<<<< @@ -20597,7 +20598,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6BitSet___cinit__(struct __pyx_obj_4cdec_2sa_ return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":125 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":125 * self.b = new_BitSet() * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -20620,7 +20621,7 @@ static void __pyx_pf_4cdec_2sa_3_sa_6BitSet_2__dealloc__(struct __pyx_obj_4cdec_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":126 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":126 * * def __dealloc__(self): * free(self.b) # <<<<<<<<<<<<<< @@ -20629,7 +20630,7 @@ static void __pyx_pf_4cdec_2sa_3_sa_6BitSet_2__dealloc__(struct __pyx_obj_4cdec_ */ free(__pyx_v_self->b); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":125 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":125 * self.b = new_BitSet() * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -20641,7 +20642,7 @@ static void __pyx_pf_4cdec_2sa_3_sa_6BitSet_2__dealloc__(struct __pyx_obj_4cdec_ __Pyx_RefNannyFinishContext(); } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":128 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":128 * free(self.b) * * def __iter__(self): # <<<<<<<<<<<<<< @@ -20674,7 +20675,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6BitSet_4__iter__(struct __pyx_obj_4cde int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__iter__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":130 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":130 * def __iter__(self): * cdef BitSetIterator it * it = BitSetIterator() # <<<<<<<<<<<<<< @@ -20686,7 +20687,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6BitSet_4__iter__(struct __pyx_obj_4cde __pyx_v_it = ((struct __pyx_obj_4cdec_2sa_3_sa_BitSetIterator *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":131 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":131 * cdef BitSetIterator it * it = BitSetIterator() * it.b = self.b # <<<<<<<<<<<<<< @@ -20696,7 +20697,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6BitSet_4__iter__(struct __pyx_obj_4cde __pyx_t_2 = __pyx_v_self->b; __pyx_v_it->b = __pyx_t_2; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":132 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":132 * it = BitSetIterator() * it.b = self.b * it.next_val = self.b.min_val # <<<<<<<<<<<<<< @@ -20706,7 +20707,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6BitSet_4__iter__(struct __pyx_obj_4cde __pyx_t_3 = __pyx_v_self->b->min_val; __pyx_v_it->next_val = __pyx_t_3; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":133 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":133 * it.b = self.b * it.next_val = self.b.min_val * return it # <<<<<<<<<<<<<< @@ -20718,7 +20719,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6BitSet_4__iter__(struct __pyx_obj_4cde __pyx_r = ((PyObject *)__pyx_v_it); goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":128 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":128 * free(self.b) * * def __iter__(self): # <<<<<<<<<<<<<< @@ -20738,7 +20739,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6BitSet_4__iter__(struct __pyx_obj_4cde return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":135 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":135 * return it * * def insert(self, i): # <<<<<<<<<<<<<< @@ -20769,7 +20770,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6BitSet_6insert(struct __pyx_obj_4cdec_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("insert", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":136 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":136 * * def insert(self, i): * return bitset_insert(self.b, i) # <<<<<<<<<<<<<< @@ -20784,7 +20785,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6BitSet_6insert(struct __pyx_obj_4cdec_ __pyx_t_2 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":135 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":135 * return it * * def insert(self, i): # <<<<<<<<<<<<<< @@ -20803,7 +20804,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6BitSet_6insert(struct __pyx_obj_4cdec_ return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":138 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":138 * return bitset_insert(self.b, i) * * def findsucc(self, i): # <<<<<<<<<<<<<< @@ -20834,7 +20835,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6BitSet_8findsucc(struct __pyx_obj_4cde int __pyx_clineno = 0; __Pyx_RefNannySetupContext("findsucc", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":139 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":139 * * def findsucc(self, i): * return bitset_findsucc(self.b, i) # <<<<<<<<<<<<<< @@ -20849,7 +20850,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6BitSet_8findsucc(struct __pyx_obj_4cde __pyx_t_2 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":138 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":138 * return bitset_insert(self.b, i) * * def findsucc(self, i): # <<<<<<<<<<<<<< @@ -20868,7 +20869,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6BitSet_8findsucc(struct __pyx_obj_4cde return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":141 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":141 * return bitset_findsucc(self.b, i) * * def __str__(self): # <<<<<<<<<<<<<< @@ -20900,7 +20901,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6BitSet_10__str__(struct __pyx_obj_4cde int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__str__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":142 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":142 * * def __str__(self): * return dec2bin(self.b.bitset)+" ("+str(self.b.size)+","+str(self.b.min_val)+","+str(self.b.max_val)+")" # <<<<<<<<<<<<<< @@ -20968,7 +20969,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6BitSet_10__str__(struct __pyx_obj_4cde __pyx_t_2 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":141 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":141 * return bitset_findsucc(self.b, i) * * def __str__(self): # <<<<<<<<<<<<<< @@ -20989,7 +20990,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6BitSet_10__str__(struct __pyx_obj_4cde return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":144 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":144 * return dec2bin(self.b.bitset)+" ("+str(self.b.size)+","+str(self.b.min_val)+","+str(self.b.max_val)+")" * * def min(self): # <<<<<<<<<<<<<< @@ -21019,7 +21020,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6BitSet_12min(struct __pyx_obj_4cdec_2s int __pyx_clineno = 0; __Pyx_RefNannySetupContext("min", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":145 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":145 * * def min(self): * return self.b.min_val # <<<<<<<<<<<<<< @@ -21033,7 +21034,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6BitSet_12min(struct __pyx_obj_4cdec_2s __pyx_t_1 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":144 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":144 * return dec2bin(self.b.bitset)+" ("+str(self.b.size)+","+str(self.b.min_val)+","+str(self.b.max_val)+")" * * def min(self): # <<<<<<<<<<<<<< @@ -21052,7 +21053,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6BitSet_12min(struct __pyx_obj_4cdec_2s return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":147 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":147 * return self.b.min_val * * def max(self): # <<<<<<<<<<<<<< @@ -21082,7 +21083,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6BitSet_14max(struct __pyx_obj_4cdec_2s int __pyx_clineno = 0; __Pyx_RefNannySetupContext("max", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":148 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":148 * * def max(self): * return self.b.max_val # <<<<<<<<<<<<<< @@ -21096,7 +21097,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6BitSet_14max(struct __pyx_obj_4cdec_2s __pyx_t_1 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":147 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":147 * return self.b.min_val * * def max(self): # <<<<<<<<<<<<<< @@ -21115,7 +21116,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6BitSet_14max(struct __pyx_obj_4cdec_2s return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":150 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":150 * return self.b.max_val * * def __len__(self): # <<<<<<<<<<<<<< @@ -21141,7 +21142,7 @@ static Py_ssize_t __pyx_pf_4cdec_2sa_3_sa_6BitSet_16__len__(struct __pyx_obj_4cd __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":151 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":151 * * def __len__(self): * return self.b.size # <<<<<<<<<<<<<< @@ -21151,7 +21152,7 @@ static Py_ssize_t __pyx_pf_4cdec_2sa_3_sa_6BitSet_16__len__(struct __pyx_obj_4cd __pyx_r = __pyx_v_self->b->size; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":150 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":150 * return self.b.max_val * * def __len__(self): # <<<<<<<<<<<<<< @@ -21165,7 +21166,7 @@ static Py_ssize_t __pyx_pf_4cdec_2sa_3_sa_6BitSet_16__len__(struct __pyx_obj_4cd return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":153 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":153 * return self.b.size * * def __contains__(self, i): # <<<<<<<<<<<<<< @@ -21197,7 +21198,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6BitSet_18__contains__(struct __pyx_obj_4cdec int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__contains__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":154 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":154 * * def __contains__(self, i): * return bool(bitset_contains(self.b, i)) # <<<<<<<<<<<<<< @@ -21212,7 +21213,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6BitSet_18__contains__(struct __pyx_obj_4cdec __pyx_r = (!(!__pyx_t_3)); goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":153 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":153 * return self.b.size * * def __contains__(self, i): # <<<<<<<<<<<<<< @@ -21230,7 +21231,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6BitSet_18__contains__(struct __pyx_obj_4cdec return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":157 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":157 * * * cdef str dec2bin(long i): # <<<<<<<<<<<<<< @@ -21252,7 +21253,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_dec2bin(long __pyx_v_i) { int __pyx_clineno = 0; __Pyx_RefNannySetupContext("dec2bin", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":158 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":158 * * cdef str dec2bin(long i): * cdef str result = "" # <<<<<<<<<<<<<< @@ -21262,7 +21263,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_dec2bin(long __pyx_v_i) { __Pyx_INCREF(__pyx_kp_s__32); __pyx_v_result = __pyx_kp_s__32; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":160 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":160 * cdef str result = "" * cdef unsigned d * for d in range(MIN_BOTTOM_SIZE): # <<<<<<<<<<<<<< @@ -21273,7 +21274,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_dec2bin(long __pyx_v_i) { for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_d = __pyx_t_2; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":161 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":161 * cdef unsigned d * for d in range(MIN_BOTTOM_SIZE): * if i & LOWER_MASK[0] == 0: # <<<<<<<<<<<<<< @@ -21283,7 +21284,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_dec2bin(long __pyx_v_i) { __pyx_t_3 = (((__pyx_v_i & (__pyx_v_4cdec_2sa_3_sa_LOWER_MASK[0])) == 0) != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":162 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":162 * for d in range(MIN_BOTTOM_SIZE): * if i & LOWER_MASK[0] == 0: * result = "0"+result # <<<<<<<<<<<<<< @@ -21298,7 +21299,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_dec2bin(long __pyx_v_i) { } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":164 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":164 * result = "0"+result * else: * result = "1"+result # <<<<<<<<<<<<<< @@ -21312,7 +21313,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_dec2bin(long __pyx_v_i) { } __pyx_L5:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":165 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":165 * else: * result = "1"+result * i = i >> 1 # <<<<<<<<<<<<<< @@ -21322,7 +21323,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_dec2bin(long __pyx_v_i) { __pyx_v_i = (__pyx_v_i >> 1); } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":166 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":166 * result = "1"+result * i = i >> 1 * return result # <<<<<<<<<<<<<< @@ -21334,7 +21335,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_dec2bin(long __pyx_v_i) { __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":157 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":157 * * * cdef str dec2bin(long i): # <<<<<<<<<<<<<< @@ -21354,7 +21355,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_dec2bin(long __pyx_v_i) { return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":177 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":177 * void** bottom * * cdef _VEB* new_VEB(int n): # <<<<<<<<<<<<<< @@ -21375,7 +21376,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__VEB *__pyx_f_4cdec_2sa_3_sa_new_VEB(int __ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("new_VEB", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":181 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":181 * cdef int num_bits, num_top_bits, i * * veb = <_VEB*> malloc(sizeof(_VEB)) # <<<<<<<<<<<<<< @@ -21384,7 +21385,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__VEB *__pyx_f_4cdec_2sa_3_sa_new_VEB(int __ */ __pyx_v_veb = ((struct __pyx_t_4cdec_2sa_3_sa__VEB *)malloc((sizeof(struct __pyx_t_4cdec_2sa_3_sa__VEB)))); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":183 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":183 * veb = <_VEB*> malloc(sizeof(_VEB)) * * num_bits = int(ceil(log(n) / log(2))) # <<<<<<<<<<<<<< @@ -21405,7 +21406,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__VEB *__pyx_f_4cdec_2sa_3_sa_new_VEB(int __ } __pyx_v_num_bits = ((int)ceil((__pyx_t_1 / __pyx_t_2))); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":184 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":184 * * num_bits = int(ceil(log(n) / log(2))) * veb.num_bottom_bits = num_bits/2 # <<<<<<<<<<<<<< @@ -21414,7 +21415,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__VEB *__pyx_f_4cdec_2sa_3_sa_new_VEB(int __ */ __pyx_v_veb->num_bottom_bits = __Pyx_div_long(__pyx_v_num_bits, 2); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":185 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":185 * num_bits = int(ceil(log(n) / log(2))) * veb.num_bottom_bits = num_bits/2 * if veb.num_bottom_bits < MIN_BOTTOM_BITS: # <<<<<<<<<<<<<< @@ -21424,7 +21425,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__VEB *__pyx_f_4cdec_2sa_3_sa_new_VEB(int __ __pyx_t_3 = ((__pyx_v_veb->num_bottom_bits < __pyx_v_4cdec_2sa_3_sa_MIN_BOTTOM_BITS) != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":186 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":186 * veb.num_bottom_bits = num_bits/2 * if veb.num_bottom_bits < MIN_BOTTOM_BITS: * veb.num_bottom_bits = MIN_BOTTOM_BITS # <<<<<<<<<<<<<< @@ -21436,7 +21437,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__VEB *__pyx_f_4cdec_2sa_3_sa_new_VEB(int __ } __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":187 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":187 * if veb.num_bottom_bits < MIN_BOTTOM_BITS: * veb.num_bottom_bits = MIN_BOTTOM_BITS * veb.top_universe_size = (n >> veb.num_bottom_bits) + 1 # <<<<<<<<<<<<<< @@ -21445,7 +21446,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__VEB *__pyx_f_4cdec_2sa_3_sa_new_VEB(int __ */ __pyx_v_veb->top_universe_size = ((__pyx_v_n >> __pyx_v_veb->num_bottom_bits) + 1); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":189 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":189 * veb.top_universe_size = (n >> veb.num_bottom_bits) + 1 * * veb.bottom = malloc(veb.top_universe_size * sizeof(void*)) # <<<<<<<<<<<<<< @@ -21454,7 +21455,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__VEB *__pyx_f_4cdec_2sa_3_sa_new_VEB(int __ */ __pyx_v_veb->bottom = ((void **)malloc((__pyx_v_veb->top_universe_size * (sizeof(void *))))); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":190 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":190 * * veb.bottom = malloc(veb.top_universe_size * sizeof(void*)) * memset(veb.bottom, 0, veb.top_universe_size * sizeof(void*)) # <<<<<<<<<<<<<< @@ -21463,7 +21464,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__VEB *__pyx_f_4cdec_2sa_3_sa_new_VEB(int __ */ memset(__pyx_v_veb->bottom, 0, (__pyx_v_veb->top_universe_size * (sizeof(void *)))); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":192 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":192 * memset(veb.bottom, 0, veb.top_universe_size * sizeof(void*)) * * if veb.top_universe_size > MIN_BOTTOM_SIZE: # <<<<<<<<<<<<<< @@ -21473,7 +21474,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__VEB *__pyx_f_4cdec_2sa_3_sa_new_VEB(int __ __pyx_t_3 = ((__pyx_v_veb->top_universe_size > __pyx_v_4cdec_2sa_3_sa_MIN_BOTTOM_SIZE) != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":193 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":193 * * if veb.top_universe_size > MIN_BOTTOM_SIZE: * veb.top = new_VEB(veb.top_universe_size) # <<<<<<<<<<<<<< @@ -21485,7 +21486,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__VEB *__pyx_f_4cdec_2sa_3_sa_new_VEB(int __ } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":195 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":195 * veb.top = new_VEB(veb.top_universe_size) * else: * veb.top = new_BitSet() # <<<<<<<<<<<<<< @@ -21496,7 +21497,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__VEB *__pyx_f_4cdec_2sa_3_sa_new_VEB(int __ } __pyx_L4:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":197 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":197 * veb.top = new_BitSet() * * veb.max_val = -1 # <<<<<<<<<<<<<< @@ -21505,7 +21506,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__VEB *__pyx_f_4cdec_2sa_3_sa_new_VEB(int __ */ __pyx_v_veb->max_val = -1; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":198 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":198 * * veb.max_val = -1 * veb.min_val = -1 # <<<<<<<<<<<<<< @@ -21514,7 +21515,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__VEB *__pyx_f_4cdec_2sa_3_sa_new_VEB(int __ */ __pyx_v_veb->min_val = -1; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":199 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":199 * veb.max_val = -1 * veb.min_val = -1 * veb.size = 0 # <<<<<<<<<<<<<< @@ -21523,7 +21524,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__VEB *__pyx_f_4cdec_2sa_3_sa_new_VEB(int __ */ __pyx_v_veb->size = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":200 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":200 * veb.min_val = -1 * veb.size = 0 * return veb # <<<<<<<<<<<<<< @@ -21533,7 +21534,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__VEB *__pyx_f_4cdec_2sa_3_sa_new_VEB(int __ __pyx_r = __pyx_v_veb; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":177 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":177 * void** bottom * * cdef _VEB* new_VEB(int n): # <<<<<<<<<<<<<< @@ -21550,7 +21551,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__VEB *__pyx_f_4cdec_2sa_3_sa_new_VEB(int __ return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":203 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":203 * * * cdef int VEB_insert(_VEB* veb, int i): # <<<<<<<<<<<<<< @@ -21572,7 +21573,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB int __pyx_t_4; __Pyx_RefNannySetupContext("VEB_insert", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":208 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":208 * cdef int a, b, tmp * * if veb.size == 0: # <<<<<<<<<<<<<< @@ -21582,7 +21583,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB __pyx_t_1 = ((__pyx_v_veb->size == 0) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":209 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":209 * * if veb.size == 0: * veb.min_val = i # <<<<<<<<<<<<<< @@ -21591,7 +21592,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB */ __pyx_v_veb->min_val = __pyx_v_i; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":210 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":210 * if veb.size == 0: * veb.min_val = i * veb.max_val = i # <<<<<<<<<<<<<< @@ -21602,7 +21603,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB goto __pyx_L3; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":211 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":211 * veb.min_val = i * veb.max_val = i * elif i == veb.min_val or i == veb.max_val: # <<<<<<<<<<<<<< @@ -21618,7 +21619,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB } if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":212 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":212 * veb.max_val = i * elif i == veb.min_val or i == veb.max_val: * return 0 # <<<<<<<<<<<<<< @@ -21630,7 +21631,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":214 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":214 * return 0 * else: * if i < veb.min_val: # <<<<<<<<<<<<<< @@ -21640,7 +21641,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB __pyx_t_3 = ((__pyx_v_i < __pyx_v_veb->min_val) != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":215 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":215 * else: * if i < veb.min_val: * tmp = i # <<<<<<<<<<<<<< @@ -21649,7 +21650,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB */ __pyx_v_tmp = __pyx_v_i; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":216 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":216 * if i < veb.min_val: * tmp = i * i = veb.min_val # <<<<<<<<<<<<<< @@ -21659,7 +21660,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB __pyx_t_4 = __pyx_v_veb->min_val; __pyx_v_i = __pyx_t_4; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":217 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":217 * tmp = i * i = veb.min_val * veb.min_val = tmp # <<<<<<<<<<<<<< @@ -21671,7 +21672,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB } __pyx_L4:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":218 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":218 * i = veb.min_val * veb.min_val = tmp * a = i >> veb.num_bottom_bits # <<<<<<<<<<<<<< @@ -21680,7 +21681,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB */ __pyx_v_a = (__pyx_v_i >> __pyx_v_veb->num_bottom_bits); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":219 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":219 * veb.min_val = tmp * a = i >> veb.num_bottom_bits * b = i & LOWER_MASK[veb.num_bottom_bits-1] # <<<<<<<<<<<<<< @@ -21689,7 +21690,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB */ __pyx_v_b = (__pyx_v_i & (__pyx_v_4cdec_2sa_3_sa_LOWER_MASK[(__pyx_v_veb->num_bottom_bits - 1)])); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":220 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":220 * a = i >> veb.num_bottom_bits * b = i & LOWER_MASK[veb.num_bottom_bits-1] * if veb.bottom[a] == NULL: # <<<<<<<<<<<<<< @@ -21699,7 +21700,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB __pyx_t_3 = (((__pyx_v_veb->bottom[__pyx_v_a]) == NULL) != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":221 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":221 * b = i & LOWER_MASK[veb.num_bottom_bits-1] * if veb.bottom[a] == NULL: * if veb.top_universe_size > MIN_BOTTOM_SIZE: # <<<<<<<<<<<<<< @@ -21709,7 +21710,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB __pyx_t_3 = ((__pyx_v_veb->top_universe_size > __pyx_v_4cdec_2sa_3_sa_MIN_BOTTOM_SIZE) != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":222 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":222 * if veb.bottom[a] == NULL: * if veb.top_universe_size > MIN_BOTTOM_SIZE: * subv = <_VEB*> veb.top # <<<<<<<<<<<<<< @@ -21718,7 +21719,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB */ __pyx_v_subv = ((struct __pyx_t_4cdec_2sa_3_sa__VEB *)__pyx_v_veb->top); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":223 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":223 * if veb.top_universe_size > MIN_BOTTOM_SIZE: * subv = <_VEB*> veb.top * VEB_insert(subv, a) # <<<<<<<<<<<<<< @@ -21730,7 +21731,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":225 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":225 * VEB_insert(subv, a) * else: * subb = <_BitSet*> veb.top # <<<<<<<<<<<<<< @@ -21739,7 +21740,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB */ __pyx_v_subb = ((struct __pyx_t_4cdec_2sa_3_sa__BitSet *)__pyx_v_veb->top); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":226 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":226 * else: * subb = <_BitSet*> veb.top * bitset_insert(subb, a) # <<<<<<<<<<<<<< @@ -21750,7 +21751,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB } __pyx_L6:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":227 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":227 * subb = <_BitSet*> veb.top * bitset_insert(subb, a) * if veb.num_bottom_bits > MIN_BOTTOM_BITS: # <<<<<<<<<<<<<< @@ -21760,7 +21761,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB __pyx_t_3 = ((__pyx_v_veb->num_bottom_bits > __pyx_v_4cdec_2sa_3_sa_MIN_BOTTOM_BITS) != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":228 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":228 * bitset_insert(subb, a) * if veb.num_bottom_bits > MIN_BOTTOM_BITS: * veb.bottom[a] = new_VEB(1 << veb.num_bottom_bits) # <<<<<<<<<<<<<< @@ -21772,7 +21773,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":230 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":230 * veb.bottom[a] = new_VEB(1 << veb.num_bottom_bits) * else: * veb.bottom[a] = new_BitSet() # <<<<<<<<<<<<<< @@ -21786,7 +21787,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB } __pyx_L5:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":231 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":231 * else: * veb.bottom[a] = new_BitSet() * if veb.num_bottom_bits > MIN_BOTTOM_BITS: # <<<<<<<<<<<<<< @@ -21796,7 +21797,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB __pyx_t_3 = ((__pyx_v_veb->num_bottom_bits > __pyx_v_4cdec_2sa_3_sa_MIN_BOTTOM_BITS) != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":232 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":232 * veb.bottom[a] = new_BitSet() * if veb.num_bottom_bits > MIN_BOTTOM_BITS: * subv = <_VEB*> veb.bottom[a] # <<<<<<<<<<<<<< @@ -21805,7 +21806,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB */ __pyx_v_subv = ((struct __pyx_t_4cdec_2sa_3_sa__VEB *)(__pyx_v_veb->bottom[__pyx_v_a])); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":233 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":233 * if veb.num_bottom_bits > MIN_BOTTOM_BITS: * subv = <_VEB*> veb.bottom[a] * if VEB_insert(subv, b) == 0: # <<<<<<<<<<<<<< @@ -21815,7 +21816,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB __pyx_t_3 = ((__pyx_f_4cdec_2sa_3_sa_VEB_insert(__pyx_v_subv, __pyx_v_b) == 0) != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":234 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":234 * subv = <_VEB*> veb.bottom[a] * if VEB_insert(subv, b) == 0: * return 0 # <<<<<<<<<<<<<< @@ -21829,7 +21830,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":236 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":236 * return 0 * else: * subb = <_BitSet*> veb.bottom[a] # <<<<<<<<<<<<<< @@ -21838,7 +21839,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB */ __pyx_v_subb = ((struct __pyx_t_4cdec_2sa_3_sa__BitSet *)(__pyx_v_veb->bottom[__pyx_v_a])); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":237 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":237 * else: * subb = <_BitSet*> veb.bottom[a] * if bitset_insert(subb, b) == 0: # <<<<<<<<<<<<<< @@ -21848,7 +21849,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB __pyx_t_3 = ((__pyx_f_4cdec_2sa_3_sa_bitset_insert(__pyx_v_subb, __pyx_v_b) == 0) != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":238 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":238 * subb = <_BitSet*> veb.bottom[a] * if bitset_insert(subb, b) == 0: * return 0 # <<<<<<<<<<<<<< @@ -21861,7 +21862,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB } __pyx_L8:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":240 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":240 * return 0 * * if i > veb.max_val: # <<<<<<<<<<<<<< @@ -21871,7 +21872,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB __pyx_t_3 = ((__pyx_v_i > __pyx_v_veb->max_val) != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":241 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":241 * * if i > veb.max_val: * veb.max_val = i # <<<<<<<<<<<<<< @@ -21885,7 +21886,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB } __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":242 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":242 * if i > veb.max_val: * veb.max_val = i * veb.size = veb.size + 1 # <<<<<<<<<<<<<< @@ -21894,7 +21895,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB */ __pyx_v_veb->size = (__pyx_v_veb->size + 1); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":243 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":243 * veb.max_val = i * veb.size = veb.size + 1 * return 1 # <<<<<<<<<<<<<< @@ -21904,7 +21905,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB __pyx_r = 1; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":203 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":203 * * * cdef int VEB_insert(_VEB* veb, int i): # <<<<<<<<<<<<<< @@ -21918,7 +21919,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_insert(struct __pyx_t_4cdec_2sa_3_sa__VEB return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":246 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":246 * * * cdef del_VEB(_VEB* veb): # <<<<<<<<<<<<<< @@ -21938,7 +21939,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_del_VEB(struct __pyx_t_4cdec_2sa_3_sa__V int __pyx_clineno = 0; __Pyx_RefNannySetupContext("del_VEB", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":249 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":249 * cdef int i * * if veb.top_universe_size > MIN_BOTTOM_SIZE: # <<<<<<<<<<<<<< @@ -21948,7 +21949,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_del_VEB(struct __pyx_t_4cdec_2sa_3_sa__V __pyx_t_1 = ((__pyx_v_veb->top_universe_size > __pyx_v_4cdec_2sa_3_sa_MIN_BOTTOM_SIZE) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":250 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":250 * * if veb.top_universe_size > MIN_BOTTOM_SIZE: * i = (<_VEB*> veb.top).min_val # <<<<<<<<<<<<<< @@ -21961,7 +21962,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_del_VEB(struct __pyx_t_4cdec_2sa_3_sa__V } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":252 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":252 * i = (<_VEB*> veb.top).min_val * else: * i = (<_BitSet*> veb.top).min_val # <<<<<<<<<<<<<< @@ -21973,7 +21974,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_del_VEB(struct __pyx_t_4cdec_2sa_3_sa__V } __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":254 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":254 * i = (<_BitSet*> veb.top).min_val * * while i != -1: # <<<<<<<<<<<<<< @@ -21984,7 +21985,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_del_VEB(struct __pyx_t_4cdec_2sa_3_sa__V __pyx_t_1 = ((__pyx_v_i != -1) != 0); if (!__pyx_t_1) break; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":255 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":255 * * while i != -1: * if veb.num_bottom_bits > MIN_BOTTOM_BITS: # <<<<<<<<<<<<<< @@ -21994,7 +21995,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_del_VEB(struct __pyx_t_4cdec_2sa_3_sa__V __pyx_t_1 = ((__pyx_v_veb->num_bottom_bits > __pyx_v_4cdec_2sa_3_sa_MIN_BOTTOM_BITS) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":256 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":256 * while i != -1: * if veb.num_bottom_bits > MIN_BOTTOM_BITS: * del_VEB(<_VEB*> veb.bottom[i]) # <<<<<<<<<<<<<< @@ -22008,7 +22009,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_del_VEB(struct __pyx_t_4cdec_2sa_3_sa__V } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":258 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":258 * del_VEB(<_VEB*> veb.bottom[i]) * else: * free(<_BitSet*> veb.bottom[i]) # <<<<<<<<<<<<<< @@ -22019,7 +22020,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_del_VEB(struct __pyx_t_4cdec_2sa_3_sa__V } __pyx_L6:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":260 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":260 * free(<_BitSet*> veb.bottom[i]) * * if veb.top_universe_size > MIN_BOTTOM_SIZE: # <<<<<<<<<<<<<< @@ -22029,7 +22030,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_del_VEB(struct __pyx_t_4cdec_2sa_3_sa__V __pyx_t_1 = ((__pyx_v_veb->top_universe_size > __pyx_v_4cdec_2sa_3_sa_MIN_BOTTOM_SIZE) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":261 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":261 * * if veb.top_universe_size > MIN_BOTTOM_SIZE: * i = VEB_findsucc(<_VEB*> veb.top, i) # <<<<<<<<<<<<<< @@ -22041,7 +22042,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_del_VEB(struct __pyx_t_4cdec_2sa_3_sa__V } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":263 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":263 * i = VEB_findsucc(<_VEB*> veb.top, i) * else: * i = bitset_findsucc(<_BitSet*> veb.top, i) # <<<<<<<<<<<<<< @@ -22053,7 +22054,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_del_VEB(struct __pyx_t_4cdec_2sa_3_sa__V __pyx_L7:; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":265 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":265 * i = bitset_findsucc(<_BitSet*> veb.top, i) * * if veb.top_universe_size > MIN_BOTTOM_SIZE: # <<<<<<<<<<<<<< @@ -22063,7 +22064,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_del_VEB(struct __pyx_t_4cdec_2sa_3_sa__V __pyx_t_1 = ((__pyx_v_veb->top_universe_size > __pyx_v_4cdec_2sa_3_sa_MIN_BOTTOM_SIZE) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":266 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":266 * * if veb.top_universe_size > MIN_BOTTOM_SIZE: * del_VEB(<_VEB*> veb.top) # <<<<<<<<<<<<<< @@ -22077,7 +22078,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_del_VEB(struct __pyx_t_4cdec_2sa_3_sa__V } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":268 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":268 * del_VEB(<_VEB*> veb.top) * else: * free(<_BitSet*> veb.top) # <<<<<<<<<<<<<< @@ -22088,7 +22089,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_del_VEB(struct __pyx_t_4cdec_2sa_3_sa__V } __pyx_L8:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":269 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":269 * else: * free(<_BitSet*> veb.top) * free(veb.bottom) # <<<<<<<<<<<<<< @@ -22097,7 +22098,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_del_VEB(struct __pyx_t_4cdec_2sa_3_sa__V */ free(__pyx_v_veb->bottom); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":270 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":270 * free(<_BitSet*> veb.top) * free(veb.bottom) * free(veb) # <<<<<<<<<<<<<< @@ -22106,7 +22107,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_del_VEB(struct __pyx_t_4cdec_2sa_3_sa__V */ free(__pyx_v_veb); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":246 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":246 * * * cdef del_VEB(_VEB* veb): # <<<<<<<<<<<<<< @@ -22127,7 +22128,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_del_VEB(struct __pyx_t_4cdec_2sa_3_sa__V return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":273 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":273 * * * cdef int VEB_findsucc(_VEB* veb, int i): # <<<<<<<<<<<<<< @@ -22150,7 +22151,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(struct __pyx_t_4cdec_2sa_3_sa__VE int __pyx_t_3; __Pyx_RefNannySetupContext("VEB_findsucc", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":278 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":278 * cdef int a, b, j, c, found * * if veb.max_val == -1 or i>=veb.max_val: # <<<<<<<<<<<<<< @@ -22166,7 +22167,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(struct __pyx_t_4cdec_2sa_3_sa__VE } if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":279 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":279 * * if veb.max_val == -1 or i>=veb.max_val: * return -1 # <<<<<<<<<<<<<< @@ -22177,7 +22178,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(struct __pyx_t_4cdec_2sa_3_sa__VE goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":280 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":280 * if veb.max_val == -1 or i>=veb.max_val: * return -1 * if i < veb.min_val: # <<<<<<<<<<<<<< @@ -22187,7 +22188,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(struct __pyx_t_4cdec_2sa_3_sa__VE __pyx_t_3 = ((__pyx_v_i < __pyx_v_veb->min_val) != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":281 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":281 * return -1 * if i < veb.min_val: * return veb.min_val # <<<<<<<<<<<<<< @@ -22198,7 +22199,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(struct __pyx_t_4cdec_2sa_3_sa__VE goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":283 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":283 * return veb.min_val * * a = i >> veb.num_bottom_bits # <<<<<<<<<<<<<< @@ -22207,7 +22208,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(struct __pyx_t_4cdec_2sa_3_sa__VE */ __pyx_v_a = (__pyx_v_i >> __pyx_v_veb->num_bottom_bits); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":284 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":284 * * a = i >> veb.num_bottom_bits * b = i & LOWER_MASK[veb.num_bottom_bits-1] # <<<<<<<<<<<<<< @@ -22216,7 +22217,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(struct __pyx_t_4cdec_2sa_3_sa__VE */ __pyx_v_b = (__pyx_v_i & (__pyx_v_4cdec_2sa_3_sa_LOWER_MASK[(__pyx_v_veb->num_bottom_bits - 1)])); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":285 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":285 * a = i >> veb.num_bottom_bits * b = i & LOWER_MASK[veb.num_bottom_bits-1] * found = 0 # <<<<<<<<<<<<<< @@ -22225,7 +22226,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(struct __pyx_t_4cdec_2sa_3_sa__VE */ __pyx_v_found = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":286 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":286 * b = i & LOWER_MASK[veb.num_bottom_bits-1] * found = 0 * if veb.bottom[a] != NULL: # <<<<<<<<<<<<<< @@ -22235,7 +22236,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(struct __pyx_t_4cdec_2sa_3_sa__VE __pyx_t_3 = (((__pyx_v_veb->bottom[__pyx_v_a]) != NULL) != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":287 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":287 * found = 0 * if veb.bottom[a] != NULL: * if veb.num_bottom_bits > MIN_BOTTOM_BITS: # <<<<<<<<<<<<<< @@ -22245,7 +22246,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(struct __pyx_t_4cdec_2sa_3_sa__VE __pyx_t_3 = ((__pyx_v_veb->num_bottom_bits > __pyx_v_4cdec_2sa_3_sa_MIN_BOTTOM_BITS) != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":288 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":288 * if veb.bottom[a] != NULL: * if veb.num_bottom_bits > MIN_BOTTOM_BITS: * subv = <_VEB*> veb.bottom[a] # <<<<<<<<<<<<<< @@ -22254,7 +22255,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(struct __pyx_t_4cdec_2sa_3_sa__VE */ __pyx_v_subv = ((struct __pyx_t_4cdec_2sa_3_sa__VEB *)(__pyx_v_veb->bottom[__pyx_v_a])); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":289 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":289 * if veb.num_bottom_bits > MIN_BOTTOM_BITS: * subv = <_VEB*> veb.bottom[a] * if subv.max_val > b: # <<<<<<<<<<<<<< @@ -22264,7 +22265,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(struct __pyx_t_4cdec_2sa_3_sa__VE __pyx_t_3 = ((__pyx_v_subv->max_val > __pyx_v_b) != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":290 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":290 * subv = <_VEB*> veb.bottom[a] * if subv.max_val > b: * j = (a << veb.num_bottom_bits) + VEB_findsucc(subv, b) # <<<<<<<<<<<<<< @@ -22273,7 +22274,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(struct __pyx_t_4cdec_2sa_3_sa__VE */ __pyx_v_j = ((__pyx_v_a << __pyx_v_veb->num_bottom_bits) + __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(__pyx_v_subv, __pyx_v_b)); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":291 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":291 * if subv.max_val > b: * j = (a << veb.num_bottom_bits) + VEB_findsucc(subv, b) * found = 1 # <<<<<<<<<<<<<< @@ -22288,7 +22289,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(struct __pyx_t_4cdec_2sa_3_sa__VE } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":293 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":293 * found = 1 * else: * subb = <_BitSet*> veb.bottom[a] # <<<<<<<<<<<<<< @@ -22297,7 +22298,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(struct __pyx_t_4cdec_2sa_3_sa__VE */ __pyx_v_subb = ((struct __pyx_t_4cdec_2sa_3_sa__BitSet *)(__pyx_v_veb->bottom[__pyx_v_a])); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":294 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":294 * else: * subb = <_BitSet*> veb.bottom[a] * if subb.max_val > b: # <<<<<<<<<<<<<< @@ -22307,7 +22308,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(struct __pyx_t_4cdec_2sa_3_sa__VE __pyx_t_3 = ((__pyx_v_subb->max_val > __pyx_v_b) != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":295 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":295 * subb = <_BitSet*> veb.bottom[a] * if subb.max_val > b: * j = (a << veb.num_bottom_bits) + bitset_findsucc(subb, b) # <<<<<<<<<<<<<< @@ -22316,7 +22317,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(struct __pyx_t_4cdec_2sa_3_sa__VE */ __pyx_v_j = ((__pyx_v_a << __pyx_v_veb->num_bottom_bits) + __pyx_f_4cdec_2sa_3_sa_bitset_findsucc(__pyx_v_subb, __pyx_v_b)); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":296 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":296 * if subb.max_val > b: * j = (a << veb.num_bottom_bits) + bitset_findsucc(subb, b) * found = 1 # <<<<<<<<<<<<<< @@ -22333,7 +22334,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(struct __pyx_t_4cdec_2sa_3_sa__VE } __pyx_L5:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":297 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":297 * j = (a << veb.num_bottom_bits) + bitset_findsucc(subb, b) * found = 1 * if found==0: # <<<<<<<<<<<<<< @@ -22343,7 +22344,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(struct __pyx_t_4cdec_2sa_3_sa__VE __pyx_t_3 = ((__pyx_v_found == 0) != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":298 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":298 * found = 1 * if found==0: * if veb.top_universe_size > MIN_BOTTOM_SIZE: # <<<<<<<<<<<<<< @@ -22353,7 +22354,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(struct __pyx_t_4cdec_2sa_3_sa__VE __pyx_t_3 = ((__pyx_v_veb->top_universe_size > __pyx_v_4cdec_2sa_3_sa_MIN_BOTTOM_SIZE) != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":299 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":299 * if found==0: * if veb.top_universe_size > MIN_BOTTOM_SIZE: * subv = <_VEB*> veb.top # <<<<<<<<<<<<<< @@ -22362,7 +22363,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(struct __pyx_t_4cdec_2sa_3_sa__VE */ __pyx_v_subv = ((struct __pyx_t_4cdec_2sa_3_sa__VEB *)__pyx_v_veb->top); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":300 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":300 * if veb.top_universe_size > MIN_BOTTOM_SIZE: * subv = <_VEB*> veb.top * c = VEB_findsucc(subv, a) # <<<<<<<<<<<<<< @@ -22374,7 +22375,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(struct __pyx_t_4cdec_2sa_3_sa__VE } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":302 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":302 * c = VEB_findsucc(subv, a) * else: * subb = <_BitSet*> veb.top # <<<<<<<<<<<<<< @@ -22383,7 +22384,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(struct __pyx_t_4cdec_2sa_3_sa__VE */ __pyx_v_subb = ((struct __pyx_t_4cdec_2sa_3_sa__BitSet *)__pyx_v_veb->top); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":303 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":303 * else: * subb = <_BitSet*> veb.top * c = bitset_findsucc(subb, a) # <<<<<<<<<<<<<< @@ -22394,7 +22395,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(struct __pyx_t_4cdec_2sa_3_sa__VE } __pyx_L10:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":304 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":304 * subb = <_BitSet*> veb.top * c = bitset_findsucc(subb, a) * if veb.num_bottom_bits > MIN_BOTTOM_BITS: # <<<<<<<<<<<<<< @@ -22404,7 +22405,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(struct __pyx_t_4cdec_2sa_3_sa__VE __pyx_t_3 = ((__pyx_v_veb->num_bottom_bits > __pyx_v_4cdec_2sa_3_sa_MIN_BOTTOM_BITS) != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":305 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":305 * c = bitset_findsucc(subb, a) * if veb.num_bottom_bits > MIN_BOTTOM_BITS: * subv = <_VEB*> veb.bottom[c] # <<<<<<<<<<<<<< @@ -22413,7 +22414,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(struct __pyx_t_4cdec_2sa_3_sa__VE */ __pyx_v_subv = ((struct __pyx_t_4cdec_2sa_3_sa__VEB *)(__pyx_v_veb->bottom[__pyx_v_c])); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":306 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":306 * if veb.num_bottom_bits > MIN_BOTTOM_BITS: * subv = <_VEB*> veb.bottom[c] * j = (c << veb.num_bottom_bits) + subv.min_val # <<<<<<<<<<<<<< @@ -22425,7 +22426,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(struct __pyx_t_4cdec_2sa_3_sa__VE } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":308 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":308 * j = (c << veb.num_bottom_bits) + subv.min_val * else: * subb = <_BitSet*> veb.bottom[c] # <<<<<<<<<<<<<< @@ -22434,7 +22435,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(struct __pyx_t_4cdec_2sa_3_sa__VE */ __pyx_v_subb = ((struct __pyx_t_4cdec_2sa_3_sa__BitSet *)(__pyx_v_veb->bottom[__pyx_v_c])); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":309 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":309 * else: * subb = <_BitSet*> veb.bottom[c] * j = (c << veb.num_bottom_bits) + subb.min_val # <<<<<<<<<<<<<< @@ -22448,7 +22449,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(struct __pyx_t_4cdec_2sa_3_sa__VE } __pyx_L9:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":310 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":310 * subb = <_BitSet*> veb.bottom[c] * j = (c << veb.num_bottom_bits) + subb.min_val * return j # <<<<<<<<<<<<<< @@ -22458,7 +22459,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(struct __pyx_t_4cdec_2sa_3_sa__VE __pyx_r = __pyx_v_j; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":273 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":273 * * * cdef int VEB_findsucc(_VEB* veb, int i): # <<<<<<<<<<<<<< @@ -22472,7 +22473,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(struct __pyx_t_4cdec_2sa_3_sa__VE return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":313 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":313 * * * cdef int VEB_contains(_VEB* veb, int i): # <<<<<<<<<<<<<< @@ -22493,7 +22494,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_contains(struct __pyx_t_4cdec_2sa_3_sa__VE int __pyx_t_4; __Pyx_RefNannySetupContext("VEB_contains", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":318 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":318 * cdef int a, b * * if veb.size == 0 or i < veb.min_val or i > veb.max_val: # <<<<<<<<<<<<<< @@ -22515,7 +22516,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_contains(struct __pyx_t_4cdec_2sa_3_sa__VE } if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":319 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":319 * * if veb.size == 0 or i < veb.min_val or i > veb.max_val: * return 0 # <<<<<<<<<<<<<< @@ -22526,7 +22527,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_contains(struct __pyx_t_4cdec_2sa_3_sa__VE goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":321 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":321 * return 0 * * if veb.min_val == i: # <<<<<<<<<<<<<< @@ -22536,7 +22537,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_contains(struct __pyx_t_4cdec_2sa_3_sa__VE __pyx_t_2 = ((__pyx_v_veb->min_val == __pyx_v_i) != 0); if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":322 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":322 * * if veb.min_val == i: * return 1 # <<<<<<<<<<<<<< @@ -22548,7 +22549,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_contains(struct __pyx_t_4cdec_2sa_3_sa__VE } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":324 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":324 * return 1 * else: * if veb.size == 1: # <<<<<<<<<<<<<< @@ -22558,7 +22559,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_contains(struct __pyx_t_4cdec_2sa_3_sa__VE __pyx_t_2 = ((__pyx_v_veb->size == 1) != 0); if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":325 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":325 * else: * if veb.size == 1: * return 0 # <<<<<<<<<<<<<< @@ -22570,7 +22571,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_contains(struct __pyx_t_4cdec_2sa_3_sa__VE } } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":327 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":327 * return 0 * * a = i >> veb.num_bottom_bits # <<<<<<<<<<<<<< @@ -22579,7 +22580,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_contains(struct __pyx_t_4cdec_2sa_3_sa__VE */ __pyx_v_a = (__pyx_v_i >> __pyx_v_veb->num_bottom_bits); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":328 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":328 * * a = i >> veb.num_bottom_bits * b = i & LOWER_MASK[veb.num_bottom_bits-1] # <<<<<<<<<<<<<< @@ -22588,7 +22589,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_contains(struct __pyx_t_4cdec_2sa_3_sa__VE */ __pyx_v_b = (__pyx_v_i & (__pyx_v_4cdec_2sa_3_sa_LOWER_MASK[(__pyx_v_veb->num_bottom_bits - 1)])); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":329 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":329 * a = i >> veb.num_bottom_bits * b = i & LOWER_MASK[veb.num_bottom_bits-1] * if veb.bottom[a] == NULL: # <<<<<<<<<<<<<< @@ -22598,7 +22599,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_contains(struct __pyx_t_4cdec_2sa_3_sa__VE __pyx_t_2 = (((__pyx_v_veb->bottom[__pyx_v_a]) == NULL) != 0); if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":330 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":330 * b = i & LOWER_MASK[veb.num_bottom_bits-1] * if veb.bottom[a] == NULL: * return 0 # <<<<<<<<<<<<<< @@ -22610,7 +22611,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_contains(struct __pyx_t_4cdec_2sa_3_sa__VE } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":332 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":332 * return 0 * else: * if veb.num_bottom_bits > MIN_BOTTOM_BITS: # <<<<<<<<<<<<<< @@ -22620,7 +22621,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_contains(struct __pyx_t_4cdec_2sa_3_sa__VE __pyx_t_2 = ((__pyx_v_veb->num_bottom_bits > __pyx_v_4cdec_2sa_3_sa_MIN_BOTTOM_BITS) != 0); if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":333 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":333 * else: * if veb.num_bottom_bits > MIN_BOTTOM_BITS: * subv = <_VEB*> veb.bottom[a] # <<<<<<<<<<<<<< @@ -22629,7 +22630,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_contains(struct __pyx_t_4cdec_2sa_3_sa__VE */ __pyx_v_subv = ((struct __pyx_t_4cdec_2sa_3_sa__VEB *)(__pyx_v_veb->bottom[__pyx_v_a])); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":334 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":334 * if veb.num_bottom_bits > MIN_BOTTOM_BITS: * subv = <_VEB*> veb.bottom[a] * return VEB_contains(subv, b) # <<<<<<<<<<<<<< @@ -22641,7 +22642,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_contains(struct __pyx_t_4cdec_2sa_3_sa__VE } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":336 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":336 * return VEB_contains(subv, b) * else: * subb = <_BitSet*> veb.bottom[a] # <<<<<<<<<<<<<< @@ -22650,7 +22651,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_contains(struct __pyx_t_4cdec_2sa_3_sa__VE */ __pyx_v_subb = ((struct __pyx_t_4cdec_2sa_3_sa__BitSet *)(__pyx_v_veb->bottom[__pyx_v_a])); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":337 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":337 * else: * subb = <_BitSet*> veb.bottom[a] * return bitset_contains(subb, b) # <<<<<<<<<<<<<< @@ -22662,7 +22663,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_contains(struct __pyx_t_4cdec_2sa_3_sa__VE } } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":313 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":313 * * * cdef int VEB_contains(_VEB* veb, int i): # <<<<<<<<<<<<<< @@ -22676,7 +22677,7 @@ static int __pyx_f_4cdec_2sa_3_sa_VEB_contains(struct __pyx_t_4cdec_2sa_3_sa__VE return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":344 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":344 * cdef int next_val * * def __next__(self): # <<<<<<<<<<<<<< @@ -22709,7 +22710,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11VEBIterator___next__(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__next__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":347 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":347 * cdef int ret_val * * if self.next_val == -1: # <<<<<<<<<<<<<< @@ -22719,7 +22720,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11VEBIterator___next__(struct __pyx_obj __pyx_t_1 = ((__pyx_v_self->next_val == -1) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":348 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":348 * * if self.next_val == -1: * raise StopIteration() # <<<<<<<<<<<<<< @@ -22733,7 +22734,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11VEBIterator___next__(struct __pyx_obj {__pyx_filename = __pyx_f[6]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":349 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":349 * if self.next_val == -1: * raise StopIteration() * ret_val = self.next_val # <<<<<<<<<<<<<< @@ -22743,7 +22744,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11VEBIterator___next__(struct __pyx_obj __pyx_t_3 = __pyx_v_self->next_val; __pyx_v_ret_val = __pyx_t_3; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":350 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":350 * raise StopIteration() * ret_val = self.next_val * self.next_val = VEB_findsucc(self.v, ret_val) # <<<<<<<<<<<<<< @@ -22752,7 +22753,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11VEBIterator___next__(struct __pyx_obj */ __pyx_v_self->next_val = __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(__pyx_v_self->v, __pyx_v_ret_val); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":351 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":351 * ret_val = self.next_val * self.next_val = VEB_findsucc(self.v, ret_val) * return ret_val # <<<<<<<<<<<<<< @@ -22766,7 +22767,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11VEBIterator___next__(struct __pyx_obj __pyx_t_2 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":344 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":344 * cdef int next_val * * def __next__(self): # <<<<<<<<<<<<<< @@ -22785,7 +22786,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11VEBIterator___next__(struct __pyx_obj return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":360 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":360 * cdef int _first(self) * * def __cinit__(self, int size): # <<<<<<<<<<<<<< @@ -22850,7 +22851,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_3VEB___cinit__(struct __pyx_obj_4cdec_2sa_3_s __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":361 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":361 * * def __cinit__(self, int size): * self.veb = new_VEB(size) # <<<<<<<<<<<<<< @@ -22859,7 +22860,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_3VEB___cinit__(struct __pyx_obj_4cdec_2sa_3_s */ __pyx_v_self->veb = __pyx_f_4cdec_2sa_3_sa_new_VEB(__pyx_v_size); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":360 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":360 * cdef int _first(self) * * def __cinit__(self, int size): # <<<<<<<<<<<<<< @@ -22873,7 +22874,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_3VEB___cinit__(struct __pyx_obj_4cdec_2sa_3_s return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":363 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":363 * self.veb = new_VEB(size) * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -22900,7 +22901,7 @@ static void __pyx_pf_4cdec_2sa_3_sa_3VEB_2__dealloc__(struct __pyx_obj_4cdec_2sa int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":364 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":364 * * def __dealloc__(self): * del_VEB(self.veb) # <<<<<<<<<<<<<< @@ -22911,7 +22912,7 @@ static void __pyx_pf_4cdec_2sa_3_sa_3VEB_2__dealloc__(struct __pyx_obj_4cdec_2sa __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":363 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":363 * self.veb = new_VEB(size) * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -22928,7 +22929,7 @@ static void __pyx_pf_4cdec_2sa_3_sa_3VEB_2__dealloc__(struct __pyx_obj_4cdec_2sa __Pyx_RefNannyFinishContext(); } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":366 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":366 * del_VEB(self.veb) * * def __iter__(self): # <<<<<<<<<<<<<< @@ -22961,7 +22962,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_3VEB_4__iter__(struct __pyx_obj_4cdec_2 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__iter__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":368 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":368 * def __iter__(self): * cdef VEBIterator it * it = VEBIterator() # <<<<<<<<<<<<<< @@ -22973,7 +22974,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_3VEB_4__iter__(struct __pyx_obj_4cdec_2 __pyx_v_it = ((struct __pyx_obj_4cdec_2sa_3_sa_VEBIterator *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":369 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":369 * cdef VEBIterator it * it = VEBIterator() * it.v = self.veb # <<<<<<<<<<<<<< @@ -22983,7 +22984,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_3VEB_4__iter__(struct __pyx_obj_4cdec_2 __pyx_t_2 = __pyx_v_self->veb; __pyx_v_it->v = __pyx_t_2; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":370 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":370 * it = VEBIterator() * it.v = self.veb * it.next_val = self.veb.min_val # <<<<<<<<<<<<<< @@ -22993,7 +22994,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_3VEB_4__iter__(struct __pyx_obj_4cdec_2 __pyx_t_3 = __pyx_v_self->veb->min_val; __pyx_v_it->next_val = __pyx_t_3; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":371 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":371 * it.v = self.veb * it.next_val = self.veb.min_val * return it # <<<<<<<<<<<<<< @@ -23005,7 +23006,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_3VEB_4__iter__(struct __pyx_obj_4cdec_2 __pyx_r = ((PyObject *)__pyx_v_it); goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":366 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":366 * del_VEB(self.veb) * * def __iter__(self): # <<<<<<<<<<<<<< @@ -23025,7 +23026,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_3VEB_4__iter__(struct __pyx_obj_4cdec_2 return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":373 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":373 * return it * * def insert(self, i): # <<<<<<<<<<<<<< @@ -23056,7 +23057,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_3VEB_6insert(struct __pyx_obj_4cdec_2sa int __pyx_clineno = 0; __Pyx_RefNannySetupContext("insert", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":374 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":374 * * def insert(self, i): * return VEB_insert(self.veb, i) # <<<<<<<<<<<<<< @@ -23071,7 +23072,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_3VEB_6insert(struct __pyx_obj_4cdec_2sa __pyx_t_2 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":373 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":373 * return it * * def insert(self, i): # <<<<<<<<<<<<<< @@ -23090,7 +23091,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_3VEB_6insert(struct __pyx_obj_4cdec_2sa return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":376 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":376 * return VEB_insert(self.veb, i) * * cdef int _insert(self, int i): # <<<<<<<<<<<<<< @@ -23103,7 +23104,7 @@ static int __pyx_f_4cdec_2sa_3_sa_3VEB__insert(struct __pyx_obj_4cdec_2sa_3_sa_V __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_insert", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":377 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":377 * * cdef int _insert(self, int i): * return VEB_insert(self.veb, i) # <<<<<<<<<<<<<< @@ -23113,7 +23114,7 @@ static int __pyx_f_4cdec_2sa_3_sa_3VEB__insert(struct __pyx_obj_4cdec_2sa_3_sa_V __pyx_r = __pyx_f_4cdec_2sa_3_sa_VEB_insert(__pyx_v_self->veb, __pyx_v_i); goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":376 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":376 * return VEB_insert(self.veb, i) * * cdef int _insert(self, int i): # <<<<<<<<<<<<<< @@ -23127,7 +23128,7 @@ static int __pyx_f_4cdec_2sa_3_sa_3VEB__insert(struct __pyx_obj_4cdec_2sa_3_sa_V return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":379 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":379 * return VEB_insert(self.veb, i) * * def findsucc(self, i): # <<<<<<<<<<<<<< @@ -23158,7 +23159,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_3VEB_8findsucc(struct __pyx_obj_4cdec_2 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("findsucc", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":380 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":380 * * def findsucc(self, i): * return VEB_findsucc(self.veb, i) # <<<<<<<<<<<<<< @@ -23173,7 +23174,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_3VEB_8findsucc(struct __pyx_obj_4cdec_2 __pyx_t_2 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":379 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":379 * return VEB_insert(self.veb, i) * * def findsucc(self, i): # <<<<<<<<<<<<<< @@ -23192,7 +23193,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_3VEB_8findsucc(struct __pyx_obj_4cdec_2 return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":382 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":382 * return VEB_findsucc(self.veb, i) * * cdef int _first(self): # <<<<<<<<<<<<<< @@ -23205,7 +23206,7 @@ static int __pyx_f_4cdec_2sa_3_sa_3VEB__first(struct __pyx_obj_4cdec_2sa_3_sa_VE __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_first", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":383 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":383 * * cdef int _first(self): * return self.veb.min_val # <<<<<<<<<<<<<< @@ -23215,7 +23216,7 @@ static int __pyx_f_4cdec_2sa_3_sa_3VEB__first(struct __pyx_obj_4cdec_2sa_3_sa_VE __pyx_r = __pyx_v_self->veb->min_val; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":382 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":382 * return VEB_findsucc(self.veb, i) * * cdef int _first(self): # <<<<<<<<<<<<<< @@ -23229,7 +23230,7 @@ static int __pyx_f_4cdec_2sa_3_sa_3VEB__first(struct __pyx_obj_4cdec_2sa_3_sa_VE return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":385 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":385 * return self.veb.min_val * * cdef int _findsucc(self, int i): # <<<<<<<<<<<<<< @@ -23242,7 +23243,7 @@ static int __pyx_f_4cdec_2sa_3_sa_3VEB__findsucc(struct __pyx_obj_4cdec_2sa_3_sa __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_findsucc", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":386 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":386 * * cdef int _findsucc(self, int i): * return VEB_findsucc(self.veb, i) # <<<<<<<<<<<<<< @@ -23252,7 +23253,7 @@ static int __pyx_f_4cdec_2sa_3_sa_3VEB__findsucc(struct __pyx_obj_4cdec_2sa_3_sa __pyx_r = __pyx_f_4cdec_2sa_3_sa_VEB_findsucc(__pyx_v_self->veb, __pyx_v_i); goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":385 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":385 * return self.veb.min_val * * cdef int _findsucc(self, int i): # <<<<<<<<<<<<<< @@ -23266,7 +23267,7 @@ static int __pyx_f_4cdec_2sa_3_sa_3VEB__findsucc(struct __pyx_obj_4cdec_2sa_3_sa return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":388 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":388 * return VEB_findsucc(self.veb, i) * * def __len__(self): # <<<<<<<<<<<<<< @@ -23292,7 +23293,7 @@ static Py_ssize_t __pyx_pf_4cdec_2sa_3_sa_3VEB_10__len__(struct __pyx_obj_4cdec_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":389 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":389 * * def __len__(self): * return self.veb.size # <<<<<<<<<<<<<< @@ -23302,7 +23303,7 @@ static Py_ssize_t __pyx_pf_4cdec_2sa_3_sa_3VEB_10__len__(struct __pyx_obj_4cdec_ __pyx_r = __pyx_v_self->veb->size; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":388 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":388 * return VEB_findsucc(self.veb, i) * * def __len__(self): # <<<<<<<<<<<<<< @@ -23316,7 +23317,7 @@ static Py_ssize_t __pyx_pf_4cdec_2sa_3_sa_3VEB_10__len__(struct __pyx_obj_4cdec_ return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":391 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":391 * return self.veb.size * * def __contains__(self, i): # <<<<<<<<<<<<<< @@ -23345,7 +23346,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_3VEB_12__contains__(struct __pyx_obj_4cdec_2s int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__contains__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":392 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":392 * * def __contains__(self, i): * return VEB_contains(self.veb, i) # <<<<<<<<<<<<<< @@ -23354,7 +23355,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_3VEB_12__contains__(struct __pyx_obj_4cdec_2s __pyx_r = __pyx_f_4cdec_2sa_3_sa_VEB_contains(__pyx_v_self->veb, __pyx_t_1); goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":391 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":391 * return self.veb.size * * def __contains__(self, i): # <<<<<<<<<<<<<< @@ -23370,7 +23371,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_3VEB_12__contains__(struct __pyx_obj_4cdec_2s return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":9 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":9 * cdef IntList lcp * * def __cinit__(self, SuffixArray sa): # <<<<<<<<<<<<<< @@ -23456,7 +23457,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_3LCP___cinit__(struct __pyx_obj_4cdec_2sa_3_s int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":13 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":13 * cdef IntList rank * * logger.info("Constructing LCP array") # <<<<<<<<<<<<<< @@ -23473,7 +23474,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_3LCP___cinit__(struct __pyx_obj_4cdec_2sa_3_s __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":14 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":14 * * logger.info("Constructing LCP array") * self.sa = sa # <<<<<<<<<<<<<< @@ -23486,7 +23487,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_3LCP___cinit__(struct __pyx_obj_4cdec_2sa_3_s __Pyx_DECREF(((PyObject *)__pyx_v_self->sa)); __pyx_v_self->sa = __pyx_v_sa; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":15 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":15 * logger.info("Constructing LCP array") * self.sa = sa * n = self.sa.sa.len # <<<<<<<<<<<<<< @@ -23496,7 +23497,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_3LCP___cinit__(struct __pyx_obj_4cdec_2sa_3_s __pyx_t_3 = __pyx_v_self->sa->sa->len; __pyx_v_n = __pyx_t_3; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":16 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":16 * self.sa = sa * n = self.sa.sa.len * self.lcp = IntList(initial_len=n) # <<<<<<<<<<<<<< @@ -23518,7 +23519,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_3LCP___cinit__(struct __pyx_obj_4cdec_2sa_3_s __pyx_v_self->lcp = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":18 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":18 * self.lcp = IntList(initial_len=n) * * rank = IntList(initial_len=n) # <<<<<<<<<<<<<< @@ -23537,7 +23538,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_3LCP___cinit__(struct __pyx_obj_4cdec_2sa_3_s __pyx_v_rank = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":19 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":19 * * rank = IntList(initial_len=n) * for i from 0 <= i < n: # <<<<<<<<<<<<<< @@ -23547,7 +23548,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_3LCP___cinit__(struct __pyx_obj_4cdec_2sa_3_s __pyx_t_3 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_3; __pyx_v_i++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":20 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":20 * rank = IntList(initial_len=n) * for i from 0 <= i < n: * rank.arr[sa.sa.arr[i]] = i # <<<<<<<<<<<<<< @@ -23557,7 +23558,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_3LCP___cinit__(struct __pyx_obj_4cdec_2sa_3_s (__pyx_v_rank->arr[(__pyx_v_sa->sa->arr[__pyx_v_i])]) = __pyx_v_i; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":22 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":22 * rank.arr[sa.sa.arr[i]] = i * * h = 0 # <<<<<<<<<<<<<< @@ -23566,7 +23567,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_3LCP___cinit__(struct __pyx_obj_4cdec_2sa_3_s */ __pyx_v_h = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":23 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":23 * * h = 0 * for i from 0 <= i < n: # <<<<<<<<<<<<<< @@ -23576,7 +23577,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_3LCP___cinit__(struct __pyx_obj_4cdec_2sa_3_s __pyx_t_3 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_3; __pyx_v_i++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":24 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":24 * h = 0 * for i from 0 <= i < n: * k = rank.arr[i] # <<<<<<<<<<<<<< @@ -23585,7 +23586,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_3LCP___cinit__(struct __pyx_obj_4cdec_2sa_3_s */ __pyx_v_k = (__pyx_v_rank->arr[__pyx_v_i]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":25 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":25 * for i from 0 <= i < n: * k = rank.arr[i] * if k == 0: # <<<<<<<<<<<<<< @@ -23595,7 +23596,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_3LCP___cinit__(struct __pyx_obj_4cdec_2sa_3_s __pyx_t_4 = ((__pyx_v_k == 0) != 0); if (__pyx_t_4) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":26 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":26 * k = rank.arr[i] * if k == 0: * self.lcp.arr[k] = -1 # <<<<<<<<<<<<<< @@ -23607,7 +23608,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_3LCP___cinit__(struct __pyx_obj_4cdec_2sa_3_s } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":28 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":28 * self.lcp.arr[k] = -1 * else: * j = sa.sa.arr[k-1] # <<<<<<<<<<<<<< @@ -23616,7 +23617,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_3LCP___cinit__(struct __pyx_obj_4cdec_2sa_3_s */ __pyx_v_j = (__pyx_v_sa->sa->arr[(__pyx_v_k - 1)]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":29 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":29 * else: * j = sa.sa.arr[k-1] * while i+h < n and j+h < n and sa.darray.data.arr[i+h] == sa.darray.data.arr[j+h]: # <<<<<<<<<<<<<< @@ -23639,7 +23640,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_3LCP___cinit__(struct __pyx_obj_4cdec_2sa_3_s } if (!__pyx_t_5) break; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":30 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":30 * j = sa.sa.arr[k-1] * while i+h < n and j+h < n and sa.darray.data.arr[i+h] == sa.darray.data.arr[j+h]: * h = h+1 # <<<<<<<<<<<<<< @@ -23649,7 +23650,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_3LCP___cinit__(struct __pyx_obj_4cdec_2sa_3_s __pyx_v_h = (__pyx_v_h + 1); } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":31 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":31 * while i+h < n and j+h < n and sa.darray.data.arr[i+h] == sa.darray.data.arr[j+h]: * h = h+1 * self.lcp.arr[k] = h # <<<<<<<<<<<<<< @@ -23660,7 +23661,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_3LCP___cinit__(struct __pyx_obj_4cdec_2sa_3_s } __pyx_L7:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":32 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":32 * h = h+1 * self.lcp.arr[k] = h * if h > 0: # <<<<<<<<<<<<<< @@ -23670,7 +23671,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_3LCP___cinit__(struct __pyx_obj_4cdec_2sa_3_s __pyx_t_5 = ((__pyx_v_h > 0) != 0); if (__pyx_t_5) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":33 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":33 * self.lcp.arr[k] = h * if h > 0: * h = h-1 # <<<<<<<<<<<<<< @@ -23683,7 +23684,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_3LCP___cinit__(struct __pyx_obj_4cdec_2sa_3_s __pyx_L10:; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":34 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":34 * if h > 0: * h = h-1 * logger.info("LCP array completed") # <<<<<<<<<<<<<< @@ -23700,7 +23701,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_3LCP___cinit__(struct __pyx_obj_4cdec_2sa_3_s __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":9 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":9 * cdef IntList lcp * * def __cinit__(self, SuffixArray sa): # <<<<<<<<<<<<<< @@ -23723,7 +23724,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_3LCP___cinit__(struct __pyx_obj_4cdec_2sa_3_s } static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":36 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":36 * logger.info("LCP array completed") * * def compute_stats(self, int max_n): # <<<<<<<<<<<<<< @@ -23825,7 +23826,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[9]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":48 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":48 * cdef VEB veb * * N = self.sa.sa.len # <<<<<<<<<<<<<< @@ -23835,7 +23836,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject __pyx_t_1 = __pyx_cur_scope->__pyx_v_self->sa->sa->len; __pyx_cur_scope->__pyx_v_N = __pyx_t_1; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":50 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":50 * N = self.sa.sa.len * * ngram_starts = [] # <<<<<<<<<<<<<< @@ -23848,7 +23849,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject __pyx_cur_scope->__pyx_v_ngram_starts = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":51 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":51 * * ngram_starts = [] * for n from 0 <= n < max_n: # <<<<<<<<<<<<<< @@ -23858,7 +23859,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject __pyx_t_1 = __pyx_cur_scope->__pyx_v_max_n; for (__pyx_cur_scope->__pyx_v_n = 0; __pyx_cur_scope->__pyx_v_n < __pyx_t_1; __pyx_cur_scope->__pyx_v_n++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":52 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":52 * ngram_starts = [] * for n from 0 <= n < max_n: * ngram_starts.append(IntList(initial_len=N)) # <<<<<<<<<<<<<< @@ -23878,7 +23879,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":54 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":54 * ngram_starts.append(IntList(initial_len=N)) * * run_start = IntList(initial_len=max_n) # <<<<<<<<<<<<<< @@ -23898,7 +23899,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject __pyx_cur_scope->__pyx_v_run_start = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":55 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":55 * * run_start = IntList(initial_len=max_n) * veb = VEB(N) # <<<<<<<<<<<<<< @@ -23919,7 +23920,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject __pyx_cur_scope->__pyx_v_veb = ((struct __pyx_obj_4cdec_2sa_3_sa_VEB *)__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":57 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":57 * veb = VEB(N) * * for i from 0 <= i < N: # <<<<<<<<<<<<<< @@ -23929,7 +23930,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject __pyx_t_1 = __pyx_cur_scope->__pyx_v_N; for (__pyx_cur_scope->__pyx_v_i = 0; __pyx_cur_scope->__pyx_v_i < __pyx_t_1; __pyx_cur_scope->__pyx_v_i++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":58 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":58 * * for i from 0 <= i < N: * h = self.lcp.arr[i] # <<<<<<<<<<<<<< @@ -23938,7 +23939,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject */ __pyx_cur_scope->__pyx_v_h = (__pyx_cur_scope->__pyx_v_self->lcp->arr[__pyx_cur_scope->__pyx_v_i]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":59 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":59 * for i from 0 <= i < N: * h = self.lcp.arr[i] * if h < 0: # <<<<<<<<<<<<<< @@ -23948,7 +23949,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject __pyx_t_5 = ((__pyx_cur_scope->__pyx_v_h < 0) != 0); if (__pyx_t_5) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":60 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":60 * h = self.lcp.arr[i] * if h < 0: * h = 0 # <<<<<<<<<<<<<< @@ -23960,7 +23961,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject } __pyx_L8:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":61 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":61 * if h < 0: * h = 0 * for n from h <= n < max_n: # <<<<<<<<<<<<<< @@ -23970,7 +23971,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject __pyx_t_6 = __pyx_cur_scope->__pyx_v_max_n; for (__pyx_cur_scope->__pyx_v_n = __pyx_cur_scope->__pyx_v_h; __pyx_cur_scope->__pyx_v_n < __pyx_t_6; __pyx_cur_scope->__pyx_v_n++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":62 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":62 * h = 0 * for n from h <= n < max_n: * rs = run_start.arr[n] # <<<<<<<<<<<<<< @@ -23979,7 +23980,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject */ __pyx_cur_scope->__pyx_v_rs = (__pyx_cur_scope->__pyx_v_run_start->arr[__pyx_cur_scope->__pyx_v_n]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":63 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":63 * for n from h <= n < max_n: * rs = run_start.arr[n] * run_start.arr[n] = i # <<<<<<<<<<<<<< @@ -23988,7 +23989,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject */ (__pyx_cur_scope->__pyx_v_run_start->arr[__pyx_cur_scope->__pyx_v_n]) = __pyx_cur_scope->__pyx_v_i; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":64 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":64 * rs = run_start.arr[n] * run_start.arr[n] = i * freq = i - rs # <<<<<<<<<<<<<< @@ -23997,7 +23998,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject */ __pyx_cur_scope->__pyx_v_freq = (__pyx_cur_scope->__pyx_v_i - __pyx_cur_scope->__pyx_v_rs); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":65 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":65 * run_start.arr[n] = i * freq = i - rs * if freq > 1000: # arbitrary, but see note below # <<<<<<<<<<<<<< @@ -24007,7 +24008,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject __pyx_t_5 = ((__pyx_cur_scope->__pyx_v_freq > 1000) != 0); if (__pyx_t_5) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":66 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":66 * freq = i - rs * if freq > 1000: # arbitrary, but see note below * veb._insert(freq) # <<<<<<<<<<<<<< @@ -24016,7 +24017,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_VEB *)__pyx_cur_scope->__pyx_v_veb->__pyx_vtab)->_insert(__pyx_cur_scope->__pyx_v_veb, __pyx_cur_scope->__pyx_v_freq); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":67 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":67 * if freq > 1000: # arbitrary, but see note below * veb._insert(freq) * ngram_start = ngram_starts[n] # <<<<<<<<<<<<<< @@ -24031,7 +24032,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":68 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":68 * veb._insert(freq) * ngram_start = ngram_starts[n] * while ngram_start.arr[freq] > 0: # <<<<<<<<<<<<<< @@ -24042,7 +24043,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject __pyx_t_5 = (((__pyx_cur_scope->__pyx_v_ngram_start->arr[__pyx_cur_scope->__pyx_v_freq]) > 0) != 0); if (!__pyx_t_5) break; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":69 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":69 * ngram_start = ngram_starts[n] * while ngram_start.arr[freq] > 0: * freq = freq + 1 # cheating a bit, should be ok for sparse histogram # <<<<<<<<<<<<<< @@ -24052,7 +24053,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject __pyx_cur_scope->__pyx_v_freq = (__pyx_cur_scope->__pyx_v_freq + 1); } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":70 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":70 * while ngram_start.arr[freq] > 0: * freq = freq + 1 # cheating a bit, should be ok for sparse histogram * ngram_start.arr[freq] = rs # <<<<<<<<<<<<<< @@ -24066,7 +24067,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject } } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":71 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":71 * freq = freq + 1 # cheating a bit, should be ok for sparse histogram * ngram_start.arr[freq] = rs * i = veb.veb.min_val # <<<<<<<<<<<<<< @@ -24076,7 +24077,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject __pyx_t_1 = __pyx_cur_scope->__pyx_v_veb->veb->min_val; __pyx_cur_scope->__pyx_v_i = __pyx_t_1; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":72 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":72 * ngram_start.arr[freq] = rs * i = veb.veb.min_val * while i != -1: # <<<<<<<<<<<<<< @@ -24087,7 +24088,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject __pyx_t_5 = ((__pyx_cur_scope->__pyx_v_i != -1) != 0); if (!__pyx_t_5) break; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":73 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":73 * i = veb.veb.min_val * while i != -1: * ii = veb._findsucc(i) # <<<<<<<<<<<<<< @@ -24096,7 +24097,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject */ __pyx_cur_scope->__pyx_v_ii = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_VEB *)__pyx_cur_scope->__pyx_v_veb->__pyx_vtab)->_findsucc(__pyx_cur_scope->__pyx_v_veb, __pyx_cur_scope->__pyx_v_i); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":74 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":74 * while i != -1: * ii = veb._findsucc(i) * for n from 0 <= n < max_n: # <<<<<<<<<<<<<< @@ -24106,7 +24107,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject __pyx_t_1 = __pyx_cur_scope->__pyx_v_max_n; for (__pyx_cur_scope->__pyx_v_n = 0; __pyx_cur_scope->__pyx_v_n < __pyx_t_1; __pyx_cur_scope->__pyx_v_n++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":75 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":75 * ii = veb._findsucc(i) * for n from 0 <= n < max_n: * ngram_start = ngram_starts[n] # <<<<<<<<<<<<<< @@ -24121,7 +24122,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":76 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":76 * for n from 0 <= n < max_n: * ngram_start = ngram_starts[n] * iii = i # <<<<<<<<<<<<<< @@ -24130,7 +24131,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject */ __pyx_cur_scope->__pyx_v_iii = __pyx_cur_scope->__pyx_v_i; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":77 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":77 * ngram_start = ngram_starts[n] * iii = i * rs = ngram_start.arr[iii] # <<<<<<<<<<<<<< @@ -24139,7 +24140,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject */ __pyx_cur_scope->__pyx_v_rs = (__pyx_cur_scope->__pyx_v_ngram_start->arr[__pyx_cur_scope->__pyx_v_iii]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":78 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":78 * iii = i * rs = ngram_start.arr[iii] * while (ii==-1 or iii < ii) and rs != 0: # <<<<<<<<<<<<<< @@ -24162,7 +24163,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject } if (!__pyx_t_7) break; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":79 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":79 * rs = ngram_start.arr[iii] * while (ii==-1 or iii < ii) and rs != 0: * j = self.sa.sa.arr[rs] # <<<<<<<<<<<<<< @@ -24171,7 +24172,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject */ __pyx_cur_scope->__pyx_v_j = (__pyx_cur_scope->__pyx_v_self->sa->sa->arr[__pyx_cur_scope->__pyx_v_rs]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":80 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":80 * while (ii==-1 or iii < ii) and rs != 0: * j = self.sa.sa.arr[rs] * valid = 1 # <<<<<<<<<<<<<< @@ -24180,7 +24181,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject */ __pyx_cur_scope->__pyx_v_valid = 1; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":81 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":81 * j = self.sa.sa.arr[rs] * valid = 1 * for k from 0 <= k < n+1: # <<<<<<<<<<<<<< @@ -24190,7 +24191,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject __pyx_t_9 = (__pyx_cur_scope->__pyx_v_n + 1); for (__pyx_cur_scope->__pyx_v_k = 0; __pyx_cur_scope->__pyx_v_k < __pyx_t_9; __pyx_cur_scope->__pyx_v_k++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":82 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":82 * valid = 1 * for k from 0 <= k < n+1: * if self.sa.darray.data.arr[j+k] < 2: # <<<<<<<<<<<<<< @@ -24200,7 +24201,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject __pyx_t_7 = (((__pyx_cur_scope->__pyx_v_self->sa->darray->data->arr[(__pyx_cur_scope->__pyx_v_j + __pyx_cur_scope->__pyx_v_k)]) < 2) != 0); if (__pyx_t_7) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":83 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":83 * for k from 0 <= k < n+1: * if self.sa.darray.data.arr[j+k] < 2: * valid = 0 # <<<<<<<<<<<<<< @@ -24213,7 +24214,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject __pyx_L22:; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":84 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":84 * if self.sa.darray.data.arr[j+k] < 2: * valid = 0 * if valid: # <<<<<<<<<<<<<< @@ -24223,7 +24224,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject __pyx_t_7 = (__pyx_cur_scope->__pyx_v_valid != 0); if (__pyx_t_7) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":85 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":85 * valid = 0 * if valid: * ngram = tuple([self.sa.darray.data.arr[j+k] for k in range(n+1)]) # <<<<<<<<<<<<<< @@ -24248,7 +24249,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":86 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":86 * if valid: * ngram = tuple([self.sa.darray.data.arr[j+k] for k in range(n+1)]) * yield i, n+1, ngram # <<<<<<<<<<<<<< @@ -24285,7 +24286,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject } __pyx_L23:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":87 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":87 * ngram = tuple([self.sa.darray.data.arr[j+k] for k in range(n+1)]) * yield i, n+1, ngram * iii = iii + 1 # <<<<<<<<<<<<<< @@ -24294,7 +24295,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject */ __pyx_cur_scope->__pyx_v_iii = (__pyx_cur_scope->__pyx_v_iii + 1); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":88 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":88 * yield i, n+1, ngram * iii = iii + 1 * rs = ngram_start.arr[iii] # <<<<<<<<<<<<<< @@ -24304,7 +24305,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject } } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":89 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":89 * iii = iii + 1 * rs = ngram_start.arr[iii] * i = ii # <<<<<<<<<<<<<< @@ -24312,7 +24313,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject __pyx_cur_scope->__pyx_v_i = __pyx_cur_scope->__pyx_v_ii; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":36 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":36 * logger.info("LCP array completed") * * def compute_stats(self, int max_n): # <<<<<<<<<<<<<< @@ -24336,7 +24337,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_3LCP_4generator1(__pyx_GeneratorObject return NULL; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":12 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":12 * cdef dict id2sym * * def __cinit__(self): # <<<<<<<<<<<<<< @@ -24369,7 +24370,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_8Alphabet___cinit__(struct __pyx_obj_4cdec_2s int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":13 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":13 * * def __cinit__(self): * self.terminals = StringMap() # <<<<<<<<<<<<<< @@ -24384,7 +24385,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_8Alphabet___cinit__(struct __pyx_obj_4cdec_2s __pyx_v_self->terminals = ((struct __pyx_obj_4cdec_2sa_3_sa_StringMap *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":14 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":14 * def __cinit__(self): * self.terminals = StringMap() * self.nonterminals = StringMap() # <<<<<<<<<<<<<< @@ -24399,7 +24400,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_8Alphabet___cinit__(struct __pyx_obj_4cdec_2s __pyx_v_self->nonterminals = ((struct __pyx_obj_4cdec_2sa_3_sa_StringMap *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":15 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":15 * self.terminals = StringMap() * self.nonterminals = StringMap() * self.id2sym = {} # <<<<<<<<<<<<<< @@ -24414,7 +24415,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_8Alphabet___cinit__(struct __pyx_obj_4cdec_2s __pyx_v_self->id2sym = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":16 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":16 * self.nonterminals = StringMap() * self.id2sym = {} * self.first_nonterminal = -1 # <<<<<<<<<<<<<< @@ -24423,7 +24424,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_8Alphabet___cinit__(struct __pyx_obj_4cdec_2s */ __pyx_v_self->first_nonterminal = -1; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":12 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":12 * cdef dict id2sym * * def __cinit__(self): # <<<<<<<<<<<<<< @@ -24443,7 +24444,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_8Alphabet___cinit__(struct __pyx_obj_4cdec_2s return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":18 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":18 * self.first_nonterminal = -1 * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -24470,7 +24471,7 @@ static void __pyx_pf_4cdec_2sa_3_sa_8Alphabet_2__dealloc__(CYTHON_UNUSED struct __Pyx_RefNannyFinishContext(); } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":21 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":21 * pass * * cdef int isvar(self, int sym): # <<<<<<<<<<<<<< @@ -24483,7 +24484,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_isvar(CYTHON_UNUSED struct __pyx_obj __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("isvar", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":22 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":22 * * cdef int isvar(self, int sym): * return sym < 0 # <<<<<<<<<<<<<< @@ -24493,7 +24494,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_isvar(CYTHON_UNUSED struct __pyx_obj __pyx_r = (__pyx_v_sym < 0); goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":21 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":21 * pass * * cdef int isvar(self, int sym): # <<<<<<<<<<<<<< @@ -24507,7 +24508,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_isvar(CYTHON_UNUSED struct __pyx_obj return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":24 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":24 * return sym < 0 * * cdef int isword(self, int sym): # <<<<<<<<<<<<<< @@ -24520,7 +24521,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_isword(CYTHON_UNUSED struct __pyx_ob __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("isword", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":25 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":25 * * cdef int isword(self, int sym): * return sym >= 0 # <<<<<<<<<<<<<< @@ -24530,7 +24531,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_isword(CYTHON_UNUSED struct __pyx_ob __pyx_r = (__pyx_v_sym >= 0); goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":24 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":24 * return sym < 0 * * cdef int isword(self, int sym): # <<<<<<<<<<<<<< @@ -24544,7 +24545,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_isword(CYTHON_UNUSED struct __pyx_ob return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":27 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":27 * return sym >= 0 * * cdef int getindex(self, int sym): # <<<<<<<<<<<<<< @@ -24557,7 +24558,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_getindex(CYTHON_UNUSED struct __pyx_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getindex", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":28 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":28 * * cdef int getindex(self, int sym): * return -sym & INDEX_MASK # <<<<<<<<<<<<<< @@ -24567,7 +24568,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_getindex(CYTHON_UNUSED struct __pyx_ __pyx_r = ((-__pyx_v_sym) & __pyx_v_4cdec_2sa_3_sa_INDEX_MASK); goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":27 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":27 * return sym >= 0 * * cdef int getindex(self, int sym): # <<<<<<<<<<<<<< @@ -24581,7 +24582,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_getindex(CYTHON_UNUSED struct __pyx_ return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":30 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":30 * return -sym & INDEX_MASK * * cdef int setindex(self, int sym, int ind): # <<<<<<<<<<<<<< @@ -24594,7 +24595,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_setindex(CYTHON_UNUSED struct __pyx_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("setindex", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":31 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":31 * * cdef int setindex(self, int sym, int ind): * return -(-sym & ~INDEX_MASK | ind) # <<<<<<<<<<<<<< @@ -24604,7 +24605,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_setindex(CYTHON_UNUSED struct __pyx_ __pyx_r = (-(((-__pyx_v_sym) & (~__pyx_v_4cdec_2sa_3_sa_INDEX_MASK)) | __pyx_v_ind)); goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":30 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":30 * return -sym & INDEX_MASK * * cdef int setindex(self, int sym, int ind): # <<<<<<<<<<<<<< @@ -24618,7 +24619,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_setindex(CYTHON_UNUSED struct __pyx_ return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":33 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":33 * return -(-sym & ~INDEX_MASK | ind) * * cdef int clearindex(self, int sym): # <<<<<<<<<<<<<< @@ -24631,7 +24632,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_clearindex(CYTHON_UNUSED struct __py __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("clearindex", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":34 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":34 * * cdef int clearindex(self, int sym): * return -(-sym& ~INDEX_MASK) # <<<<<<<<<<<<<< @@ -24641,7 +24642,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_clearindex(CYTHON_UNUSED struct __py __pyx_r = (-((-__pyx_v_sym) & (~__pyx_v_4cdec_2sa_3_sa_INDEX_MASK))); goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":33 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":33 * return -(-sym & ~INDEX_MASK | ind) * * cdef int clearindex(self, int sym): # <<<<<<<<<<<<<< @@ -24655,7 +24656,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_clearindex(CYTHON_UNUSED struct __py return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":36 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":36 * return -(-sym& ~INDEX_MASK) * * cdef int match(self, int sym1, int sym2): # <<<<<<<<<<<<<< @@ -24668,7 +24669,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_match(struct __pyx_obj_4cdec_2sa_3_s __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("match", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":37 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":37 * * cdef int match(self, int sym1, int sym2): * return self.clearindex(sym1) == self.clearindex(sym2); # <<<<<<<<<<<<<< @@ -24678,7 +24679,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_match(struct __pyx_obj_4cdec_2sa_3_s __pyx_r = (((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Alphabet *)__pyx_v_self->__pyx_vtab)->clearindex(__pyx_v_self, __pyx_v_sym1) == ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Alphabet *)__pyx_v_self->__pyx_vtab)->clearindex(__pyx_v_self, __pyx_v_sym2)); goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":36 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":36 * return -(-sym& ~INDEX_MASK) * * cdef int match(self, int sym1, int sym2): # <<<<<<<<<<<<<< @@ -24692,7 +24693,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_match(struct __pyx_obj_4cdec_2sa_3_s return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":39 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":39 * return self.clearindex(sym1) == self.clearindex(sym2); * * cdef char* tocat(self, int sym): # <<<<<<<<<<<<<< @@ -24705,7 +24706,7 @@ static char *__pyx_f_4cdec_2sa_3_sa_8Alphabet_tocat(struct __pyx_obj_4cdec_2sa_3 __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("tocat", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":40 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":40 * * cdef char* tocat(self, int sym): * return self.nonterminals.word((-sym >> INDEX_SHIFT)-1) # <<<<<<<<<<<<<< @@ -24715,7 +24716,7 @@ static char *__pyx_f_4cdec_2sa_3_sa_8Alphabet_tocat(struct __pyx_obj_4cdec_2sa_3 __pyx_r = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_StringMap *)__pyx_v_self->nonterminals->__pyx_vtab)->word(__pyx_v_self->nonterminals, (((-__pyx_v_sym) >> __pyx_v_4cdec_2sa_3_sa_INDEX_SHIFT) - 1)); goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":39 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":39 * return self.clearindex(sym1) == self.clearindex(sym2); * * cdef char* tocat(self, int sym): # <<<<<<<<<<<<<< @@ -24729,7 +24730,7 @@ static char *__pyx_f_4cdec_2sa_3_sa_8Alphabet_tocat(struct __pyx_obj_4cdec_2sa_3 return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":42 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":42 * return self.nonterminals.word((-sym >> INDEX_SHIFT)-1) * * cdef int fromcat(self, char *s): # <<<<<<<<<<<<<< @@ -24744,7 +24745,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_fromcat(struct __pyx_obj_4cdec_2sa_3 int __pyx_t_1; __Pyx_RefNannySetupContext("fromcat", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":44 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":44 * cdef int fromcat(self, char *s): * cdef int i * i = self.nonterminals.index(s) # <<<<<<<<<<<<<< @@ -24753,7 +24754,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_fromcat(struct __pyx_obj_4cdec_2sa_3 */ __pyx_v_i = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_StringMap *)__pyx_v_self->nonterminals->__pyx_vtab)->index(__pyx_v_self->nonterminals, __pyx_v_s); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":45 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":45 * cdef int i * i = self.nonterminals.index(s) * if self.first_nonterminal == -1: # <<<<<<<<<<<<<< @@ -24763,7 +24764,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_fromcat(struct __pyx_obj_4cdec_2sa_3 __pyx_t_1 = ((__pyx_v_self->first_nonterminal == -1) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":46 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":46 * i = self.nonterminals.index(s) * if self.first_nonterminal == -1: * self.first_nonterminal = i # <<<<<<<<<<<<<< @@ -24775,7 +24776,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_fromcat(struct __pyx_obj_4cdec_2sa_3 } __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":47 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":47 * if self.first_nonterminal == -1: * self.first_nonterminal = i * if i > self.last_nonterminal: # <<<<<<<<<<<<<< @@ -24785,7 +24786,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_fromcat(struct __pyx_obj_4cdec_2sa_3 __pyx_t_1 = ((__pyx_v_i > __pyx_v_self->last_nonterminal) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":48 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":48 * self.first_nonterminal = i * if i > self.last_nonterminal: * self.last_nonterminal = i # <<<<<<<<<<<<<< @@ -24797,7 +24798,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_fromcat(struct __pyx_obj_4cdec_2sa_3 } __pyx_L4:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":49 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":49 * if i > self.last_nonterminal: * self.last_nonterminal = i * return -(i+1 << INDEX_SHIFT) # <<<<<<<<<<<<<< @@ -24807,7 +24808,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_fromcat(struct __pyx_obj_4cdec_2sa_3 __pyx_r = (-((__pyx_v_i + 1) << __pyx_v_4cdec_2sa_3_sa_INDEX_SHIFT)); goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":42 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":42 * return self.nonterminals.word((-sym >> INDEX_SHIFT)-1) * * cdef int fromcat(self, char *s): # <<<<<<<<<<<<<< @@ -24821,7 +24822,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_fromcat(struct __pyx_obj_4cdec_2sa_3 return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":51 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":51 * return -(i+1 << INDEX_SHIFT) * * cdef char* tostring(self, int sym): # <<<<<<<<<<<<<< @@ -24844,7 +24845,7 @@ static char *__pyx_f_4cdec_2sa_3_sa_8Alphabet_tostring(struct __pyx_obj_4cdec_2s int __pyx_clineno = 0; __Pyx_RefNannySetupContext("tostring", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":53 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":53 * cdef char* tostring(self, int sym): * cdef int ind * if self.isvar(sym): # <<<<<<<<<<<<<< @@ -24854,7 +24855,7 @@ static char *__pyx_f_4cdec_2sa_3_sa_8Alphabet_tostring(struct __pyx_obj_4cdec_2s __pyx_t_1 = (((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Alphabet *)__pyx_v_self->__pyx_vtab)->isvar(__pyx_v_self, __pyx_v_sym) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":54 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":54 * cdef int ind * if self.isvar(sym): * if sym in self.id2sym: # <<<<<<<<<<<<<< @@ -24872,7 +24873,7 @@ static char *__pyx_f_4cdec_2sa_3_sa_8Alphabet_tostring(struct __pyx_obj_4cdec_2s __pyx_t_3 = (__pyx_t_1 != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":55 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":55 * if self.isvar(sym): * if sym in self.id2sym: * return self.id2sym[sym] # <<<<<<<<<<<<<< @@ -24894,7 +24895,7 @@ static char *__pyx_f_4cdec_2sa_3_sa_8Alphabet_tostring(struct __pyx_obj_4cdec_2s goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":56 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":56 * if sym in self.id2sym: * return self.id2sym[sym] * ind = self.getindex(sym) # <<<<<<<<<<<<<< @@ -24903,7 +24904,7 @@ static char *__pyx_f_4cdec_2sa_3_sa_8Alphabet_tostring(struct __pyx_obj_4cdec_2s */ __pyx_v_ind = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Alphabet *)__pyx_v_self->__pyx_vtab)->getindex(__pyx_v_self, __pyx_v_sym); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":57 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":57 * return self.id2sym[sym] * ind = self.getindex(sym) * if ind > 0: # <<<<<<<<<<<<<< @@ -24913,7 +24914,7 @@ static char *__pyx_f_4cdec_2sa_3_sa_8Alphabet_tostring(struct __pyx_obj_4cdec_2s __pyx_t_3 = ((__pyx_v_ind > 0) != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":58 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":58 * ind = self.getindex(sym) * if ind > 0: * self.id2sym[sym] = "[%s,%d]" % (self.tocat(sym), ind) # <<<<<<<<<<<<<< @@ -24948,7 +24949,7 @@ static char *__pyx_f_4cdec_2sa_3_sa_8Alphabet_tostring(struct __pyx_obj_4cdec_2s } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":60 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":60 * self.id2sym[sym] = "[%s,%d]" % (self.tocat(sym), ind) * else: * self.id2sym[sym] = "[%s]" % self.tocat(sym) # <<<<<<<<<<<<<< @@ -24972,7 +24973,7 @@ static char *__pyx_f_4cdec_2sa_3_sa_8Alphabet_tostring(struct __pyx_obj_4cdec_2s } __pyx_L5:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":61 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":61 * else: * self.id2sym[sym] = "[%s]" % self.tocat(sym) * return self.id2sym[sym] # <<<<<<<<<<<<<< @@ -24995,7 +24996,7 @@ static char *__pyx_f_4cdec_2sa_3_sa_8Alphabet_tostring(struct __pyx_obj_4cdec_2s } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":63 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":63 * return self.id2sym[sym] * else: * return self.terminals.word(sym) # <<<<<<<<<<<<<< @@ -25006,7 +25007,7 @@ static char *__pyx_f_4cdec_2sa_3_sa_8Alphabet_tostring(struct __pyx_obj_4cdec_2s goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":51 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":51 * return -(i+1 << INDEX_SHIFT) * * cdef char* tostring(self, int sym): # <<<<<<<<<<<<<< @@ -25026,7 +25027,7 @@ static char *__pyx_f_4cdec_2sa_3_sa_8Alphabet_tostring(struct __pyx_obj_4cdec_2s return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":65 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":65 * return self.terminals.word(sym) * * cdef int fromstring(self, char *s, bint terminal): # <<<<<<<<<<<<<< @@ -25054,7 +25055,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_fromstring(struct __pyx_obj_4cdec_2s int __pyx_clineno = 0; __Pyx_RefNannySetupContext("fromstring", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":69 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":69 * cdef char *comma * cdef int n * n = strlen(s) # <<<<<<<<<<<<<< @@ -25063,7 +25064,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_fromstring(struct __pyx_obj_4cdec_2s */ __pyx_v_n = strlen(__pyx_v_s); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":71 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":71 * n = strlen(s) * cdef char *sep * sep = strstr(s,"_SEP_") # <<<<<<<<<<<<<< @@ -25072,7 +25073,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_fromstring(struct __pyx_obj_4cdec_2s */ __pyx_v_sep = strstr(__pyx_v_s, __pyx_k_SEP); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":72 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":72 * cdef char *sep * sep = strstr(s,"_SEP_") * if n >= 3 and s[0] == c'[' and s[n-1] == c']' and sep == NULL: # <<<<<<<<<<<<<< @@ -25100,7 +25101,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_fromstring(struct __pyx_obj_4cdec_2s } if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":73 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":73 * sep = strstr(s,"_SEP_") * if n >= 3 and s[0] == c'[' and s[n-1] == c']' and sep == NULL: * if terminal: # <<<<<<<<<<<<<< @@ -25110,7 +25111,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_fromstring(struct __pyx_obj_4cdec_2s __pyx_t_2 = (__pyx_v_terminal != 0); if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":74 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":74 * if n >= 3 and s[0] == c'[' and s[n-1] == c']' and sep == NULL: * if terminal: * s1 = "\\"+s # <<<<<<<<<<<<<< @@ -25125,7 +25126,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_fromstring(struct __pyx_obj_4cdec_2s __pyx_v_s1 = __pyx_t_7; __pyx_t_7 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":75 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":75 * if terminal: * s1 = "\\"+s * return self.terminals.index(s1) # <<<<<<<<<<<<<< @@ -25137,7 +25138,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_fromstring(struct __pyx_obj_4cdec_2s goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":76 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":76 * s1 = "\\"+s * return self.terminals.index(s1) * s[n-1] = c'\0' # <<<<<<<<<<<<<< @@ -25146,7 +25147,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_fromstring(struct __pyx_obj_4cdec_2s */ (__pyx_v_s[(__pyx_v_n - 1)]) = '\x00'; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":77 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":77 * return self.terminals.index(s1) * s[n-1] = c'\0' * s = s + 1 # <<<<<<<<<<<<<< @@ -25155,7 +25156,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_fromstring(struct __pyx_obj_4cdec_2s */ __pyx_v_s = (__pyx_v_s + 1); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":78 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":78 * s[n-1] = c'\0' * s = s + 1 * comma = strrchr(s, c',') # <<<<<<<<<<<<<< @@ -25164,7 +25165,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_fromstring(struct __pyx_obj_4cdec_2s */ __pyx_v_comma = strrchr(__pyx_v_s, ','); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":79 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":79 * s = s + 1 * comma = strrchr(s, c',') * if comma != NULL: # <<<<<<<<<<<<<< @@ -25174,7 +25175,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_fromstring(struct __pyx_obj_4cdec_2s __pyx_t_2 = ((__pyx_v_comma != NULL) != 0); if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":80 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":80 * comma = strrchr(s, c',') * if comma != NULL: * comma[0] = c'\0' # <<<<<<<<<<<<<< @@ -25183,7 +25184,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_fromstring(struct __pyx_obj_4cdec_2s */ (__pyx_v_comma[0]) = '\x00'; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":81 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":81 * if comma != NULL: * comma[0] = c'\0' * return self.setindex(self.fromcat(s), strtol(comma+1, NULL, 10)) # <<<<<<<<<<<<<< @@ -25195,7 +25196,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_fromstring(struct __pyx_obj_4cdec_2s } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":83 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":83 * return self.setindex(self.fromcat(s), strtol(comma+1, NULL, 10)) * else: * return self.fromcat(s) # <<<<<<<<<<<<<< @@ -25208,7 +25209,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_fromstring(struct __pyx_obj_4cdec_2s } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":85 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":85 * return self.fromcat(s) * else: * return self.terminals.index(s) # <<<<<<<<<<<<<< @@ -25219,7 +25220,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_fromstring(struct __pyx_obj_4cdec_2s goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":65 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":65 * return self.terminals.word(sym) * * cdef int fromstring(self, char *s, bint terminal): # <<<<<<<<<<<<<< @@ -25239,7 +25240,7 @@ static int __pyx_f_4cdec_2sa_3_sa_8Alphabet_fromstring(struct __pyx_obj_4cdec_2s return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":8 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":8 * * cdef class Alphabet: * cdef readonly StringMap terminals, nonterminals # <<<<<<<<<<<<<< @@ -25305,7 +25306,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_8Alphabet_12nonterminals___get__(struct return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":89 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":89 * cdef Alphabet ALPHABET = Alphabet() * * cdef char* sym_tostring(int sym): # <<<<<<<<<<<<<< @@ -25318,7 +25319,7 @@ static char *__pyx_f_4cdec_2sa_3_sa_sym_tostring(int __pyx_v_sym) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sym_tostring", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":90 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":90 * * cdef char* sym_tostring(int sym): * return ALPHABET.tostring(sym) # <<<<<<<<<<<<<< @@ -25328,7 +25329,7 @@ static char *__pyx_f_4cdec_2sa_3_sa_sym_tostring(int __pyx_v_sym) { __pyx_r = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Alphabet *)__pyx_v_4cdec_2sa_3_sa_ALPHABET->__pyx_vtab)->tostring(__pyx_v_4cdec_2sa_3_sa_ALPHABET, __pyx_v_sym); goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":89 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":89 * cdef Alphabet ALPHABET = Alphabet() * * cdef char* sym_tostring(int sym): # <<<<<<<<<<<<<< @@ -25342,7 +25343,7 @@ static char *__pyx_f_4cdec_2sa_3_sa_sym_tostring(int __pyx_v_sym) { return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":92 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":92 * return ALPHABET.tostring(sym) * * cdef char* sym_tocat(int sym): # <<<<<<<<<<<<<< @@ -25355,7 +25356,7 @@ static char *__pyx_f_4cdec_2sa_3_sa_sym_tocat(int __pyx_v_sym) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sym_tocat", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":93 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":93 * * cdef char* sym_tocat(int sym): * return ALPHABET.tocat(sym) # <<<<<<<<<<<<<< @@ -25365,7 +25366,7 @@ static char *__pyx_f_4cdec_2sa_3_sa_sym_tocat(int __pyx_v_sym) { __pyx_r = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Alphabet *)__pyx_v_4cdec_2sa_3_sa_ALPHABET->__pyx_vtab)->tocat(__pyx_v_4cdec_2sa_3_sa_ALPHABET, __pyx_v_sym); goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":92 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":92 * return ALPHABET.tostring(sym) * * cdef char* sym_tocat(int sym): # <<<<<<<<<<<<<< @@ -25379,7 +25380,7 @@ static char *__pyx_f_4cdec_2sa_3_sa_sym_tocat(int __pyx_v_sym) { return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":95 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":95 * return ALPHABET.tocat(sym) * * cdef int sym_isvar(int sym): # <<<<<<<<<<<<<< @@ -25392,7 +25393,7 @@ static int __pyx_f_4cdec_2sa_3_sa_sym_isvar(int __pyx_v_sym) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sym_isvar", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":96 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":96 * * cdef int sym_isvar(int sym): * return ALPHABET.isvar(sym) # <<<<<<<<<<<<<< @@ -25402,7 +25403,7 @@ static int __pyx_f_4cdec_2sa_3_sa_sym_isvar(int __pyx_v_sym) { __pyx_r = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Alphabet *)__pyx_v_4cdec_2sa_3_sa_ALPHABET->__pyx_vtab)->isvar(__pyx_v_4cdec_2sa_3_sa_ALPHABET, __pyx_v_sym); goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":95 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":95 * return ALPHABET.tocat(sym) * * cdef int sym_isvar(int sym): # <<<<<<<<<<<<<< @@ -25416,7 +25417,7 @@ static int __pyx_f_4cdec_2sa_3_sa_sym_isvar(int __pyx_v_sym) { return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":98 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":98 * return ALPHABET.isvar(sym) * * cdef int sym_getindex(int sym): # <<<<<<<<<<<<<< @@ -25429,7 +25430,7 @@ static int __pyx_f_4cdec_2sa_3_sa_sym_getindex(int __pyx_v_sym) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sym_getindex", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":99 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":99 * * cdef int sym_getindex(int sym): * return ALPHABET.getindex(sym) # <<<<<<<<<<<<<< @@ -25439,7 +25440,7 @@ static int __pyx_f_4cdec_2sa_3_sa_sym_getindex(int __pyx_v_sym) { __pyx_r = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Alphabet *)__pyx_v_4cdec_2sa_3_sa_ALPHABET->__pyx_vtab)->getindex(__pyx_v_4cdec_2sa_3_sa_ALPHABET, __pyx_v_sym); goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":98 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":98 * return ALPHABET.isvar(sym) * * cdef int sym_getindex(int sym): # <<<<<<<<<<<<<< @@ -25453,7 +25454,7 @@ static int __pyx_f_4cdec_2sa_3_sa_sym_getindex(int __pyx_v_sym) { return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":101 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":101 * return ALPHABET.getindex(sym) * * cdef int sym_setindex(int sym, int id): # <<<<<<<<<<<<<< @@ -25466,7 +25467,7 @@ static int __pyx_f_4cdec_2sa_3_sa_sym_setindex(int __pyx_v_sym, int __pyx_v_id) __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sym_setindex", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":102 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":102 * * cdef int sym_setindex(int sym, int id): * return ALPHABET.setindex(sym, id) # <<<<<<<<<<<<<< @@ -25476,7 +25477,7 @@ static int __pyx_f_4cdec_2sa_3_sa_sym_setindex(int __pyx_v_sym, int __pyx_v_id) __pyx_r = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Alphabet *)__pyx_v_4cdec_2sa_3_sa_ALPHABET->__pyx_vtab)->setindex(__pyx_v_4cdec_2sa_3_sa_ALPHABET, __pyx_v_sym, __pyx_v_id); goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":101 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":101 * return ALPHABET.getindex(sym) * * cdef int sym_setindex(int sym, int id): # <<<<<<<<<<<<<< @@ -25490,7 +25491,7 @@ static int __pyx_f_4cdec_2sa_3_sa_sym_setindex(int __pyx_v_sym, int __pyx_v_id) return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":104 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":104 * return ALPHABET.setindex(sym, id) * * cdef int sym_fromstring(char* string, bint terminal): # <<<<<<<<<<<<<< @@ -25503,7 +25504,7 @@ static int __pyx_f_4cdec_2sa_3_sa_sym_fromstring(char *__pyx_v_string, int __pyx __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sym_fromstring", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":105 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":105 * * cdef int sym_fromstring(char* string, bint terminal): * return ALPHABET.fromstring(string, terminal) # <<<<<<<<<<<<<< @@ -25513,7 +25514,7 @@ static int __pyx_f_4cdec_2sa_3_sa_sym_fromstring(char *__pyx_v_string, int __pyx __pyx_r = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Alphabet *)__pyx_v_4cdec_2sa_3_sa_ALPHABET->__pyx_vtab)->fromstring(__pyx_v_4cdec_2sa_3_sa_ALPHABET, __pyx_v_string, __pyx_v_terminal); goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":104 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":104 * return ALPHABET.setindex(sym, id) * * cdef int sym_fromstring(char* string, bint terminal): # <<<<<<<<<<<<<< @@ -25527,7 +25528,7 @@ static int __pyx_f_4cdec_2sa_3_sa_sym_fromstring(char *__pyx_v_string, int __pyx return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":107 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":107 * return ALPHABET.fromstring(string, terminal) * * def isvar(sym): # <<<<<<<<<<<<<< @@ -25559,7 +25560,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_4isvar(CYTHON_UNUSED PyObject *__pyx_se int __pyx_clineno = 0; __Pyx_RefNannySetupContext("isvar", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":108 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":108 * * def isvar(sym): * return sym_isvar(sym) # <<<<<<<<<<<<<< @@ -25574,7 +25575,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_4isvar(CYTHON_UNUSED PyObject *__pyx_se __pyx_t_2 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":107 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":107 * return ALPHABET.fromstring(string, terminal) * * def isvar(sym): # <<<<<<<<<<<<<< @@ -25593,7 +25594,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_4isvar(CYTHON_UNUSED PyObject *__pyx_se return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":110 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":110 * return sym_isvar(sym) * * def make_lattice(words): # <<<<<<<<<<<<<< @@ -25616,7 +25617,7 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_7make_lattice(PyObject *__pyx_self, PyO } static PyObject *__pyx_gb_4cdec_2sa_3_sa_12make_lattice_2generator7(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":111 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":111 * * def make_lattice(words): * word_ids = (sym_fromstring(word, True) for word in words) # <<<<<<<<<<<<<< @@ -25764,7 +25765,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_12make_lattice_2generator7(__pyx_Genera } static PyObject *__pyx_gb_4cdec_2sa_3_sa_12make_lattice_5generator8(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":112 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":112 * def make_lattice(words): * word_ids = (sym_fromstring(word, True) for word in words) * return tuple(((word, None, 1), ) for word in word_ids) # <<<<<<<<<<<<<< @@ -25925,7 +25926,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_12make_lattice_5generator8(__pyx_Genera return NULL; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":110 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":110 * return sym_isvar(sym) * * def make_lattice(words): # <<<<<<<<<<<<<< @@ -25953,7 +25954,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6make_lattice(CYTHON_UNUSED PyObject *_ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_words); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_words); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":111 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":111 * * def make_lattice(words): * word_ids = (sym_fromstring(word, True) for word in words) # <<<<<<<<<<<<<< @@ -25966,7 +25967,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6make_lattice(CYTHON_UNUSED PyObject *_ __pyx_cur_scope->__pyx_v_word_ids = __pyx_t_1; __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":112 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":112 * def make_lattice(words): * word_ids = (sym_fromstring(word, True) for word in words) * return tuple(((word, None, 1), ) for word in word_ids) # <<<<<<<<<<<<<< @@ -25988,7 +25989,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6make_lattice(CYTHON_UNUSED PyObject *_ __pyx_t_1 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":110 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":110 * return sym_isvar(sym) * * def make_lattice(words): # <<<<<<<<<<<<<< @@ -26009,7 +26010,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6make_lattice(CYTHON_UNUSED PyObject *_ return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":114 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":114 * return tuple(((word, None, 1), ) for word in word_ids) * * def decode_lattice(lattice): # <<<<<<<<<<<<<< @@ -26032,7 +26033,7 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_9decode_lattice(PyObject *__pyx_self, P } static PyObject *__pyx_gb_4cdec_2sa_3_sa_14decode_lattice_2generator9(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":115 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":115 * * def decode_lattice(lattice): * return tuple((sym_tostring(sym), weight, dist) for (sym, weight, dist) in arc # <<<<<<<<<<<<<< @@ -26110,7 +26111,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_14decode_lattice_2generator9(__pyx_Gene __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":116 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":116 * def decode_lattice(lattice): * return tuple((sym_tostring(sym), weight, dist) for (sym, weight, dist) in arc * for arc in node for node in lattice) # <<<<<<<<<<<<<< @@ -26119,7 +26120,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_14decode_lattice_2generator9(__pyx_Gene */ if (unlikely(!__pyx_cur_scope->__pyx_v_arc)) { __Pyx_RaiseUnboundLocalError("arc"); {__pyx_filename = __pyx_f[10]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":115 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":115 * * def decode_lattice(lattice): * return tuple((sym_tostring(sym), weight, dist) for (sym, weight, dist) in arc # <<<<<<<<<<<<<< @@ -26231,7 +26232,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_14decode_lattice_2generator9(__pyx_Gene __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":116 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":116 * def decode_lattice(lattice): * return tuple((sym_tostring(sym), weight, dist) for (sym, weight, dist) in arc * for arc in node for node in lattice) # <<<<<<<<<<<<<< @@ -26319,7 +26320,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_14decode_lattice_2generator9(__pyx_Gene __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":115 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":115 * * def decode_lattice(lattice): * return tuple((sym_tostring(sym), weight, dist) for (sym, weight, dist) in arc # <<<<<<<<<<<<<< @@ -26402,7 +26403,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_14decode_lattice_2generator9(__pyx_Gene return NULL; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":114 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":114 * return tuple(((word, None, 1), ) for word in word_ids) * * def decode_lattice(lattice): # <<<<<<<<<<<<<< @@ -26430,7 +26431,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_8decode_lattice(CYTHON_UNUSED PyObject __Pyx_INCREF(__pyx_cur_scope->__pyx_v_lattice); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_lattice); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":115 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":115 * * def decode_lattice(lattice): * return tuple((sym_tostring(sym), weight, dist) for (sym, weight, dist) in arc # <<<<<<<<<<<<<< @@ -26452,7 +26453,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_8decode_lattice(CYTHON_UNUSED PyObject __pyx_t_1 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":114 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":114 * return tuple(((word, None, 1), ) for word in word_ids) * * def decode_lattice(lattice): # <<<<<<<<<<<<<< @@ -26473,7 +26474,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_8decode_lattice(CYTHON_UNUSED PyObject return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":118 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":118 * for arc in node for node in lattice) * * def decode_sentence(lattice): # <<<<<<<<<<<<<< @@ -26496,7 +26497,7 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_11decode_sentence(PyObject *__pyx_self, } static PyObject *__pyx_gb_4cdec_2sa_3_sa_15decode_sentence_2generator10(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":119 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":119 * * def decode_sentence(lattice): * return tuple(sym_tostring(sym) for ((sym, _, _),) in lattice) # <<<<<<<<<<<<<< @@ -26762,7 +26763,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_15decode_sentence_2generator10(__pyx_Ge return NULL; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":118 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":118 * for arc in node for node in lattice) * * def decode_sentence(lattice): # <<<<<<<<<<<<<< @@ -26790,7 +26791,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_10decode_sentence(CYTHON_UNUSED PyObjec __Pyx_INCREF(__pyx_cur_scope->__pyx_v_lattice); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_lattice); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":119 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":119 * * def decode_sentence(lattice): * return tuple(sym_tostring(sym) for ((sym, _, _),) in lattice) # <<<<<<<<<<<<<< @@ -26812,7 +26813,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_10decode_sentence(CYTHON_UNUSED PyObjec __pyx_t_1 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":118 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":118 * for arc in node for node in lattice) * * def decode_sentence(lattice): # <<<<<<<<<<<<<< @@ -26833,7 +26834,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_10decode_sentence(CYTHON_UNUSED PyObjec return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":121 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":121 * return tuple(sym_tostring(sym) for ((sym, _, _),) in lattice) * * def encode_words(words): # <<<<<<<<<<<<<< @@ -26856,7 +26857,7 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_13encode_words(PyObject *__pyx_self, Py } static PyObject *__pyx_gb_4cdec_2sa_3_sa_12encode_words_2generator11(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":122 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":122 * * def encode_words(words): * return tuple(sym_fromstring(word, True) for word in words) # <<<<<<<<<<<<<< @@ -27003,7 +27004,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_12encode_words_2generator11(__pyx_Gener return NULL; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":121 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":121 * return tuple(sym_tostring(sym) for ((sym, _, _),) in lattice) * * def encode_words(words): # <<<<<<<<<<<<<< @@ -27031,7 +27032,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_12encode_words(CYTHON_UNUSED PyObject * __Pyx_INCREF(__pyx_cur_scope->__pyx_v_words); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_words); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":122 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":122 * * def encode_words(words): * return tuple(sym_fromstring(word, True) for word in words) # <<<<<<<<<<<<<< @@ -27053,7 +27054,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_12encode_words(CYTHON_UNUSED PyObject * __pyx_t_1 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":121 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":121 * return tuple(sym_tostring(sym) for ((sym, _, _),) in lattice) * * def encode_words(words): # <<<<<<<<<<<<<< @@ -27074,7 +27075,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_12encode_words(CYTHON_UNUSED PyObject * return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":124 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":124 * return tuple(sym_fromstring(word, True) for word in words) * * def decode_words(syms): # <<<<<<<<<<<<<< @@ -27096,7 +27097,7 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_15decode_words(PyObject *__pyx_self, Py } static PyObject *__pyx_gb_4cdec_2sa_3_sa_12decode_words_2generator12(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":125 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":125 * * def decode_words(syms): * return tuple(sym_tostring(sym) for sym in syms) # <<<<<<<<<<<<<< @@ -27241,7 +27242,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_12decode_words_2generator12(__pyx_Gener return NULL; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":124 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":124 * return tuple(sym_fromstring(word, True) for word in words) * * def decode_words(syms): # <<<<<<<<<<<<<< @@ -27268,7 +27269,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14decode_words(CYTHON_UNUSED PyObject * __Pyx_INCREF(__pyx_cur_scope->__pyx_v_syms); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_syms); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":125 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":125 * * def decode_words(syms): * return tuple(sym_tostring(sym) for sym in syms) # <<<<<<<<<<<<<< @@ -27288,7 +27289,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14decode_words(CYTHON_UNUSED PyObject * __pyx_t_1 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":124 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":124 * return tuple(sym_fromstring(word, True) for word in words) * * def decode_words(syms): # <<<<<<<<<<<<<< @@ -27308,7 +27309,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14decode_words(CYTHON_UNUSED PyObject * return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":6 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":6 * cdef class Phrase: * * def __cinit__(self, words): # <<<<<<<<<<<<<< @@ -27385,7 +27386,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Phrase___cinit__(struct __pyx_obj_4cdec_2sa_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":8 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":8 * def __cinit__(self, words): * cdef int i, j, n, n_vars * n_vars = 0 # <<<<<<<<<<<<<< @@ -27394,7 +27395,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Phrase___cinit__(struct __pyx_obj_4cdec_2sa_ */ __pyx_v_n_vars = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":9 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":9 * cdef int i, j, n, n_vars * n_vars = 0 * n = len(words) # <<<<<<<<<<<<<< @@ -27404,7 +27405,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Phrase___cinit__(struct __pyx_obj_4cdec_2sa_ __pyx_t_1 = PyObject_Length(__pyx_v_words); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_n = __pyx_t_1; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":10 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":10 * n_vars = 0 * n = len(words) * self.syms = malloc(n*sizeof(int)) # <<<<<<<<<<<<<< @@ -27413,7 +27414,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Phrase___cinit__(struct __pyx_obj_4cdec_2sa_ */ __pyx_v_self->syms = ((int *)malloc((__pyx_v_n * (sizeof(int))))); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":11 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":11 * n = len(words) * self.syms = malloc(n*sizeof(int)) * for i from 0 <= i < n: # <<<<<<<<<<<<<< @@ -27423,7 +27424,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Phrase___cinit__(struct __pyx_obj_4cdec_2sa_ __pyx_t_2 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":12 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":12 * self.syms = malloc(n*sizeof(int)) * for i from 0 <= i < n: * self.syms[i] = words[i] # <<<<<<<<<<<<<< @@ -27436,7 +27437,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Phrase___cinit__(struct __pyx_obj_4cdec_2sa_ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; (__pyx_v_self->syms[__pyx_v_i]) = __pyx_t_4; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":13 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":13 * for i from 0 <= i < n: * self.syms[i] = words[i] * if sym_isvar(self.syms[i]): # <<<<<<<<<<<<<< @@ -27446,7 +27447,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Phrase___cinit__(struct __pyx_obj_4cdec_2sa_ __pyx_t_5 = (__pyx_f_4cdec_2sa_3_sa_sym_isvar((__pyx_v_self->syms[__pyx_v_i])) != 0); if (__pyx_t_5) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":14 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":14 * self.syms[i] = words[i] * if sym_isvar(self.syms[i]): * n_vars += 1 # <<<<<<<<<<<<<< @@ -27459,7 +27460,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Phrase___cinit__(struct __pyx_obj_4cdec_2sa_ __pyx_L5:; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":15 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":15 * if sym_isvar(self.syms[i]): * n_vars += 1 * self.n = n # <<<<<<<<<<<<<< @@ -27468,7 +27469,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Phrase___cinit__(struct __pyx_obj_4cdec_2sa_ */ __pyx_v_self->n = __pyx_v_n; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":16 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":16 * n_vars += 1 * self.n = n * self.n_vars = n_vars # <<<<<<<<<<<<<< @@ -27477,7 +27478,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Phrase___cinit__(struct __pyx_obj_4cdec_2sa_ */ __pyx_v_self->n_vars = __pyx_v_n_vars; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":17 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":17 * self.n = n * self.n_vars = n_vars * self.varpos = malloc(n_vars*sizeof(int)) # <<<<<<<<<<<<<< @@ -27486,7 +27487,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Phrase___cinit__(struct __pyx_obj_4cdec_2sa_ */ __pyx_v_self->varpos = ((int *)malloc((__pyx_v_n_vars * (sizeof(int))))); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":18 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":18 * self.n_vars = n_vars * self.varpos = malloc(n_vars*sizeof(int)) * j = 0 # <<<<<<<<<<<<<< @@ -27495,7 +27496,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Phrase___cinit__(struct __pyx_obj_4cdec_2sa_ */ __pyx_v_j = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":19 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":19 * self.varpos = malloc(n_vars*sizeof(int)) * j = 0 * for i from 0 <= i < n: # <<<<<<<<<<<<<< @@ -27505,7 +27506,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Phrase___cinit__(struct __pyx_obj_4cdec_2sa_ __pyx_t_2 = __pyx_v_n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":20 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":20 * j = 0 * for i from 0 <= i < n: * if sym_isvar(self.syms[i]): # <<<<<<<<<<<<<< @@ -27515,7 +27516,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Phrase___cinit__(struct __pyx_obj_4cdec_2sa_ __pyx_t_5 = (__pyx_f_4cdec_2sa_3_sa_sym_isvar((__pyx_v_self->syms[__pyx_v_i])) != 0); if (__pyx_t_5) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":21 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":21 * for i from 0 <= i < n: * if sym_isvar(self.syms[i]): * self.varpos[j] = i # <<<<<<<<<<<<<< @@ -27524,7 +27525,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Phrase___cinit__(struct __pyx_obj_4cdec_2sa_ */ (__pyx_v_self->varpos[__pyx_v_j]) = __pyx_v_i; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":22 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":22 * if sym_isvar(self.syms[i]): * self.varpos[j] = i * j = j + 1 # <<<<<<<<<<<<<< @@ -27537,7 +27538,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Phrase___cinit__(struct __pyx_obj_4cdec_2sa_ __pyx_L8:; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":6 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":6 * cdef class Phrase: * * def __cinit__(self, words): # <<<<<<<<<<<<<< @@ -27557,7 +27558,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Phrase___cinit__(struct __pyx_obj_4cdec_2sa_ return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":24 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":24 * j = j + 1 * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -27580,7 +27581,7 @@ static void __pyx_pf_4cdec_2sa_3_sa_6Phrase_2__dealloc__(struct __pyx_obj_4cdec_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":25 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":25 * * def __dealloc__(self): * free(self.syms) # <<<<<<<<<<<<<< @@ -27589,7 +27590,7 @@ static void __pyx_pf_4cdec_2sa_3_sa_6Phrase_2__dealloc__(struct __pyx_obj_4cdec_ */ free(__pyx_v_self->syms); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":26 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":26 * def __dealloc__(self): * free(self.syms) * free(self.varpos) # <<<<<<<<<<<<<< @@ -27598,7 +27599,7 @@ static void __pyx_pf_4cdec_2sa_3_sa_6Phrase_2__dealloc__(struct __pyx_obj_4cdec_ */ free(__pyx_v_self->varpos); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":24 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":24 * j = j + 1 * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -27610,7 +27611,7 @@ static void __pyx_pf_4cdec_2sa_3_sa_6Phrase_2__dealloc__(struct __pyx_obj_4cdec_ __Pyx_RefNannyFinishContext(); } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":28 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":28 * free(self.varpos) * * def __str__(self): # <<<<<<<<<<<<<< @@ -27645,7 +27646,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_4__str__(struct __pyx_obj_4cdec int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__str__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":29 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":29 * * def __str__(self): * strs = [] # <<<<<<<<<<<<<< @@ -27657,7 +27658,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_4__str__(struct __pyx_obj_4cdec __pyx_v_strs = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":31 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":31 * strs = [] * cdef int i, s * for i from 0 <= i < self.n: # <<<<<<<<<<<<<< @@ -27667,7 +27668,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_4__str__(struct __pyx_obj_4cdec __pyx_t_2 = __pyx_v_self->n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":32 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":32 * cdef int i, s * for i from 0 <= i < self.n: * s = self.syms[i] # <<<<<<<<<<<<<< @@ -27676,7 +27677,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_4__str__(struct __pyx_obj_4cdec */ __pyx_v_s = (__pyx_v_self->syms[__pyx_v_i]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":33 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":33 * for i from 0 <= i < self.n: * s = self.syms[i] * strs.append(sym_tostring(s)) # <<<<<<<<<<<<<< @@ -27689,7 +27690,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_4__str__(struct __pyx_obj_4cdec __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":34 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":34 * s = self.syms[i] * strs.append(sym_tostring(s)) * return ' '.join(strs) # <<<<<<<<<<<<<< @@ -27703,7 +27704,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_4__str__(struct __pyx_obj_4cdec __pyx_t_1 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":28 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":28 * free(self.varpos) * * def __str__(self): # <<<<<<<<<<<<<< @@ -27723,7 +27724,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_4__str__(struct __pyx_obj_4cdec return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":36 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":36 * return ' '.join(strs) * * def handle(self): # <<<<<<<<<<<<<< @@ -27761,7 +27762,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_6handle(struct __pyx_obj_4cdec_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("handle", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":39 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":39 * """return a hashable representation that normalizes the ordering * of the nonterminal indices""" * norm = [] # <<<<<<<<<<<<<< @@ -27773,7 +27774,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_6handle(struct __pyx_obj_4cdec_ __pyx_v_norm = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":41 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":41 * norm = [] * cdef int i, j, s * i = 1 # <<<<<<<<<<<<<< @@ -27782,7 +27783,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_6handle(struct __pyx_obj_4cdec_ */ __pyx_v_i = 1; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":42 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":42 * cdef int i, j, s * i = 1 * j = 0 # <<<<<<<<<<<<<< @@ -27791,7 +27792,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_6handle(struct __pyx_obj_4cdec_ */ __pyx_v_j = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":43 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":43 * i = 1 * j = 0 * for j from 0 <= j < self.n: # <<<<<<<<<<<<<< @@ -27801,7 +27802,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_6handle(struct __pyx_obj_4cdec_ __pyx_t_2 = __pyx_v_self->n; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_2; __pyx_v_j++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":44 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":44 * j = 0 * for j from 0 <= j < self.n: * s = self.syms[j] # <<<<<<<<<<<<<< @@ -27810,7 +27811,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_6handle(struct __pyx_obj_4cdec_ */ __pyx_v_s = (__pyx_v_self->syms[__pyx_v_j]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":45 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":45 * for j from 0 <= j < self.n: * s = self.syms[j] * if sym_isvar(s): # <<<<<<<<<<<<<< @@ -27820,7 +27821,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_6handle(struct __pyx_obj_4cdec_ __pyx_t_3 = (__pyx_f_4cdec_2sa_3_sa_sym_isvar(__pyx_v_s) != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":46 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":46 * s = self.syms[j] * if sym_isvar(s): * s = sym_setindex(s,i) # <<<<<<<<<<<<<< @@ -27829,7 +27830,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_6handle(struct __pyx_obj_4cdec_ */ __pyx_v_s = __pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_s, __pyx_v_i); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":47 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":47 * if sym_isvar(s): * s = sym_setindex(s,i) * i = i + 1 # <<<<<<<<<<<<<< @@ -27841,7 +27842,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_6handle(struct __pyx_obj_4cdec_ } __pyx_L5:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":48 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":48 * s = sym_setindex(s,i) * i = i + 1 * norm.append(s) # <<<<<<<<<<<<<< @@ -27854,7 +27855,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_6handle(struct __pyx_obj_4cdec_ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":49 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":49 * i = i + 1 * norm.append(s) * return tuple(norm) # <<<<<<<<<<<<<< @@ -27868,7 +27869,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_6handle(struct __pyx_obj_4cdec_ __pyx_t_1 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":36 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":36 * return ' '.join(strs) * * def handle(self): # <<<<<<<<<<<<<< @@ -27888,7 +27889,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_6handle(struct __pyx_obj_4cdec_ return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":51 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":51 * return tuple(norm) * * def strhandle(self): # <<<<<<<<<<<<<< @@ -27925,7 +27926,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_8strhandle(struct __pyx_obj_4cd int __pyx_clineno = 0; __Pyx_RefNannySetupContext("strhandle", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":52 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":52 * * def strhandle(self): * norm = [] # <<<<<<<<<<<<<< @@ -27937,7 +27938,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_8strhandle(struct __pyx_obj_4cd __pyx_v_norm = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":54 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":54 * norm = [] * cdef int i, j, s * i = 1 # <<<<<<<<<<<<<< @@ -27946,7 +27947,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_8strhandle(struct __pyx_obj_4cd */ __pyx_v_i = 1; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":55 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":55 * cdef int i, j, s * i = 1 * j = 0 # <<<<<<<<<<<<<< @@ -27955,7 +27956,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_8strhandle(struct __pyx_obj_4cd */ __pyx_v_j = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":56 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":56 * i = 1 * j = 0 * for j from 0 <= j < self.n: # <<<<<<<<<<<<<< @@ -27965,7 +27966,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_8strhandle(struct __pyx_obj_4cd __pyx_t_2 = __pyx_v_self->n; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_2; __pyx_v_j++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":57 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":57 * j = 0 * for j from 0 <= j < self.n: * s = self.syms[j] # <<<<<<<<<<<<<< @@ -27974,7 +27975,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_8strhandle(struct __pyx_obj_4cd */ __pyx_v_s = (__pyx_v_self->syms[__pyx_v_j]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":58 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":58 * for j from 0 <= j < self.n: * s = self.syms[j] * if sym_isvar(s): # <<<<<<<<<<<<<< @@ -27984,7 +27985,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_8strhandle(struct __pyx_obj_4cd __pyx_t_3 = (__pyx_f_4cdec_2sa_3_sa_sym_isvar(__pyx_v_s) != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":59 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":59 * s = self.syms[j] * if sym_isvar(s): * s = sym_setindex(s,i) # <<<<<<<<<<<<<< @@ -27993,7 +27994,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_8strhandle(struct __pyx_obj_4cd */ __pyx_v_s = __pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_s, __pyx_v_i); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":60 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":60 * if sym_isvar(s): * s = sym_setindex(s,i) * i = i + 1 # <<<<<<<<<<<<<< @@ -28005,7 +28006,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_8strhandle(struct __pyx_obj_4cd } __pyx_L5:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":61 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":61 * s = sym_setindex(s,i) * i = i + 1 * norm.append(sym_tostring(s)) # <<<<<<<<<<<<<< @@ -28018,7 +28019,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_8strhandle(struct __pyx_obj_4cd __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":62 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":62 * i = i + 1 * norm.append(sym_tostring(s)) * return ' '.join(norm) # <<<<<<<<<<<<<< @@ -28032,7 +28033,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_8strhandle(struct __pyx_obj_4cd __pyx_t_1 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":51 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":51 * return tuple(norm) * * def strhandle(self): # <<<<<<<<<<<<<< @@ -28052,7 +28053,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_8strhandle(struct __pyx_obj_4cd return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":64 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":64 * return ' '.join(norm) * * def arity(self): # <<<<<<<<<<<<<< @@ -28082,7 +28083,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_10arity(struct __pyx_obj_4cdec_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("arity", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":65 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":65 * * def arity(self): * return self.n_vars # <<<<<<<<<<<<<< @@ -28096,7 +28097,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_10arity(struct __pyx_obj_4cdec_ __pyx_t_1 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":64 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":64 * return ' '.join(norm) * * def arity(self): # <<<<<<<<<<<<<< @@ -28115,7 +28116,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_10arity(struct __pyx_obj_4cdec_ return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":67 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":67 * return self.n_vars * * def getvarpos(self, i): # <<<<<<<<<<<<<< @@ -28148,7 +28149,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_12getvarpos(struct __pyx_obj_4c int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getvarpos", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":68 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":68 * * def getvarpos(self, i): * if 0 <= i < self.n_vars: # <<<<<<<<<<<<<< @@ -28167,7 +28168,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_12getvarpos(struct __pyx_obj_4c __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":69 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":69 * def getvarpos(self, i): * if 0 <= i < self.n_vars: * return self.varpos[i] # <<<<<<<<<<<<<< @@ -28184,7 +28185,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_12getvarpos(struct __pyx_obj_4c } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":71 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":71 * return self.varpos[i] * else: * raise IndexError # <<<<<<<<<<<<<< @@ -28195,7 +28196,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_12getvarpos(struct __pyx_obj_4c {__pyx_filename = __pyx_f[7]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":67 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":67 * return self.n_vars * * def getvarpos(self, i): # <<<<<<<<<<<<<< @@ -28215,7 +28216,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_12getvarpos(struct __pyx_obj_4c return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":73 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":73 * raise IndexError * * def getvar(self, i): # <<<<<<<<<<<<<< @@ -28248,7 +28249,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_14getvar(struct __pyx_obj_4cdec int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getvar", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":74 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":74 * * def getvar(self, i): * if 0 <= i < self.n_vars: # <<<<<<<<<<<<<< @@ -28267,7 +28268,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_14getvar(struct __pyx_obj_4cdec __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":75 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":75 * def getvar(self, i): * if 0 <= i < self.n_vars: * return self.syms[self.varpos[i]] # <<<<<<<<<<<<<< @@ -28284,7 +28285,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_14getvar(struct __pyx_obj_4cdec } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":77 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":77 * return self.syms[self.varpos[i]] * else: * raise IndexError # <<<<<<<<<<<<<< @@ -28295,7 +28296,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_14getvar(struct __pyx_obj_4cdec {__pyx_filename = __pyx_f[7]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":73 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":73 * raise IndexError * * def getvar(self, i): # <<<<<<<<<<<<<< @@ -28315,7 +28316,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_14getvar(struct __pyx_obj_4cdec return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":79 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":79 * raise IndexError * * cdef int chunkpos(self, int k): # <<<<<<<<<<<<<< @@ -28329,7 +28330,7 @@ int __pyx_f_4cdec_2sa_3_sa_6Phrase_chunkpos(struct __pyx_obj_4cdec_2sa_3_sa_Phra int __pyx_t_1; __Pyx_RefNannySetupContext("chunkpos", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":80 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":80 * * cdef int chunkpos(self, int k): * if k == 0: # <<<<<<<<<<<<<< @@ -28339,7 +28340,7 @@ int __pyx_f_4cdec_2sa_3_sa_6Phrase_chunkpos(struct __pyx_obj_4cdec_2sa_3_sa_Phra __pyx_t_1 = ((__pyx_v_k == 0) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":81 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":81 * cdef int chunkpos(self, int k): * if k == 0: * return 0 # <<<<<<<<<<<<<< @@ -28351,7 +28352,7 @@ int __pyx_f_4cdec_2sa_3_sa_6Phrase_chunkpos(struct __pyx_obj_4cdec_2sa_3_sa_Phra } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":83 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":83 * return 0 * else: * return self.varpos[k-1]+1 # <<<<<<<<<<<<<< @@ -28362,7 +28363,7 @@ int __pyx_f_4cdec_2sa_3_sa_6Phrase_chunkpos(struct __pyx_obj_4cdec_2sa_3_sa_Phra goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":79 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":79 * raise IndexError * * cdef int chunkpos(self, int k): # <<<<<<<<<<<<<< @@ -28376,7 +28377,7 @@ int __pyx_f_4cdec_2sa_3_sa_6Phrase_chunkpos(struct __pyx_obj_4cdec_2sa_3_sa_Phra return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":85 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":85 * return self.varpos[k-1]+1 * * cdef int chunklen(self, int k): # <<<<<<<<<<<<<< @@ -28390,7 +28391,7 @@ int __pyx_f_4cdec_2sa_3_sa_6Phrase_chunklen(struct __pyx_obj_4cdec_2sa_3_sa_Phra int __pyx_t_1; __Pyx_RefNannySetupContext("chunklen", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":86 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":86 * * cdef int chunklen(self, int k): * if self.n_vars == 0: # <<<<<<<<<<<<<< @@ -28400,7 +28401,7 @@ int __pyx_f_4cdec_2sa_3_sa_6Phrase_chunklen(struct __pyx_obj_4cdec_2sa_3_sa_Phra __pyx_t_1 = ((__pyx_v_self->n_vars == 0) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":87 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":87 * cdef int chunklen(self, int k): * if self.n_vars == 0: * return self.n # <<<<<<<<<<<<<< @@ -28411,7 +28412,7 @@ int __pyx_f_4cdec_2sa_3_sa_6Phrase_chunklen(struct __pyx_obj_4cdec_2sa_3_sa_Phra goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":88 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":88 * if self.n_vars == 0: * return self.n * elif k == 0: # <<<<<<<<<<<<<< @@ -28421,7 +28422,7 @@ int __pyx_f_4cdec_2sa_3_sa_6Phrase_chunklen(struct __pyx_obj_4cdec_2sa_3_sa_Phra __pyx_t_1 = ((__pyx_v_k == 0) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":89 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":89 * return self.n * elif k == 0: * return self.varpos[0] # <<<<<<<<<<<<<< @@ -28432,7 +28433,7 @@ int __pyx_f_4cdec_2sa_3_sa_6Phrase_chunklen(struct __pyx_obj_4cdec_2sa_3_sa_Phra goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":90 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":90 * elif k == 0: * return self.varpos[0] * elif k == self.n_vars: # <<<<<<<<<<<<<< @@ -28442,7 +28443,7 @@ int __pyx_f_4cdec_2sa_3_sa_6Phrase_chunklen(struct __pyx_obj_4cdec_2sa_3_sa_Phra __pyx_t_1 = ((__pyx_v_k == __pyx_v_self->n_vars) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":91 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":91 * return self.varpos[0] * elif k == self.n_vars: * return self.n-self.varpos[k-1]-1 # <<<<<<<<<<<<<< @@ -28454,7 +28455,7 @@ int __pyx_f_4cdec_2sa_3_sa_6Phrase_chunklen(struct __pyx_obj_4cdec_2sa_3_sa_Phra } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":93 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":93 * return self.n-self.varpos[k-1]-1 * else: * return self.varpos[k]-self.varpos[k-1]-1 # <<<<<<<<<<<<<< @@ -28465,7 +28466,7 @@ int __pyx_f_4cdec_2sa_3_sa_6Phrase_chunklen(struct __pyx_obj_4cdec_2sa_3_sa_Phra goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":85 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":85 * return self.varpos[k-1]+1 * * cdef int chunklen(self, int k): # <<<<<<<<<<<<<< @@ -28479,7 +28480,7 @@ int __pyx_f_4cdec_2sa_3_sa_6Phrase_chunklen(struct __pyx_obj_4cdec_2sa_3_sa_Phra return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":95 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":95 * return self.varpos[k]-self.varpos[k-1]-1 * * def clen(self, k): # <<<<<<<<<<<<<< @@ -28510,7 +28511,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_16clen(struct __pyx_obj_4cdec_2 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("clen", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":96 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":96 * * def clen(self, k): * return self.chunklen(k) # <<<<<<<<<<<<<< @@ -28525,7 +28526,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_16clen(struct __pyx_obj_4cdec_2 __pyx_t_2 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":95 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":95 * return self.varpos[k]-self.varpos[k-1]-1 * * def clen(self, k): # <<<<<<<<<<<<<< @@ -28544,7 +28545,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_16clen(struct __pyx_obj_4cdec_2 return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":98 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":98 * return self.chunklen(k) * * def getchunk(self, ci): # <<<<<<<<<<<<<< @@ -28580,7 +28581,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_18getchunk(struct __pyx_obj_4cd int __pyx_clineno = 0; __Pyx_RefNannySetupContext("getchunk", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":100 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":100 * def getchunk(self, ci): * cdef int start, stop * start = self.chunkpos(ci) # <<<<<<<<<<<<<< @@ -28590,7 +28591,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_18getchunk(struct __pyx_obj_4cd __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_ci); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_start = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Phrase *)__pyx_v_self->__pyx_vtab)->chunkpos(__pyx_v_self, __pyx_t_1); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":101 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":101 * cdef int start, stop * start = self.chunkpos(ci) * stop = start+self.chunklen(ci) # <<<<<<<<<<<<<< @@ -28600,7 +28601,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_18getchunk(struct __pyx_obj_4cd __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_ci); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_stop = (__pyx_v_start + ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Phrase *)__pyx_v_self->__pyx_vtab)->chunklen(__pyx_v_self, __pyx_t_1)); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":102 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":102 * start = self.chunkpos(ci) * stop = start+self.chunklen(ci) * chunk = [] # <<<<<<<<<<<<<< @@ -28612,7 +28613,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_18getchunk(struct __pyx_obj_4cd __pyx_v_chunk = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":103 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":103 * stop = start+self.chunklen(ci) * chunk = [] * for i from start <= i < stop: # <<<<<<<<<<<<<< @@ -28622,7 +28623,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_18getchunk(struct __pyx_obj_4cd __pyx_t_1 = __pyx_v_stop; for (__pyx_v_i = __pyx_v_start; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":104 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":104 * chunk = [] * for i from start <= i < stop: * chunk.append(self.syms[i]) # <<<<<<<<<<<<<< @@ -28635,7 +28636,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_18getchunk(struct __pyx_obj_4cd __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":105 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":105 * for i from start <= i < stop: * chunk.append(self.syms[i]) * return chunk # <<<<<<<<<<<<<< @@ -28647,7 +28648,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_18getchunk(struct __pyx_obj_4cd __pyx_r = __pyx_v_chunk; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":98 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":98 * return self.chunklen(k) * * def getchunk(self, ci): # <<<<<<<<<<<<<< @@ -28667,7 +28668,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_18getchunk(struct __pyx_obj_4cd return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":107 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":107 * return chunk * * def __cmp__(self, other): # <<<<<<<<<<<<<< @@ -28706,7 +28707,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Phrase_20__cmp__(struct __pyx_obj_4cdec_2sa_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cmp__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":110 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":110 * cdef Phrase otherp * cdef int i * otherp = other # <<<<<<<<<<<<<< @@ -28719,7 +28720,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Phrase_20__cmp__(struct __pyx_obj_4cdec_2sa_ __pyx_v_otherp = ((struct __pyx_obj_4cdec_2sa_3_sa_Phrase *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":111 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":111 * cdef int i * otherp = other * for i from 0 <= i < min(self.n, otherp.n): # <<<<<<<<<<<<<< @@ -28736,7 +28737,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Phrase_20__cmp__(struct __pyx_obj_4cdec_2sa_ __pyx_t_2 = __pyx_t_4; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":112 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":112 * otherp = other * for i from 0 <= i < min(self.n, otherp.n): * if self.syms[i] < otherp.syms[i]: # <<<<<<<<<<<<<< @@ -28746,7 +28747,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Phrase_20__cmp__(struct __pyx_obj_4cdec_2sa_ __pyx_t_5 = (((__pyx_v_self->syms[__pyx_v_i]) < (__pyx_v_otherp->syms[__pyx_v_i])) != 0); if (__pyx_t_5) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":113 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":113 * for i from 0 <= i < min(self.n, otherp.n): * if self.syms[i] < otherp.syms[i]: * return -1 # <<<<<<<<<<<<<< @@ -28757,7 +28758,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Phrase_20__cmp__(struct __pyx_obj_4cdec_2sa_ goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":114 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":114 * if self.syms[i] < otherp.syms[i]: * return -1 * elif self.syms[i] > otherp.syms[i]: # <<<<<<<<<<<<<< @@ -28767,7 +28768,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Phrase_20__cmp__(struct __pyx_obj_4cdec_2sa_ __pyx_t_5 = (((__pyx_v_self->syms[__pyx_v_i]) > (__pyx_v_otherp->syms[__pyx_v_i])) != 0); if (__pyx_t_5) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":115 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":115 * return -1 * elif self.syms[i] > otherp.syms[i]: * return 1 # <<<<<<<<<<<<<< @@ -28779,7 +28780,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Phrase_20__cmp__(struct __pyx_obj_4cdec_2sa_ } } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":116 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":116 * elif self.syms[i] > otherp.syms[i]: * return 1 * if self.n < otherp.n: # <<<<<<<<<<<<<< @@ -28789,7 +28790,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Phrase_20__cmp__(struct __pyx_obj_4cdec_2sa_ __pyx_t_5 = ((__pyx_v_self->n < __pyx_v_otherp->n) != 0); if (__pyx_t_5) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":117 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":117 * return 1 * if self.n < otherp.n: * return -1 # <<<<<<<<<<<<<< @@ -28800,7 +28801,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Phrase_20__cmp__(struct __pyx_obj_4cdec_2sa_ goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":118 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":118 * if self.n < otherp.n: * return -1 * elif self.n > otherp.n: # <<<<<<<<<<<<<< @@ -28810,7 +28811,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Phrase_20__cmp__(struct __pyx_obj_4cdec_2sa_ __pyx_t_5 = ((__pyx_v_self->n > __pyx_v_otherp->n) != 0); if (__pyx_t_5) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":119 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":119 * return -1 * elif self.n > otherp.n: * return 1 # <<<<<<<<<<<<<< @@ -28822,7 +28823,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Phrase_20__cmp__(struct __pyx_obj_4cdec_2sa_ } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":121 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":121 * return 1 * else: * return 0 # <<<<<<<<<<<<<< @@ -28833,7 +28834,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Phrase_20__cmp__(struct __pyx_obj_4cdec_2sa_ goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":107 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":107 * return chunk * * def __cmp__(self, other): # <<<<<<<<<<<<<< @@ -28853,7 +28854,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Phrase_20__cmp__(struct __pyx_obj_4cdec_2sa_ } #endif /*!(#if PY_MAJOR_VERSION < 3)*/ -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":123 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":123 * return 0 * * def __hash__(self): # <<<<<<<<<<<<<< @@ -28883,7 +28884,7 @@ static Py_hash_t __pyx_pf_4cdec_2sa_3_sa_6Phrase_22__hash__(struct __pyx_obj_4cd int __pyx_t_2; __Pyx_RefNannySetupContext("__hash__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":126 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":126 * cdef int i * cdef unsigned h * h = 0 # <<<<<<<<<<<<<< @@ -28892,7 +28893,7 @@ static Py_hash_t __pyx_pf_4cdec_2sa_3_sa_6Phrase_22__hash__(struct __pyx_obj_4cd */ __pyx_v_h = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":127 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":127 * cdef unsigned h * h = 0 * for i from 0 <= i < self.n: # <<<<<<<<<<<<<< @@ -28902,7 +28903,7 @@ static Py_hash_t __pyx_pf_4cdec_2sa_3_sa_6Phrase_22__hash__(struct __pyx_obj_4cd __pyx_t_1 = __pyx_v_self->n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":128 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":128 * h = 0 * for i from 0 <= i < self.n: * if self.syms[i] > 0: # <<<<<<<<<<<<<< @@ -28912,7 +28913,7 @@ static Py_hash_t __pyx_pf_4cdec_2sa_3_sa_6Phrase_22__hash__(struct __pyx_obj_4cd __pyx_t_2 = (((__pyx_v_self->syms[__pyx_v_i]) > 0) != 0); if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":129 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":129 * for i from 0 <= i < self.n: * if self.syms[i] > 0: * h = (h << 1) + self.syms[i] # <<<<<<<<<<<<<< @@ -28924,7 +28925,7 @@ static Py_hash_t __pyx_pf_4cdec_2sa_3_sa_6Phrase_22__hash__(struct __pyx_obj_4cd } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":131 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":131 * h = (h << 1) + self.syms[i] * else: * h = (h << 1) + -self.syms[i] # <<<<<<<<<<<<<< @@ -28936,7 +28937,7 @@ static Py_hash_t __pyx_pf_4cdec_2sa_3_sa_6Phrase_22__hash__(struct __pyx_obj_4cd __pyx_L5:; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":132 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":132 * else: * h = (h << 1) + -self.syms[i] * return h # <<<<<<<<<<<<<< @@ -28946,7 +28947,7 @@ static Py_hash_t __pyx_pf_4cdec_2sa_3_sa_6Phrase_22__hash__(struct __pyx_obj_4cd __pyx_r = __pyx_v_h; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":123 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":123 * return 0 * * def __hash__(self): # <<<<<<<<<<<<<< @@ -28961,7 +28962,7 @@ static Py_hash_t __pyx_pf_4cdec_2sa_3_sa_6Phrase_22__hash__(struct __pyx_obj_4cd return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":134 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":134 * return h * * def __len__(self): # <<<<<<<<<<<<<< @@ -28987,7 +28988,7 @@ static Py_ssize_t __pyx_pf_4cdec_2sa_3_sa_6Phrase_24__len__(struct __pyx_obj_4cd __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":135 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":135 * * def __len__(self): * return self.n # <<<<<<<<<<<<<< @@ -28997,7 +28998,7 @@ static Py_ssize_t __pyx_pf_4cdec_2sa_3_sa_6Phrase_24__len__(struct __pyx_obj_4cd __pyx_r = __pyx_v_self->n; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":134 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":134 * return h * * def __len__(self): # <<<<<<<<<<<<<< @@ -29011,7 +29012,7 @@ static Py_ssize_t __pyx_pf_4cdec_2sa_3_sa_6Phrase_24__len__(struct __pyx_obj_4cd return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":137 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":137 * return self.n * * def __getitem__(self, i): # <<<<<<<<<<<<<< @@ -29042,7 +29043,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_26__getitem__(struct __pyx_obj_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getitem__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":138 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":138 * * def __getitem__(self, i): * return self.syms[i] # <<<<<<<<<<<<<< @@ -29057,7 +29058,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_26__getitem__(struct __pyx_obj_ __pyx_t_2 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":137 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":137 * return self.n * * def __getitem__(self, i): # <<<<<<<<<<<<<< @@ -29077,7 +29078,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_26__getitem__(struct __pyx_obj_ } static PyObject *__pyx_gb_4cdec_2sa_3_sa_6Phrase_30generator2(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":140 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":140 * return self.syms[i] * * def __iter__(self): # <<<<<<<<<<<<<< @@ -29156,7 +29157,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_6Phrase_30generator2(__pyx_GeneratorObj __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":142 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":142 * def __iter__(self): * cdef int i * for i from 0 <= i < self.n: # <<<<<<<<<<<<<< @@ -29166,7 +29167,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_6Phrase_30generator2(__pyx_GeneratorObj __pyx_t_1 = __pyx_cur_scope->__pyx_v_self->n; for (__pyx_cur_scope->__pyx_v_i = 0; __pyx_cur_scope->__pyx_v_i < __pyx_t_1; __pyx_cur_scope->__pyx_v_i++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":143 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":143 * cdef int i * for i from 0 <= i < self.n: * yield self.syms[i] # <<<<<<<<<<<<<< @@ -29188,7 +29189,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_6Phrase_30generator2(__pyx_GeneratorObj if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":140 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":140 * return self.syms[i] * * def __iter__(self): # <<<<<<<<<<<<<< @@ -29210,7 +29211,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_6Phrase_30generator2(__pyx_GeneratorObj return NULL; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":145 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":145 * yield self.syms[i] * * def subst(self, start, children): # <<<<<<<<<<<<<< @@ -29294,7 +29295,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_31subst(struct __pyx_obj_4cdec_ __Pyx_RefNannySetupContext("subst", 0); __Pyx_INCREF(__pyx_v_start); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":147 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":147 * def subst(self, start, children): * cdef int i * for i from 0 <= i < self.n: # <<<<<<<<<<<<<< @@ -29304,7 +29305,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_31subst(struct __pyx_obj_4cdec_ __pyx_t_1 = __pyx_v_self->n; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":148 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":148 * cdef int i * for i from 0 <= i < self.n: * if sym_isvar(self.syms[i]): # <<<<<<<<<<<<<< @@ -29314,7 +29315,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_31subst(struct __pyx_obj_4cdec_ __pyx_t_2 = (__pyx_f_4cdec_2sa_3_sa_sym_isvar((__pyx_v_self->syms[__pyx_v_i])) != 0); if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":149 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":149 * for i from 0 <= i < self.n: * if sym_isvar(self.syms[i]): * start = start + children[sym_getindex(self.syms[i])-1] # <<<<<<<<<<<<<< @@ -29333,7 +29334,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_31subst(struct __pyx_obj_4cdec_ } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":151 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":151 * start = start + children[sym_getindex(self.syms[i])-1] * else: * start = start + (self.syms[i],) # <<<<<<<<<<<<<< @@ -29356,7 +29357,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_31subst(struct __pyx_obj_4cdec_ __pyx_L5:; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":152 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":152 * else: * start = start + (self.syms[i],) * return start # <<<<<<<<<<<<<< @@ -29368,7 +29369,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_31subst(struct __pyx_obj_4cdec_ __pyx_r = __pyx_v_start; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":145 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":145 * yield self.syms[i] * * def subst(self, start, children): # <<<<<<<<<<<<<< @@ -29389,7 +29390,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_31subst(struct __pyx_obj_4cdec_ return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":155 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":155 * * property words: * def __get__(self): # <<<<<<<<<<<<<< @@ -29426,7 +29427,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_5words___get__(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":156 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":156 * property words: * def __get__(self): * return [sym_tostring(w) for w in self if not sym_isvar(w)] # <<<<<<<<<<<<<< @@ -29490,7 +29491,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_5words___get__(struct __pyx_obj __pyx_t_1 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":155 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":155 * * property words: * def __get__(self): # <<<<<<<<<<<<<< @@ -29512,7 +29513,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_6Phrase_5words___get__(struct __pyx_obj return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":160 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":160 * cdef class Rule: * * def __cinit__(self, int lhs, Phrase f, Phrase e, scores=None, word_alignments=None): # <<<<<<<<<<<<<< @@ -29629,7 +29630,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_4Rule___cinit__(struct __pyx_obj_4cdec_2sa_3_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":161 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":161 * * def __cinit__(self, int lhs, Phrase f, Phrase e, scores=None, word_alignments=None): * if not sym_isvar(lhs): raise Exception('Invalid LHS symbol: %d' % lhs) # <<<<<<<<<<<<<< @@ -29656,7 +29657,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_4Rule___cinit__(struct __pyx_obj_4cdec_2sa_3_ {__pyx_filename = __pyx_f[7]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":162 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":162 * def __cinit__(self, int lhs, Phrase f, Phrase e, scores=None, word_alignments=None): * if not sym_isvar(lhs): raise Exception('Invalid LHS symbol: %d' % lhs) * self.lhs = lhs # <<<<<<<<<<<<<< @@ -29665,7 +29666,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_4Rule___cinit__(struct __pyx_obj_4cdec_2sa_3_ */ __pyx_v_self->lhs = __pyx_v_lhs; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":163 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":163 * if not sym_isvar(lhs): raise Exception('Invalid LHS symbol: %d' % lhs) * self.lhs = lhs * self.f = f # <<<<<<<<<<<<<< @@ -29678,7 +29679,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_4Rule___cinit__(struct __pyx_obj_4cdec_2sa_3_ __Pyx_DECREF(((PyObject *)__pyx_v_self->f)); __pyx_v_self->f = __pyx_v_f; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":164 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":164 * self.lhs = lhs * self.f = f * self.e = e # <<<<<<<<<<<<<< @@ -29691,7 +29692,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_4Rule___cinit__(struct __pyx_obj_4cdec_2sa_3_ __Pyx_DECREF(((PyObject *)__pyx_v_self->e)); __pyx_v_self->e = __pyx_v_e; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":165 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":165 * self.f = f * self.e = e * self.word_alignments = word_alignments # <<<<<<<<<<<<<< @@ -29704,7 +29705,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_4Rule___cinit__(struct __pyx_obj_4cdec_2sa_3_ __Pyx_DECREF(__pyx_v_self->word_alignments); __pyx_v_self->word_alignments = __pyx_v_word_alignments; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":166 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":166 * self.e = e * self.word_alignments = word_alignments * self.scores = scores # <<<<<<<<<<<<<< @@ -29720,7 +29721,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_4Rule___cinit__(struct __pyx_obj_4cdec_2sa_3_ __pyx_v_self->scores = ((struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector *)__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":160 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":160 * cdef class Rule: * * def __cinit__(self, int lhs, Phrase f, Phrase e, scores=None, word_alignments=None): # <<<<<<<<<<<<<< @@ -29741,7 +29742,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_4Rule___cinit__(struct __pyx_obj_4cdec_2sa_3_ return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":168 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":168 * self.scores = scores * * def __hash__(self): # <<<<<<<<<<<<<< @@ -29773,7 +29774,7 @@ static Py_hash_t __pyx_pf_4cdec_2sa_3_sa_4Rule_2__hash__(struct __pyx_obj_4cdec_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__hash__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":169 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":169 * * def __hash__(self): * return hash((self.lhs, self.f, self.e)) # <<<<<<<<<<<<<< @@ -29798,7 +29799,7 @@ static Py_hash_t __pyx_pf_4cdec_2sa_3_sa_4Rule_2__hash__(struct __pyx_obj_4cdec_ __pyx_r = __pyx_t_3; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":168 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":168 * self.scores = scores * * def __hash__(self): # <<<<<<<<<<<<<< @@ -29818,7 +29819,7 @@ static Py_hash_t __pyx_pf_4cdec_2sa_3_sa_4Rule_2__hash__(struct __pyx_obj_4cdec_ return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":171 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":171 * return hash((self.lhs, self.f, self.e)) * * def __cmp__(self, Rule other): # <<<<<<<<<<<<<< @@ -29862,7 +29863,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_4Rule_4__cmp__(struct __pyx_obj_4cdec_2sa_3_s int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cmp__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":172 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":172 * * def __cmp__(self, Rule other): * return cmp((self.lhs, self.f, self.e, self.word_alignments), # <<<<<<<<<<<<<< @@ -29886,7 +29887,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_4Rule_4__cmp__(struct __pyx_obj_4cdec_2sa_3_s __Pyx_GIVEREF(__pyx_v_self->word_alignments); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":173 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":173 * def __cmp__(self, Rule other): * return cmp((self.lhs, self.f, self.e, self.word_alignments), * (other.lhs, other.f, other.e, self.word_alignments)) # <<<<<<<<<<<<<< @@ -29910,7 +29911,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_4Rule_4__cmp__(struct __pyx_obj_4cdec_2sa_3_s __Pyx_GIVEREF(__pyx_v_self->word_alignments); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":172 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":172 * * def __cmp__(self, Rule other): * return cmp((self.lhs, self.f, self.e, self.word_alignments), # <<<<<<<<<<<<<< @@ -29933,7 +29934,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_4Rule_4__cmp__(struct __pyx_obj_4cdec_2sa_3_s __pyx_r = __pyx_t_4; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":171 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":171 * return hash((self.lhs, self.f, self.e)) * * def __cmp__(self, Rule other): # <<<<<<<<<<<<<< @@ -29954,7 +29955,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_4Rule_4__cmp__(struct __pyx_obj_4cdec_2sa_3_s } #endif /*!(#if PY_MAJOR_VERSION < 3)*/ -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":175 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":175 * (other.lhs, other.f, other.e, self.word_alignments)) * * def fmerge(self, Phrase f): # <<<<<<<<<<<<<< @@ -29993,7 +29994,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_4Rule_6fmerge(struct __pyx_obj_4cdec_2s int __pyx_clineno = 0; __Pyx_RefNannySetupContext("fmerge", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":176 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":176 * * def fmerge(self, Phrase f): * if self.f == f: # <<<<<<<<<<<<<< @@ -30005,7 +30006,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_4Rule_6fmerge(struct __pyx_obj_4cdec_2s __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":177 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":177 * def fmerge(self, Phrase f): * if self.f == f: * self.f = f # <<<<<<<<<<<<<< @@ -30021,7 +30022,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_4Rule_6fmerge(struct __pyx_obj_4cdec_2s } __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":175 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":175 * (other.lhs, other.f, other.e, self.word_alignments)) * * def fmerge(self, Phrase f): # <<<<<<<<<<<<<< @@ -30042,7 +30043,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_4Rule_6fmerge(struct __pyx_obj_4cdec_2s return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":179 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":179 * self.f = f * * def arity(self): # <<<<<<<<<<<<<< @@ -30073,7 +30074,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_4Rule_8arity(struct __pyx_obj_4cdec_2sa int __pyx_clineno = 0; __Pyx_RefNannySetupContext("arity", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":180 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":180 * * def arity(self): * return self.f.arity() # <<<<<<<<<<<<<< @@ -30090,7 +30091,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_4Rule_8arity(struct __pyx_obj_4cdec_2sa __pyx_t_2 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":179 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":179 * self.f = f * * def arity(self): # <<<<<<<<<<<<<< @@ -30110,7 +30111,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_4Rule_8arity(struct __pyx_obj_4cdec_2sa return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":182 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":182 * return self.f.arity() * * def __str__(self): # <<<<<<<<<<<<<< @@ -30132,7 +30133,7 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_4Rule_11__str__(PyObject *__pyx_v_self) } static PyObject *__pyx_gb_4cdec_2sa_3_sa_4Rule_7__str___2generator13(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":186 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":186 * fields = [sym_tostring(self.lhs), str(self.f), str(self.e), str(self.scores)] * if self.word_alignments is not None: * fields.append(' '.join('%d-%d' % a for a in self.alignments())) # <<<<<<<<<<<<<< @@ -30283,7 +30284,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_4Rule_7__str___2generator13(__pyx_Gener return NULL; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":182 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":182 * return self.f.arity() * * def __str__(self): # <<<<<<<<<<<<<< @@ -30318,7 +30319,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_4Rule_10__str__(struct __pyx_obj_4cdec_ __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":184 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":184 * def __str__(self): * cdef unsigned i * fields = [sym_tostring(self.lhs), str(self.f), str(self.e), str(self.scores)] # <<<<<<<<<<<<<< @@ -30368,7 +30369,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_4Rule_10__str__(struct __pyx_obj_4cdec_ __pyx_v_fields = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":185 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":185 * cdef unsigned i * fields = [sym_tostring(self.lhs), str(self.f), str(self.e), str(self.scores)] * if self.word_alignments is not None: # <<<<<<<<<<<<<< @@ -30379,7 +30380,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_4Rule_10__str__(struct __pyx_obj_4cdec_ __pyx_t_7 = (__pyx_t_6 != 0); if (__pyx_t_7) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":186 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":186 * fields = [sym_tostring(self.lhs), str(self.f), str(self.e), str(self.scores)] * if self.word_alignments is not None: * fields.append(' '.join('%d-%d' % a for a in self.alignments())) # <<<<<<<<<<<<<< @@ -30397,7 +30398,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_4Rule_10__str__(struct __pyx_obj_4cdec_ } __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":187 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":187 * if self.word_alignments is not None: * fields.append(' '.join('%d-%d' % a for a in self.alignments())) * return ' ||| '.join(fields) # <<<<<<<<<<<<<< @@ -30411,7 +30412,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_4Rule_10__str__(struct __pyx_obj_4cdec_ __pyx_t_5 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":182 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":182 * return self.f.arity() * * def __str__(self): # <<<<<<<<<<<<<< @@ -30437,7 +30438,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_4Rule_10__str__(struct __pyx_obj_4cdec_ } static PyObject *__pyx_gb_4cdec_2sa_3_sa_4Rule_14generator3(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":189 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":189 * return ' ||| '.join(fields) * * def alignments(self): # <<<<<<<<<<<<<< @@ -30520,7 +30521,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_4Rule_14generator3(__pyx_GeneratorObjec __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":190 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":190 * * def alignments(self): * for point in self.word_alignments: # <<<<<<<<<<<<<< @@ -30566,7 +30567,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_4Rule_14generator3(__pyx_GeneratorObjec __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":191 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":191 * def alignments(self): * for point in self.word_alignments: * yield point / ALIGNMENT_CODE, point % ALIGNMENT_CODE # <<<<<<<<<<<<<< @@ -30610,7 +30611,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_4Rule_14generator3(__pyx_GeneratorObjec } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rule.pxi":189 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rule.pxi":189 * return ' ||| '.join(fields) * * def alignments(self): # <<<<<<<<<<<<<< @@ -30701,7 +30702,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_4Rule_1e___get__(struct __pyx_obj_4cdec return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":21 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":21 * int arr_len * * cdef _Trie_Node* new_trie_node(): # <<<<<<<<<<<<<< @@ -30715,7 +30716,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_new_trie __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("new_trie_node", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":23 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":23 * cdef _Trie_Node* new_trie_node(): * cdef _Trie_Node* node * node = <_Trie_Node*> malloc(sizeof(_Trie_Node)) # <<<<<<<<<<<<<< @@ -30724,7 +30725,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_new_trie */ __pyx_v_node = ((struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *)malloc((sizeof(struct __pyx_t_4cdec_2sa_3_sa__Trie_Node)))); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":24 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":24 * cdef _Trie_Node* node * node = <_Trie_Node*> malloc(sizeof(_Trie_Node)) * node.root = NULL # <<<<<<<<<<<<<< @@ -30733,7 +30734,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_new_trie */ __pyx_v_node->root = NULL; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":25 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":25 * node = <_Trie_Node*> malloc(sizeof(_Trie_Node)) * node.root = NULL * node.arr_len = 0 # <<<<<<<<<<<<<< @@ -30742,7 +30743,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_new_trie */ __pyx_v_node->arr_len = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":26 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":26 * node.root = NULL * node.arr_len = 0 * node.arr = malloc(sizeof(0*sizeof(int))) # <<<<<<<<<<<<<< @@ -30751,7 +30752,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_new_trie */ __pyx_v_node->arr = ((int *)malloc((sizeof((0 * (sizeof(int))))))); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":27 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":27 * node.arr_len = 0 * node.arr = malloc(sizeof(0*sizeof(int))) * return node # <<<<<<<<<<<<<< @@ -30761,7 +30762,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_new_trie __pyx_r = __pyx_v_node; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":21 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":21 * int arr_len * * cdef _Trie_Node* new_trie_node(): # <<<<<<<<<<<<<< @@ -30775,7 +30776,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_new_trie return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":29 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":29 * return node * * cdef _Trie_Edge* new_trie_edge(int val): # <<<<<<<<<<<<<< @@ -30789,7 +30790,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Edge *__pyx_f_4cdec_2sa_3_sa_new_trie __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("new_trie_edge", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":31 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":31 * cdef _Trie_Edge* new_trie_edge(int val): * cdef _Trie_Edge* edge * edge = <_Trie_Edge*> malloc(sizeof(_Trie_Edge)) # <<<<<<<<<<<<<< @@ -30798,7 +30799,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Edge *__pyx_f_4cdec_2sa_3_sa_new_trie */ __pyx_v_edge = ((struct __pyx_t_4cdec_2sa_3_sa__Trie_Edge *)malloc((sizeof(struct __pyx_t_4cdec_2sa_3_sa__Trie_Edge)))); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":32 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":32 * cdef _Trie_Edge* edge * edge = <_Trie_Edge*> malloc(sizeof(_Trie_Edge)) * edge.node = new_trie_node() # <<<<<<<<<<<<<< @@ -30807,7 +30808,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Edge *__pyx_f_4cdec_2sa_3_sa_new_trie */ __pyx_v_edge->node = __pyx_f_4cdec_2sa_3_sa_new_trie_node(); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":33 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":33 * edge = <_Trie_Edge*> malloc(sizeof(_Trie_Edge)) * edge.node = new_trie_node() * edge.bigger = NULL # <<<<<<<<<<<<<< @@ -30816,7 +30817,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Edge *__pyx_f_4cdec_2sa_3_sa_new_trie */ __pyx_v_edge->bigger = NULL; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":34 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":34 * edge.node = new_trie_node() * edge.bigger = NULL * edge.smaller = NULL # <<<<<<<<<<<<<< @@ -30825,7 +30826,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Edge *__pyx_f_4cdec_2sa_3_sa_new_trie */ __pyx_v_edge->smaller = NULL; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":35 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":35 * edge.bigger = NULL * edge.smaller = NULL * edge.val = val # <<<<<<<<<<<<<< @@ -30834,7 +30835,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Edge *__pyx_f_4cdec_2sa_3_sa_new_trie */ __pyx_v_edge->val = __pyx_v_val; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":36 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":36 * edge.smaller = NULL * edge.val = val * return edge # <<<<<<<<<<<<<< @@ -30844,7 +30845,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Edge *__pyx_f_4cdec_2sa_3_sa_new_trie __pyx_r = __pyx_v_edge; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":29 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":29 * return node * * cdef _Trie_Edge* new_trie_edge(int val): # <<<<<<<<<<<<<< @@ -30858,7 +30859,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Edge *__pyx_f_4cdec_2sa_3_sa_new_trie return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":38 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":38 * return edge * * cdef free_trie_node(_Trie_Node* node): # <<<<<<<<<<<<<< @@ -30876,7 +30877,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_free_trie_node(struct __pyx_t_4cdec_2sa_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("free_trie_node", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":39 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":39 * * cdef free_trie_node(_Trie_Node* node): * if node != NULL: # <<<<<<<<<<<<<< @@ -30886,7 +30887,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_free_trie_node(struct __pyx_t_4cdec_2sa_ __pyx_t_1 = ((__pyx_v_node != NULL) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":40 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":40 * cdef free_trie_node(_Trie_Node* node): * if node != NULL: * free_trie_edge(node.root) # <<<<<<<<<<<<<< @@ -30897,7 +30898,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_free_trie_node(struct __pyx_t_4cdec_2sa_ __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":41 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":41 * if node != NULL: * free_trie_edge(node.root) * free(node.arr) # <<<<<<<<<<<<<< @@ -30909,7 +30910,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_free_trie_node(struct __pyx_t_4cdec_2sa_ } __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":38 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":38 * return edge * * cdef free_trie_node(_Trie_Node* node): # <<<<<<<<<<<<<< @@ -30930,7 +30931,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_free_trie_node(struct __pyx_t_4cdec_2sa_ return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":43 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":43 * free(node.arr) * * cdef free_trie_edge(_Trie_Edge* edge): # <<<<<<<<<<<<<< @@ -30948,7 +30949,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_free_trie_edge(struct __pyx_t_4cdec_2sa_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("free_trie_edge", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":44 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":44 * * cdef free_trie_edge(_Trie_Edge* edge): * if edge != NULL: # <<<<<<<<<<<<<< @@ -30958,7 +30959,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_free_trie_edge(struct __pyx_t_4cdec_2sa_ __pyx_t_1 = ((__pyx_v_edge != NULL) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":45 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":45 * cdef free_trie_edge(_Trie_Edge* edge): * if edge != NULL: * free_trie_node(edge.node) # <<<<<<<<<<<<<< @@ -30969,7 +30970,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_free_trie_edge(struct __pyx_t_4cdec_2sa_ __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":46 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":46 * if edge != NULL: * free_trie_node(edge.node) * free_trie_edge(edge.bigger) # <<<<<<<<<<<<<< @@ -30980,7 +30981,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_free_trie_edge(struct __pyx_t_4cdec_2sa_ __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":47 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":47 * free_trie_node(edge.node) * free_trie_edge(edge.bigger) * free_trie_edge(edge.smaller) # <<<<<<<<<<<<<< @@ -30994,7 +30995,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_free_trie_edge(struct __pyx_t_4cdec_2sa_ } __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":43 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":43 * free(node.arr) * * cdef free_trie_edge(_Trie_Edge* edge): # <<<<<<<<<<<<<< @@ -31015,7 +31016,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_free_trie_edge(struct __pyx_t_4cdec_2sa_ return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":49 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":49 * free_trie_edge(edge.smaller) * * cdef _Trie_Node* trie_find(_Trie_Node* node, int val): # <<<<<<<<<<<<<< @@ -31033,7 +31034,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_trie_fin int __pyx_t_4; __Pyx_RefNannySetupContext("trie_find", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":51 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":51 * cdef _Trie_Node* trie_find(_Trie_Node* node, int val): * cdef _Trie_Edge* cur * cur = node.root # <<<<<<<<<<<<<< @@ -31043,7 +31044,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_trie_fin __pyx_t_1 = __pyx_v_node->root; __pyx_v_cur = __pyx_t_1; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":52 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":52 * cdef _Trie_Edge* cur * cur = node.root * while cur != NULL and cur.val != val: # <<<<<<<<<<<<<< @@ -31060,7 +31061,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_trie_fin } if (!__pyx_t_4) break; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":53 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":53 * cur = node.root * while cur != NULL and cur.val != val: * if val > cur.val: # <<<<<<<<<<<<<< @@ -31070,7 +31071,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_trie_fin __pyx_t_4 = ((__pyx_v_val > __pyx_v_cur->val) != 0); if (__pyx_t_4) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":54 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":54 * while cur != NULL and cur.val != val: * if val > cur.val: * cur = cur.bigger # <<<<<<<<<<<<<< @@ -31082,7 +31083,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_trie_fin goto __pyx_L5; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":55 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":55 * if val > cur.val: * cur = cur.bigger * elif val < cur.val: # <<<<<<<<<<<<<< @@ -31092,7 +31093,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_trie_fin __pyx_t_4 = ((__pyx_v_val < __pyx_v_cur->val) != 0); if (__pyx_t_4) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":56 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":56 * cur = cur.bigger * elif val < cur.val: * cur = cur.smaller # <<<<<<<<<<<<<< @@ -31106,7 +31107,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_trie_fin __pyx_L5:; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":57 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":57 * elif val < cur.val: * cur = cur.smaller * if cur == NULL: # <<<<<<<<<<<<<< @@ -31116,7 +31117,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_trie_fin __pyx_t_4 = ((__pyx_v_cur == NULL) != 0); if (__pyx_t_4) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":58 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":58 * cur = cur.smaller * if cur == NULL: * return NULL # <<<<<<<<<<<<<< @@ -31128,7 +31129,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_trie_fin } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":60 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":60 * return NULL * else: * return cur.node # <<<<<<<<<<<<<< @@ -31139,7 +31140,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_trie_fin goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":49 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":49 * free_trie_edge(edge.smaller) * * cdef _Trie_Node* trie_find(_Trie_Node* node, int val): # <<<<<<<<<<<<<< @@ -31153,7 +31154,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_trie_fin return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":62 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":62 * return cur.node * * cdef trie_node_data_append(_Trie_Node* node, int val): # <<<<<<<<<<<<<< @@ -31167,7 +31168,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_node_data_append(struct __pyx_t_4cd __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("trie_node_data_append", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":64 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":64 * cdef trie_node_data_append(_Trie_Node* node, int val): * cdef int new_len * new_len = node.arr_len + 1 # <<<<<<<<<<<<<< @@ -31176,7 +31177,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_node_data_append(struct __pyx_t_4cd */ __pyx_v_new_len = (__pyx_v_node->arr_len + 1); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":65 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":65 * cdef int new_len * new_len = node.arr_len + 1 * node.arr = realloc(node.arr, new_len*sizeof(int)) # <<<<<<<<<<<<<< @@ -31185,7 +31186,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_node_data_append(struct __pyx_t_4cd */ __pyx_v_node->arr = ((int *)realloc(__pyx_v_node->arr, (__pyx_v_new_len * (sizeof(int))))); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":66 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":66 * new_len = node.arr_len + 1 * node.arr = realloc(node.arr, new_len*sizeof(int)) * node.arr[node.arr_len] = val # <<<<<<<<<<<<<< @@ -31194,7 +31195,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_node_data_append(struct __pyx_t_4cd */ (__pyx_v_node->arr[__pyx_v_node->arr_len]) = __pyx_v_val; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":67 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":67 * node.arr = realloc(node.arr, new_len*sizeof(int)) * node.arr[node.arr_len] = val * node.arr_len = new_len # <<<<<<<<<<<<<< @@ -31203,7 +31204,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_node_data_append(struct __pyx_t_4cd */ __pyx_v_node->arr_len = __pyx_v_new_len; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":62 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":62 * return cur.node * * cdef trie_node_data_append(_Trie_Node* node, int val): # <<<<<<<<<<<<<< @@ -31218,7 +31219,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_node_data_append(struct __pyx_t_4cd return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":69 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":69 * node.arr_len = new_len * * cdef trie_node_data_extend(_Trie_Node* node, int* vals, int num_vals): # <<<<<<<<<<<<<< @@ -31232,7 +31233,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_node_data_extend(struct __pyx_t_4cd __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("trie_node_data_extend", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":71 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":71 * cdef trie_node_data_extend(_Trie_Node* node, int* vals, int num_vals): * cdef int new_len * new_len = node.arr_len + num_vals # <<<<<<<<<<<<<< @@ -31241,7 +31242,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_node_data_extend(struct __pyx_t_4cd */ __pyx_v_new_len = (__pyx_v_node->arr_len + __pyx_v_num_vals); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":72 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":72 * cdef int new_len * new_len = node.arr_len + num_vals * node.arr = realloc(node.arr, new_len*sizeof(int)) # <<<<<<<<<<<<<< @@ -31250,7 +31251,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_node_data_extend(struct __pyx_t_4cd */ __pyx_v_node->arr = ((int *)realloc(__pyx_v_node->arr, (__pyx_v_new_len * (sizeof(int))))); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":73 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":73 * new_len = node.arr_len + num_vals * node.arr = realloc(node.arr, new_len*sizeof(int)) * memcpy(node.arr + node.arr_len, vals, num_vals*sizeof(int)) # <<<<<<<<<<<<<< @@ -31259,7 +31260,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_node_data_extend(struct __pyx_t_4cd */ memcpy((__pyx_v_node->arr + __pyx_v_node->arr_len), __pyx_v_vals, (__pyx_v_num_vals * (sizeof(int)))); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":74 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":74 * node.arr = realloc(node.arr, new_len*sizeof(int)) * memcpy(node.arr + node.arr_len, vals, num_vals*sizeof(int)) * node.arr_len = new_len # <<<<<<<<<<<<<< @@ -31268,7 +31269,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_node_data_extend(struct __pyx_t_4cd */ __pyx_v_node->arr_len = __pyx_v_new_len; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":69 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":69 * node.arr_len = new_len * * cdef trie_node_data_extend(_Trie_Node* node, int* vals, int num_vals): # <<<<<<<<<<<<<< @@ -31283,7 +31284,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_node_data_extend(struct __pyx_t_4cd return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":77 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":77 * * * cdef _Trie_Node* trie_insert(_Trie_Node* node, int val): # <<<<<<<<<<<<<< @@ -31300,7 +31301,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_trie_ins int __pyx_t_3; __Pyx_RefNannySetupContext("trie_insert", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":79 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":79 * cdef _Trie_Node* trie_insert(_Trie_Node* node, int val): * cdef _Trie_Edge** cur * cur = &node.root # <<<<<<<<<<<<<< @@ -31309,7 +31310,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_trie_ins */ __pyx_v_cur = (&__pyx_v_node->root); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":80 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":80 * cdef _Trie_Edge** cur * cur = &node.root * while cur[0] != NULL and cur[0].val != val: # <<<<<<<<<<<<<< @@ -31326,7 +31327,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_trie_ins } if (!__pyx_t_3) break; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":81 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":81 * cur = &node.root * while cur[0] != NULL and cur[0].val != val: * if val > cur[0].val: # <<<<<<<<<<<<<< @@ -31336,7 +31337,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_trie_ins __pyx_t_3 = ((__pyx_v_val > (__pyx_v_cur[0])->val) != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":82 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":82 * while cur[0] != NULL and cur[0].val != val: * if val > cur[0].val: * cur = &cur[0].bigger # <<<<<<<<<<<<<< @@ -31347,7 +31348,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_trie_ins goto __pyx_L5; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":83 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":83 * if val > cur[0].val: * cur = &cur[0].bigger * elif val < cur[0].val: # <<<<<<<<<<<<<< @@ -31357,7 +31358,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_trie_ins __pyx_t_3 = ((__pyx_v_val < (__pyx_v_cur[0])->val) != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":84 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":84 * cur = &cur[0].bigger * elif val < cur[0].val: * cur = &cur[0].smaller # <<<<<<<<<<<<<< @@ -31370,7 +31371,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_trie_ins __pyx_L5:; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":85 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":85 * elif val < cur[0].val: * cur = &cur[0].smaller * if cur[0] == NULL: # <<<<<<<<<<<<<< @@ -31380,7 +31381,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_trie_ins __pyx_t_3 = (((__pyx_v_cur[0]) == NULL) != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":86 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":86 * cur = &cur[0].smaller * if cur[0] == NULL: * cur[0] = new_trie_edge(val) # <<<<<<<<<<<<<< @@ -31392,7 +31393,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_trie_ins } __pyx_L6:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":87 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":87 * if cur[0] == NULL: * cur[0] = new_trie_edge(val) * return cur[0].node # <<<<<<<<<<<<<< @@ -31402,7 +31403,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_trie_ins __pyx_r = (__pyx_v_cur[0])->node; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":77 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":77 * * * cdef _Trie_Node* trie_insert(_Trie_Node* node, int val): # <<<<<<<<<<<<<< @@ -31416,7 +31417,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_trie_ins return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":89 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":89 * return cur[0].node * * cdef trie_node_to_map(_Trie_Node* node, result, prefix, int include_zeros): # <<<<<<<<<<<<<< @@ -31437,7 +31438,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_node_to_map(struct __pyx_t_4cdec_2s int __pyx_clineno = 0; __Pyx_RefNannySetupContext("trie_node_to_map", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":92 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":92 * cdef IntList arr * * if include_zeros or node.arr_len > 0: # <<<<<<<<<<<<<< @@ -31452,7 +31453,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_node_to_map(struct __pyx_t_4cdec_2s } if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":93 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":93 * * if include_zeros or node.arr_len > 0: * arr = IntList() # <<<<<<<<<<<<<< @@ -31464,7 +31465,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_node_to_map(struct __pyx_t_4cdec_2s __pyx_v_arr = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":94 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":94 * if include_zeros or node.arr_len > 0: * arr = IntList() * free(arr.arr) # <<<<<<<<<<<<<< @@ -31473,7 +31474,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_node_to_map(struct __pyx_t_4cdec_2s */ free(__pyx_v_arr->arr); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":95 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":95 * arr = IntList() * free(arr.arr) * arr.arr = malloc(node.arr_len * sizeof(int)) # <<<<<<<<<<<<<< @@ -31482,7 +31483,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_node_to_map(struct __pyx_t_4cdec_2s */ __pyx_v_arr->arr = ((int *)malloc((__pyx_v_node->arr_len * (sizeof(int))))); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":96 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":96 * free(arr.arr) * arr.arr = malloc(node.arr_len * sizeof(int)) * memcpy(arr.arr, node.arr, node.arr_len * sizeof(int)) # <<<<<<<<<<<<<< @@ -31491,7 +31492,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_node_to_map(struct __pyx_t_4cdec_2s */ memcpy(__pyx_v_arr->arr, __pyx_v_node->arr, (__pyx_v_node->arr_len * (sizeof(int)))); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":97 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":97 * arr.arr = malloc(node.arr_len * sizeof(int)) * memcpy(arr.arr, node.arr, node.arr_len * sizeof(int)) * arr.len = node.arr_len # <<<<<<<<<<<<<< @@ -31501,7 +31502,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_node_to_map(struct __pyx_t_4cdec_2s __pyx_t_4 = __pyx_v_node->arr_len; __pyx_v_arr->len = __pyx_t_4; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":98 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":98 * memcpy(arr.arr, node.arr, node.arr_len * sizeof(int)) * arr.len = node.arr_len * arr.size = node.arr_len # <<<<<<<<<<<<<< @@ -31511,7 +31512,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_node_to_map(struct __pyx_t_4cdec_2s __pyx_t_4 = __pyx_v_node->arr_len; __pyx_v_arr->size = __pyx_t_4; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":99 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":99 * arr.len = node.arr_len * arr.size = node.arr_len * result[prefix] = arr # <<<<<<<<<<<<<< @@ -31523,7 +31524,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_node_to_map(struct __pyx_t_4cdec_2s } __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":100 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":100 * arr.size = node.arr_len * result[prefix] = arr * trie_edge_to_map(node.root, result, prefix, include_zeros) # <<<<<<<<<<<<<< @@ -31534,7 +31535,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_node_to_map(struct __pyx_t_4cdec_2s __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":89 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":89 * return cur[0].node * * cdef trie_node_to_map(_Trie_Node* node, result, prefix, int include_zeros): # <<<<<<<<<<<<<< @@ -31556,7 +31557,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_node_to_map(struct __pyx_t_4cdec_2s return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":102 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":102 * trie_edge_to_map(node.root, result, prefix, include_zeros) * * cdef trie_edge_to_map(_Trie_Edge* edge, result, prefix, int include_zeros): # <<<<<<<<<<<<<< @@ -31576,7 +31577,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_edge_to_map(struct __pyx_t_4cdec_2s __Pyx_RefNannySetupContext("trie_edge_to_map", 0); __Pyx_INCREF(__pyx_v_prefix); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":103 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":103 * * cdef trie_edge_to_map(_Trie_Edge* edge, result, prefix, int include_zeros): * if edge != NULL: # <<<<<<<<<<<<<< @@ -31586,7 +31587,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_edge_to_map(struct __pyx_t_4cdec_2s __pyx_t_1 = ((__pyx_v_edge != NULL) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":104 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":104 * cdef trie_edge_to_map(_Trie_Edge* edge, result, prefix, int include_zeros): * if edge != NULL: * trie_edge_to_map(edge.smaller, result, prefix, include_zeros) # <<<<<<<<<<<<<< @@ -31597,7 +31598,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_edge_to_map(struct __pyx_t_4cdec_2s __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":105 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":105 * if edge != NULL: * trie_edge_to_map(edge.smaller, result, prefix, include_zeros) * trie_edge_to_map(edge.bigger, result, prefix, include_zeros) # <<<<<<<<<<<<<< @@ -31608,7 +31609,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_edge_to_map(struct __pyx_t_4cdec_2s __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":106 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":106 * trie_edge_to_map(edge.smaller, result, prefix, include_zeros) * trie_edge_to_map(edge.bigger, result, prefix, include_zeros) * prefix = prefix + (edge.val,) # <<<<<<<<<<<<<< @@ -31628,7 +31629,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_edge_to_map(struct __pyx_t_4cdec_2s __Pyx_DECREF_SET(__pyx_v_prefix, __pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":107 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":107 * trie_edge_to_map(edge.bigger, result, prefix, include_zeros) * prefix = prefix + (edge.val,) * trie_node_to_map(edge.node, result, prefix, include_zeros) # <<<<<<<<<<<<<< @@ -31642,7 +31643,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_edge_to_map(struct __pyx_t_4cdec_2s } __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":102 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":102 * trie_edge_to_map(node.root, result, prefix, include_zeros) * * cdef trie_edge_to_map(_Trie_Edge* edge, result, prefix, int include_zeros): # <<<<<<<<<<<<<< @@ -31665,7 +31666,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_trie_edge_to_map(struct __pyx_t_4cdec_2s return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":114 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":114 * cdef int V * * def __cinit__(self, int alphabet_size): # <<<<<<<<<<<<<< @@ -31730,7 +31731,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_7TrieMap___cinit__(struct __pyx_obj_4cdec_2sa __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":115 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":115 * * def __cinit__(self, int alphabet_size): * self.V = alphabet_size # <<<<<<<<<<<<<< @@ -31739,7 +31740,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_7TrieMap___cinit__(struct __pyx_obj_4cdec_2sa */ __pyx_v_self->V = __pyx_v_alphabet_size; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":116 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":116 * def __cinit__(self, int alphabet_size): * self.V = alphabet_size * self.root = <_Trie_Node**> malloc(self.V * sizeof(_Trie_Node*)) # <<<<<<<<<<<<<< @@ -31748,7 +31749,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_7TrieMap___cinit__(struct __pyx_obj_4cdec_2sa */ __pyx_v_self->root = ((struct __pyx_t_4cdec_2sa_3_sa__Trie_Node **)malloc((__pyx_v_self->V * (sizeof(struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *))))); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":117 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":117 * self.V = alphabet_size * self.root = <_Trie_Node**> malloc(self.V * sizeof(_Trie_Node*)) * memset(self.root, 0, self.V * sizeof(_Trie_Node*)) # <<<<<<<<<<<<<< @@ -31757,7 +31758,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_7TrieMap___cinit__(struct __pyx_obj_4cdec_2sa */ memset(__pyx_v_self->root, 0, (__pyx_v_self->V * (sizeof(struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *)))); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":114 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":114 * cdef int V * * def __cinit__(self, int alphabet_size): # <<<<<<<<<<<<<< @@ -31771,7 +31772,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_7TrieMap___cinit__(struct __pyx_obj_4cdec_2sa return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":120 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":120 * * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -31801,7 +31802,7 @@ static void __pyx_pf_4cdec_2sa_3_sa_7TrieMap_2__dealloc__(struct __pyx_obj_4cdec int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":122 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":122 * def __dealloc__(self): * cdef int i * for i from 0 <= i < self.V: # <<<<<<<<<<<<<< @@ -31811,7 +31812,7 @@ static void __pyx_pf_4cdec_2sa_3_sa_7TrieMap_2__dealloc__(struct __pyx_obj_4cdec __pyx_t_1 = __pyx_v_self->V; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":123 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":123 * cdef int i * for i from 0 <= i < self.V: * if self.root[i] != NULL: # <<<<<<<<<<<<<< @@ -31821,7 +31822,7 @@ static void __pyx_pf_4cdec_2sa_3_sa_7TrieMap_2__dealloc__(struct __pyx_obj_4cdec __pyx_t_2 = (((__pyx_v_self->root[__pyx_v_i]) != NULL) != 0); if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":124 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":124 * for i from 0 <= i < self.V: * if self.root[i] != NULL: * free_trie_node(self.root[i]) # <<<<<<<<<<<<<< @@ -31836,7 +31837,7 @@ static void __pyx_pf_4cdec_2sa_3_sa_7TrieMap_2__dealloc__(struct __pyx_obj_4cdec __pyx_L5:; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":125 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":125 * if self.root[i] != NULL: * free_trie_node(self.root[i]) * free(self.root) # <<<<<<<<<<<<<< @@ -31845,7 +31846,7 @@ static void __pyx_pf_4cdec_2sa_3_sa_7TrieMap_2__dealloc__(struct __pyx_obj_4cdec */ free(__pyx_v_self->root); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":120 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":120 * * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -31862,7 +31863,7 @@ static void __pyx_pf_4cdec_2sa_3_sa_7TrieMap_2__dealloc__(struct __pyx_obj_4cdec __Pyx_RefNannyFinishContext(); } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":128 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":128 * * * def insert(self, pattern): # <<<<<<<<<<<<<< @@ -31898,7 +31899,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7TrieMap_4insert(struct __pyx_obj_4cdec int __pyx_clineno = 0; __Pyx_RefNannySetupContext("insert", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":131 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":131 * cdef int* p * cdef int i, l * l = len(pattern) # <<<<<<<<<<<<<< @@ -31908,7 +31909,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7TrieMap_4insert(struct __pyx_obj_4cdec __pyx_t_1 = PyObject_Length(__pyx_v_pattern); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_l = __pyx_t_1; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":132 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":132 * cdef int i, l * l = len(pattern) * p = malloc(l*sizeof(int)) # <<<<<<<<<<<<<< @@ -31917,7 +31918,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7TrieMap_4insert(struct __pyx_obj_4cdec */ __pyx_v_p = ((int *)malloc((__pyx_v_l * (sizeof(int))))); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":133 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":133 * l = len(pattern) * p = malloc(l*sizeof(int)) * for i from 0 <= i < l: # <<<<<<<<<<<<<< @@ -31927,7 +31928,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7TrieMap_4insert(struct __pyx_obj_4cdec __pyx_t_2 = __pyx_v_l; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":134 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":134 * p = malloc(l*sizeof(int)) * for i from 0 <= i < l: * p[i] = pattern[i] # <<<<<<<<<<<<<< @@ -31941,7 +31942,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7TrieMap_4insert(struct __pyx_obj_4cdec (__pyx_v_p[__pyx_v_i]) = __pyx_t_4; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":135 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":135 * for i from 0 <= i < l: * p[i] = pattern[i] * self._insert(p,l) # <<<<<<<<<<<<<< @@ -31950,7 +31951,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7TrieMap_4insert(struct __pyx_obj_4cdec */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_TrieMap *)__pyx_v_self->__pyx_vtab)->_insert(__pyx_v_self, __pyx_v_p, __pyx_v_l); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":136 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":136 * p[i] = pattern[i] * self._insert(p,l) * free(p) # <<<<<<<<<<<<<< @@ -31959,7 +31960,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7TrieMap_4insert(struct __pyx_obj_4cdec */ free(__pyx_v_p); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":128 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":128 * * * def insert(self, pattern): # <<<<<<<<<<<<<< @@ -31980,7 +31981,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7TrieMap_4insert(struct __pyx_obj_4cdec return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":139 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":139 * * * cdef _Trie_Node* _insert(self, int* pattern, int pattern_len): # <<<<<<<<<<<<<< @@ -31997,7 +31998,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_7TrieMap int __pyx_t_2; __Pyx_RefNannySetupContext("_insert", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":142 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":142 * cdef int i * cdef _Trie_Node* node * if self.root[pattern[0]] == NULL: # <<<<<<<<<<<<<< @@ -32007,7 +32008,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_7TrieMap __pyx_t_1 = (((__pyx_v_self->root[(__pyx_v_pattern[0])]) == NULL) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":143 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":143 * cdef _Trie_Node* node * if self.root[pattern[0]] == NULL: * self.root[pattern[0]] = new_trie_node() # <<<<<<<<<<<<<< @@ -32019,7 +32020,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_7TrieMap } __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":144 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":144 * if self.root[pattern[0]] == NULL: * self.root[pattern[0]] = new_trie_node() * node = self.root[pattern[0]] # <<<<<<<<<<<<<< @@ -32028,7 +32029,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_7TrieMap */ __pyx_v_node = (__pyx_v_self->root[(__pyx_v_pattern[0])]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":145 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":145 * self.root[pattern[0]] = new_trie_node() * node = self.root[pattern[0]] * for i from 1 <= i < pattern_len: # <<<<<<<<<<<<<< @@ -32038,7 +32039,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_7TrieMap __pyx_t_2 = __pyx_v_pattern_len; for (__pyx_v_i = 1; __pyx_v_i < __pyx_t_2; __pyx_v_i++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":146 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":146 * node = self.root[pattern[0]] * for i from 1 <= i < pattern_len: * node = trie_insert(node, pattern[i]) # <<<<<<<<<<<<<< @@ -32048,7 +32049,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_7TrieMap __pyx_v_node = __pyx_f_4cdec_2sa_3_sa_trie_insert(__pyx_v_node, (__pyx_v_pattern[__pyx_v_i])); } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":147 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":147 * for i from 1 <= i < pattern_len: * node = trie_insert(node, pattern[i]) * return node # <<<<<<<<<<<<<< @@ -32058,7 +32059,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_7TrieMap __pyx_r = __pyx_v_node; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":139 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":139 * * * cdef _Trie_Node* _insert(self, int* pattern, int pattern_len): # <<<<<<<<<<<<<< @@ -32072,7 +32073,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_7TrieMap return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":149 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":149 * return node * * def contains(self, pattern): # <<<<<<<<<<<<<< @@ -32110,7 +32111,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7TrieMap_6contains(struct __pyx_obj_4cd int __pyx_clineno = 0; __Pyx_RefNannySetupContext("contains", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":153 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":153 * cdef int i, l * cdef _Trie_Node* node * l = len(pattern) # <<<<<<<<<<<<<< @@ -32120,7 +32121,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7TrieMap_6contains(struct __pyx_obj_4cd __pyx_t_1 = PyObject_Length(__pyx_v_pattern); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_l = __pyx_t_1; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":154 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":154 * cdef _Trie_Node* node * l = len(pattern) * p = malloc(l*sizeof(int)) # <<<<<<<<<<<<<< @@ -32129,7 +32130,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7TrieMap_6contains(struct __pyx_obj_4cd */ __pyx_v_p = ((int *)malloc((__pyx_v_l * (sizeof(int))))); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":155 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":155 * l = len(pattern) * p = malloc(l*sizeof(int)) * for i from 0 <= i < l: # <<<<<<<<<<<<<< @@ -32139,7 +32140,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7TrieMap_6contains(struct __pyx_obj_4cd __pyx_t_2 = __pyx_v_l; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":156 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":156 * p = malloc(l*sizeof(int)) * for i from 0 <= i < l: * p[i] = pattern[i] # <<<<<<<<<<<<<< @@ -32153,7 +32154,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7TrieMap_6contains(struct __pyx_obj_4cd (__pyx_v_p[__pyx_v_i]) = __pyx_t_4; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":157 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":157 * for i from 0 <= i < l: * p[i] = pattern[i] * node = self._contains(p,l) # <<<<<<<<<<<<<< @@ -32162,7 +32163,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7TrieMap_6contains(struct __pyx_obj_4cd */ __pyx_v_node = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_TrieMap *)__pyx_v_self->__pyx_vtab)->_contains(__pyx_v_self, __pyx_v_p, __pyx_v_l); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":158 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":158 * p[i] = pattern[i] * node = self._contains(p,l) * free(p) # <<<<<<<<<<<<<< @@ -32171,7 +32172,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7TrieMap_6contains(struct __pyx_obj_4cd */ free(__pyx_v_p); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":159 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":159 * node = self._contains(p,l) * free(p) * if node == NULL: # <<<<<<<<<<<<<< @@ -32181,7 +32182,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7TrieMap_6contains(struct __pyx_obj_4cd __pyx_t_5 = ((__pyx_v_node == NULL) != 0); if (__pyx_t_5) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":160 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":160 * free(p) * if node == NULL: * return False # <<<<<<<<<<<<<< @@ -32195,7 +32196,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7TrieMap_6contains(struct __pyx_obj_4cd } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":162 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":162 * return False * else: * return True # <<<<<<<<<<<<<< @@ -32208,7 +32209,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7TrieMap_6contains(struct __pyx_obj_4cd goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":149 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":149 * return node * * def contains(self, pattern): # <<<<<<<<<<<<<< @@ -32227,7 +32228,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7TrieMap_6contains(struct __pyx_obj_4cd return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":164 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":164 * return True * * cdef _Trie_Node* _contains(self, int* pattern, int pattern_len): # <<<<<<<<<<<<<< @@ -32245,7 +32246,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_7TrieMap int __pyx_t_3; __Pyx_RefNannySetupContext("_contains", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":167 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":167 * cdef int i * cdef _Trie_Node* node * node = self.root[pattern[0]] # <<<<<<<<<<<<<< @@ -32254,7 +32255,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_7TrieMap */ __pyx_v_node = (__pyx_v_self->root[(__pyx_v_pattern[0])]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":168 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":168 * cdef _Trie_Node* node * node = self.root[pattern[0]] * i = 1 # <<<<<<<<<<<<<< @@ -32263,7 +32264,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_7TrieMap */ __pyx_v_i = 1; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":169 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":169 * node = self.root[pattern[0]] * i = 1 * while node != NULL and i < pattern_len: # <<<<<<<<<<<<<< @@ -32280,7 +32281,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_7TrieMap } if (!__pyx_t_3) break; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":170 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":170 * i = 1 * while node != NULL and i < pattern_len: * node = trie_find(node, pattern[i]) # <<<<<<<<<<<<<< @@ -32289,7 +32290,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_7TrieMap */ __pyx_v_node = __pyx_f_4cdec_2sa_3_sa_trie_find(__pyx_v_node, (__pyx_v_pattern[__pyx_v_i])); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":171 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":171 * while node != NULL and i < pattern_len: * node = trie_find(node, pattern[i]) * i = i+1 # <<<<<<<<<<<<<< @@ -32299,7 +32300,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_7TrieMap __pyx_v_i = (__pyx_v_i + 1); } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":172 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":172 * node = trie_find(node, pattern[i]) * i = i+1 * return node # <<<<<<<<<<<<<< @@ -32309,7 +32310,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_7TrieMap __pyx_r = __pyx_v_node; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":164 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":164 * return True * * cdef _Trie_Node* _contains(self, int* pattern, int pattern_len): # <<<<<<<<<<<<<< @@ -32323,7 +32324,7 @@ static struct __pyx_t_4cdec_2sa_3_sa__Trie_Node *__pyx_f_4cdec_2sa_3_sa_7TrieMap return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":174 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":174 * return node * * def toMap(self, flag): # <<<<<<<<<<<<<< @@ -32359,7 +32360,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7TrieMap_8toMap(struct __pyx_obj_4cdec_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("toMap", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":177 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":177 * cdef int i, include_zeros * * if flag: # <<<<<<<<<<<<<< @@ -32369,7 +32370,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7TrieMap_8toMap(struct __pyx_obj_4cdec_ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_flag); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":178 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":178 * * if flag: * include_zeros=1 # <<<<<<<<<<<<<< @@ -32381,7 +32382,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7TrieMap_8toMap(struct __pyx_obj_4cdec_ } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":180 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":180 * include_zeros=1 * else: * include_zeros=0 # <<<<<<<<<<<<<< @@ -32392,7 +32393,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7TrieMap_8toMap(struct __pyx_obj_4cdec_ } __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":181 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":181 * else: * include_zeros=0 * result = {} # <<<<<<<<<<<<<< @@ -32404,7 +32405,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7TrieMap_8toMap(struct __pyx_obj_4cdec_ __pyx_v_result = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":182 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":182 * include_zeros=0 * result = {} * for i from 0 <= i < self.V: # <<<<<<<<<<<<<< @@ -32414,7 +32415,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7TrieMap_8toMap(struct __pyx_obj_4cdec_ __pyx_t_3 = __pyx_v_self->V; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_3; __pyx_v_i++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":183 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":183 * result = {} * for i from 0 <= i < self.V: * if self.root[i] != NULL: # <<<<<<<<<<<<<< @@ -32424,7 +32425,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7TrieMap_8toMap(struct __pyx_obj_4cdec_ __pyx_t_1 = (((__pyx_v_self->root[__pyx_v_i]) != NULL) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":184 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":184 * for i from 0 <= i < self.V: * if self.root[i] != NULL: * trie_node_to_map(self.root[i], result, (i,), include_zeros) # <<<<<<<<<<<<<< @@ -32447,7 +32448,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7TrieMap_8toMap(struct __pyx_obj_4cdec_ __pyx_L6:; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":185 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":185 * if self.root[i] != NULL: * trie_node_to_map(self.root[i], result, (i,), include_zeros) * return result # <<<<<<<<<<<<<< @@ -32459,7 +32460,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7TrieMap_8toMap(struct __pyx_obj_4cdec_ __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":174 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":174 * return node * * def toMap(self, flag): # <<<<<<<<<<<<<< @@ -32480,7 +32481,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7TrieMap_8toMap(struct __pyx_obj_4cdec_ return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":200 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":200 * cdef write_map(self, m, FILE* f) * * def __cinit__(self, fsarray=None, from_stats=None, from_binary=None, # <<<<<<<<<<<<<< @@ -32638,7 +32639,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_14Precomputation___cinit__(struct __pyx_obj_4 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":204 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":204 * max_length=5, max_nonterminals=2, * train_max_initial_size=10, train_min_gap_size=2): * self.precompute_rank = precompute_rank # <<<<<<<<<<<<<< @@ -32648,7 +32649,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_14Precomputation___cinit__(struct __pyx_obj_4 __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_precompute_rank); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->precompute_rank = __pyx_t_1; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":205 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":205 * train_max_initial_size=10, train_min_gap_size=2): * self.precompute_rank = precompute_rank * self.precompute_secondary_rank = precompute_secondary_rank # <<<<<<<<<<<<<< @@ -32658,7 +32659,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_14Precomputation___cinit__(struct __pyx_obj_4 __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_precompute_secondary_rank); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->precompute_secondary_rank = __pyx_t_1; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":206 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":206 * self.precompute_rank = precompute_rank * self.precompute_secondary_rank = precompute_secondary_rank * self.max_length = max_length # <<<<<<<<<<<<<< @@ -32668,7 +32669,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_14Precomputation___cinit__(struct __pyx_obj_4 __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_max_length); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->max_length = __pyx_t_1; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":207 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":207 * self.precompute_secondary_rank = precompute_secondary_rank * self.max_length = max_length * self.max_nonterminals = max_nonterminals # <<<<<<<<<<<<<< @@ -32678,7 +32679,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_14Precomputation___cinit__(struct __pyx_obj_4 __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_max_nonterminals); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->max_nonterminals = __pyx_t_1; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":208 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":208 * self.max_length = max_length * self.max_nonterminals = max_nonterminals * self.train_max_initial_size = train_max_initial_size # <<<<<<<<<<<<<< @@ -32688,7 +32689,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_14Precomputation___cinit__(struct __pyx_obj_4 __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_train_max_initial_size); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->train_max_initial_size = __pyx_t_1; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":209 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":209 * self.max_nonterminals = max_nonterminals * self.train_max_initial_size = train_max_initial_size * self.train_min_gap_size = train_min_gap_size # <<<<<<<<<<<<<< @@ -32698,7 +32699,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_14Precomputation___cinit__(struct __pyx_obj_4 __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_train_min_gap_size); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->train_min_gap_size = __pyx_t_1; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":210 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":210 * self.train_max_initial_size = train_max_initial_size * self.train_min_gap_size = train_min_gap_size * if from_binary: # <<<<<<<<<<<<<< @@ -32708,7 +32709,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_14Precomputation___cinit__(struct __pyx_obj_4 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_from_binary); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":211 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":211 * self.train_min_gap_size = train_min_gap_size * if from_binary: * self.read_binary(from_binary) # <<<<<<<<<<<<<< @@ -32730,7 +32731,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_14Precomputation___cinit__(struct __pyx_obj_4 goto __pyx_L3; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":212 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":212 * if from_binary: * self.read_binary(from_binary) * elif from_stats: # <<<<<<<<<<<<<< @@ -32740,7 +32741,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_14Precomputation___cinit__(struct __pyx_obj_4 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_from_stats); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":213 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":213 * self.read_binary(from_binary) * elif from_stats: * self.precompute(from_stats, fsarray) # <<<<<<<<<<<<<< @@ -32766,7 +32767,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_14Precomputation___cinit__(struct __pyx_obj_4 } __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":200 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":200 * cdef write_map(self, m, FILE* f) * * def __cinit__(self, fsarray=None, from_stats=None, from_binary=None, # <<<<<<<<<<<<<< @@ -32788,7 +32789,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_14Precomputation___cinit__(struct __pyx_obj_4 return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":216 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":216 * * * def read_binary(self, char* filename): # <<<<<<<<<<<<<< @@ -32832,7 +32833,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_2read_binary(struct __ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("read_binary", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":218 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":218 * def read_binary(self, char* filename): * cdef FILE* f * f = fopen(filename, "r") # <<<<<<<<<<<<<< @@ -32841,7 +32842,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_2read_binary(struct __ */ __pyx_v_f = fopen(__pyx_v_filename, __pyx_k_r); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":219 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":219 * cdef FILE* f * f = fopen(filename, "r") * fread(&(self.precompute_rank), sizeof(int), 1, f) # <<<<<<<<<<<<<< @@ -32850,7 +32851,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_2read_binary(struct __ */ fread((&__pyx_v_self->precompute_rank), (sizeof(int)), 1, __pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":220 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":220 * f = fopen(filename, "r") * fread(&(self.precompute_rank), sizeof(int), 1, f) * fread(&(self.precompute_secondary_rank), sizeof(int), 1, f) # <<<<<<<<<<<<<< @@ -32859,7 +32860,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_2read_binary(struct __ */ fread((&__pyx_v_self->precompute_secondary_rank), (sizeof(int)), 1, __pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":221 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":221 * fread(&(self.precompute_rank), sizeof(int), 1, f) * fread(&(self.precompute_secondary_rank), sizeof(int), 1, f) * fread(&(self.max_length), sizeof(int), 1, f) # <<<<<<<<<<<<<< @@ -32868,7 +32869,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_2read_binary(struct __ */ fread((&__pyx_v_self->max_length), (sizeof(int)), 1, __pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":222 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":222 * fread(&(self.precompute_secondary_rank), sizeof(int), 1, f) * fread(&(self.max_length), sizeof(int), 1, f) * fread(&(self.max_nonterminals), sizeof(int), 1, f) # <<<<<<<<<<<<<< @@ -32877,7 +32878,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_2read_binary(struct __ */ fread((&__pyx_v_self->max_nonterminals), (sizeof(int)), 1, __pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":223 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":223 * fread(&(self.max_length), sizeof(int), 1, f) * fread(&(self.max_nonterminals), sizeof(int), 1, f) * fread(&(self.train_max_initial_size), sizeof(int), 1, f) # <<<<<<<<<<<<<< @@ -32886,7 +32887,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_2read_binary(struct __ */ fread((&__pyx_v_self->train_max_initial_size), (sizeof(int)), 1, __pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":224 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":224 * fread(&(self.max_nonterminals), sizeof(int), 1, f) * fread(&(self.train_max_initial_size), sizeof(int), 1, f) * fread(&(self.train_min_gap_size), sizeof(int), 1, f) # <<<<<<<<<<<<<< @@ -32895,7 +32896,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_2read_binary(struct __ */ fread((&__pyx_v_self->train_min_gap_size), (sizeof(int)), 1, __pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":225 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":225 * fread(&(self.train_max_initial_size), sizeof(int), 1, f) * fread(&(self.train_min_gap_size), sizeof(int), 1, f) * self.precomputed_index = self.read_map(f) # <<<<<<<<<<<<<< @@ -32910,7 +32911,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_2read_binary(struct __ __pyx_v_self->precomputed_index = __pyx_t_1; __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":226 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":226 * fread(&(self.train_min_gap_size), sizeof(int), 1, f) * self.precomputed_index = self.read_map(f) * self.precomputed_collocations = self.read_map(f) # <<<<<<<<<<<<<< @@ -32925,7 +32926,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_2read_binary(struct __ __pyx_v_self->precomputed_collocations = __pyx_t_1; __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":227 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":227 * self.precomputed_index = self.read_map(f) * self.precomputed_collocations = self.read_map(f) * fclose(f) # <<<<<<<<<<<<<< @@ -32934,7 +32935,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_2read_binary(struct __ */ fclose(__pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":216 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":216 * * * def read_binary(self, char* filename): # <<<<<<<<<<<<<< @@ -32955,7 +32956,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_2read_binary(struct __ return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":230 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":230 * * * def write_binary(self, char* filename): # <<<<<<<<<<<<<< @@ -33000,7 +33001,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_4write_binary(struct _ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("write_binary", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":232 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":232 * def write_binary(self, char* filename): * cdef FILE* f * f = fopen(filename, "w") # <<<<<<<<<<<<<< @@ -33009,7 +33010,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_4write_binary(struct _ */ __pyx_v_f = fopen(__pyx_v_filename, __pyx_k_w); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":233 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":233 * cdef FILE* f * f = fopen(filename, "w") * fwrite(&(self.precompute_rank), sizeof(int), 1, f) # <<<<<<<<<<<<<< @@ -33018,7 +33019,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_4write_binary(struct _ */ fwrite((&__pyx_v_self->precompute_rank), (sizeof(int)), 1, __pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":234 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":234 * f = fopen(filename, "w") * fwrite(&(self.precompute_rank), sizeof(int), 1, f) * fwrite(&(self.precompute_secondary_rank), sizeof(int), 1, f) # <<<<<<<<<<<<<< @@ -33027,7 +33028,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_4write_binary(struct _ */ fwrite((&__pyx_v_self->precompute_secondary_rank), (sizeof(int)), 1, __pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":235 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":235 * fwrite(&(self.precompute_rank), sizeof(int), 1, f) * fwrite(&(self.precompute_secondary_rank), sizeof(int), 1, f) * fwrite(&(self.max_length), sizeof(int), 1, f) # <<<<<<<<<<<<<< @@ -33036,7 +33037,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_4write_binary(struct _ */ fwrite((&__pyx_v_self->max_length), (sizeof(int)), 1, __pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":236 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":236 * fwrite(&(self.precompute_secondary_rank), sizeof(int), 1, f) * fwrite(&(self.max_length), sizeof(int), 1, f) * fwrite(&(self.max_nonterminals), sizeof(int), 1, f) # <<<<<<<<<<<<<< @@ -33045,7 +33046,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_4write_binary(struct _ */ fwrite((&__pyx_v_self->max_nonterminals), (sizeof(int)), 1, __pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":237 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":237 * fwrite(&(self.max_length), sizeof(int), 1, f) * fwrite(&(self.max_nonterminals), sizeof(int), 1, f) * fwrite(&(self.train_max_initial_size), sizeof(int), 1, f) # <<<<<<<<<<<<<< @@ -33054,7 +33055,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_4write_binary(struct _ */ fwrite((&__pyx_v_self->train_max_initial_size), (sizeof(int)), 1, __pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":238 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":238 * fwrite(&(self.max_nonterminals), sizeof(int), 1, f) * fwrite(&(self.train_max_initial_size), sizeof(int), 1, f) * fwrite(&(self.train_min_gap_size), sizeof(int), 1, f) # <<<<<<<<<<<<<< @@ -33063,7 +33064,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_4write_binary(struct _ */ fwrite((&__pyx_v_self->train_min_gap_size), (sizeof(int)), 1, __pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":239 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":239 * fwrite(&(self.train_max_initial_size), sizeof(int), 1, f) * fwrite(&(self.train_min_gap_size), sizeof(int), 1, f) * self.write_map(self.precomputed_index, f) # <<<<<<<<<<<<<< @@ -33077,7 +33078,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_4write_binary(struct _ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":240 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":240 * fwrite(&(self.train_min_gap_size), sizeof(int), 1, f) * self.write_map(self.precomputed_index, f) * self.write_map(self.precomputed_collocations, f) # <<<<<<<<<<<<<< @@ -33091,7 +33092,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_4write_binary(struct _ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":241 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":241 * self.write_map(self.precomputed_index, f) * self.write_map(self.precomputed_collocations, f) * fclose(f) # <<<<<<<<<<<<<< @@ -33100,7 +33101,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_4write_binary(struct _ */ fclose(__pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":230 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":230 * * * def write_binary(self, char* filename): # <<<<<<<<<<<<<< @@ -33122,7 +33123,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_4write_binary(struct _ return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":244 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":244 * * * cdef write_map(self, m, FILE* f): # <<<<<<<<<<<<<< @@ -33153,7 +33154,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_14Precomputation_write_map(CYTHON_UNUSED int __pyx_clineno = 0; __Pyx_RefNannySetupContext("write_map", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":248 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":248 * cdef IntList arr * * N = len(m) # <<<<<<<<<<<<<< @@ -33163,7 +33164,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_14Precomputation_write_map(CYTHON_UNUSED __pyx_t_1 = PyObject_Length(__pyx_v_m); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_N = __pyx_t_1; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":249 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":249 * * N = len(m) * fwrite(&(N), sizeof(int), 1, f) # <<<<<<<<<<<<<< @@ -33172,7 +33173,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_14Precomputation_write_map(CYTHON_UNUSED */ fwrite((&__pyx_v_N), (sizeof(int)), 1, __pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":250 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":250 * N = len(m) * fwrite(&(N), sizeof(int), 1, f) * for pattern, val in m.iteritems(): # <<<<<<<<<<<<<< @@ -33200,7 +33201,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_14Precomputation_write_map(CYTHON_UNUSED __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_6); __pyx_t_6 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":251 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":251 * fwrite(&(N), sizeof(int), 1, f) * for pattern, val in m.iteritems(): * N = len(pattern) # <<<<<<<<<<<<<< @@ -33210,7 +33211,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_14Precomputation_write_map(CYTHON_UNUSED __pyx_t_8 = PyObject_Length(__pyx_v_pattern); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_N = __pyx_t_8; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":252 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":252 * for pattern, val in m.iteritems(): * N = len(pattern) * fwrite(&(N), sizeof(int), 1, f) # <<<<<<<<<<<<<< @@ -33219,7 +33220,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_14Precomputation_write_map(CYTHON_UNUSED */ fwrite((&__pyx_v_N), (sizeof(int)), 1, __pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":253 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":253 * N = len(pattern) * fwrite(&(N), sizeof(int), 1, f) * for word_id in pattern: # <<<<<<<<<<<<<< @@ -33264,7 +33265,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_14Precomputation_write_map(CYTHON_UNUSED __Pyx_XDECREF_SET(__pyx_v_word_id, __pyx_t_5); __pyx_t_5 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":254 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":254 * fwrite(&(N), sizeof(int), 1, f) * for word_id in pattern: * i = word_id # <<<<<<<<<<<<<< @@ -33274,7 +33275,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_14Precomputation_write_map(CYTHON_UNUSED __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_word_id); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_i = __pyx_t_7; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":255 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":255 * for word_id in pattern: * i = word_id * fwrite(&(i), sizeof(int), 1, f) # <<<<<<<<<<<<<< @@ -33285,7 +33286,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_14Precomputation_write_map(CYTHON_UNUSED } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":256 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":256 * i = word_id * fwrite(&(i), sizeof(int), 1, f) * arr = val # <<<<<<<<<<<<<< @@ -33298,7 +33299,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_14Precomputation_write_map(CYTHON_UNUSED __Pyx_XDECREF_SET(__pyx_v_arr, ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_6)); __pyx_t_6 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":257 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":257 * fwrite(&(i), sizeof(int), 1, f) * arr = val * arr.write_handle(f) # <<<<<<<<<<<<<< @@ -33309,7 +33310,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_14Precomputation_write_map(CYTHON_UNUSED } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":244 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":244 * * * cdef write_map(self, m, FILE* f): # <<<<<<<<<<<<<< @@ -33336,7 +33337,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_14Precomputation_write_map(CYTHON_UNUSED return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":260 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":260 * * * cdef read_map(self, FILE* f): # <<<<<<<<<<<<<< @@ -33364,7 +33365,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_14Precomputation_read_map(CYTHON_UNUSED int __pyx_clineno = 0; __Pyx_RefNannySetupContext("read_map", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":264 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":264 * cdef IntList arr * * m = {} # <<<<<<<<<<<<<< @@ -33376,7 +33377,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_14Precomputation_read_map(CYTHON_UNUSED __pyx_v_m = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":265 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":265 * * m = {} * fread(&(N), sizeof(int), 1, f) # <<<<<<<<<<<<<< @@ -33385,7 +33386,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_14Precomputation_read_map(CYTHON_UNUSED */ fread((&__pyx_v_N), (sizeof(int)), 1, __pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":266 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":266 * m = {} * fread(&(N), sizeof(int), 1, f) * for j from 0 <= j < N: # <<<<<<<<<<<<<< @@ -33395,7 +33396,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_14Precomputation_read_map(CYTHON_UNUSED __pyx_t_2 = __pyx_v_N; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_2; __pyx_v_j++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":267 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":267 * fread(&(N), sizeof(int), 1, f) * for j from 0 <= j < N: * fread(&(i), sizeof(int), 1, f) # <<<<<<<<<<<<<< @@ -33404,7 +33405,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_14Precomputation_read_map(CYTHON_UNUSED */ fread((&__pyx_v_i), (sizeof(int)), 1, __pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":268 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":268 * for j from 0 <= j < N: * fread(&(i), sizeof(int), 1, f) * key = () # <<<<<<<<<<<<<< @@ -33414,7 +33415,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_14Precomputation_read_map(CYTHON_UNUSED __Pyx_INCREF(__pyx_empty_tuple); __Pyx_XDECREF_SET(__pyx_v_key, __pyx_empty_tuple); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":269 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":269 * fread(&(i), sizeof(int), 1, f) * key = () * for k from 0 <= k < i: # <<<<<<<<<<<<<< @@ -33424,7 +33425,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_14Precomputation_read_map(CYTHON_UNUSED __pyx_t_3 = __pyx_v_i; for (__pyx_v_k = 0; __pyx_v_k < __pyx_t_3; __pyx_v_k++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":270 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":270 * key = () * for k from 0 <= k < i: * fread(&(word_id), sizeof(int), 1, f) # <<<<<<<<<<<<<< @@ -33433,7 +33434,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_14Precomputation_read_map(CYTHON_UNUSED */ fread((&__pyx_v_word_id), (sizeof(int)), 1, __pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":271 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":271 * for k from 0 <= k < i: * fread(&(word_id), sizeof(int), 1, f) * key = key + (word_id,) # <<<<<<<<<<<<<< @@ -33454,7 +33455,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_14Precomputation_read_map(CYTHON_UNUSED __pyx_t_1 = 0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":272 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":272 * fread(&(word_id), sizeof(int), 1, f) * key = key + (word_id,) * arr = IntList() # <<<<<<<<<<<<<< @@ -33466,7 +33467,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_14Precomputation_read_map(CYTHON_UNUSED __Pyx_XDECREF_SET(__pyx_v_arr, ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1)); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":273 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":273 * key = key + (word_id,) * arr = IntList() * arr.read_handle(f) # <<<<<<<<<<<<<< @@ -33475,7 +33476,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_14Precomputation_read_map(CYTHON_UNUSED */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_arr->__pyx_vtab)->read_handle(__pyx_v_arr, __pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":274 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":274 * arr = IntList() * arr.read_handle(f) * m[key] = arr # <<<<<<<<<<<<<< @@ -33485,7 +33486,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_14Precomputation_read_map(CYTHON_UNUSED if (unlikely(PyDict_SetItem(__pyx_v_m, __pyx_v_key, ((PyObject *)__pyx_v_arr)) < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":275 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":275 * arr.read_handle(f) * m[key] = arr * return m # <<<<<<<<<<<<<< @@ -33497,7 +33498,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_14Precomputation_read_map(CYTHON_UNUSED __pyx_r = __pyx_v_m; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":260 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":260 * * * cdef read_map(self, FILE* f): # <<<<<<<<<<<<<< @@ -33520,7 +33521,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_14Precomputation_read_map(CYTHON_UNUSED return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":278 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":278 * * * def precompute(self, stats, SuffixArray sarray): # <<<<<<<<<<<<<< @@ -33672,7 +33673,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("precompute", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":280 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":280 * def precompute(self, stats, SuffixArray sarray): * cdef int i, l, N, max_pattern_len, i1, l1, i2, l2, i3, l3, ptr1, ptr2, ptr3, is_super, sent_count, max_rank * cdef DataArray darray = sarray.darray # <<<<<<<<<<<<<< @@ -33684,7 +33685,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_v_darray = ((struct __pyx_obj_4cdec_2sa_3_sa_DataArray *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":285 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":285 * cdef _Trie_Node* node * * data = darray.data # <<<<<<<<<<<<<< @@ -33696,7 +33697,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_v_data = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":287 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":287 * data = darray.data * * frequent_patterns = TrieMap(len(darray.id2word)) # <<<<<<<<<<<<<< @@ -33720,7 +33721,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_v_frequent_patterns = ((struct __pyx_obj_4cdec_2sa_3_sa_TrieMap *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":288 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":288 * * frequent_patterns = TrieMap(len(darray.id2word)) * super_frequent_patterns = TrieMap(len(darray.id2word)) # <<<<<<<<<<<<<< @@ -33744,7 +33745,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_v_super_frequent_patterns = ((struct __pyx_obj_4cdec_2sa_3_sa_TrieMap *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":289 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":289 * frequent_patterns = TrieMap(len(darray.id2word)) * super_frequent_patterns = TrieMap(len(darray.id2word)) * collocations = TrieMap(len(darray.id2word)) # <<<<<<<<<<<<<< @@ -33768,7 +33769,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_v_collocations = ((struct __pyx_obj_4cdec_2sa_3_sa_TrieMap *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":291 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":291 * collocations = TrieMap(len(darray.id2word)) * * I_set = set() # <<<<<<<<<<<<<< @@ -33780,7 +33781,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_v_I_set = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":292 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":292 * * I_set = set() * J_set = set() # <<<<<<<<<<<<<< @@ -33792,7 +33793,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_v_J_set = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":293 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":293 * I_set = set() * J_set = set() * J2_set = set() # <<<<<<<<<<<<<< @@ -33804,7 +33805,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_v_J2_set = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":294 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":294 * J_set = set() * J2_set = set() * IJ_set = set() # <<<<<<<<<<<<<< @@ -33816,7 +33817,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_v_IJ_set = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":295 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":295 * J2_set = set() * IJ_set = set() * pattern_rank = {} # <<<<<<<<<<<<<< @@ -33828,7 +33829,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_v_pattern_rank = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":297 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":297 * pattern_rank = {} * * logger.info("Precomputing frequent intersections") # <<<<<<<<<<<<<< @@ -33845,7 +33846,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":298 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":298 * * logger.info("Precomputing frequent intersections") * cdef float start_time = monitor_cpu() # <<<<<<<<<<<<<< @@ -33861,7 +33862,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_start_time = __pyx_t_4; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":300 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":300 * cdef float start_time = monitor_cpu() * * max_pattern_len = 0 # <<<<<<<<<<<<<< @@ -33870,7 +33871,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p */ __pyx_v_max_pattern_len = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":301 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":301 * * max_pattern_len = 0 * for rank, (_, _, phrase) in enumerate(stats): # <<<<<<<<<<<<<< @@ -33985,7 +33986,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_t_3 = __pyx_t_6; __pyx_t_6 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":302 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":302 * max_pattern_len = 0 * for rank, (_, _, phrase) in enumerate(stats): * if rank >= self.precompute_rank: # <<<<<<<<<<<<<< @@ -34000,7 +34001,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (__pyx_t_12) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":303 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":303 * for rank, (_, _, phrase) in enumerate(stats): * if rank >= self.precompute_rank: * break # <<<<<<<<<<<<<< @@ -34010,7 +34011,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p goto __pyx_L4_break; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":304 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":304 * if rank >= self.precompute_rank: * break * max_pattern_len = max(max_pattern_len, len(phrase)) # <<<<<<<<<<<<<< @@ -34026,7 +34027,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p } __pyx_v_max_pattern_len = __pyx_t_15; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":305 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":305 * break * max_pattern_len = max(max_pattern_len, len(phrase)) * frequent_patterns.insert(phrase) # <<<<<<<<<<<<<< @@ -34046,7 +34047,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":306 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":306 * max_pattern_len = max(max_pattern_len, len(phrase)) * frequent_patterns.insert(phrase) * I_set.add(phrase) # <<<<<<<<<<<<<< @@ -34055,7 +34056,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p */ __pyx_t_16 = PySet_Add(__pyx_v_I_set, __pyx_v_phrase); if (unlikely(__pyx_t_16 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":307 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":307 * frequent_patterns.insert(phrase) * I_set.add(phrase) * pattern_rank[phrase] = rank # <<<<<<<<<<<<<< @@ -34064,7 +34065,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p */ if (unlikely(PyDict_SetItem(__pyx_v_pattern_rank, __pyx_v_phrase, __pyx_v_rank) < 0)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":308 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":308 * I_set.add(phrase) * pattern_rank[phrase] = rank * if rank < self.precompute_secondary_rank: # <<<<<<<<<<<<<< @@ -34079,7 +34080,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_12) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":309 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":309 * pattern_rank[phrase] = rank * if rank < self.precompute_secondary_rank: * super_frequent_patterns.insert(phrase) # <<<<<<<<<<<<<< @@ -34099,7 +34100,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":310 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":310 * if rank < self.precompute_secondary_rank: * super_frequent_patterns.insert(phrase) * J_set.add(phrase) # <<<<<<<<<<<<<< @@ -34115,7 +34116,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":312 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":312 * J_set.add(phrase) * * queue = IntList(increment=1000) # <<<<<<<<<<<<<< @@ -34131,7 +34132,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_v_queue = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":314 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":314 * queue = IntList(increment=1000) * * logger.info(" Computing inverted indexes...") # <<<<<<<<<<<<<< @@ -34148,7 +34149,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":315 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":315 * * logger.info(" Computing inverted indexes...") * N = len(data) # <<<<<<<<<<<<<< @@ -34158,7 +34159,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_data)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_N = __pyx_t_2; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":316 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":316 * logger.info(" Computing inverted indexes...") * N = len(data) * for i from 0 <= i < N: # <<<<<<<<<<<<<< @@ -34168,7 +34169,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_t_14 = __pyx_v_N; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_14; __pyx_v_i++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":317 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":317 * N = len(data) * for i from 0 <= i < N: * sa_word_id = data.arr[i] # <<<<<<<<<<<<<< @@ -34177,7 +34178,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p */ __pyx_v_sa_word_id = (__pyx_v_data->arr[__pyx_v_i]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":318 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":318 * for i from 0 <= i < N: * sa_word_id = data.arr[i] * if sa_word_id == 1: # <<<<<<<<<<<<<< @@ -34187,7 +34188,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_t_12 = ((__pyx_v_sa_word_id == 1) != 0); if (__pyx_t_12) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":319 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":319 * sa_word_id = data.arr[i] * if sa_word_id == 1: * queue._append(-1) # <<<<<<<<<<<<<< @@ -34199,7 +34200,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":321 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":321 * queue._append(-1) * else: * for l from 1 <= l <= max_pattern_len: # <<<<<<<<<<<<<< @@ -34209,7 +34210,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_t_17 = __pyx_v_max_pattern_len; for (__pyx_v_l = 1; __pyx_v_l <= __pyx_t_17; __pyx_v_l++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":322 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":322 * else: * for l from 1 <= l <= max_pattern_len: * node = frequent_patterns._contains(data.arr+i, l) # <<<<<<<<<<<<<< @@ -34218,7 +34219,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p */ __pyx_v_node = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_TrieMap *)__pyx_v_frequent_patterns->__pyx_vtab)->_contains(__pyx_v_frequent_patterns, (__pyx_v_data->arr + __pyx_v_i), __pyx_v_l); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":323 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":323 * for l from 1 <= l <= max_pattern_len: * node = frequent_patterns._contains(data.arr+i, l) * if node == NULL: # <<<<<<<<<<<<<< @@ -34228,7 +34229,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_t_12 = ((__pyx_v_node == NULL) != 0); if (__pyx_t_12) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":324 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":324 * node = frequent_patterns._contains(data.arr+i, l) * if node == NULL: * break # <<<<<<<<<<<<<< @@ -34238,7 +34239,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p goto __pyx_L13_break; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":325 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":325 * if node == NULL: * break * queue._append(i) # <<<<<<<<<<<<<< @@ -34247,7 +34248,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_queue->__pyx_vtab)->_append(__pyx_v_queue, __pyx_v_i); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":326 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":326 * break * queue._append(i) * queue._append(l) # <<<<<<<<<<<<<< @@ -34256,7 +34257,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_queue->__pyx_vtab)->_append(__pyx_v_queue, __pyx_v_l); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":327 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":327 * queue._append(i) * queue._append(l) * trie_node_data_append(node, i) # <<<<<<<<<<<<<< @@ -34272,7 +34273,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_L11:; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":329 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":329 * trie_node_data_append(node, i) * * logger.info(" Computing collocations...") # <<<<<<<<<<<<<< @@ -34289,7 +34290,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":330 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":330 * * logger.info(" Computing collocations...") * N = len(queue) # <<<<<<<<<<<<<< @@ -34299,7 +34300,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_t_2 = PyObject_Length(((PyObject *)__pyx_v_queue)); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_N = __pyx_t_2; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":331 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":331 * logger.info(" Computing collocations...") * N = len(queue) * ptr1 = 0 # <<<<<<<<<<<<<< @@ -34308,7 +34309,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p */ __pyx_v_ptr1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":332 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":332 * N = len(queue) * ptr1 = 0 * sent_count = 0 # <<<<<<<<<<<<<< @@ -34317,7 +34318,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p */ __pyx_v_sent_count = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":333 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":333 * ptr1 = 0 * sent_count = 0 * while ptr1 < N: # main loop # <<<<<<<<<<<<<< @@ -34328,7 +34329,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_t_12 = ((__pyx_v_ptr1 < __pyx_v_N) != 0); if (!__pyx_t_12) break; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":334 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":334 * sent_count = 0 * while ptr1 < N: # main loop * i1 = queue.arr[ptr1] # <<<<<<<<<<<<<< @@ -34337,7 +34338,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p */ __pyx_v_i1 = (__pyx_v_queue->arr[__pyx_v_ptr1]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":335 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":335 * while ptr1 < N: # main loop * i1 = queue.arr[ptr1] * if i1 > -1: # <<<<<<<<<<<<<< @@ -34347,7 +34348,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_t_12 = ((__pyx_v_i1 > -1) != 0); if (__pyx_t_12) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":336 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":336 * i1 = queue.arr[ptr1] * if i1 > -1: * l1 = queue.arr[ptr1+1] # <<<<<<<<<<<<<< @@ -34356,7 +34357,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p */ __pyx_v_l1 = (__pyx_v_queue->arr[(__pyx_v_ptr1 + 1)]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":337 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":337 * if i1 > -1: * l1 = queue.arr[ptr1+1] * ptr2 = ptr1 + 2 # <<<<<<<<<<<<<< @@ -34365,7 +34366,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p */ __pyx_v_ptr2 = (__pyx_v_ptr1 + 2); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":338 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":338 * l1 = queue.arr[ptr1+1] * ptr2 = ptr1 + 2 * while ptr2 < N: # <<<<<<<<<<<<<< @@ -34376,7 +34377,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_t_12 = ((__pyx_v_ptr2 < __pyx_v_N) != 0); if (!__pyx_t_12) break; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":339 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":339 * ptr2 = ptr1 + 2 * while ptr2 < N: * i2 = queue.arr[ptr2] # <<<<<<<<<<<<<< @@ -34385,7 +34386,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p */ __pyx_v_i2 = (__pyx_v_queue->arr[__pyx_v_ptr2]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":340 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":340 * while ptr2 < N: * i2 = queue.arr[ptr2] * if i2 == -1 or i2 - i1 >= self.train_max_initial_size: # <<<<<<<<<<<<<< @@ -34401,7 +34402,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p } if (__pyx_t_19) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":341 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":341 * i2 = queue.arr[ptr2] * if i2 == -1 or i2 - i1 >= self.train_max_initial_size: * break # <<<<<<<<<<<<<< @@ -34411,7 +34412,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p goto __pyx_L19_break; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":342 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":342 * if i2 == -1 or i2 - i1 >= self.train_max_initial_size: * break * l2 = queue.arr[ptr2+1] # <<<<<<<<<<<<<< @@ -34420,7 +34421,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p */ __pyx_v_l2 = (__pyx_v_queue->arr[(__pyx_v_ptr2 + 1)]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":343 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":343 * break * l2 = queue.arr[ptr2+1] * if (i2 - i1 - l1 >= self.train_min_gap_size and # <<<<<<<<<<<<<< @@ -34430,7 +34431,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_t_19 = ((((__pyx_v_i2 - __pyx_v_i1) - __pyx_v_l1) >= __pyx_v_self->train_min_gap_size) != 0); if (__pyx_t_19) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":344 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":344 * l2 = queue.arr[ptr2+1] * if (i2 - i1 - l1 >= self.train_min_gap_size and * i2 + l2 - i1 <= self.train_max_initial_size and # <<<<<<<<<<<<<< @@ -34440,7 +34441,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_t_12 = ((((__pyx_v_i2 + __pyx_v_l2) - __pyx_v_i1) <= __pyx_v_self->train_max_initial_size) != 0); if (__pyx_t_12) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":345 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":345 * if (i2 - i1 - l1 >= self.train_min_gap_size and * i2 + l2 - i1 <= self.train_max_initial_size and * l1+l2+1 <= self.max_length): # <<<<<<<<<<<<<< @@ -34458,7 +34459,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p } if (__pyx_t_12) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":346 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":346 * i2 + l2 - i1 <= self.train_max_initial_size and * l1+l2+1 <= self.max_length): * node = collocations._insert(data.arr+i1, l1) # <<<<<<<<<<<<<< @@ -34467,7 +34468,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p */ __pyx_v_node = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_TrieMap *)__pyx_v_collocations->__pyx_vtab)->_insert(__pyx_v_collocations, (__pyx_v_data->arr + __pyx_v_i1), __pyx_v_l1); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":347 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":347 * l1+l2+1 <= self.max_length): * node = collocations._insert(data.arr+i1, l1) * node = trie_insert(node, -1) # <<<<<<<<<<<<<< @@ -34476,7 +34477,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p */ __pyx_v_node = __pyx_f_4cdec_2sa_3_sa_trie_insert(__pyx_v_node, -1); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":348 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":348 * node = collocations._insert(data.arr+i1, l1) * node = trie_insert(node, -1) * for i from i2 <= i < i2+l2: # <<<<<<<<<<<<<< @@ -34486,7 +34487,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_t_14 = (__pyx_v_i2 + __pyx_v_l2); for (__pyx_v_i = __pyx_v_i2; __pyx_v_i < __pyx_t_14; __pyx_v_i++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":349 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":349 * node = trie_insert(node, -1) * for i from i2 <= i < i2+l2: * node = trie_insert(node, data.arr[i]) # <<<<<<<<<<<<<< @@ -34496,7 +34497,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_v_node = __pyx_f_4cdec_2sa_3_sa_trie_insert(__pyx_v_node, (__pyx_v_data->arr[__pyx_v_i])); } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":350 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":350 * for i from i2 <= i < i2+l2: * node = trie_insert(node, data.arr[i]) * trie_node_data_append(node, i1) # <<<<<<<<<<<<<< @@ -34507,7 +34508,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":351 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":351 * node = trie_insert(node, data.arr[i]) * trie_node_data_append(node, i1) * trie_node_data_append(node, i2) # <<<<<<<<<<<<<< @@ -34518,7 +34519,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":352 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":352 * trie_node_data_append(node, i1) * trie_node_data_append(node, i2) * if super_frequent_patterns._contains(data.arr+i2, l2) != NULL: # <<<<<<<<<<<<<< @@ -34528,7 +34529,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_t_12 = ((((struct __pyx_vtabstruct_4cdec_2sa_3_sa_TrieMap *)__pyx_v_super_frequent_patterns->__pyx_vtab)->_contains(__pyx_v_super_frequent_patterns, (__pyx_v_data->arr + __pyx_v_i2), __pyx_v_l2) != NULL) != 0); if (__pyx_t_12) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":353 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":353 * trie_node_data_append(node, i2) * if super_frequent_patterns._contains(data.arr+i2, l2) != NULL: * if super_frequent_patterns._contains(data.arr+i1, l1) != NULL: # <<<<<<<<<<<<<< @@ -34538,7 +34539,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_t_12 = ((((struct __pyx_vtabstruct_4cdec_2sa_3_sa_TrieMap *)__pyx_v_super_frequent_patterns->__pyx_vtab)->_contains(__pyx_v_super_frequent_patterns, (__pyx_v_data->arr + __pyx_v_i1), __pyx_v_l1) != NULL) != 0); if (__pyx_t_12) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":354 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":354 * if super_frequent_patterns._contains(data.arr+i2, l2) != NULL: * if super_frequent_patterns._contains(data.arr+i1, l1) != NULL: * is_super = 1 # <<<<<<<<<<<<<< @@ -34550,7 +34551,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":356 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":356 * is_super = 1 * else: * is_super = 0 # <<<<<<<<<<<<<< @@ -34561,7 +34562,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p } __pyx_L25:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":357 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":357 * else: * is_super = 0 * ptr3 = ptr2 + 2 # <<<<<<<<<<<<<< @@ -34570,7 +34571,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p */ __pyx_v_ptr3 = (__pyx_v_ptr2 + 2); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":358 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":358 * is_super = 0 * ptr3 = ptr2 + 2 * while ptr3 < N: # <<<<<<<<<<<<<< @@ -34581,7 +34582,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_t_12 = ((__pyx_v_ptr3 < __pyx_v_N) != 0); if (!__pyx_t_12) break; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":359 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":359 * ptr3 = ptr2 + 2 * while ptr3 < N: * i3 = queue.arr[ptr3] # <<<<<<<<<<<<<< @@ -34590,7 +34591,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p */ __pyx_v_i3 = (__pyx_v_queue->arr[__pyx_v_ptr3]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":360 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":360 * while ptr3 < N: * i3 = queue.arr[ptr3] * if i3 == -1 or i3 - i1 >= self.train_max_initial_size: # <<<<<<<<<<<<<< @@ -34606,7 +34607,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p } if (__pyx_t_20) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":361 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":361 * i3 = queue.arr[ptr3] * if i3 == -1 or i3 - i1 >= self.train_max_initial_size: * break # <<<<<<<<<<<<<< @@ -34616,7 +34617,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p goto __pyx_L27_break; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":362 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":362 * if i3 == -1 or i3 - i1 >= self.train_max_initial_size: * break * l3 = queue.arr[ptr3+1] # <<<<<<<<<<<<<< @@ -34625,7 +34626,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p */ __pyx_v_l3 = (__pyx_v_queue->arr[(__pyx_v_ptr3 + 1)]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":363 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":363 * break * l3 = queue.arr[ptr3+1] * if (i3 - i2 - l2 >= self.train_min_gap_size and # <<<<<<<<<<<<<< @@ -34635,7 +34636,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_t_20 = ((((__pyx_v_i3 - __pyx_v_i2) - __pyx_v_l2) >= __pyx_v_self->train_min_gap_size) != 0); if (__pyx_t_20) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":364 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":364 * l3 = queue.arr[ptr3+1] * if (i3 - i2 - l2 >= self.train_min_gap_size and * i3 + l3 - i1 <= self.train_max_initial_size and # <<<<<<<<<<<<<< @@ -34645,7 +34646,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_t_12 = ((((__pyx_v_i3 + __pyx_v_l3) - __pyx_v_i1) <= __pyx_v_self->train_max_initial_size) != 0); if (__pyx_t_12) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":365 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":365 * if (i3 - i2 - l2 >= self.train_min_gap_size and * i3 + l3 - i1 <= self.train_max_initial_size and * l1+l2+l3+2 <= self.max_length): # <<<<<<<<<<<<<< @@ -34663,7 +34664,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p } if (__pyx_t_12) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":366 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":366 * i3 + l3 - i1 <= self.train_max_initial_size and * l1+l2+l3+2 <= self.max_length): * if is_super or super_frequent_patterns._contains(data.arr+i3, l3) != NULL: # <<<<<<<<<<<<<< @@ -34678,7 +34679,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p } if (__pyx_t_20) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":367 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":367 * l1+l2+l3+2 <= self.max_length): * if is_super or super_frequent_patterns._contains(data.arr+i3, l3) != NULL: * node = collocations._insert(data.arr+i1, l1) # <<<<<<<<<<<<<< @@ -34687,7 +34688,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p */ __pyx_v_node = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_TrieMap *)__pyx_v_collocations->__pyx_vtab)->_insert(__pyx_v_collocations, (__pyx_v_data->arr + __pyx_v_i1), __pyx_v_l1); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":368 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":368 * if is_super or super_frequent_patterns._contains(data.arr+i3, l3) != NULL: * node = collocations._insert(data.arr+i1, l1) * node = trie_insert(node, -1) # <<<<<<<<<<<<<< @@ -34696,7 +34697,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p */ __pyx_v_node = __pyx_f_4cdec_2sa_3_sa_trie_insert(__pyx_v_node, -1); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":369 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":369 * node = collocations._insert(data.arr+i1, l1) * node = trie_insert(node, -1) * for i from i2 <= i < i2+l2: # <<<<<<<<<<<<<< @@ -34706,7 +34707,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_t_14 = (__pyx_v_i2 + __pyx_v_l2); for (__pyx_v_i = __pyx_v_i2; __pyx_v_i < __pyx_t_14; __pyx_v_i++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":370 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":370 * node = trie_insert(node, -1) * for i from i2 <= i < i2+l2: * node = trie_insert(node, data.arr[i]) # <<<<<<<<<<<<<< @@ -34716,7 +34717,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_v_node = __pyx_f_4cdec_2sa_3_sa_trie_insert(__pyx_v_node, (__pyx_v_data->arr[__pyx_v_i])); } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":371 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":371 * for i from i2 <= i < i2+l2: * node = trie_insert(node, data.arr[i]) * node = trie_insert(node, -1) # <<<<<<<<<<<<<< @@ -34725,7 +34726,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p */ __pyx_v_node = __pyx_f_4cdec_2sa_3_sa_trie_insert(__pyx_v_node, -1); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":372 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":372 * node = trie_insert(node, data.arr[i]) * node = trie_insert(node, -1) * for i from i3 <= i < i3+l3: # <<<<<<<<<<<<<< @@ -34735,7 +34736,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_t_14 = (__pyx_v_i3 + __pyx_v_l3); for (__pyx_v_i = __pyx_v_i3; __pyx_v_i < __pyx_t_14; __pyx_v_i++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":373 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":373 * node = trie_insert(node, -1) * for i from i3 <= i < i3+l3: * node = trie_insert(node, data.arr[i]) # <<<<<<<<<<<<<< @@ -34745,7 +34746,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_v_node = __pyx_f_4cdec_2sa_3_sa_trie_insert(__pyx_v_node, (__pyx_v_data->arr[__pyx_v_i])); } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":374 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":374 * for i from i3 <= i < i3+l3: * node = trie_insert(node, data.arr[i]) * trie_node_data_append(node, i1) # <<<<<<<<<<<<<< @@ -34756,7 +34757,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":375 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":375 * node = trie_insert(node, data.arr[i]) * trie_node_data_append(node, i1) * trie_node_data_append(node, i2) # <<<<<<<<<<<<<< @@ -34767,7 +34768,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":376 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":376 * trie_node_data_append(node, i1) * trie_node_data_append(node, i2) * trie_node_data_append(node, i3) # <<<<<<<<<<<<<< @@ -34784,7 +34785,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p } __pyx_L29:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":377 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":377 * trie_node_data_append(node, i2) * trie_node_data_append(node, i3) * ptr3 = ptr3 + 2 # <<<<<<<<<<<<<< @@ -34801,7 +34802,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p } __pyx_L21:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":378 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":378 * trie_node_data_append(node, i3) * ptr3 = ptr3 + 2 * ptr2 = ptr2 + 2 # <<<<<<<<<<<<<< @@ -34812,7 +34813,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p } __pyx_L19_break:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":379 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":379 * ptr3 = ptr3 + 2 * ptr2 = ptr2 + 2 * ptr1 = ptr1 + 2 # <<<<<<<<<<<<<< @@ -34824,7 +34825,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":381 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":381 * ptr1 = ptr1 + 2 * else: * sent_count = sent_count + 1 # <<<<<<<<<<<<<< @@ -34833,7 +34834,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p */ __pyx_v_sent_count = (__pyx_v_sent_count + 1); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":382 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":382 * else: * sent_count = sent_count + 1 * if sent_count % 10000 == 0: # <<<<<<<<<<<<<< @@ -34843,7 +34844,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_t_20 = ((__Pyx_mod_long(__pyx_v_sent_count, 10000) == 0) != 0); if (__pyx_t_20) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":383 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":383 * sent_count = sent_count + 1 * if sent_count % 10000 == 0: * logger.debug(" %d sentences", sent_count) # <<<<<<<<<<<<<< @@ -34874,7 +34875,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p } __pyx_L35:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":384 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":384 * if sent_count % 10000 == 0: * logger.debug(" %d sentences", sent_count) * ptr1 = ptr1 + 1 # <<<<<<<<<<<<<< @@ -34886,7 +34887,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_L17:; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":386 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":386 * ptr1 = ptr1 + 1 * * self.precomputed_collocations = collocations.toMap(False) # <<<<<<<<<<<<<< @@ -34904,7 +34905,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_v_self->precomputed_collocations = __pyx_t_9; __pyx_t_9 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":387 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":387 * * self.precomputed_collocations = collocations.toMap(False) * self.precomputed_index = frequent_patterns.toMap(True) # <<<<<<<<<<<<<< @@ -34922,7 +34923,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_v_self->precomputed_index = __pyx_t_1; __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":389 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":389 * self.precomputed_index = frequent_patterns.toMap(True) * * x = 0 # <<<<<<<<<<<<<< @@ -34932,7 +34933,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_INCREF(__pyx_int_0); __pyx_v_x = __pyx_int_0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":390 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":390 * * x = 0 * for pattern1 in J_set: # <<<<<<<<<<<<<< @@ -34958,7 +34959,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_XDECREF_SET(__pyx_v_pattern1, __pyx_t_9); __pyx_t_9 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":391 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":391 * x = 0 * for pattern1 in J_set: * for pattern2 in J_set: # <<<<<<<<<<<<<< @@ -34984,7 +34985,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_XDECREF_SET(__pyx_v_pattern2, __pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":392 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":392 * for pattern1 in J_set: * for pattern2 in J_set: * if len(pattern1) + len(pattern2) + 1 < self.max_length: # <<<<<<<<<<<<<< @@ -34996,7 +34997,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_t_20 = ((((__pyx_t_2 + __pyx_t_15) + 1) < __pyx_v_self->max_length) != 0); if (__pyx_t_20) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":393 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":393 * for pattern2 in J_set: * if len(pattern1) + len(pattern2) + 1 < self.max_length: * combined_pattern = pattern1 + (-1,) + pattern2 # <<<<<<<<<<<<<< @@ -35011,7 +35012,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_XDECREF_SET(__pyx_v_combined_pattern, __pyx_t_8); __pyx_t_8 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":394 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":394 * if len(pattern1) + len(pattern2) + 1 < self.max_length: * combined_pattern = pattern1 + (-1,) + pattern2 * J2_set.add(combined_pattern) # <<<<<<<<<<<<<< @@ -35027,7 +35028,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":396 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":396 * J2_set.add(combined_pattern) * * for pattern1 in I_set: # <<<<<<<<<<<<<< @@ -35053,7 +35054,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_XDECREF_SET(__pyx_v_pattern1, __pyx_t_9); __pyx_t_9 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":397 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":397 * * for pattern1 in I_set: * for pattern2 in I_set: # <<<<<<<<<<<<<< @@ -35079,7 +35080,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_XDECREF_SET(__pyx_v_pattern2, __pyx_t_8); __pyx_t_8 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":398 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":398 * for pattern1 in I_set: * for pattern2 in I_set: * x = x+1 # <<<<<<<<<<<<<< @@ -35091,7 +35092,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_DECREF_SET(__pyx_v_x, __pyx_t_8); __pyx_t_8 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":399 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":399 * for pattern2 in I_set: * x = x+1 * if len(pattern1) + len(pattern2) + 1 <= self.max_length: # <<<<<<<<<<<<<< @@ -35103,7 +35104,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_t_20 = ((((__pyx_t_15 + __pyx_t_2) + 1) <= __pyx_v_self->max_length) != 0); if (__pyx_t_20) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":400 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":400 * x = x+1 * if len(pattern1) + len(pattern2) + 1 <= self.max_length: * combined_pattern = pattern1 + (-1,) + pattern2 # <<<<<<<<<<<<<< @@ -35118,7 +35119,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_XDECREF_SET(__pyx_v_combined_pattern, __pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":401 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":401 * if len(pattern1) + len(pattern2) + 1 <= self.max_length: * combined_pattern = pattern1 + (-1,) + pattern2 * IJ_set.add(combined_pattern) # <<<<<<<<<<<<<< @@ -35134,7 +35135,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":403 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":403 * IJ_set.add(combined_pattern) * * for pattern1 in I_set: # <<<<<<<<<<<<<< @@ -35160,7 +35161,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_XDECREF_SET(__pyx_v_pattern1, __pyx_t_9); __pyx_t_9 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":404 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":404 * * for pattern1 in I_set: * for pattern2 in J2_set: # <<<<<<<<<<<<<< @@ -35186,7 +35187,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_XDECREF_SET(__pyx_v_pattern2, __pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":405 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":405 * for pattern1 in I_set: * for pattern2 in J2_set: * x = x+2 # <<<<<<<<<<<<<< @@ -35198,7 +35199,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_DECREF_SET(__pyx_v_x, __pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":406 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":406 * for pattern2 in J2_set: * x = x+2 * if len(pattern1) + len(pattern2) + 1<= self.max_length: # <<<<<<<<<<<<<< @@ -35210,7 +35211,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_t_20 = ((((__pyx_t_2 + __pyx_t_15) + 1) <= __pyx_v_self->max_length) != 0); if (__pyx_t_20) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":407 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":407 * x = x+2 * if len(pattern1) + len(pattern2) + 1<= self.max_length: * combined_pattern = pattern1 + (-1,) + pattern2 # <<<<<<<<<<<<<< @@ -35225,7 +35226,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_XDECREF_SET(__pyx_v_combined_pattern, __pyx_t_8); __pyx_t_8 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":408 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":408 * if len(pattern1) + len(pattern2) + 1<= self.max_length: * combined_pattern = pattern1 + (-1,) + pattern2 * IJ_set.add(combined_pattern) # <<<<<<<<<<<<<< @@ -35234,7 +35235,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p */ __pyx_t_16 = PySet_Add(__pyx_v_IJ_set, __pyx_v_combined_pattern); if (unlikely(__pyx_t_16 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 408; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":409 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":409 * combined_pattern = pattern1 + (-1,) + pattern2 * IJ_set.add(combined_pattern) * combined_pattern = pattern2 + (-1,) + pattern1 # <<<<<<<<<<<<<< @@ -35249,7 +35250,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_DECREF_SET(__pyx_v_combined_pattern, __pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":410 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":410 * IJ_set.add(combined_pattern) * combined_pattern = pattern2 + (-1,) + pattern1 * IJ_set.add(combined_pattern) # <<<<<<<<<<<<<< @@ -35265,7 +35266,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":412 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":412 * IJ_set.add(combined_pattern) * * N = len(pattern_rank) # <<<<<<<<<<<<<< @@ -35275,7 +35276,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_t_15 = PyDict_Size(__pyx_v_pattern_rank); if (unlikely(__pyx_t_15 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_N = __pyx_t_15; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":413 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":413 * * N = len(pattern_rank) * cost_by_rank = IntList(initial_len=N) # <<<<<<<<<<<<<< @@ -35294,7 +35295,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_v_cost_by_rank = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_9); __pyx_t_9 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":414 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":414 * N = len(pattern_rank) * cost_by_rank = IntList(initial_len=N) * count_by_rank = IntList(initial_len=N) # <<<<<<<<<<<<<< @@ -35313,7 +35314,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_v_count_by_rank = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":415 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":415 * cost_by_rank = IntList(initial_len=N) * count_by_rank = IntList(initial_len=N) * for pattern, arr in self.precomputed_collocations.iteritems(): # <<<<<<<<<<<<<< @@ -35341,7 +35342,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_XDECREF_SET(__pyx_v_arr, __pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":416 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":416 * count_by_rank = IntList(initial_len=N) * for pattern, arr in self.precomputed_collocations.iteritems(): * if pattern not in IJ_set: # <<<<<<<<<<<<<< @@ -35352,7 +35353,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_t_12 = (__pyx_t_20 != 0); if (__pyx_t_12) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":417 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":417 * for pattern, arr in self.precomputed_collocations.iteritems(): * if pattern not in IJ_set: * s = "" # <<<<<<<<<<<<<< @@ -35362,7 +35363,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_INCREF(__pyx_kp_s__32); __Pyx_XDECREF_SET(__pyx_v_s, __pyx_kp_s__32); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":418 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":418 * if pattern not in IJ_set: * s = "" * for word_id in pattern: # <<<<<<<<<<<<<< @@ -35407,7 +35408,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_XDECREF_SET(__pyx_v_word_id, __pyx_t_9); __pyx_t_9 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":419 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":419 * s = "" * for word_id in pattern: * if word_id == -1: # <<<<<<<<<<<<<< @@ -35419,7 +35420,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (__pyx_t_12) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":420 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":420 * for word_id in pattern: * if word_id == -1: * s = s + "X " # <<<<<<<<<<<<<< @@ -35434,7 +35435,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":422 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":422 * s = s + "X " * else: * s = s + darray.id2word[word_id] + " " # <<<<<<<<<<<<<< @@ -35456,7 +35457,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":423 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":423 * else: * s = s + darray.id2word[word_id] + " " * logger.warn("ERROR: unexpected pattern %s in set of precomputed collocations", s) # <<<<<<<<<<<<<< @@ -35485,7 +35486,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":425 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":425 * logger.warn("ERROR: unexpected pattern %s in set of precomputed collocations", s) * else: * chunk = () # <<<<<<<<<<<<<< @@ -35495,7 +35496,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_INCREF(__pyx_empty_tuple); __Pyx_XDECREF_SET(__pyx_v_chunk, __pyx_empty_tuple); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":426 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":426 * else: * chunk = () * max_rank = 0 # <<<<<<<<<<<<<< @@ -35504,7 +35505,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p */ __pyx_v_max_rank = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":427 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":427 * chunk = () * max_rank = 0 * arity = 0 # <<<<<<<<<<<<<< @@ -35514,7 +35515,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_INCREF(__pyx_int_0); __Pyx_XDECREF_SET(__pyx_v_arity, __pyx_int_0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":428 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":428 * max_rank = 0 * arity = 0 * for word_id in pattern: # <<<<<<<<<<<<<< @@ -35559,7 +35560,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_XDECREF_SET(__pyx_v_word_id, __pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":429 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":429 * arity = 0 * for word_id in pattern: * if word_id == -1: # <<<<<<<<<<<<<< @@ -35571,7 +35572,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_12) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":430 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":430 * for word_id in pattern: * if word_id == -1: * max_rank = max(max_rank, pattern_rank[chunk]) # <<<<<<<<<<<<<< @@ -35601,7 +35602,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_v_max_rank = __pyx_t_17; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":431 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":431 * if word_id == -1: * max_rank = max(max_rank, pattern_rank[chunk]) * arity = arity + 1 # <<<<<<<<<<<<<< @@ -35613,7 +35614,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_DECREF_SET(__pyx_v_arity, __pyx_t_9); __pyx_t_9 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":432 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":432 * max_rank = max(max_rank, pattern_rank[chunk]) * arity = arity + 1 * chunk = () # <<<<<<<<<<<<<< @@ -35626,7 +35627,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":434 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":434 * chunk = () * else: * chunk = chunk + (word_id,) # <<<<<<<<<<<<<< @@ -35648,7 +35649,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":435 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":435 * else: * chunk = chunk + (word_id,) * max_rank = max(max_rank, pattern_rank[chunk]) # <<<<<<<<<<<<<< @@ -35678,7 +35679,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_max_rank = __pyx_t_17; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":436 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":436 * chunk = chunk + (word_id,) * max_rank = max(max_rank, pattern_rank[chunk]) * cost_by_rank.arr[max_rank] = cost_by_rank.arr[max_rank] + (4*len(arr)) # <<<<<<<<<<<<<< @@ -35688,7 +35689,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_t_13 = PyObject_Length(__pyx_v_arr); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[11]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;} (__pyx_v_cost_by_rank->arr[__pyx_v_max_rank]) = ((__pyx_v_cost_by_rank->arr[__pyx_v_max_rank]) + (4 * __pyx_t_13)); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":437 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":437 * max_rank = max(max_rank, pattern_rank[chunk]) * cost_by_rank.arr[max_rank] = cost_by_rank.arr[max_rank] + (4*len(arr)) * count_by_rank.arr[max_rank] = count_by_rank.arr[max_rank] + (len(arr)/(arity+1)) # <<<<<<<<<<<<<< @@ -35718,7 +35719,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":439 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":439 * count_by_rank.arr[max_rank] = count_by_rank.arr[max_rank] + (len(arr)/(arity+1)) * * cumul_cost = 0 # <<<<<<<<<<<<<< @@ -35728,7 +35729,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_INCREF(__pyx_int_0); __pyx_v_cumul_cost = __pyx_int_0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":440 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":440 * * cumul_cost = 0 * cumul_count = 0 # <<<<<<<<<<<<<< @@ -35738,7 +35739,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_INCREF(__pyx_int_0); __pyx_v_cumul_count = __pyx_int_0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":441 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":441 * cumul_cost = 0 * cumul_count = 0 * for i from 0 <= i < N: # <<<<<<<<<<<<<< @@ -35748,7 +35749,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_t_14 = __pyx_v_N; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_14; __pyx_v_i++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":442 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":442 * cumul_count = 0 * for i from 0 <= i < N: * cumul_cost = cumul_cost + cost_by_rank.arr[i] # <<<<<<<<<<<<<< @@ -35763,7 +35764,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_DECREF_SET(__pyx_v_cumul_cost, __pyx_t_7); __pyx_t_7 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":443 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":443 * for i from 0 <= i < N: * cumul_cost = cumul_cost + cost_by_rank.arr[i] * cumul_count = cumul_count + count_by_rank.arr[i] # <<<<<<<<<<<<<< @@ -35778,7 +35779,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_DECREF_SET(__pyx_v_cumul_count, __pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":444 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":444 * cumul_cost = cumul_cost + cost_by_rank.arr[i] * cumul_count = cumul_count + count_by_rank.arr[i] * logger.debug("RANK %d\tCOUNT, COST: %d %d\tCUMUL: %d, %d", i, count_by_rank.arr[i], cost_by_rank.arr[i], cumul_count, cumul_cost) # <<<<<<<<<<<<<< @@ -35823,7 +35824,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":446 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":446 * logger.debug("RANK %d\tCOUNT, COST: %d %d\tCUMUL: %d, %d", i, count_by_rank.arr[i], cost_by_rank.arr[i], cumul_count, cumul_cost) * * num_found_patterns = len(self.precomputed_collocations) # <<<<<<<<<<<<<< @@ -35836,7 +35837,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_num_found_patterns = __pyx_t_2; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":447 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":447 * * num_found_patterns = len(self.precomputed_collocations) * for pattern in IJ_set: # <<<<<<<<<<<<<< @@ -35862,7 +35863,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_XDECREF_SET(__pyx_v_pattern, __pyx_t_8); __pyx_t_8 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":448 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":448 * num_found_patterns = len(self.precomputed_collocations) * for pattern in IJ_set: * if pattern not in self.precomputed_collocations: # <<<<<<<<<<<<<< @@ -35873,7 +35874,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __pyx_t_20 = (__pyx_t_12 != 0); if (__pyx_t_20) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":449 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":449 * for pattern in IJ_set: * if pattern not in self.precomputed_collocations: * self.precomputed_collocations[pattern] = IntList() # <<<<<<<<<<<<<< @@ -35890,7 +35891,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":451 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":451 * self.precomputed_collocations[pattern] = IntList() * * cdef float stop_time = monitor_cpu() # <<<<<<<<<<<<<< @@ -35906,7 +35907,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_stop_time = __pyx_t_4; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":452 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":452 * * cdef float stop_time = monitor_cpu() * logger.info("Precomputed collocations for %d patterns out of %d possible (upper bound %d)", num_found_patterns, len(self.precomputed_collocations), x) # <<<<<<<<<<<<<< @@ -35946,7 +35947,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":453 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":453 * cdef float stop_time = monitor_cpu() * logger.info("Precomputed collocations for %d patterns out of %d possible (upper bound %d)", num_found_patterns, len(self.precomputed_collocations), x) * logger.info("Precomputed inverted index for %d patterns ", len(self.precomputed_index)) # <<<<<<<<<<<<<< @@ -35977,7 +35978,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":454 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":454 * logger.info("Precomputed collocations for %d patterns out of %d possible (upper bound %d)", num_found_patterns, len(self.precomputed_collocations), x) * logger.info("Precomputed inverted index for %d patterns ", len(self.precomputed_index)) * logger.info("Precomputation took %f seconds", (stop_time - start_time)) # <<<<<<<<<<<<<< @@ -36003,7 +36004,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":278 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":278 * * * def precompute(self, stats, SuffixArray sarray): # <<<<<<<<<<<<<< @@ -36058,7 +36059,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_14Precomputation_6precompute(struct __p return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":11 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":11 * cdef IntList ha * * def __cinit__(self, from_binary=None, from_text=None, side=None): # <<<<<<<<<<<<<< @@ -36155,7 +36156,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_11SuffixArray___cinit__(struct __pyx_obj_4cde int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":12 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":12 * * def __cinit__(self, from_binary=None, from_text=None, side=None): * self.darray = DataArray() # <<<<<<<<<<<<<< @@ -36170,7 +36171,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_11SuffixArray___cinit__(struct __pyx_obj_4cde __pyx_v_self->darray = ((struct __pyx_obj_4cdec_2sa_3_sa_DataArray *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":13 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":13 * def __cinit__(self, from_binary=None, from_text=None, side=None): * self.darray = DataArray() * self.sa = IntList() # <<<<<<<<<<<<<< @@ -36185,7 +36186,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_11SuffixArray___cinit__(struct __pyx_obj_4cde __pyx_v_self->sa = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":14 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":14 * self.darray = DataArray() * self.sa = IntList() * self.ha = IntList() # <<<<<<<<<<<<<< @@ -36200,7 +36201,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_11SuffixArray___cinit__(struct __pyx_obj_4cde __pyx_v_self->ha = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":15 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":15 * self.sa = IntList() * self.ha = IntList() * if from_binary: # <<<<<<<<<<<<<< @@ -36210,7 +36211,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_11SuffixArray___cinit__(struct __pyx_obj_4cde __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_from_binary); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":16 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":16 * self.ha = IntList() * if from_binary: * self.read_binary(from_binary) # <<<<<<<<<<<<<< @@ -36232,7 +36233,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_11SuffixArray___cinit__(struct __pyx_obj_4cde goto __pyx_L3; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":17 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":17 * if from_binary: * self.read_binary(from_binary) * elif from_text: # <<<<<<<<<<<<<< @@ -36242,7 +36243,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_11SuffixArray___cinit__(struct __pyx_obj_4cde __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_from_text); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":18 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":18 * self.read_binary(from_binary) * elif from_text: * self.read_text(from_text, side) # <<<<<<<<<<<<<< @@ -36268,7 +36269,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_11SuffixArray___cinit__(struct __pyx_obj_4cde } __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":11 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":11 * cdef IntList ha * * def __cinit__(self, from_binary=None, from_text=None, side=None): # <<<<<<<<<<<<<< @@ -36290,7 +36291,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_11SuffixArray___cinit__(struct __pyx_obj_4cde return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":20 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":20 * self.read_text(from_text, side) * * def __getitem__(self, i): # <<<<<<<<<<<<<< @@ -36321,7 +36322,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_2__getitem__(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getitem__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":21 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":21 * * def __getitem__(self, i): * return self.sa.arr[i] # <<<<<<<<<<<<<< @@ -36336,7 +36337,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_2__getitem__(struct __pyx __pyx_t_2 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":20 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":20 * self.read_text(from_text, side) * * def __getitem__(self, i): # <<<<<<<<<<<<<< @@ -36355,7 +36356,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_2__getitem__(struct __pyx return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":23 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":23 * return self.sa.arr[i] * * def read_text(self, filename, side): # <<<<<<<<<<<<<< @@ -36458,7 +36459,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o int __pyx_clineno = 0; __Pyx_RefNannySetupContext("read_text", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":29 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":29 * cdef IntList isa, word_count * * self.darray = DataArray(from_text=filename, side=side, use_sent_id=True) # <<<<<<<<<<<<<< @@ -36479,7 +36480,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o __pyx_v_self->darray = ((struct __pyx_obj_4cdec_2sa_3_sa_DataArray *)__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":30 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":30 * * self.darray = DataArray(from_text=filename, side=side, use_sent_id=True) * N = len(self.darray) # <<<<<<<<<<<<<< @@ -36492,7 +36493,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_N = __pyx_t_3; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":31 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":31 * self.darray = DataArray(from_text=filename, side=side, use_sent_id=True) * N = len(self.darray) * V = len(self.darray.id2word) # <<<<<<<<<<<<<< @@ -36505,7 +36506,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_V = __pyx_t_3; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":33 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":33 * V = len(self.darray.id2word) * * self.sa = IntList(initial_len=N) # <<<<<<<<<<<<<< @@ -36527,7 +36528,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o __pyx_v_self->sa = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":34 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":34 * * self.sa = IntList(initial_len=N) * self.ha = IntList(initial_len=V+1) # <<<<<<<<<<<<<< @@ -36549,7 +36550,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o __pyx_v_self->ha = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":36 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":36 * self.ha = IntList(initial_len=V+1) * * isa = IntList(initial_len=N) # <<<<<<<<<<<<<< @@ -36568,7 +36569,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o __pyx_v_isa = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":37 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":37 * * isa = IntList(initial_len=N) * word_count = IntList(initial_len=V+1) # <<<<<<<<<<<<<< @@ -36587,7 +36588,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o __pyx_v_word_count = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":40 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":40 * * '''Step 1: bucket sort data''' * cdef float sort_start_time = monitor_cpu() # <<<<<<<<<<<<<< @@ -36603,7 +36604,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_sort_start_time = __pyx_t_4; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":41 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":41 * '''Step 1: bucket sort data''' * cdef float sort_start_time = monitor_cpu() * cdef float start_time = sort_start_time # <<<<<<<<<<<<<< @@ -36612,7 +36613,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o */ __pyx_v_start_time = __pyx_v_sort_start_time; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":42 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":42 * cdef float sort_start_time = monitor_cpu() * cdef float start_time = sort_start_time * for i from 0 <= i < N: # <<<<<<<<<<<<<< @@ -36622,7 +36623,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o __pyx_t_5 = __pyx_v_N; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_5; __pyx_v_i++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":43 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":43 * cdef float start_time = sort_start_time * for i from 0 <= i < N: * a_i = self.darray.data.arr[i] # <<<<<<<<<<<<<< @@ -36631,7 +36632,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o */ __pyx_v_a_i = (__pyx_v_self->darray->data->arr[__pyx_v_i]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":44 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":44 * for i from 0 <= i < N: * a_i = self.darray.data.arr[i] * word_count.arr[a_i] = word_count.arr[a_i] + 1 # <<<<<<<<<<<<<< @@ -36641,7 +36642,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o (__pyx_v_word_count->arr[__pyx_v_a_i]) = ((__pyx_v_word_count->arr[__pyx_v_a_i]) + 1); } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":46 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":46 * word_count.arr[a_i] = word_count.arr[a_i] + 1 * * n = 0 # <<<<<<<<<<<<<< @@ -36650,7 +36651,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o */ __pyx_v_n = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":47 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":47 * * n = 0 * for i from 0 <= i < V+1: # <<<<<<<<<<<<<< @@ -36660,7 +36661,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o __pyx_t_6 = (__pyx_v_V + 1); for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_6; __pyx_v_i++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":48 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":48 * n = 0 * for i from 0 <= i < V+1: * self.ha.arr[i] = n # <<<<<<<<<<<<<< @@ -36669,7 +36670,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o */ (__pyx_v_self->ha->arr[__pyx_v_i]) = __pyx_v_n; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":49 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":49 * for i from 0 <= i < V+1: * self.ha.arr[i] = n * n = n + word_count.arr[i] # <<<<<<<<<<<<<< @@ -36678,7 +36679,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o */ __pyx_v_n = (__pyx_v_n + (__pyx_v_word_count->arr[__pyx_v_i])); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":50 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":50 * self.ha.arr[i] = n * n = n + word_count.arr[i] * word_count.arr[i] = 0 # <<<<<<<<<<<<<< @@ -36688,7 +36689,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o (__pyx_v_word_count->arr[__pyx_v_i]) = 0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":52 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":52 * word_count.arr[i] = 0 * * for i from 0 <= i < N: # <<<<<<<<<<<<<< @@ -36698,7 +36699,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o __pyx_t_5 = __pyx_v_N; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_5; __pyx_v_i++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":53 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":53 * * for i from 0 <= i < N: * a_i = self.darray.data.arr[i] # <<<<<<<<<<<<<< @@ -36707,7 +36708,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o */ __pyx_v_a_i = (__pyx_v_self->darray->data->arr[__pyx_v_i]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":54 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":54 * for i from 0 <= i < N: * a_i = self.darray.data.arr[i] * self.sa.arr[self.ha.arr[a_i] + word_count.arr[a_i]] = i # <<<<<<<<<<<<<< @@ -36716,7 +36717,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o */ (__pyx_v_self->sa->arr[((__pyx_v_self->ha->arr[__pyx_v_a_i]) + (__pyx_v_word_count->arr[__pyx_v_a_i]))]) = __pyx_v_i; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":55 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":55 * a_i = self.darray.data.arr[i] * self.sa.arr[self.ha.arr[a_i] + word_count.arr[a_i]] = i * isa.arr[i] = self.ha.arr[a_i + 1] - 1 # bucket pointer is last index in bucket # <<<<<<<<<<<<<< @@ -36725,7 +36726,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o */ (__pyx_v_isa->arr[__pyx_v_i]) = ((__pyx_v_self->ha->arr[(__pyx_v_a_i + 1)]) - 1); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":56 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":56 * self.sa.arr[self.ha.arr[a_i] + word_count.arr[a_i]] = i * isa.arr[i] = self.ha.arr[a_i + 1] - 1 # bucket pointer is last index in bucket * word_count.arr[a_i] = word_count.arr[a_i] + 1 # <<<<<<<<<<<<<< @@ -36735,7 +36736,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o (__pyx_v_word_count->arr[__pyx_v_a_i]) = ((__pyx_v_word_count->arr[__pyx_v_a_i]) + 1); } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":59 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":59 * * '''Determine size of initial runs''' * current_run = 0 # <<<<<<<<<<<<<< @@ -36744,7 +36745,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o */ __pyx_v_current_run = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":60 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":60 * '''Determine size of initial runs''' * current_run = 0 * for i from 0 <= i < V+1: # <<<<<<<<<<<<<< @@ -36754,7 +36755,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o __pyx_t_6 = (__pyx_v_V + 1); for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_6; __pyx_v_i++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":61 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":61 * current_run = 0 * for i from 0 <= i < V+1: * if i < V and self.ha.arr[i+1] - self.ha.arr[i] == 1: # <<<<<<<<<<<<<< @@ -36770,7 +36771,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o } if (__pyx_t_9) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":62 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":62 * for i from 0 <= i < V+1: * if i < V and self.ha.arr[i+1] - self.ha.arr[i] == 1: * current_run = current_run + 1 # <<<<<<<<<<<<<< @@ -36782,7 +36783,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":64 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":64 * current_run = current_run + 1 * else: * if current_run > 0: # <<<<<<<<<<<<<< @@ -36792,7 +36793,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o __pyx_t_9 = ((__pyx_v_current_run > 0) != 0); if (__pyx_t_9) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":65 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":65 * else: * if current_run > 0: * self.sa.arr[self.ha.arr[i] - current_run] = -current_run # <<<<<<<<<<<<<< @@ -36801,7 +36802,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o */ (__pyx_v_self->sa->arr[((__pyx_v_self->ha->arr[__pyx_v_i]) - __pyx_v_current_run)]) = (-__pyx_v_current_run); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":66 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":66 * if current_run > 0: * self.sa.arr[self.ha.arr[i] - current_run] = -current_run * current_run = 0 # <<<<<<<<<<<<<< @@ -36816,7 +36817,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o __pyx_L11:; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":68 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":68 * current_run = 0 * * logger.info(" Bucket sort took %f seconds", (monitor_cpu() - sort_start_time)) # <<<<<<<<<<<<<< @@ -36853,7 +36854,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":71 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":71 * * '''Step 2: prefix-doubling sort''' * h = 1 # <<<<<<<<<<<<<< @@ -36862,7 +36863,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o */ __pyx_v_h = 1; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":72 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":72 * '''Step 2: prefix-doubling sort''' * h = 1 * while self.sa.arr[0] != -N: # <<<<<<<<<<<<<< @@ -36873,7 +36874,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o __pyx_t_9 = (((__pyx_v_self->sa->arr[0]) != (-__pyx_v_N)) != 0); if (!__pyx_t_9) break; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":73 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":73 * h = 1 * while self.sa.arr[0] != -N: * sort_start_time = monitor_cpu() # <<<<<<<<<<<<<< @@ -36889,7 +36890,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_sort_start_time = __pyx_t_4; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":74 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":74 * while self.sa.arr[0] != -N: * sort_start_time = monitor_cpu() * logger.debug(" Refining, sort depth = %d", h) # <<<<<<<<<<<<<< @@ -36917,7 +36918,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":75 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":75 * sort_start_time = monitor_cpu() * logger.debug(" Refining, sort depth = %d", h) * i = 0 # <<<<<<<<<<<<<< @@ -36926,7 +36927,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o */ __pyx_v_i = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":76 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":76 * logger.debug(" Refining, sort depth = %d", h) * i = 0 * skip = 0 # <<<<<<<<<<<<<< @@ -36935,7 +36936,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o */ __pyx_v_skip = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":77 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":77 * i = 0 * skip = 0 * while i < N: # <<<<<<<<<<<<<< @@ -36946,7 +36947,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o __pyx_t_9 = ((__pyx_v_i < __pyx_v_N) != 0); if (!__pyx_t_9) break; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":78 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":78 * skip = 0 * while i < N: * if self.sa.arr[i] < 0: # <<<<<<<<<<<<<< @@ -36956,7 +36957,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o __pyx_t_9 = (((__pyx_v_self->sa->arr[__pyx_v_i]) < 0) != 0); if (__pyx_t_9) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":79 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":79 * while i < N: * if self.sa.arr[i] < 0: * skip = skip + self.sa.arr[i] # <<<<<<<<<<<<<< @@ -36965,7 +36966,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o */ __pyx_v_skip = (__pyx_v_skip + (__pyx_v_self->sa->arr[__pyx_v_i])); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":80 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":80 * if self.sa.arr[i] < 0: * skip = skip + self.sa.arr[i] * i = i - self.sa.arr[i] # <<<<<<<<<<<<<< @@ -36977,7 +36978,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":82 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":82 * i = i - self.sa.arr[i] * else: * if skip < 0: # <<<<<<<<<<<<<< @@ -36987,7 +36988,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o __pyx_t_9 = ((__pyx_v_skip < 0) != 0); if (__pyx_t_9) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":83 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":83 * else: * if skip < 0: * self.sa.arr[i+skip] = skip # <<<<<<<<<<<<<< @@ -36996,7 +36997,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o */ (__pyx_v_self->sa->arr[(__pyx_v_i + __pyx_v_skip)]) = __pyx_v_skip; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":84 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":84 * if skip < 0: * self.sa.arr[i+skip] = skip * skip = 0 # <<<<<<<<<<<<<< @@ -37008,7 +37009,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o } __pyx_L18:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":85 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":85 * self.sa.arr[i+skip] = skip * skip = 0 * j = isa.arr[self.sa.arr[i]] # <<<<<<<<<<<<<< @@ -37017,7 +37018,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o */ __pyx_v_j = (__pyx_v_isa->arr[(__pyx_v_self->sa->arr[__pyx_v_i])]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":86 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":86 * skip = 0 * j = isa.arr[self.sa.arr[i]] * self.q3sort(i, j, h, isa) # <<<<<<<<<<<<<< @@ -37052,7 +37053,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":87 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":87 * j = isa.arr[self.sa.arr[i]] * self.q3sort(i, j, h, isa) * i = j+1 # <<<<<<<<<<<<<< @@ -37064,7 +37065,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o __pyx_L17:; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":88 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":88 * self.q3sort(i, j, h, isa) * i = j+1 * if skip < 0: # <<<<<<<<<<<<<< @@ -37074,7 +37075,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o __pyx_t_9 = ((__pyx_v_skip < 0) != 0); if (__pyx_t_9) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":89 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":89 * i = j+1 * if skip < 0: * self.sa.arr[i+skip] = skip # <<<<<<<<<<<<<< @@ -37086,7 +37087,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o } __pyx_L19:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":90 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":90 * if skip < 0: * self.sa.arr[i+skip] = skip * h = h * 2 # <<<<<<<<<<<<<< @@ -37095,7 +37096,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o */ __pyx_v_h = (__pyx_v_h * 2); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":91 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":91 * self.sa.arr[i+skip] = skip * h = h * 2 * logger.debug(" Refinement took %f seconds", (monitor_cpu() - sort_start_time)) # <<<<<<<<<<<<<< @@ -37133,7 +37134,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":94 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":94 * * '''Step 3: read off suffix array from inverse suffix array''' * logger.info(" Finalizing sort...") # <<<<<<<<<<<<<< @@ -37150,7 +37151,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":95 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":95 * '''Step 3: read off suffix array from inverse suffix array''' * logger.info(" Finalizing sort...") * for i from 0 <= i < N: # <<<<<<<<<<<<<< @@ -37160,7 +37161,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o __pyx_t_5 = __pyx_v_N; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_5; __pyx_v_i++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":96 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":96 * logger.info(" Finalizing sort...") * for i from 0 <= i < N: * j = isa.arr[i] # <<<<<<<<<<<<<< @@ -37169,7 +37170,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o */ __pyx_v_j = (__pyx_v_isa->arr[__pyx_v_i]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":97 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":97 * for i from 0 <= i < N: * j = isa.arr[i] * self.sa.arr[j] = i # <<<<<<<<<<<<<< @@ -37179,7 +37180,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o (__pyx_v_self->sa->arr[__pyx_v_j]) = __pyx_v_i; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":98 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":98 * j = isa.arr[i] * self.sa.arr[j] = i * logger.info("Suffix array construction took %f seconds", (monitor_cpu() - start_time)) # <<<<<<<<<<<<<< @@ -37216,7 +37217,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":23 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":23 * return self.sa.arr[i] * * def read_text(self, filename, side): # <<<<<<<<<<<<<< @@ -37243,7 +37244,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_4read_text(struct __pyx_o return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":100 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":100 * logger.info("Suffix array construction took %f seconds", (monitor_cpu() - start_time)) * * def q3sort(self, int i, int j, int h, IntList isa, pad=""): # <<<<<<<<<<<<<< @@ -37370,7 +37371,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("q3sort", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":107 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":107 * cdef int k, midpoint, pval, phead, ptail, tmp * * if j-i < -1: # <<<<<<<<<<<<<< @@ -37380,7 +37381,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ __pyx_t_1 = (((__pyx_v_j - __pyx_v_i) < -1) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":108 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":108 * * if j-i < -1: * raise Exception("Unexpected condition found in q3sort: sort from %d to %d" % (i,j)) # <<<<<<<<<<<<<< @@ -37415,7 +37416,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ {__pyx_filename = __pyx_f[12]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":109 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":109 * if j-i < -1: * raise Exception("Unexpected condition found in q3sort: sort from %d to %d" % (i,j)) * if j-i == -1: # recursive base case -- empty interval # <<<<<<<<<<<<<< @@ -37425,7 +37426,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ __pyx_t_1 = (((__pyx_v_j - __pyx_v_i) == -1) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":110 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":110 * raise Exception("Unexpected condition found in q3sort: sort from %d to %d" % (i,j)) * if j-i == -1: # recursive base case -- empty interval * return # <<<<<<<<<<<<<< @@ -37437,7 +37438,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":111 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":111 * if j-i == -1: # recursive base case -- empty interval * return * if (j-i == 0): # recursive base case -- singleton interval # <<<<<<<<<<<<<< @@ -37447,7 +37448,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ __pyx_t_1 = (((__pyx_v_j - __pyx_v_i) == 0) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":112 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":112 * return * if (j-i == 0): # recursive base case -- singleton interval * isa.arr[self.sa.arr[i]] = i # <<<<<<<<<<<<<< @@ -37456,7 +37457,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ */ (__pyx_v_isa->arr[(__pyx_v_self->sa->arr[__pyx_v_i])]) = __pyx_v_i; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":113 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":113 * if (j-i == 0): # recursive base case -- singleton interval * isa.arr[self.sa.arr[i]] = i * self.sa.arr[i] = -1 # <<<<<<<<<<<<<< @@ -37465,7 +37466,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ */ (__pyx_v_self->sa->arr[__pyx_v_i]) = -1; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":114 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":114 * isa.arr[self.sa.arr[i]] = i * self.sa.arr[i] = -1 * return # <<<<<<<<<<<<<< @@ -37477,7 +37478,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":123 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":123 * # If the method of assigning word_id's is changed, this method * # may need to be reconsidered as well. * midpoint = (i+j)/2 # <<<<<<<<<<<<<< @@ -37486,7 +37487,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ */ __pyx_v_midpoint = __Pyx_div_long((__pyx_v_i + __pyx_v_j), 2); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":124 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":124 * # may need to be reconsidered as well. * midpoint = (i+j)/2 * pval = isa.arr[self.sa.arr[midpoint] + h] # <<<<<<<<<<<<<< @@ -37495,7 +37496,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ */ __pyx_v_pval = (__pyx_v_isa->arr[((__pyx_v_self->sa->arr[__pyx_v_midpoint]) + __pyx_v_h)]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":125 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":125 * midpoint = (i+j)/2 * pval = isa.arr[self.sa.arr[midpoint] + h] * if i != midpoint: # <<<<<<<<<<<<<< @@ -37505,7 +37506,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ __pyx_t_1 = ((__pyx_v_i != __pyx_v_midpoint) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":126 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":126 * pval = isa.arr[self.sa.arr[midpoint] + h] * if i != midpoint: * tmp = self.sa.arr[midpoint] # <<<<<<<<<<<<<< @@ -37514,7 +37515,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ */ __pyx_v_tmp = (__pyx_v_self->sa->arr[__pyx_v_midpoint]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":127 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":127 * if i != midpoint: * tmp = self.sa.arr[midpoint] * self.sa.arr[midpoint] = self.sa.arr[i] # <<<<<<<<<<<<<< @@ -37523,7 +37524,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ */ (__pyx_v_self->sa->arr[__pyx_v_midpoint]) = (__pyx_v_self->sa->arr[__pyx_v_i]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":128 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":128 * tmp = self.sa.arr[midpoint] * self.sa.arr[midpoint] = self.sa.arr[i] * self.sa.arr[i] = tmp # <<<<<<<<<<<<<< @@ -37535,7 +37536,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ } __pyx_L6:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":129 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":129 * self.sa.arr[midpoint] = self.sa.arr[i] * self.sa.arr[i] = tmp * phead = i # <<<<<<<<<<<<<< @@ -37544,7 +37545,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ */ __pyx_v_phead = __pyx_v_i; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":130 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":130 * self.sa.arr[i] = tmp * phead = i * ptail = i # <<<<<<<<<<<<<< @@ -37553,7 +37554,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ */ __pyx_v_ptail = __pyx_v_i; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":134 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":134 * # find the three partitions. phead marks the first element * # of the middle partition, and ptail marks the last element * for k from i+1 <= k < j+1: # <<<<<<<<<<<<<< @@ -37563,7 +37564,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ __pyx_t_5 = (__pyx_v_j + 1); for (__pyx_v_k = (__pyx_v_i + 1); __pyx_v_k < __pyx_t_5; __pyx_v_k++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":135 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":135 * # of the middle partition, and ptail marks the last element * for k from i+1 <= k < j+1: * if isa.arr[self.sa.arr[k] + h] < pval: # <<<<<<<<<<<<<< @@ -37573,7 +37574,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ __pyx_t_1 = (((__pyx_v_isa->arr[((__pyx_v_self->sa->arr[__pyx_v_k]) + __pyx_v_h)]) < __pyx_v_pval) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":136 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":136 * for k from i+1 <= k < j+1: * if isa.arr[self.sa.arr[k] + h] < pval: * if k > ptail+1: # <<<<<<<<<<<<<< @@ -37583,7 +37584,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ __pyx_t_1 = ((__pyx_v_k > (__pyx_v_ptail + 1)) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":137 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":137 * if isa.arr[self.sa.arr[k] + h] < pval: * if k > ptail+1: * tmp = self.sa.arr[phead] # <<<<<<<<<<<<<< @@ -37592,7 +37593,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ */ __pyx_v_tmp = (__pyx_v_self->sa->arr[__pyx_v_phead]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":138 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":138 * if k > ptail+1: * tmp = self.sa.arr[phead] * self.sa.arr[phead] = self.sa.arr[k] # <<<<<<<<<<<<<< @@ -37601,7 +37602,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ */ (__pyx_v_self->sa->arr[__pyx_v_phead]) = (__pyx_v_self->sa->arr[__pyx_v_k]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":139 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":139 * tmp = self.sa.arr[phead] * self.sa.arr[phead] = self.sa.arr[k] * self.sa.arr[k] = self.sa.arr[ptail+1] # <<<<<<<<<<<<<< @@ -37610,7 +37611,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ */ (__pyx_v_self->sa->arr[__pyx_v_k]) = (__pyx_v_self->sa->arr[(__pyx_v_ptail + 1)]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":140 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":140 * self.sa.arr[phead] = self.sa.arr[k] * self.sa.arr[k] = self.sa.arr[ptail+1] * self.sa.arr[ptail+1] = tmp # <<<<<<<<<<<<<< @@ -37622,7 +37623,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":142 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":142 * self.sa.arr[ptail+1] = tmp * else: # k == ptail+1 * tmp = self.sa.arr[phead] # <<<<<<<<<<<<<< @@ -37631,7 +37632,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ */ __pyx_v_tmp = (__pyx_v_self->sa->arr[__pyx_v_phead]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":143 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":143 * else: # k == ptail+1 * tmp = self.sa.arr[phead] * self.sa.arr[phead] = self.sa.arr[k] # <<<<<<<<<<<<<< @@ -37640,7 +37641,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ */ (__pyx_v_self->sa->arr[__pyx_v_phead]) = (__pyx_v_self->sa->arr[__pyx_v_k]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":144 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":144 * tmp = self.sa.arr[phead] * self.sa.arr[phead] = self.sa.arr[k] * self.sa.arr[k] = tmp # <<<<<<<<<<<<<< @@ -37651,7 +37652,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ } __pyx_L10:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":145 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":145 * self.sa.arr[phead] = self.sa.arr[k] * self.sa.arr[k] = tmp * phead = phead + 1 # <<<<<<<<<<<<<< @@ -37660,7 +37661,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ */ __pyx_v_phead = (__pyx_v_phead + 1); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":146 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":146 * self.sa.arr[k] = tmp * phead = phead + 1 * ptail = ptail + 1 # <<<<<<<<<<<<<< @@ -37672,7 +37673,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":148 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":148 * ptail = ptail + 1 * else: * if isa.arr[self.sa.arr[k] + h] == pval: # <<<<<<<<<<<<<< @@ -37682,7 +37683,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ __pyx_t_1 = (((__pyx_v_isa->arr[((__pyx_v_self->sa->arr[__pyx_v_k]) + __pyx_v_h)]) == __pyx_v_pval) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":149 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":149 * else: * if isa.arr[self.sa.arr[k] + h] == pval: * if k > ptail+1: # <<<<<<<<<<<<<< @@ -37692,7 +37693,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ __pyx_t_1 = ((__pyx_v_k > (__pyx_v_ptail + 1)) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":150 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":150 * if isa.arr[self.sa.arr[k] + h] == pval: * if k > ptail+1: * tmp = self.sa.arr[ptail+1] # <<<<<<<<<<<<<< @@ -37701,7 +37702,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ */ __pyx_v_tmp = (__pyx_v_self->sa->arr[(__pyx_v_ptail + 1)]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":151 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":151 * if k > ptail+1: * tmp = self.sa.arr[ptail+1] * self.sa.arr[ptail+1] = self.sa.arr[k] # <<<<<<<<<<<<<< @@ -37710,7 +37711,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ */ (__pyx_v_self->sa->arr[(__pyx_v_ptail + 1)]) = (__pyx_v_self->sa->arr[__pyx_v_k]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":152 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":152 * tmp = self.sa.arr[ptail+1] * self.sa.arr[ptail+1] = self.sa.arr[k] * self.sa.arr[k] = tmp # <<<<<<<<<<<<<< @@ -37722,7 +37723,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ } __pyx_L12:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":153 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":153 * self.sa.arr[ptail+1] = self.sa.arr[k] * self.sa.arr[k] = tmp * ptail = ptail + 1 # <<<<<<<<<<<<<< @@ -37737,7 +37738,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ __pyx_L9:; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":156 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":156 * * # recursively sort smaller suffixes * self.q3sort(i, phead-1, h, isa, pad+" ") # <<<<<<<<<<<<<< @@ -37777,7 +37778,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":160 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":160 * # update suffixes with pivot value * # corresponds to update_group function in Larsson & Sadakane * for k from phead <= k < ptail+1: # <<<<<<<<<<<<<< @@ -37787,7 +37788,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ __pyx_t_5 = (__pyx_v_ptail + 1); for (__pyx_v_k = __pyx_v_phead; __pyx_v_k < __pyx_t_5; __pyx_v_k++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":161 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":161 * # corresponds to update_group function in Larsson & Sadakane * for k from phead <= k < ptail+1: * isa.arr[self.sa.arr[k]] = ptail # <<<<<<<<<<<<<< @@ -37797,7 +37798,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ (__pyx_v_isa->arr[(__pyx_v_self->sa->arr[__pyx_v_k])]) = __pyx_v_ptail; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":162 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":162 * for k from phead <= k < ptail+1: * isa.arr[self.sa.arr[k]] = ptail * if phead == ptail: # <<<<<<<<<<<<<< @@ -37807,7 +37808,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ __pyx_t_1 = ((__pyx_v_phead == __pyx_v_ptail) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":163 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":163 * isa.arr[self.sa.arr[k]] = ptail * if phead == ptail: * self.sa.arr[phead] = -1 # <<<<<<<<<<<<<< @@ -37819,7 +37820,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ } __pyx_L15:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":166 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":166 * * # recursively sort larger suffixes * self.q3sort(ptail+1, j, h, isa, pad+" ") # <<<<<<<<<<<<<< @@ -37859,7 +37860,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":100 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":100 * logger.info("Suffix array construction took %f seconds", (monitor_cpu() - start_time)) * * def q3sort(self, int i, int j, int h, IntList isa, pad=""): # <<<<<<<<<<<<<< @@ -37885,7 +37886,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_6q3sort(struct __pyx_obj_ return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":169 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":169 * * * def write_text(self, char* filename): # <<<<<<<<<<<<<< @@ -37930,7 +37931,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_8write_text(struct __pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("write_text", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":170 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":170 * * def write_text(self, char* filename): * self.darray.write_text(filename) # <<<<<<<<<<<<<< @@ -37952,7 +37953,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_8write_text(struct __pyx_ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":169 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":169 * * * def write_text(self, char* filename): # <<<<<<<<<<<<<< @@ -37975,7 +37976,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_8write_text(struct __pyx_ return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":172 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":172 * self.darray.write_text(filename) * * def read_binary(self, char* filename): # <<<<<<<<<<<<<< @@ -38015,7 +38016,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_10read_binary(struct __py __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("read_binary", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":174 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":174 * def read_binary(self, char* filename): * cdef FILE *f * f = fopen(filename, "r") # <<<<<<<<<<<<<< @@ -38024,7 +38025,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_10read_binary(struct __py */ __pyx_v_f = fopen(__pyx_v_filename, __pyx_k_r); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":175 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":175 * cdef FILE *f * f = fopen(filename, "r") * self.darray.read_handle(f) # <<<<<<<<<<<<<< @@ -38033,7 +38034,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_10read_binary(struct __py */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_DataArray *)__pyx_v_self->darray->__pyx_vtab)->read_handle(__pyx_v_self->darray, __pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":176 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":176 * f = fopen(filename, "r") * self.darray.read_handle(f) * self.sa.read_handle(f) # <<<<<<<<<<<<<< @@ -38042,7 +38043,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_10read_binary(struct __py */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->sa->__pyx_vtab)->read_handle(__pyx_v_self->sa, __pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":177 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":177 * self.darray.read_handle(f) * self.sa.read_handle(f) * self.ha.read_handle(f) # <<<<<<<<<<<<<< @@ -38051,7 +38052,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_10read_binary(struct __py */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->ha->__pyx_vtab)->read_handle(__pyx_v_self->ha, __pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":178 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":178 * self.sa.read_handle(f) * self.ha.read_handle(f) * fclose(f) # <<<<<<<<<<<<<< @@ -38060,7 +38061,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_10read_binary(struct __py */ fclose(__pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":172 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":172 * self.darray.write_text(filename) * * def read_binary(self, char* filename): # <<<<<<<<<<<<<< @@ -38075,7 +38076,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_10read_binary(struct __py return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":180 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":180 * fclose(f) * * def write_binary(self, char* filename): # <<<<<<<<<<<<<< @@ -38115,7 +38116,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_12write_binary(struct __p __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("write_binary", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":182 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":182 * def write_binary(self, char* filename): * cdef FILE* f * f = fopen(filename, "w") # <<<<<<<<<<<<<< @@ -38124,7 +38125,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_12write_binary(struct __p */ __pyx_v_f = fopen(__pyx_v_filename, __pyx_k_w); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":183 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":183 * cdef FILE* f * f = fopen(filename, "w") * self.darray.write_handle(f) # <<<<<<<<<<<<<< @@ -38133,7 +38134,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_12write_binary(struct __p */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_DataArray *)__pyx_v_self->darray->__pyx_vtab)->write_handle(__pyx_v_self->darray, __pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":184 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":184 * f = fopen(filename, "w") * self.darray.write_handle(f) * self.sa.write_handle(f) # <<<<<<<<<<<<<< @@ -38142,7 +38143,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_12write_binary(struct __p */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->sa->__pyx_vtab)->write_handle(__pyx_v_self->sa, __pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":185 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":185 * self.darray.write_handle(f) * self.sa.write_handle(f) * self.ha.write_handle(f) # <<<<<<<<<<<<<< @@ -38151,7 +38152,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_12write_binary(struct __p */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_self->ha->__pyx_vtab)->write_handle(__pyx_v_self->ha, __pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":186 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":186 * self.sa.write_handle(f) * self.ha.write_handle(f) * fclose(f) # <<<<<<<<<<<<<< @@ -38160,7 +38161,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_12write_binary(struct __p */ fclose(__pyx_v_f); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":180 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":180 * fclose(f) * * def write_binary(self, char* filename): # <<<<<<<<<<<<<< @@ -38175,7 +38176,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_12write_binary(struct __p return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":188 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":188 * fclose(f) * * def write_enhanced(self, char* filename): # <<<<<<<<<<<<<< @@ -38233,7 +38234,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_14write_enhanced(struct _ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("write_enhanced", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":189 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":189 * * def write_enhanced(self, char* filename): * with open(filename, "w") as f: # <<<<<<<<<<<<<< @@ -38273,7 +38274,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_14write_enhanced(struct _ __pyx_v_f = __pyx_t_4; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":190 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":190 * def write_enhanced(self, char* filename): * with open(filename, "w") as f: * self.darray.write_enhanced_handle(f) # <<<<<<<<<<<<<< @@ -38293,7 +38294,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_14write_enhanced(struct _ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":191 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":191 * with open(filename, "w") as f: * self.darray.write_enhanced_handle(f) * for a_i in self.sa: # <<<<<<<<<<<<<< @@ -38338,7 +38339,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_14write_enhanced(struct _ __Pyx_XDECREF_SET(__pyx_v_a_i, __pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":192 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":192 * self.darray.write_enhanced_handle(f) * for a_i in self.sa: * f.write("%d " % a_i) # <<<<<<<<<<<<<< @@ -38362,7 +38363,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_14write_enhanced(struct _ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":193 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":193 * for a_i in self.sa: * f.write("%d " % a_i) * f.write("\n") # <<<<<<<<<<<<<< @@ -38376,7 +38377,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_14write_enhanced(struct _ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":194 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":194 * f.write("%d " % a_i) * f.write("\n") * for w_i in self.ha: # <<<<<<<<<<<<<< @@ -38421,7 +38422,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_14write_enhanced(struct _ __Pyx_XDECREF_SET(__pyx_v_w_i, __pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":195 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":195 * f.write("\n") * for w_i in self.ha: * f.write("%d " % w_i) # <<<<<<<<<<<<<< @@ -38445,7 +38446,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_14write_enhanced(struct _ } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":196 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":196 * for w_i in self.ha: * f.write("%d " % w_i) * f.write("\n") # <<<<<<<<<<<<<< @@ -38469,7 +38470,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_14write_enhanced(struct _ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":189 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":189 * * def write_enhanced(self, char* filename): * with open(filename, "w") as f: # <<<<<<<<<<<<<< @@ -38540,7 +38541,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_14write_enhanced(struct _ __pyx_L23:; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":188 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":188 * fclose(f) * * def write_enhanced(self, char* filename): # <<<<<<<<<<<<<< @@ -38567,7 +38568,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_14write_enhanced(struct _ return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":198 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":198 * f.write("\n") * * cdef int __search_high(self, int word_id, int offset, int low, int high): # <<<<<<<<<<<<<< @@ -38582,7 +38583,7 @@ static int __pyx_f_4cdec_2sa_3_sa_11SuffixArray___search_high(struct __pyx_obj_4 int __pyx_t_1; __Pyx_RefNannySetupContext("__search_high", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":201 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":201 * cdef int midpoint * * if low >= high: # <<<<<<<<<<<<<< @@ -38592,7 +38593,7 @@ static int __pyx_f_4cdec_2sa_3_sa_11SuffixArray___search_high(struct __pyx_obj_4 __pyx_t_1 = ((__pyx_v_low >= __pyx_v_high) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":202 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":202 * * if low >= high: * return high # <<<<<<<<<<<<<< @@ -38603,7 +38604,7 @@ static int __pyx_f_4cdec_2sa_3_sa_11SuffixArray___search_high(struct __pyx_obj_4 goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":203 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":203 * if low >= high: * return high * midpoint = (high + low) / 2 # <<<<<<<<<<<<<< @@ -38612,7 +38613,7 @@ static int __pyx_f_4cdec_2sa_3_sa_11SuffixArray___search_high(struct __pyx_obj_4 */ __pyx_v_midpoint = __Pyx_div_long((__pyx_v_high + __pyx_v_low), 2); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":204 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":204 * return high * midpoint = (high + low) / 2 * if self.darray.data.arr[self.sa.arr[midpoint] + offset] == word_id: # <<<<<<<<<<<<<< @@ -38622,7 +38623,7 @@ static int __pyx_f_4cdec_2sa_3_sa_11SuffixArray___search_high(struct __pyx_obj_4 __pyx_t_1 = (((__pyx_v_self->darray->data->arr[((__pyx_v_self->sa->arr[__pyx_v_midpoint]) + __pyx_v_offset)]) == __pyx_v_word_id) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":205 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":205 * midpoint = (high + low) / 2 * if self.darray.data.arr[self.sa.arr[midpoint] + offset] == word_id: * return self.__search_high(word_id, offset, midpoint+1, high) # <<<<<<<<<<<<<< @@ -38634,7 +38635,7 @@ static int __pyx_f_4cdec_2sa_3_sa_11SuffixArray___search_high(struct __pyx_obj_4 } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":207 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":207 * return self.__search_high(word_id, offset, midpoint+1, high) * else: * return self.__search_high(word_id, offset, low, midpoint) # <<<<<<<<<<<<<< @@ -38645,7 +38646,7 @@ static int __pyx_f_4cdec_2sa_3_sa_11SuffixArray___search_high(struct __pyx_obj_4 goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":198 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":198 * f.write("\n") * * cdef int __search_high(self, int word_id, int offset, int low, int high): # <<<<<<<<<<<<<< @@ -38659,7 +38660,7 @@ static int __pyx_f_4cdec_2sa_3_sa_11SuffixArray___search_high(struct __pyx_obj_4 return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":209 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":209 * return self.__search_high(word_id, offset, low, midpoint) * * cdef int __search_low(self, int word_id, int offset, int low, int high): # <<<<<<<<<<<<<< @@ -38674,7 +38675,7 @@ static int __pyx_f_4cdec_2sa_3_sa_11SuffixArray___search_low(struct __pyx_obj_4c int __pyx_t_1; __Pyx_RefNannySetupContext("__search_low", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":212 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":212 * cdef int midpoint * * if low >= high: # <<<<<<<<<<<<<< @@ -38684,7 +38685,7 @@ static int __pyx_f_4cdec_2sa_3_sa_11SuffixArray___search_low(struct __pyx_obj_4c __pyx_t_1 = ((__pyx_v_low >= __pyx_v_high) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":213 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":213 * * if low >= high: * return high # <<<<<<<<<<<<<< @@ -38695,7 +38696,7 @@ static int __pyx_f_4cdec_2sa_3_sa_11SuffixArray___search_low(struct __pyx_obj_4c goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":214 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":214 * if low >= high: * return high * midpoint = (high + low) / 2 # <<<<<<<<<<<<<< @@ -38704,7 +38705,7 @@ static int __pyx_f_4cdec_2sa_3_sa_11SuffixArray___search_low(struct __pyx_obj_4c */ __pyx_v_midpoint = __Pyx_div_long((__pyx_v_high + __pyx_v_low), 2); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":215 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":215 * return high * midpoint = (high + low) / 2 * if self.darray.data.arr[self.sa.arr[midpoint] + offset] == word_id: # <<<<<<<<<<<<<< @@ -38714,7 +38715,7 @@ static int __pyx_f_4cdec_2sa_3_sa_11SuffixArray___search_low(struct __pyx_obj_4c __pyx_t_1 = (((__pyx_v_self->darray->data->arr[((__pyx_v_self->sa->arr[__pyx_v_midpoint]) + __pyx_v_offset)]) == __pyx_v_word_id) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":216 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":216 * midpoint = (high + low) / 2 * if self.darray.data.arr[self.sa.arr[midpoint] + offset] == word_id: * return self.__search_low(word_id, offset, low, midpoint) # <<<<<<<<<<<<<< @@ -38726,7 +38727,7 @@ static int __pyx_f_4cdec_2sa_3_sa_11SuffixArray___search_low(struct __pyx_obj_4c } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":218 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":218 * return self.__search_low(word_id, offset, low, midpoint) * else: * return self.__search_low(word_id, offset, midpoint+1, high) # <<<<<<<<<<<<<< @@ -38737,7 +38738,7 @@ static int __pyx_f_4cdec_2sa_3_sa_11SuffixArray___search_low(struct __pyx_obj_4c goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":209 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":209 * return self.__search_high(word_id, offset, low, midpoint) * * cdef int __search_low(self, int word_id, int offset, int low, int high): # <<<<<<<<<<<<<< @@ -38751,7 +38752,7 @@ static int __pyx_f_4cdec_2sa_3_sa_11SuffixArray___search_low(struct __pyx_obj_4c return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":220 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":220 * return self.__search_low(word_id, offset, midpoint+1, high) * * cdef __get_range(self, int word_id, int offset, int low, int high, int midpoint): # <<<<<<<<<<<<<< @@ -38770,7 +38771,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_11SuffixArray___get_range(struct __pyx_o int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get_range", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":221 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":221 * * cdef __get_range(self, int word_id, int offset, int low, int high, int midpoint): * return (self.__search_low(word_id, offset, low, midpoint), # <<<<<<<<<<<<<< @@ -38781,7 +38782,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_11SuffixArray___get_range(struct __pyx_o __pyx_t_1 = __Pyx_PyInt_From_int(((struct __pyx_vtabstruct_4cdec_2sa_3_sa_SuffixArray *)__pyx_v_self->__pyx_vtab)->__pyx___search_low(__pyx_v_self, __pyx_v_word_id, __pyx_v_offset, __pyx_v_low, __pyx_v_midpoint)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":222 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":222 * cdef __get_range(self, int word_id, int offset, int low, int high, int midpoint): * return (self.__search_low(word_id, offset, low, midpoint), * self.__search_high(word_id, offset, midpoint, high)) # <<<<<<<<<<<<<< @@ -38791,7 +38792,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_11SuffixArray___get_range(struct __pyx_o __pyx_t_2 = __Pyx_PyInt_From_int(((struct __pyx_vtabstruct_4cdec_2sa_3_sa_SuffixArray *)__pyx_v_self->__pyx_vtab)->__pyx___search_high(__pyx_v_self, __pyx_v_word_id, __pyx_v_offset, __pyx_v_midpoint, __pyx_v_high)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":221 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":221 * * cdef __get_range(self, int word_id, int offset, int low, int high, int midpoint): * return (self.__search_low(word_id, offset, low, midpoint), # <<<<<<<<<<<<<< @@ -38810,7 +38811,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_11SuffixArray___get_range(struct __pyx_o __pyx_t_3 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":220 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":220 * return self.__search_low(word_id, offset, midpoint+1, high) * * cdef __get_range(self, int word_id, int offset, int low, int high, int midpoint): # <<<<<<<<<<<<<< @@ -38831,7 +38832,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_11SuffixArray___get_range(struct __pyx_o return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":224 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":224 * self.__search_high(word_id, offset, midpoint, high)) * * cdef __lookup_helper(self, int word_id, int offset, int low, int high): # <<<<<<<<<<<<<< @@ -38852,7 +38853,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_11SuffixArray___lookup_helper(struct __p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__lookup_helper", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":227 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":227 * cdef int midpoint * * if offset == 0: # <<<<<<<<<<<<<< @@ -38862,7 +38863,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_11SuffixArray___lookup_helper(struct __p __pyx_t_1 = ((__pyx_v_offset == 0) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":228 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":228 * * if offset == 0: * return (self.ha.arr[word_id], self.ha.arr[word_id+1]) # <<<<<<<<<<<<<< @@ -38887,7 +38888,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_11SuffixArray___lookup_helper(struct __p goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":229 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":229 * if offset == 0: * return (self.ha.arr[word_id], self.ha.arr[word_id+1]) * if low >= high: # <<<<<<<<<<<<<< @@ -38897,7 +38898,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_11SuffixArray___lookup_helper(struct __p __pyx_t_1 = ((__pyx_v_low >= __pyx_v_high) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":230 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":230 * return (self.ha.arr[word_id], self.ha.arr[word_id+1]) * if low >= high: * return None # <<<<<<<<<<<<<< @@ -38910,7 +38911,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_11SuffixArray___lookup_helper(struct __p goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":232 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":232 * return None * * midpoint = (high + low) / 2 # <<<<<<<<<<<<<< @@ -38919,7 +38920,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_11SuffixArray___lookup_helper(struct __p */ __pyx_v_midpoint = __Pyx_div_long((__pyx_v_high + __pyx_v_low), 2); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":233 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":233 * * midpoint = (high + low) / 2 * if self.darray.data.arr[self.sa.arr[midpoint] + offset] == word_id: # <<<<<<<<<<<<<< @@ -38929,7 +38930,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_11SuffixArray___lookup_helper(struct __p __pyx_t_1 = (((__pyx_v_self->darray->data->arr[((__pyx_v_self->sa->arr[__pyx_v_midpoint]) + __pyx_v_offset)]) == __pyx_v_word_id) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":234 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":234 * midpoint = (high + low) / 2 * if self.darray.data.arr[self.sa.arr[midpoint] + offset] == word_id: * return self.__get_range(word_id, offset, low, high, midpoint) # <<<<<<<<<<<<<< @@ -38944,7 +38945,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_11SuffixArray___lookup_helper(struct __p goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":235 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":235 * if self.darray.data.arr[self.sa.arr[midpoint] + offset] == word_id: * return self.__get_range(word_id, offset, low, high, midpoint) * if self.darray.data.arr[self.sa.arr[midpoint] + offset] > word_id: # <<<<<<<<<<<<<< @@ -38954,7 +38955,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_11SuffixArray___lookup_helper(struct __p __pyx_t_1 = (((__pyx_v_self->darray->data->arr[((__pyx_v_self->sa->arr[__pyx_v_midpoint]) + __pyx_v_offset)]) > __pyx_v_word_id) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":236 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":236 * return self.__get_range(word_id, offset, low, high, midpoint) * if self.darray.data.arr[self.sa.arr[midpoint] + offset] > word_id: * return self.__lookup_helper(word_id, offset, low, midpoint) # <<<<<<<<<<<<<< @@ -38970,7 +38971,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_11SuffixArray___lookup_helper(struct __p } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":238 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":238 * return self.__lookup_helper(word_id, offset, low, midpoint) * else: * return self.__lookup_helper(word_id, offset, midpoint+1, high) # <<<<<<<<<<<<<< @@ -38985,7 +38986,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_11SuffixArray___lookup_helper(struct __p goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":224 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":224 * self.__search_high(word_id, offset, midpoint, high)) * * cdef __lookup_helper(self, int word_id, int offset, int low, int high): # <<<<<<<<<<<<<< @@ -39006,7 +39007,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_11SuffixArray___lookup_helper(struct __p return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":240 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":240 * return self.__lookup_helper(word_id, offset, midpoint+1, high) * * def lookup(self, word, int offset, int low, int high): # <<<<<<<<<<<<<< @@ -39107,7 +39108,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_16lookup(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("lookup", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":242 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":242 * def lookup(self, word, int offset, int low, int high): * cdef int wordid * if low == -1: # <<<<<<<<<<<<<< @@ -39117,7 +39118,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_16lookup(struct __pyx_obj __pyx_t_1 = ((__pyx_v_low == -1) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":243 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":243 * cdef int wordid * if low == -1: * low = 0 # <<<<<<<<<<<<<< @@ -39129,7 +39130,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_16lookup(struct __pyx_obj } __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":244 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":244 * if low == -1: * low = 0 * if high == -1: # <<<<<<<<<<<<<< @@ -39139,7 +39140,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_16lookup(struct __pyx_obj __pyx_t_1 = ((__pyx_v_high == -1) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":245 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":245 * low = 0 * if high == -1: * high = len(self.sa) # <<<<<<<<<<<<<< @@ -39155,7 +39156,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_16lookup(struct __pyx_obj } __pyx_L4:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":246 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":246 * if high == -1: * high = len(self.sa) * if word in self.darray.word2id: # <<<<<<<<<<<<<< @@ -39166,7 +39167,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_16lookup(struct __pyx_obj __pyx_t_4 = (__pyx_t_1 != 0); if (__pyx_t_4) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":247 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":247 * high = len(self.sa) * if word in self.darray.word2id: * word_id = self.darray.word2id[word] # <<<<<<<<<<<<<< @@ -39178,7 +39179,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_16lookup(struct __pyx_obj __pyx_v_word_id = __pyx_t_2; __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":248 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":248 * if word in self.darray.word2id: * word_id = self.darray.word2id[word] * return self.__lookup_helper(word_id, offset, low, high) # <<<<<<<<<<<<<< @@ -39195,7 +39196,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_16lookup(struct __pyx_obj } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":250 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":250 * return self.__lookup_helper(word_id, offset, low, high) * else: * return None # <<<<<<<<<<<<<< @@ -39206,7 +39207,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_16lookup(struct __pyx_obj goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":240 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":240 * return self.__lookup_helper(word_id, offset, midpoint+1, high) * * def lookup(self, word, int offset, int low, int high): # <<<<<<<<<<<<<< @@ -39226,8 +39227,8 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_11SuffixArray_16lookup(struct __pyx_obj return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":43 - * cdef public phrases_al +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":47 + * cdef public bilex * * def __cinit__(self): # <<<<<<<<<<<<<< * # Keep track of everything that can be sampled: @@ -39250,7 +39251,7 @@ static int __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_1__cinit__(PyObject *__pyx_v_se return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":50 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":54 * self.phrases_f = defaultdict(int) * self.phrases_e = defaultdict(int) * self.phrases_fe = defaultdict(lambda: defaultdict(int)) # <<<<<<<<<<<<<< @@ -39283,14 +39284,14 @@ static PyObject *__pyx_lambda_funcdef_lambda1(CYTHON_UNUSED PyObject *__pyx_self int __pyx_clineno = 0; __Pyx_RefNannySetupContext("lambda1", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_defaultdict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_defaultdict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 54; __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[8]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)((PyObject*)(&PyInt_Type)))); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)((PyObject*)(&PyInt_Type)))); __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyInt_Type)))); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -39311,12 +39312,12 @@ static PyObject *__pyx_lambda_funcdef_lambda1(CYTHON_UNUSED PyObject *__pyx_self return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":51 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":55 * self.phrases_e = defaultdict(int) * self.phrases_fe = defaultdict(lambda: defaultdict(int)) * self.phrases_al = defaultdict(lambda: defaultdict(tuple)) # <<<<<<<<<<<<<< * - * cdef int PRECOMPUTE = 0 + * # Instance-specific bilex */ /* Python wrapper */ @@ -39344,14 +39345,14 @@ static PyObject *__pyx_lambda_funcdef_lambda2(CYTHON_UNUSED PyObject *__pyx_self int __pyx_clineno = 0; __Pyx_RefNannySetupContext("lambda2", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_defaultdict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_defaultdict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 55; __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[8]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)((PyObject*)(&PyTuple_Type)))); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)((PyObject*)(&PyTuple_Type)))); __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyTuple_Type)))); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -39372,8 +39373,8 @@ static PyObject *__pyx_lambda_funcdef_lambda2(CYTHON_UNUSED PyObject *__pyx_self return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":43 - * cdef public phrases_al +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":47 + * cdef public bilex * * def __cinit__(self): # <<<<<<<<<<<<<< * # Keep track of everything that can be sampled: @@ -39391,21 +39392,21 @@ static int __pyx_pf_4cdec_2sa_3_sa_11OnlineStats___cinit__(struct __pyx_obj_4cde int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":45 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":49 * def __cinit__(self): * # Keep track of everything that can be sampled: * self.samples_f = defaultdict(int) # <<<<<<<<<<<<<< * * # Phrase counts */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_defaultdict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_defaultdict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 49; __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[8]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)((PyObject*)(&PyInt_Type)))); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)((PyObject*)(&PyInt_Type)))); __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyInt_Type)))); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -39415,21 +39416,21 @@ static int __pyx_pf_4cdec_2sa_3_sa_11OnlineStats___cinit__(struct __pyx_obj_4cde __pyx_v_self->samples_f = __pyx_t_3; __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":48 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":52 * * # Phrase counts * self.phrases_f = defaultdict(int) # <<<<<<<<<<<<<< * self.phrases_e = defaultdict(int) * self.phrases_fe = defaultdict(lambda: defaultdict(int)) */ - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_defaultdict); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_defaultdict); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)((PyObject*)(&PyInt_Type)))); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)((PyObject*)(&PyInt_Type)))); __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyInt_Type)))); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -39439,21 +39440,21 @@ static int __pyx_pf_4cdec_2sa_3_sa_11OnlineStats___cinit__(struct __pyx_obj_4cde __pyx_v_self->phrases_f = __pyx_t_1; __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":49 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":53 * # Phrase counts * self.phrases_f = defaultdict(int) * self.phrases_e = defaultdict(int) # <<<<<<<<<<<<<< * self.phrases_fe = defaultdict(lambda: defaultdict(int)) * self.phrases_al = defaultdict(lambda: defaultdict(tuple)) */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_defaultdict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_defaultdict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 53; __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[8]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)((PyObject*)(&PyInt_Type)))); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)((PyObject*)(&PyInt_Type)))); __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyInt_Type)))); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -39463,23 +39464,23 @@ static int __pyx_pf_4cdec_2sa_3_sa_11OnlineStats___cinit__(struct __pyx_obj_4cde __pyx_v_self->phrases_e = __pyx_t_3; __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":50 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":54 * self.phrases_f = defaultdict(int) * self.phrases_e = defaultdict(int) * self.phrases_fe = defaultdict(lambda: defaultdict(int)) # <<<<<<<<<<<<<< * self.phrases_al = defaultdict(lambda: defaultdict(tuple)) * */ - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_defaultdict); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_defaultdict); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cdec_2sa_3_sa_11OnlineStats_9__cinit___lambda1, 0, __pyx_n_s_cinit___locals_lambda, NULL, __pyx_n_s_cdec_sa__sa, PyModule_GetDict(__pyx_m), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cdec_2sa_3_sa_11OnlineStats_9__cinit___lambda1, 0, __pyx_n_s_cinit___locals_lambda, NULL, __pyx_n_s_cdec_sa__sa, PyModule_GetDict(__pyx_m), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 54; __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_1); __pyx_t_1 = 0; @@ -39489,23 +39490,23 @@ static int __pyx_pf_4cdec_2sa_3_sa_11OnlineStats___cinit__(struct __pyx_obj_4cde __pyx_v_self->phrases_fe = __pyx_t_2; __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":51 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":55 * self.phrases_e = defaultdict(int) * self.phrases_fe = defaultdict(lambda: defaultdict(int)) * self.phrases_al = defaultdict(lambda: defaultdict(tuple)) # <<<<<<<<<<<<<< * - * cdef int PRECOMPUTE = 0 + * # Instance-specific bilex */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_defaultdict); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_defaultdict); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cdec_2sa_3_sa_11OnlineStats_9__cinit___1lambda2, 0, __pyx_n_s_cinit___locals_lambda, NULL, __pyx_n_s_cdec_sa__sa, PyModule_GetDict(__pyx_m), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cdec_2sa_3_sa_11OnlineStats_9__cinit___1lambda2, 0, __pyx_n_s_cinit___locals_lambda, NULL, __pyx_n_s_cdec_sa__sa, PyModule_GetDict(__pyx_m), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 55; __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_3); __pyx_t_3 = 0; @@ -39515,8 +39516,26 @@ static int __pyx_pf_4cdec_2sa_3_sa_11OnlineStats___cinit__(struct __pyx_obj_4cde __pyx_v_self->phrases_al = __pyx_t_1; __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":43 - * cdef public phrases_al + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":58 + * + * # Instance-specific bilex + * self.bilex = Bilex() # <<<<<<<<<<<<<< + * + * cdef int PRECOMPUTE = 0 + */ + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_Bilex); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_GIVEREF(__pyx_t_3); + __Pyx_GOTREF(__pyx_v_self->bilex); + __Pyx_DECREF(__pyx_v_self->bilex); + __pyx_v_self->bilex = __pyx_t_3; + __pyx_t_3 = 0; + + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":47 + * cdef public bilex * * def __cinit__(self): # <<<<<<<<<<<<<< * # Keep track of everything that can be sampled: @@ -39537,7 +39556,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_11OnlineStats___cinit__(struct __pyx_obj_4cde return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":37 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":40 * * cdef class OnlineStats: * cdef public samples_f # <<<<<<<<<<<<<< @@ -39632,7 +39651,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_9samples_f_4__del__(struct __py return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":38 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":41 * cdef class OnlineStats: * cdef public samples_f * cdef public phrases_f # <<<<<<<<<<<<<< @@ -39727,7 +39746,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_9phrases_f_4__del__(struct __py return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":39 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":42 * cdef public samples_f * cdef public phrases_f * cdef public phrases_e # <<<<<<<<<<<<<< @@ -39822,12 +39841,12 @@ static int __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_9phrases_e_4__del__(struct __py return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":40 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":43 * cdef public phrases_f * cdef public phrases_e * cdef public phrases_fe # <<<<<<<<<<<<<< * cdef public phrases_al - * + * cdef public bilex */ /* Python wrapper */ @@ -39917,12 +39936,12 @@ static int __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_10phrases_fe_4__del__(struct __ return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":41 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":44 * cdef public phrases_e * cdef public phrases_fe * cdef public phrases_al # <<<<<<<<<<<<<< + * cdef public bilex * - * def __cinit__(self): */ /* Python wrapper */ @@ -40012,7 +40031,102 @@ static int __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_10phrases_al_4__del__(struct __ return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":63 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":45 + * cdef public phrases_fe + * cdef public phrases_al + * cdef public bilex # <<<<<<<<<<<<<< + * + * def __cinit__(self): + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cdec_2sa_3_sa_11OnlineStats_5bilex_1__get__(PyObject *__pyx_v_self); /*proto*/ +static PyObject *__pyx_pw_4cdec_2sa_3_sa_11OnlineStats_5bilex_1__get__(PyObject *__pyx_v_self) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); + __pyx_r = __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_5bilex___get__(((struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_4cdec_2sa_3_sa_11OnlineStats_5bilex___get__(struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__get__", 0); + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_self->bilex); + __pyx_r = __pyx_v_self->bilex; + goto __pyx_L0; + + /* function exit code */ + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_5bilex_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/ +static int __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_5bilex_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); + __pyx_r = __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_5bilex_2__set__(((struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *)__pyx_v_self), ((PyObject *)__pyx_v_value)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_5bilex_2__set__(struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *__pyx_v_self, PyObject *__pyx_v_value) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__set__", 0); + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); + __Pyx_GOTREF(__pyx_v_self->bilex); + __Pyx_DECREF(__pyx_v_self->bilex); + __pyx_v_self->bilex = __pyx_v_value; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static int __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_5bilex_5__del__(PyObject *__pyx_v_self); /*proto*/ +static int __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_5bilex_5__del__(PyObject *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); + __pyx_r = __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_5bilex_4__del__(((struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static int __pyx_pf_4cdec_2sa_3_sa_11OnlineStats_5bilex_4__del__(struct __pyx_obj_4cdec_2sa_3_sa_OnlineStats *__pyx_v_self) { + int __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__del__", 0); + __Pyx_INCREF(Py_None); + __Pyx_GIVEREF(Py_None); + __Pyx_GOTREF(__pyx_v_self->bilex); + __Pyx_DECREF(__pyx_v_self->bilex); + __pyx_v_self->bilex = Py_None; + + /* function exit code */ + __pyx_r = 0; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":70 * cdef public children * * def __cinit__(self): # <<<<<<<<<<<<<< @@ -40045,14 +40159,14 @@ static int __pyx_pf_4cdec_2sa_3_sa_8TrieNode___cinit__(struct __pyx_obj_4cdec_2s int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":64 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":71 * * def __cinit__(self): * self.children = {} # <<<<<<<<<<<<<< * * cdef class ExtendedTrieNode(TrieNode): */ - __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->children); @@ -40060,7 +40174,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_8TrieNode___cinit__(struct __pyx_obj_4cdec_2s __pyx_v_self->children = __pyx_t_1; __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":63 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":70 * cdef public children * * def __cinit__(self): # <<<<<<<<<<<<<< @@ -40080,7 +40194,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_8TrieNode___cinit__(struct __pyx_obj_4cdec_2s return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":61 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":68 * * cdef class TrieNode: * cdef public children # <<<<<<<<<<<<<< @@ -40175,7 +40289,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_8TrieNode_8children_4__del__(struct __pyx_obj return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":71 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":78 * cdef public suffix_link * * def __cinit__(self, phrase=None, phrase_location=None, suffix_link=None): # <<<<<<<<<<<<<< @@ -40230,7 +40344,7 @@ static int __pyx_pw_4cdec_2sa_3_sa_16ExtendedTrieNode_1__cinit__(PyObject *__pyx } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -40247,7 +40361,7 @@ static int __pyx_pw_4cdec_2sa_3_sa_16ExtendedTrieNode_1__cinit__(PyObject *__pyx } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("cdec.sa._sa.ExtendedTrieNode.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -40265,7 +40379,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_16ExtendedTrieNode___cinit__(struct __pyx_obj __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":72 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":79 * * def __cinit__(self, phrase=None, phrase_location=None, suffix_link=None): * self.phrase = phrase # <<<<<<<<<<<<<< @@ -40278,7 +40392,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_16ExtendedTrieNode___cinit__(struct __pyx_obj __Pyx_DECREF(__pyx_v_self->phrase); __pyx_v_self->phrase = __pyx_v_phrase; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":73 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":80 * def __cinit__(self, phrase=None, phrase_location=None, suffix_link=None): * self.phrase = phrase * self.phrase_location = phrase_location # <<<<<<<<<<<<<< @@ -40291,7 +40405,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_16ExtendedTrieNode___cinit__(struct __pyx_obj __Pyx_DECREF(__pyx_v_self->phrase_location); __pyx_v_self->phrase_location = __pyx_v_phrase_location; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":74 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":81 * self.phrase = phrase * self.phrase_location = phrase_location * self.suffix_link = suffix_link # <<<<<<<<<<<<<< @@ -40304,7 +40418,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_16ExtendedTrieNode___cinit__(struct __pyx_obj __Pyx_DECREF(__pyx_v_self->suffix_link); __pyx_v_self->suffix_link = __pyx_v_suffix_link; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":71 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":78 * cdef public suffix_link * * def __cinit__(self, phrase=None, phrase_location=None, suffix_link=None): # <<<<<<<<<<<<<< @@ -40318,7 +40432,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_16ExtendedTrieNode___cinit__(struct __pyx_obj return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":67 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":74 * * cdef class ExtendedTrieNode(TrieNode): * cdef public phrase # <<<<<<<<<<<<<< @@ -40413,7 +40527,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_16ExtendedTrieNode_6phrase_4__del__(struct __ return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":68 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":75 * cdef class ExtendedTrieNode(TrieNode): * cdef public phrase * cdef public phrase_location # <<<<<<<<<<<<<< @@ -40508,7 +40622,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_16ExtendedTrieNode_15phrase_location_4__del__ return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":69 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":76 * cdef public phrase * cdef public phrase_location * cdef public suffix_link # <<<<<<<<<<<<<< @@ -40603,7 +40717,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_16ExtendedTrieNode_11suffix_link_4__del__(str return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":81 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":88 * cdef public int count * cdef public root * def __cinit__(self, extended=False): # <<<<<<<<<<<<<< @@ -40642,7 +40756,7 @@ static int __pyx_pw_4cdec_2sa_3_sa_9TrieTable_1__cinit__(PyObject *__pyx_v_self, } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -40655,7 +40769,7 @@ static int __pyx_pw_4cdec_2sa_3_sa_9TrieTable_1__cinit__(PyObject *__pyx_v_self, } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("cdec.sa._sa.TrieTable.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -40679,7 +40793,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9TrieTable___cinit__(struct __pyx_obj_4cdec_2 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":82 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":89 * cdef public root * def __cinit__(self, extended=False): * self.count = 0 # <<<<<<<<<<<<<< @@ -40688,34 +40802,34 @@ static int __pyx_pf_4cdec_2sa_3_sa_9TrieTable___cinit__(struct __pyx_obj_4cdec_2 */ __pyx_v_self->count = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":83 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":90 * def __cinit__(self, extended=False): * self.count = 0 * self.extended = extended # <<<<<<<<<<<<<< * if extended: * self.root = ExtendedTrieNode() */ - __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_extended); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_extended); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->extended = __pyx_t_1; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":84 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":91 * self.count = 0 * self.extended = extended * if extended: # <<<<<<<<<<<<<< * self.root = ExtendedTrieNode() * else: */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_extended); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_extended); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":85 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":92 * self.extended = extended * if extended: * self.root = ExtendedTrieNode() # <<<<<<<<<<<<<< * else: * self.root = TrieNode() */ - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_ExtendedTrieNode)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_ExtendedTrieNode)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->root); @@ -40726,14 +40840,14 @@ static int __pyx_pf_4cdec_2sa_3_sa_9TrieTable___cinit__(struct __pyx_obj_4cdec_2 } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":87 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":94 * self.root = ExtendedTrieNode() * else: * self.root = TrieNode() # <<<<<<<<<<<<<< * * # linked list structure for storing matches in BaselineRuleFactory */ - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_TrieNode)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_TrieNode)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->root); @@ -40743,7 +40857,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9TrieTable___cinit__(struct __pyx_obj_4cdec_2 } __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":81 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":88 * cdef public int count * cdef public root * def __cinit__(self, extended=False): # <<<<<<<<<<<<<< @@ -40763,7 +40877,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9TrieTable___cinit__(struct __pyx_obj_4cdec_2 return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":78 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":85 * * cdef class TrieTable: * cdef public int extended # <<<<<<<<<<<<<< @@ -40793,7 +40907,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9TrieTable_8extended___get__(struct __p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->extended); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->extended); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -40831,7 +40945,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9TrieTable_8extended_2__set__(struct __pyx_ob const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->extended = __pyx_t_1; /* function exit code */ @@ -40845,7 +40959,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9TrieTable_8extended_2__set__(struct __pyx_ob return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":79 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":86 * cdef class TrieTable: * cdef public int extended * cdef public int count # <<<<<<<<<<<<<< @@ -40875,7 +40989,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_9TrieTable_5count___get__(struct __pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->count); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->count); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -40913,7 +41027,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9TrieTable_5count_2__set__(struct __pyx_obj_4 const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->count = __pyx_t_1; /* function exit code */ @@ -40927,7 +41041,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9TrieTable_5count_2__set__(struct __pyx_obj_4 return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":80 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":87 * cdef public int extended * cdef public int count * cdef public root # <<<<<<<<<<<<<< @@ -41022,7 +41136,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_9TrieTable_4root_4__del__(struct __pyx_obj_4c return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":107 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":114 * * # returns true if sent_id is contained * cdef int contains(self, int sent_id): # <<<<<<<<<<<<<< @@ -41035,7 +41149,7 @@ static int __pyx_f_4cdec_2sa_3_sa_14PhraseLocation_contains(CYTHON_UNUSED struct __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("contains", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":108 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":115 * # returns true if sent_id is contained * cdef int contains(self, int sent_id): * return 1 # <<<<<<<<<<<<<< @@ -41045,7 +41159,7 @@ static int __pyx_f_4cdec_2sa_3_sa_14PhraseLocation_contains(CYTHON_UNUSED struct __pyx_r = 1; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":107 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":114 * * # returns true if sent_id is contained * cdef int contains(self, int sent_id): # <<<<<<<<<<<<<< @@ -41059,7 +41173,7 @@ static int __pyx_f_4cdec_2sa_3_sa_14PhraseLocation_contains(CYTHON_UNUSED struct return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":110 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":117 * return 1 * * def __cinit__(self, int sa_low=-1, int sa_high=-1, int arr_low=-1, int arr_high=-1, # <<<<<<<<<<<<<< @@ -41086,7 +41200,7 @@ static int __pyx_pw_4cdec_2sa_3_sa_14PhraseLocation_1__cinit__(PyObject *__pyx_v static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sa_low,&__pyx_n_s_sa_high,&__pyx_n_s_arr_low,&__pyx_n_s_arr_high,&__pyx_n_s_arr,&__pyx_n_s_num_subpatterns,0}; PyObject* values[6] = {0,0,0,0,0,0}; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":111 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":118 * * def __cinit__(self, int sa_low=-1, int sa_high=-1, int arr_low=-1, int arr_high=-1, * arr=None, int num_subpatterns=1): # <<<<<<<<<<<<<< @@ -41141,7 +41255,7 @@ static int __pyx_pw_4cdec_2sa_3_sa_14PhraseLocation_1__cinit__(PyObject *__pyx_v } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -41156,35 +41270,35 @@ static int __pyx_pw_4cdec_2sa_3_sa_14PhraseLocation_1__cinit__(PyObject *__pyx_v } } if (values[0]) { - __pyx_v_sa_low = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_sa_low == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_sa_low = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_sa_low == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_sa_low = ((int)-1); } if (values[1]) { - __pyx_v_sa_high = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_sa_high == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_sa_high = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_sa_high == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_sa_high = ((int)-1); } if (values[2]) { - __pyx_v_arr_low = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_arr_low == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_arr_low = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_arr_low == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_arr_low = ((int)-1); } if (values[3]) { - __pyx_v_arr_high = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_arr_high == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_arr_high = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_arr_high == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_arr_high = ((int)-1); } __pyx_v_arr = values[4]; if (values[5]) { - __pyx_v_num_subpatterns = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_num_subpatterns == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_num_subpatterns = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_num_subpatterns == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_num_subpatterns = ((int)1); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("cdec.sa._sa.PhraseLocation.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -41192,7 +41306,7 @@ static int __pyx_pw_4cdec_2sa_3_sa_14PhraseLocation_1__cinit__(PyObject *__pyx_v __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4cdec_2sa_3_sa_14PhraseLocation___cinit__(((struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *)__pyx_v_self), __pyx_v_sa_low, __pyx_v_sa_high, __pyx_v_arr_low, __pyx_v_arr_high, __pyx_v_arr, __pyx_v_num_subpatterns); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":110 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":117 * return 1 * * def __cinit__(self, int sa_low=-1, int sa_high=-1, int arr_low=-1, int arr_high=-1, # <<<<<<<<<<<<<< @@ -41214,7 +41328,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_14PhraseLocation___cinit__(struct __pyx_obj_4 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":112 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":119 * def __cinit__(self, int sa_low=-1, int sa_high=-1, int arr_low=-1, int arr_high=-1, * arr=None, int num_subpatterns=1): * self.sa_low = sa_low # <<<<<<<<<<<<<< @@ -41223,7 +41337,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_14PhraseLocation___cinit__(struct __pyx_obj_4 */ __pyx_v_self->sa_low = __pyx_v_sa_low; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":113 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":120 * arr=None, int num_subpatterns=1): * self.sa_low = sa_low * self.sa_high = sa_high # <<<<<<<<<<<<<< @@ -41232,7 +41346,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_14PhraseLocation___cinit__(struct __pyx_obj_4 */ __pyx_v_self->sa_high = __pyx_v_sa_high; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":114 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":121 * self.sa_low = sa_low * self.sa_high = sa_high * self.arr_low = arr_low # <<<<<<<<<<<<<< @@ -41241,7 +41355,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_14PhraseLocation___cinit__(struct __pyx_obj_4 */ __pyx_v_self->arr_low = __pyx_v_arr_low; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":115 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":122 * self.sa_high = sa_high * self.arr_low = arr_low * self.arr_high = arr_high # <<<<<<<<<<<<<< @@ -41250,14 +41364,14 @@ static int __pyx_pf_4cdec_2sa_3_sa_14PhraseLocation___cinit__(struct __pyx_obj_4 */ __pyx_v_self->arr_high = __pyx_v_arr_high; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":116 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":123 * self.arr_low = arr_low * self.arr_high = arr_high * self.arr = arr # <<<<<<<<<<<<<< * self.num_subpatterns = num_subpatterns * */ - if (!(likely(((__pyx_v_arr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_arr, __pyx_ptype_4cdec_2sa_3_sa_IntList))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(((__pyx_v_arr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_arr, __pyx_ptype_4cdec_2sa_3_sa_IntList))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __pyx_v_arr; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -41266,7 +41380,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_14PhraseLocation___cinit__(struct __pyx_obj_4 __pyx_v_self->arr = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":117 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":124 * self.arr_high = arr_high * self.arr = arr * self.num_subpatterns = num_subpatterns # <<<<<<<<<<<<<< @@ -41275,7 +41389,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_14PhraseLocation___cinit__(struct __pyx_obj_4 */ __pyx_v_self->num_subpatterns = __pyx_v_num_subpatterns; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":110 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":117 * return 1 * * def __cinit__(self, int sa_low=-1, int sa_high=-1, int arr_low=-1, int arr_high=-1, # <<<<<<<<<<<<<< @@ -41295,7 +41409,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_14PhraseLocation___cinit__(struct __pyx_obj_4 return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":127 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":134 * cdef IntList sa * * def __cinit__(self, int sample_size, SuffixArray fsarray): # <<<<<<<<<<<<<< @@ -41334,11 +41448,11 @@ static int __pyx_pw_4cdec_2sa_3_sa_7Sampler_1__cinit__(PyObject *__pyx_v_self, P case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fsarray)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -41346,18 +41460,18 @@ static int __pyx_pw_4cdec_2sa_3_sa_7Sampler_1__cinit__(PyObject *__pyx_v_self, P values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } - __pyx_v_sample_size = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_sample_size == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_sample_size = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_sample_size == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_v_fsarray = ((struct __pyx_obj_4cdec_2sa_3_sa_SuffixArray *)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("cdec.sa._sa.Sampler.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fsarray), __pyx_ptype_4cdec_2sa_3_sa_SuffixArray, 1, "fsarray", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fsarray), __pyx_ptype_4cdec_2sa_3_sa_SuffixArray, 1, "fsarray", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_4cdec_2sa_3_sa_7Sampler___cinit__(((struct __pyx_obj_4cdec_2sa_3_sa_Sampler *)__pyx_v_self), __pyx_v_sample_size, __pyx_v_fsarray); /* function exit code */ @@ -41381,7 +41495,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_7Sampler___cinit__(struct __pyx_obj_4cdec_2sa int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":128 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":135 * * def __cinit__(self, int sample_size, SuffixArray fsarray): * self.sample_size = sample_size # <<<<<<<<<<<<<< @@ -41390,7 +41504,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_7Sampler___cinit__(struct __pyx_obj_4cdec_2sa */ __pyx_v_self->sample_size = __pyx_v_sample_size; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":129 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":136 * def __cinit__(self, int sample_size, SuffixArray fsarray): * self.sample_size = sample_size * self.sa = fsarray.sa # <<<<<<<<<<<<<< @@ -41405,7 +41519,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_7Sampler___cinit__(struct __pyx_obj_4cdec_2sa __pyx_v_self->sa = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":130 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":137 * self.sample_size = sample_size * self.sa = fsarray.sa * if sample_size > 0: # <<<<<<<<<<<<<< @@ -41415,21 +41529,21 @@ static int __pyx_pf_4cdec_2sa_3_sa_7Sampler___cinit__(struct __pyx_obj_4cdec_2sa __pyx_t_2 = ((__pyx_v_sample_size > 0) != 0); if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":131 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":138 * self.sa = fsarray.sa * if sample_size > 0: * logger.info("Sampling strategy: uniform, max sample size = %d", sample_size) # <<<<<<<<<<<<<< * else: * logger.info("Sampling strategy: no sampling") */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_logger); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_logger); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_info); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_info); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_sample_size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_sample_size); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_kp_s_Sampling_strategy_uniform_max_sa); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_s_Sampling_strategy_uniform_max_sa); @@ -41437,7 +41551,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_7Sampler___cinit__(struct __pyx_obj_4cdec_2sa PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -41446,26 +41560,26 @@ static int __pyx_pf_4cdec_2sa_3_sa_7Sampler___cinit__(struct __pyx_obj_4cdec_2sa } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":133 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":140 * logger.info("Sampling strategy: uniform, max sample size = %d", sample_size) * else: * logger.info("Sampling strategy: no sampling") # <<<<<<<<<<<<<< * * def sample(self, PhraseLocation phrase_location): */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_logger); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_logger); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_info); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_info); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__60, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__60, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 140; __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_1); __pyx_t_1 = 0; } __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":127 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":134 * cdef IntList sa * * def __cinit__(self, int sample_size, SuffixArray fsarray): # <<<<<<<<<<<<<< @@ -41487,7 +41601,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_7Sampler___cinit__(struct __pyx_obj_4cdec_2sa return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":135 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":142 * logger.info("Sampling strategy: no sampling") * * def sample(self, PhraseLocation phrase_location): # <<<<<<<<<<<<<< @@ -41505,7 +41619,7 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_7Sampler_3sample(PyObject *__pyx_v_self PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("sample (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_phrase_location), __pyx_ptype_4cdec_2sa_3_sa_PhraseLocation, 1, "phrase_location", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_phrase_location), __pyx_ptype_4cdec_2sa_3_sa_PhraseLocation, 1, "phrase_location", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_4cdec_2sa_3_sa_7Sampler_2sample(((struct __pyx_obj_4cdec_2sa_3_sa_Sampler *)__pyx_v_self), ((struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *)__pyx_v_phrase_location)); /* function exit code */ @@ -41536,19 +41650,19 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7Sampler_2sample(struct __pyx_obj_4cdec int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sample", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":148 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":155 * cdef int num_locations, val, j * * sample = IntList() # <<<<<<<<<<<<<< * if phrase_location.arr is None: * num_locations = phrase_location.sa_high - phrase_location.sa_low */ - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_IntList)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_IntList)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_sample = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":149 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":156 * * sample = IntList() * if phrase_location.arr is None: # <<<<<<<<<<<<<< @@ -41559,7 +41673,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7Sampler_2sample(struct __pyx_obj_4cdec __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":150 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":157 * sample = IntList() * if phrase_location.arr is None: * num_locations = phrase_location.sa_high - phrase_location.sa_low # <<<<<<<<<<<<<< @@ -41568,7 +41682,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7Sampler_2sample(struct __pyx_obj_4cdec */ __pyx_v_num_locations = (__pyx_v_phrase_location->sa_high - __pyx_v_phrase_location->sa_low); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":151 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":158 * if phrase_location.arr is None: * num_locations = phrase_location.sa_high - phrase_location.sa_low * if self.sample_size == -1 or num_locations <= self.sample_size: # <<<<<<<<<<<<<< @@ -41584,7 +41698,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7Sampler_2sample(struct __pyx_obj_4cdec } if (__pyx_t_4) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":152 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":159 * num_locations = phrase_location.sa_high - phrase_location.sa_low * if self.sample_size == -1 or num_locations <= self.sample_size: * sample._extend_arr(self.sa.arr + phrase_location.sa_low, num_locations) # <<<<<<<<<<<<<< @@ -41596,7 +41710,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7Sampler_2sample(struct __pyx_obj_4cdec } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":154 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":161 * sample._extend_arr(self.sa.arr + phrase_location.sa_low, num_locations) * else: * stepsize = float(num_locations)/float(self.sample_size) # <<<<<<<<<<<<<< @@ -41611,11 +41725,11 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7Sampler_2sample(struct __pyx_obj_4cdec #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_stepsize = (((double)__pyx_v_num_locations) / ((double)__pyx_v_self->sample_size)); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":155 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":162 * else: * stepsize = float(num_locations)/float(self.sample_size) * i = phrase_location.sa_low # <<<<<<<<<<<<<< @@ -41625,7 +41739,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7Sampler_2sample(struct __pyx_obj_4cdec __pyx_t_5 = __pyx_v_phrase_location->sa_low; __pyx_v_i = __pyx_t_5; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":156 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":163 * stepsize = float(num_locations)/float(self.sample_size) * i = phrase_location.sa_low * while i < phrase_location.sa_high and sample.len < self.sample_size: # <<<<<<<<<<<<<< @@ -41642,7 +41756,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7Sampler_2sample(struct __pyx_obj_4cdec } if (!__pyx_t_2) break; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":159 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":166 * '''Note: int(i) not guaranteed to have the desired * effect, according to the python documentation''' * if fmod(i,1.0) > 0.5: # <<<<<<<<<<<<<< @@ -41652,7 +41766,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7Sampler_2sample(struct __pyx_obj_4cdec __pyx_t_2 = ((fmod(__pyx_v_i, 1.0) > 0.5) != 0); if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":160 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":167 * effect, according to the python documentation''' * if fmod(i,1.0) > 0.5: * val = int(ceil(i)) # <<<<<<<<<<<<<< @@ -41664,7 +41778,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7Sampler_2sample(struct __pyx_obj_4cdec } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":162 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":169 * val = int(ceil(i)) * else: * val = int(floor(i)) # <<<<<<<<<<<<<< @@ -41675,7 +41789,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7Sampler_2sample(struct __pyx_obj_4cdec } __pyx_L7:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":163 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":170 * else: * val = int(floor(i)) * sample._append(self.sa.arr[val]) # <<<<<<<<<<<<<< @@ -41684,7 +41798,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7Sampler_2sample(struct __pyx_obj_4cdec */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_sample->__pyx_vtab)->_append(__pyx_v_sample, (__pyx_v_self->sa->arr[__pyx_v_val])); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":164 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":171 * val = int(floor(i)) * sample._append(self.sa.arr[val]) * i = i + stepsize # <<<<<<<<<<<<<< @@ -41699,7 +41813,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7Sampler_2sample(struct __pyx_obj_4cdec } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":166 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":173 * i = i + stepsize * else: * num_locations = (phrase_location.arr_high - phrase_location.arr_low) / phrase_location.num_subpatterns # <<<<<<<<<<<<<< @@ -41715,7 +41829,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7Sampler_2sample(struct __pyx_obj_4cdec #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else if (sizeof(int) == sizeof(long) && (!(((int)-1) > 0)) && unlikely(__pyx_v_phrase_location->num_subpatterns == (int)-1) && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_t_5))) { #ifdef WITH_THREAD @@ -41725,11 +41839,11 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7Sampler_2sample(struct __pyx_obj_4cdec #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_num_locations = __Pyx_div_int(__pyx_t_5, __pyx_v_phrase_location->num_subpatterns); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":167 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":174 * else: * num_locations = (phrase_location.arr_high - phrase_location.arr_low) / phrase_location.num_subpatterns * if self.sample_size == -1 or num_locations <= self.sample_size: # <<<<<<<<<<<<<< @@ -41745,7 +41859,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7Sampler_2sample(struct __pyx_obj_4cdec } if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":168 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":175 * num_locations = (phrase_location.arr_high - phrase_location.arr_low) / phrase_location.num_subpatterns * if self.sample_size == -1 or num_locations <= self.sample_size: * sample = phrase_location.arr # <<<<<<<<<<<<<< @@ -41760,7 +41874,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7Sampler_2sample(struct __pyx_obj_4cdec } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":170 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":177 * sample = phrase_location.arr * else: * stepsize = float(num_locations)/float(self.sample_size) # <<<<<<<<<<<<<< @@ -41775,11 +41889,11 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7Sampler_2sample(struct __pyx_obj_4cdec #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_stepsize = (((double)__pyx_v_num_locations) / ((double)__pyx_v_self->sample_size)); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":171 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":178 * else: * stepsize = float(num_locations)/float(self.sample_size) * i = phrase_location.arr_low # <<<<<<<<<<<<<< @@ -41789,7 +41903,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7Sampler_2sample(struct __pyx_obj_4cdec __pyx_t_5 = __pyx_v_phrase_location->arr_low; __pyx_v_i = __pyx_t_5; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":172 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":179 * stepsize = float(num_locations)/float(self.sample_size) * i = phrase_location.arr_low * while i < num_locations and sample.len < self.sample_size * phrase_location.num_subpatterns: # <<<<<<<<<<<<<< @@ -41806,7 +41920,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7Sampler_2sample(struct __pyx_obj_4cdec } if (!__pyx_t_4) break; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":175 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":182 * '''Note: int(i) not guaranteed to have the desired * effect, according to the python documentation''' * if fmod(i,1.0) > 0.5: # <<<<<<<<<<<<<< @@ -41816,7 +41930,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7Sampler_2sample(struct __pyx_obj_4cdec __pyx_t_4 = ((fmod(__pyx_v_i, 1.0) > 0.5) != 0); if (__pyx_t_4) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":176 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":183 * effect, according to the python documentation''' * if fmod(i,1.0) > 0.5: * val = int(ceil(i)) # <<<<<<<<<<<<<< @@ -41828,7 +41942,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7Sampler_2sample(struct __pyx_obj_4cdec } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":178 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":185 * val = int(ceil(i)) * else: * val = int(floor(i)) # <<<<<<<<<<<<<< @@ -41839,7 +41953,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7Sampler_2sample(struct __pyx_obj_4cdec } __pyx_L11:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":179 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":186 * else: * val = int(floor(i)) * j = phrase_location.arr_low + (val*phrase_location.num_subpatterns) # <<<<<<<<<<<<<< @@ -41848,7 +41962,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7Sampler_2sample(struct __pyx_obj_4cdec */ __pyx_v_j = (__pyx_v_phrase_location->arr_low + (__pyx_v_val * __pyx_v_phrase_location->num_subpatterns)); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":180 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":187 * val = int(floor(i)) * j = phrase_location.arr_low + (val*phrase_location.num_subpatterns) * sample._extend_arr(phrase_location.arr.arr + j, phrase_location.num_subpatterns) # <<<<<<<<<<<<<< @@ -41857,7 +41971,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7Sampler_2sample(struct __pyx_obj_4cdec */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_sample->__pyx_vtab)->_extend_arr(__pyx_v_sample, (__pyx_v_phrase_location->arr->arr + __pyx_v_j), __pyx_v_phrase_location->num_subpatterns); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":181 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":188 * j = phrase_location.arr_low + (val*phrase_location.num_subpatterns) * sample._extend_arr(phrase_location.arr.arr + j, phrase_location.num_subpatterns) * i = i + stepsize # <<<<<<<<<<<<<< @@ -41871,7 +41985,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7Sampler_2sample(struct __pyx_obj_4cdec } __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":182 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":189 * sample._extend_arr(phrase_location.arr.arr + j, phrase_location.num_subpatterns) * i = i + stepsize * return sample # <<<<<<<<<<<<<< @@ -41883,7 +41997,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7Sampler_2sample(struct __pyx_obj_4cdec __pyx_r = ((PyObject *)__pyx_v_sample); goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":135 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":142 * logger.info("Sampling strategy: no sampling") * * def sample(self, PhraseLocation phrase_location): # <<<<<<<<<<<<<< @@ -41903,7 +42017,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_7Sampler_2sample(struct __pyx_obj_4cdec return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":194 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":201 * * * cdef void assign_matching(Matching* m, int* arr, int start, int step, int* sent_id_arr): # <<<<<<<<<<<<<< @@ -41915,7 +42029,7 @@ static void __pyx_f_4cdec_2sa_3_sa_assign_matching(struct __pyx_t_4cdec_2sa_3_sa __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("assign_matching", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":195 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":202 * * cdef void assign_matching(Matching* m, int* arr, int start, int step, int* sent_id_arr): * m.arr = arr # <<<<<<<<<<<<<< @@ -41924,7 +42038,7 @@ static void __pyx_f_4cdec_2sa_3_sa_assign_matching(struct __pyx_t_4cdec_2sa_3_sa */ __pyx_v_m->arr = __pyx_v_arr; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":196 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":203 * cdef void assign_matching(Matching* m, int* arr, int start, int step, int* sent_id_arr): * m.arr = arr * m.start = start # <<<<<<<<<<<<<< @@ -41933,7 +42047,7 @@ static void __pyx_f_4cdec_2sa_3_sa_assign_matching(struct __pyx_t_4cdec_2sa_3_sa */ __pyx_v_m->start = __pyx_v_start; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":197 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":204 * m.arr = arr * m.start = start * m.end = start + step # <<<<<<<<<<<<<< @@ -41942,7 +42056,7 @@ static void __pyx_f_4cdec_2sa_3_sa_assign_matching(struct __pyx_t_4cdec_2sa_3_sa */ __pyx_v_m->end = (__pyx_v_start + __pyx_v_step); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":198 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":205 * m.start = start * m.end = start + step * m.sent_id = sent_id_arr[arr[start]] # <<<<<<<<<<<<<< @@ -41951,7 +42065,7 @@ static void __pyx_f_4cdec_2sa_3_sa_assign_matching(struct __pyx_t_4cdec_2sa_3_sa */ __pyx_v_m->sent_id = (__pyx_v_sent_id_arr[(__pyx_v_arr[__pyx_v_start])]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":199 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":206 * m.end = start + step * m.sent_id = sent_id_arr[arr[start]] * m.size = step # <<<<<<<<<<<<<< @@ -41960,7 +42074,7 @@ static void __pyx_f_4cdec_2sa_3_sa_assign_matching(struct __pyx_t_4cdec_2sa_3_sa */ __pyx_v_m->size = __pyx_v_step; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":194 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":201 * * * cdef void assign_matching(Matching* m, int* arr, int start, int step, int* sent_id_arr): # <<<<<<<<<<<<<< @@ -41972,7 +42086,7 @@ static void __pyx_f_4cdec_2sa_3_sa_assign_matching(struct __pyx_t_4cdec_2sa_3_sa __Pyx_RefNannyFinishContext(); } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":202 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":209 * * * cdef int* append_combined_matching(int* arr, Matching* loc1, Matching* loc2, # <<<<<<<<<<<<<< @@ -41989,7 +42103,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_append_combined_matching(int *__pyx_v_arr, st int __pyx_t_2; __Pyx_RefNannySetupContext("append_combined_matching", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":206 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":213 * cdef int i, new_len * * new_len = result_len[0] + num_subpatterns # <<<<<<<<<<<<<< @@ -41998,7 +42112,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_append_combined_matching(int *__pyx_v_arr, st */ __pyx_v_new_len = ((__pyx_v_result_len[0]) + __pyx_v_num_subpatterns); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":207 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":214 * * new_len = result_len[0] + num_subpatterns * arr = realloc(arr, new_len*sizeof(int)) # <<<<<<<<<<<<<< @@ -42007,7 +42121,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_append_combined_matching(int *__pyx_v_arr, st */ __pyx_v_arr = ((int *)realloc(__pyx_v_arr, (__pyx_v_new_len * (sizeof(int))))); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":209 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":216 * arr = realloc(arr, new_len*sizeof(int)) * * for i from 0 <= i < loc1.size: # <<<<<<<<<<<<<< @@ -42017,7 +42131,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_append_combined_matching(int *__pyx_v_arr, st __pyx_t_1 = __pyx_v_loc1->size; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":210 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":217 * * for i from 0 <= i < loc1.size: * arr[result_len[0]+i] = loc1.arr[loc1.start+i] # <<<<<<<<<<<<<< @@ -42027,7 +42141,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_append_combined_matching(int *__pyx_v_arr, st (__pyx_v_arr[((__pyx_v_result_len[0]) + __pyx_v_i)]) = (__pyx_v_loc1->arr[(__pyx_v_loc1->start + __pyx_v_i)]); } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":211 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":218 * for i from 0 <= i < loc1.size: * arr[result_len[0]+i] = loc1.arr[loc1.start+i] * if num_subpatterns > loc1.size: # <<<<<<<<<<<<<< @@ -42037,7 +42151,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_append_combined_matching(int *__pyx_v_arr, st __pyx_t_2 = ((__pyx_v_num_subpatterns > __pyx_v_loc1->size) != 0); if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":212 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":219 * arr[result_len[0]+i] = loc1.arr[loc1.start+i] * if num_subpatterns > loc1.size: * arr[new_len-1] = loc2.arr[loc2.end-1] # <<<<<<<<<<<<<< @@ -42049,7 +42163,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_append_combined_matching(int *__pyx_v_arr, st } __pyx_L5:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":213 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":220 * if num_subpatterns > loc1.size: * arr[new_len-1] = loc2.arr[loc2.end-1] * result_len[0] = new_len # <<<<<<<<<<<<<< @@ -42058,7 +42172,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_append_combined_matching(int *__pyx_v_arr, st */ (__pyx_v_result_len[0]) = __pyx_v_new_len; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":214 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":221 * arr[new_len-1] = loc2.arr[loc2.end-1] * result_len[0] = new_len * return arr # <<<<<<<<<<<<<< @@ -42068,7 +42182,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_append_combined_matching(int *__pyx_v_arr, st __pyx_r = __pyx_v_arr; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":202 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":209 * * * cdef int* append_combined_matching(int* arr, Matching* loc1, Matching* loc2, # <<<<<<<<<<<<<< @@ -42082,7 +42196,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_append_combined_matching(int *__pyx_v_arr, st return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":217 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":224 * * * cdef int* extend_arr(int* arr, int* arr_len, int* appendix, int appendix_len): # <<<<<<<<<<<<<< @@ -42096,7 +42210,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_extend_arr(int *__pyx_v_arr, int *__pyx_v_arr __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("extend_arr", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":220 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":227 * cdef int new_len * * new_len = arr_len[0] + appendix_len # <<<<<<<<<<<<<< @@ -42105,7 +42219,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_extend_arr(int *__pyx_v_arr, int *__pyx_v_arr */ __pyx_v_new_len = ((__pyx_v_arr_len[0]) + __pyx_v_appendix_len); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":221 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":228 * * new_len = arr_len[0] + appendix_len * arr = realloc(arr, new_len*sizeof(int)) # <<<<<<<<<<<<<< @@ -42114,7 +42228,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_extend_arr(int *__pyx_v_arr, int *__pyx_v_arr */ __pyx_v_arr = ((int *)realloc(__pyx_v_arr, (__pyx_v_new_len * (sizeof(int))))); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":222 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":229 * new_len = arr_len[0] + appendix_len * arr = realloc(arr, new_len*sizeof(int)) * memcpy(arr+arr_len[0], appendix, appendix_len*sizeof(int)) # <<<<<<<<<<<<<< @@ -42123,7 +42237,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_extend_arr(int *__pyx_v_arr, int *__pyx_v_arr */ memcpy((__pyx_v_arr + (__pyx_v_arr_len[0])), __pyx_v_appendix, (__pyx_v_appendix_len * (sizeof(int)))); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":223 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":230 * arr = realloc(arr, new_len*sizeof(int)) * memcpy(arr+arr_len[0], appendix, appendix_len*sizeof(int)) * arr_len[0] = new_len # <<<<<<<<<<<<<< @@ -42132,7 +42246,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_extend_arr(int *__pyx_v_arr, int *__pyx_v_arr */ (__pyx_v_arr_len[0]) = __pyx_v_new_len; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":224 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":231 * memcpy(arr+arr_len[0], appendix, appendix_len*sizeof(int)) * arr_len[0] = new_len * return arr # <<<<<<<<<<<<<< @@ -42142,7 +42256,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_extend_arr(int *__pyx_v_arr, int *__pyx_v_arr __pyx_r = __pyx_v_arr; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":217 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":224 * * * cdef int* extend_arr(int* arr, int* arr_len, int* appendix, int appendix_len): # <<<<<<<<<<<<<< @@ -42156,7 +42270,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_extend_arr(int *__pyx_v_arr, int *__pyx_v_arr return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":226 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":233 * return arr * * cdef int median(int low, int high, int step): # <<<<<<<<<<<<<< @@ -42173,7 +42287,7 @@ static int __pyx_f_4cdec_2sa_3_sa_median(int __pyx_v_low, int __pyx_v_high, int int __pyx_clineno = 0; __Pyx_RefNannySetupContext("median", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":227 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":234 * * cdef int median(int low, int high, int step): * return low + (((high - low)/step)/2)*step # <<<<<<<<<<<<<< @@ -42189,7 +42303,7 @@ static int __pyx_f_4cdec_2sa_3_sa_median(int __pyx_v_low, int __pyx_v_high, int #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else if (sizeof(int) == sizeof(long) && (!(((int)-1) > 0)) && unlikely(__pyx_v_step == (int)-1) && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_t_1))) { #ifdef WITH_THREAD @@ -42199,12 +42313,12 @@ static int __pyx_f_4cdec_2sa_3_sa_median(int __pyx_v_low, int __pyx_v_high, int #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_r = (__pyx_v_low + (__Pyx_div_long(__Pyx_div_int(__pyx_t_1, __pyx_v_step), 2) * __pyx_v_step)); goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":226 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":233 * return arr * * cdef int median(int low, int high, int step): # <<<<<<<<<<<<<< @@ -42221,7 +42335,7 @@ static int __pyx_f_4cdec_2sa_3_sa_median(int __pyx_v_low, int __pyx_v_high, int return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":230 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":237 * * * cdef void find_comparable_matchings(int low, int high, int* arr, int step, int loc, int* loc_minus, int* loc_plus): # <<<<<<<<<<<<<< @@ -42236,7 +42350,7 @@ static void __pyx_f_4cdec_2sa_3_sa_find_comparable_matchings(int __pyx_v_low, in int __pyx_t_3; __Pyx_RefNannySetupContext("find_comparable_matchings", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":234 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":241 * # in which all matchings have the same first index as the one * # starting at loc * loc_plus[0] = loc + step # <<<<<<<<<<<<<< @@ -42245,7 +42359,7 @@ static void __pyx_f_4cdec_2sa_3_sa_find_comparable_matchings(int __pyx_v_low, in */ (__pyx_v_loc_plus[0]) = (__pyx_v_loc + __pyx_v_step); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":235 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":242 * # starting at loc * loc_plus[0] = loc + step * while loc_plus[0] < high and arr[loc_plus[0]] == arr[loc]: # <<<<<<<<<<<<<< @@ -42262,7 +42376,7 @@ static void __pyx_f_4cdec_2sa_3_sa_find_comparable_matchings(int __pyx_v_low, in } if (!__pyx_t_3) break; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":236 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":243 * loc_plus[0] = loc + step * while loc_plus[0] < high and arr[loc_plus[0]] == arr[loc]: * loc_plus[0] = loc_plus[0] + step # <<<<<<<<<<<<<< @@ -42272,7 +42386,7 @@ static void __pyx_f_4cdec_2sa_3_sa_find_comparable_matchings(int __pyx_v_low, in (__pyx_v_loc_plus[0]) = ((__pyx_v_loc_plus[0]) + __pyx_v_step); } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":237 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":244 * while loc_plus[0] < high and arr[loc_plus[0]] == arr[loc]: * loc_plus[0] = loc_plus[0] + step * loc_minus[0] = loc # <<<<<<<<<<<<<< @@ -42281,7 +42395,7 @@ static void __pyx_f_4cdec_2sa_3_sa_find_comparable_matchings(int __pyx_v_low, in */ (__pyx_v_loc_minus[0]) = __pyx_v_loc; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":238 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":245 * loc_plus[0] = loc_plus[0] + step * loc_minus[0] = loc * while loc_minus[0]-step >= low and arr[loc_minus[0]-step] == arr[loc]: # <<<<<<<<<<<<<< @@ -42298,7 +42412,7 @@ static void __pyx_f_4cdec_2sa_3_sa_find_comparable_matchings(int __pyx_v_low, in } if (!__pyx_t_2) break; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":239 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":246 * loc_minus[0] = loc * while loc_minus[0]-step >= low and arr[loc_minus[0]-step] == arr[loc]: * loc_minus[0] = loc_minus[0] - step # <<<<<<<<<<<<<< @@ -42308,7 +42422,7 @@ static void __pyx_f_4cdec_2sa_3_sa_find_comparable_matchings(int __pyx_v_low, in (__pyx_v_loc_minus[0]) = ((__pyx_v_loc_minus[0]) - __pyx_v_step); } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":230 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":237 * * * cdef void find_comparable_matchings(int low, int high, int* arr, int step, int loc, int* loc_minus, int* loc_plus): # <<<<<<<<<<<<<< @@ -42320,7 +42434,7 @@ static void __pyx_f_4cdec_2sa_3_sa_find_comparable_matchings(int __pyx_v_low, in __Pyx_RefNannyFinishContext(); } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":296 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":303 * cdef bilex * * def __cinit__(self, # <<<<<<<<<<<<<< @@ -42363,7 +42477,7 @@ static int __pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_1__cinit__(PyObject static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_alignment,&__pyx_n_s_bilex,&__pyx_n_s_by_slack_factor,&__pyx_n_s_category,&__pyx_n_s_max_chunks,&__pyx_n_s_max_initial_size,&__pyx_n_s_max_length,&__pyx_n_s_max_nonterminals,&__pyx_n_s_max_target_chunks,&__pyx_n_s_max_target_length,&__pyx_n_s_min_gap_size,&__pyx_n_s_precompute_file,&__pyx_n_s_precompute_secondary_rank,&__pyx_n_s_precompute_rank,&__pyx_n_s_require_aligned_terminal,&__pyx_n_s_require_aligned_chunks,&__pyx_n_s_train_max_initial_size,&__pyx_n_s_train_min_gap_size,&__pyx_n_s_tight_phrases,&__pyx_n_s_use_baeza_yates,&__pyx_n_s_use_collocations,&__pyx_n_s_use_index,0}; PyObject* values[22] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":300 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":307 * Alignment alignment, * # bilexical dictionary if online * bilex=None, # <<<<<<<<<<<<<< @@ -42372,7 +42486,7 @@ static int __pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_1__cinit__(PyObject */ values[1] = ((PyObject *)Py_None); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":306 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":313 * char* category="[X]", * # maximum number of contiguous chunks of terminal symbols in RHS of a rule. If None, defaults to max_nonterminals+1 * max_chunks=None, # <<<<<<<<<<<<<< @@ -42381,7 +42495,7 @@ static int __pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_1__cinit__(PyObject */ values[4] = ((PyObject *)Py_None); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":314 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":321 * unsigned max_nonterminals=2, * # maximum number of contiguous chunks of terminal symbols in target-side RHS of a rule. If None, defaults to max_nonterminals+1 * max_target_chunks=None, # <<<<<<<<<<<<<< @@ -42390,7 +42504,7 @@ static int __pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_1__cinit__(PyObject */ values[8] = ((PyObject *)Py_None); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":316 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":323 * max_target_chunks=None, * # maximum number of target side symbols (both T and NT) allowed in a rule. If None, defaults to max_initial_size * max_target_length=None, # <<<<<<<<<<<<<< @@ -42399,7 +42513,7 @@ static int __pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_1__cinit__(PyObject */ values[9] = ((PyObject *)Py_None); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":320 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":327 * unsigned min_gap_size=2, * # filename of file containing precomputed collocations * precompute_file=None, # <<<<<<<<<<<<<< @@ -42548,7 +42662,7 @@ static int __pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_1__cinit__(PyObject } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -42581,54 +42695,54 @@ static int __pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_1__cinit__(PyObject __pyx_v_alignment = ((struct __pyx_obj_4cdec_2sa_3_sa_Alignment *)values[0]); __pyx_v_bilex = values[1]; if (values[2]) { - __pyx_v_by_slack_factor = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_by_slack_factor == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_by_slack_factor = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_by_slack_factor == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_by_slack_factor = ((float)1.0); } if (values[3]) { - __pyx_v_category = __Pyx_PyObject_AsString(values[3]); if (unlikely((!__pyx_v_category) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_category = __Pyx_PyObject_AsString(values[3]); if (unlikely((!__pyx_v_category) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_category = ((char *)__pyx_k_X_2); } __pyx_v_max_chunks = values[4]; if (values[5]) { - __pyx_v_max_initial_size = __Pyx_PyInt_As_unsigned_int(values[5]); if (unlikely((__pyx_v_max_initial_size == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_max_initial_size = __Pyx_PyInt_As_unsigned_int(values[5]); if (unlikely((__pyx_v_max_initial_size == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_max_initial_size = ((unsigned int)10); } if (values[6]) { - __pyx_v_max_length = __Pyx_PyInt_As_unsigned_int(values[6]); if (unlikely((__pyx_v_max_length == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_max_length = __Pyx_PyInt_As_unsigned_int(values[6]); if (unlikely((__pyx_v_max_length == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_max_length = ((unsigned int)5); } if (values[7]) { - __pyx_v_max_nonterminals = __Pyx_PyInt_As_unsigned_int(values[7]); if (unlikely((__pyx_v_max_nonterminals == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_max_nonterminals = __Pyx_PyInt_As_unsigned_int(values[7]); if (unlikely((__pyx_v_max_nonterminals == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_max_nonterminals = ((unsigned int)2); } __pyx_v_max_target_chunks = values[8]; __pyx_v_max_target_length = values[9]; if (values[10]) { - __pyx_v_min_gap_size = __Pyx_PyInt_As_unsigned_int(values[10]); if (unlikely((__pyx_v_min_gap_size == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_min_gap_size = __Pyx_PyInt_As_unsigned_int(values[10]); if (unlikely((__pyx_v_min_gap_size == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_min_gap_size = ((unsigned int)2); } __pyx_v_precompute_file = values[11]; if (values[12]) { - __pyx_v_precompute_secondary_rank = __Pyx_PyInt_As_unsigned_int(values[12]); if (unlikely((__pyx_v_precompute_secondary_rank == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_precompute_secondary_rank = __Pyx_PyInt_As_unsigned_int(values[12]); if (unlikely((__pyx_v_precompute_secondary_rank == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_precompute_secondary_rank = ((unsigned int)20); } if (values[13]) { - __pyx_v_precompute_rank = __Pyx_PyInt_As_unsigned_int(values[13]); if (unlikely((__pyx_v_precompute_rank == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 324; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_precompute_rank = __Pyx_PyInt_As_unsigned_int(values[13]); if (unlikely((__pyx_v_precompute_rank == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_precompute_rank = ((unsigned int)100); } if (values[14]) { - __pyx_v_require_aligned_terminal = __Pyx_PyObject_IsTrue(values[14]); if (unlikely((__pyx_v_require_aligned_terminal == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_require_aligned_terminal = __Pyx_PyObject_IsTrue(values[14]); if (unlikely((__pyx_v_require_aligned_terminal == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":326 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":333 * unsigned precompute_rank=100, * # require extracted rules to have at least one aligned word * bint require_aligned_terminal=True, # <<<<<<<<<<<<<< @@ -42638,10 +42752,10 @@ static int __pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_1__cinit__(PyObject __pyx_v_require_aligned_terminal = ((int)1); } if (values[15]) { - __pyx_v_require_aligned_chunks = __Pyx_PyObject_IsTrue(values[15]); if (unlikely((__pyx_v_require_aligned_chunks == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_require_aligned_chunks = __Pyx_PyObject_IsTrue(values[15]); if (unlikely((__pyx_v_require_aligned_chunks == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 335; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":328 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":335 * bint require_aligned_terminal=True, * # require each contiguous chunk of extracted rules to have at least one aligned word * bint require_aligned_chunks=False, # <<<<<<<<<<<<<< @@ -42651,20 +42765,20 @@ static int __pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_1__cinit__(PyObject __pyx_v_require_aligned_chunks = ((int)0); } if (values[16]) { - __pyx_v_train_max_initial_size = __Pyx_PyInt_As_unsigned_int(values[16]); if (unlikely((__pyx_v_train_max_initial_size == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_train_max_initial_size = __Pyx_PyInt_As_unsigned_int(values[16]); if (unlikely((__pyx_v_train_max_initial_size == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_train_max_initial_size = ((unsigned int)10); } if (values[17]) { - __pyx_v_train_min_gap_size = __Pyx_PyInt_As_unsigned_int(values[17]); if (unlikely((__pyx_v_train_min_gap_size == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_train_min_gap_size = __Pyx_PyInt_As_unsigned_int(values[17]); if (unlikely((__pyx_v_train_min_gap_size == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_train_min_gap_size = ((unsigned int)2); } if (values[18]) { - __pyx_v_tight_phrases = __Pyx_PyObject_IsTrue(values[18]); if (unlikely((__pyx_v_tight_phrases == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_tight_phrases = __Pyx_PyObject_IsTrue(values[18]); if (unlikely((__pyx_v_tight_phrases == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":334 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":341 * unsigned train_min_gap_size=2, * # False if phrases should be loose (better but slower), True otherwise * bint tight_phrases=True, # <<<<<<<<<<<<<< @@ -42674,10 +42788,10 @@ static int __pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_1__cinit__(PyObject __pyx_v_tight_phrases = ((int)1); } if (values[19]) { - __pyx_v_use_baeza_yates = __Pyx_PyObject_IsTrue(values[19]); if (unlikely((__pyx_v_use_baeza_yates == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_use_baeza_yates = __Pyx_PyObject_IsTrue(values[19]); if (unlikely((__pyx_v_use_baeza_yates == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":336 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":343 * bint tight_phrases=True, * # True to require use of double-binary alg, false otherwise * bint use_baeza_yates=True, # <<<<<<<<<<<<<< @@ -42687,10 +42801,10 @@ static int __pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_1__cinit__(PyObject __pyx_v_use_baeza_yates = ((int)1); } if (values[20]) { - __pyx_v_use_collocations = __Pyx_PyObject_IsTrue(values[20]); if (unlikely((__pyx_v_use_collocations == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 338; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_use_collocations = __Pyx_PyObject_IsTrue(values[20]); if (unlikely((__pyx_v_use_collocations == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":338 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":345 * bint use_baeza_yates=True, * # True to enable used of precomputed collocations * bint use_collocations=True, # <<<<<<<<<<<<<< @@ -42700,10 +42814,10 @@ static int __pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_1__cinit__(PyObject __pyx_v_use_collocations = ((int)1); } if (values[21]) { - __pyx_v_use_index = __Pyx_PyObject_IsTrue(values[21]); if (unlikely((__pyx_v_use_index == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 340; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_use_index = __Pyx_PyObject_IsTrue(values[21]); if (unlikely((__pyx_v_use_index == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":340 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":347 * bint use_collocations=True, * # True to enable use of precomputed inverted indices * bint use_index=True): # <<<<<<<<<<<<<< @@ -42715,16 +42829,16 @@ static int __pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_1__cinit__(PyObject } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 22, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 296; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 22, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_alignment), __pyx_ptype_4cdec_2sa_3_sa_Alignment, 1, "alignment", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_alignment), __pyx_ptype_4cdec_2sa_3_sa_Alignment, 1, "alignment", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(((struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self), __pyx_v_alignment, __pyx_v_bilex, __pyx_v_by_slack_factor, __pyx_v_category, __pyx_v_max_chunks, __pyx_v_max_initial_size, __pyx_v_max_length, __pyx_v_max_nonterminals, __pyx_v_max_target_chunks, __pyx_v_max_target_length, __pyx_v_min_gap_size, __pyx_v_precompute_file, __pyx_v_precompute_secondary_rank, __pyx_v_precompute_rank, __pyx_v_require_aligned_terminal, __pyx_v_require_aligned_chunks, __pyx_v_train_max_initial_size, __pyx_v_train_min_gap_size, __pyx_v_tight_phrases, __pyx_v_use_baeza_yates, __pyx_v_use_collocations, __pyx_v_use_index); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":296 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":303 * cdef bilex * * def __cinit__(self, # <<<<<<<<<<<<<< @@ -42755,14 +42869,14 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":346 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":353 * respectively. This is because Chiang's model does not require * them to be the same, therefore we don't either.''' * self.rules = TrieTable(True) # cache # <<<<<<<<<<<<<< * self.rules.root = ExtendedTrieNode(phrase_location=PhraseLocation()) * if alignment is None: */ - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_TrieTable)), __pyx_tuple__61, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_TrieTable)), __pyx_tuple__61, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->rules); @@ -42770,20 +42884,20 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ __pyx_v_self->rules = ((struct __pyx_obj_4cdec_2sa_3_sa_TrieTable *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":347 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":354 * them to be the same, therefore we don't either.''' * self.rules = TrieTable(True) # cache * self.rules.root = ExtendedTrieNode(phrase_location=PhraseLocation()) # <<<<<<<<<<<<<< * if alignment is None: * raise Exception("Must specify an alignment object") */ - __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_PhraseLocation)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_PhraseLocation)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_phrase_location, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_phrase_location, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_ExtendedTrieNode)), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 347; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_ExtendedTrieNode)), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 354; __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); @@ -42792,7 +42906,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ __pyx_v_self->rules->root = __pyx_t_2; __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":348 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":355 * self.rules = TrieTable(True) # cache * self.rules.root = ExtendedTrieNode(phrase_location=PhraseLocation()) * if alignment is None: # <<<<<<<<<<<<<< @@ -42803,21 +42917,21 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":349 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":356 * self.rules.root = ExtendedTrieNode(phrase_location=PhraseLocation()) * if alignment is None: * raise Exception("Must specify an alignment object") # <<<<<<<<<<<<<< * self.alignment = alignment * */ - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_tuple__62, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_tuple__62, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":350 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":357 * if alignment is None: * raise Exception("Must specify an alignment object") * self.alignment = alignment # <<<<<<<<<<<<<< @@ -42830,7 +42944,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ __Pyx_DECREF(((PyObject *)__pyx_v_self->alignment)); __pyx_v_self->alignment = __pyx_v_alignment; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":354 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":361 * # grammar parameters and settings * # NOTE: setting max_nonterminals > 2 is not currently supported in Hiero * self.max_length = max_length # <<<<<<<<<<<<<< @@ -42839,7 +42953,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ */ __pyx_v_self->max_length = __pyx_v_max_length; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":355 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":362 * # NOTE: setting max_nonterminals > 2 is not currently supported in Hiero * self.max_length = max_length * self.max_nonterminals = max_nonterminals # <<<<<<<<<<<<<< @@ -42848,7 +42962,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ */ __pyx_v_self->max_nonterminals = __pyx_v_max_nonterminals; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":356 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":363 * self.max_length = max_length * self.max_nonterminals = max_nonterminals * self.max_initial_size = max_initial_size # <<<<<<<<<<<<<< @@ -42857,7 +42971,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ */ __pyx_v_self->max_initial_size = __pyx_v_max_initial_size; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":357 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":364 * self.max_nonterminals = max_nonterminals * self.max_initial_size = max_initial_size * self.train_max_initial_size = train_max_initial_size # <<<<<<<<<<<<<< @@ -42866,7 +42980,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ */ __pyx_v_self->train_max_initial_size = __pyx_v_train_max_initial_size; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":358 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":365 * self.max_initial_size = max_initial_size * self.train_max_initial_size = train_max_initial_size * self.min_gap_size = min_gap_size # <<<<<<<<<<<<<< @@ -42875,7 +42989,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ */ __pyx_v_self->min_gap_size = __pyx_v_min_gap_size; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":359 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":366 * self.train_max_initial_size = train_max_initial_size * self.min_gap_size = min_gap_size * self.train_min_gap_size = train_min_gap_size # <<<<<<<<<<<<<< @@ -42884,7 +42998,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ */ __pyx_v_self->train_min_gap_size = __pyx_v_train_min_gap_size; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":360 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":367 * self.min_gap_size = min_gap_size * self.train_min_gap_size = train_min_gap_size * self.category = sym_fromstring(category, False) # <<<<<<<<<<<<<< @@ -42893,7 +43007,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ */ __pyx_v_self->category = __pyx_f_4cdec_2sa_3_sa_sym_fromstring(__pyx_v_category, 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":362 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":369 * self.category = sym_fromstring(category, False) * * if max_chunks is None: # <<<<<<<<<<<<<< @@ -42904,7 +43018,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ __pyx_t_3 = (__pyx_t_4 != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":363 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":370 * * if max_chunks is None: * self.max_chunks = self.max_nonterminals + 1 # <<<<<<<<<<<<<< @@ -42916,19 +43030,19 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":365 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":372 * self.max_chunks = self.max_nonterminals + 1 * else: * self.max_chunks = max_chunks # <<<<<<<<<<<<<< * * if max_target_chunks is None: */ - __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_max_chunks); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 365; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_max_chunks); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->max_chunks = __pyx_t_5; } __pyx_L4:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":367 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":374 * self.max_chunks = max_chunks * * if max_target_chunks is None: # <<<<<<<<<<<<<< @@ -42939,7 +43053,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":368 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":375 * * if max_target_chunks is None: * self.max_target_chunks = self.max_nonterminals + 1 # <<<<<<<<<<<<<< @@ -42951,19 +43065,19 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":370 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":377 * self.max_target_chunks = self.max_nonterminals + 1 * else: * self.max_target_chunks = max_target_chunks # <<<<<<<<<<<<<< * * if max_target_length is None: */ - __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_max_target_chunks); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_max_target_chunks); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->max_target_chunks = __pyx_t_5; } __pyx_L5:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":372 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":379 * self.max_target_chunks = max_target_chunks * * if max_target_length is None: # <<<<<<<<<<<<<< @@ -42974,7 +43088,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ __pyx_t_3 = (__pyx_t_4 != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":373 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":380 * * if max_target_length is None: * self.max_target_length = max_initial_size # <<<<<<<<<<<<<< @@ -42986,26 +43100,26 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":375 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":382 * self.max_target_length = max_initial_size * else: * self.max_target_length = max_target_length # <<<<<<<<<<<<<< * * # algorithmic parameters and settings */ - __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_max_target_length); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 375; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_max_target_length); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->max_target_length = __pyx_t_5; } __pyx_L6:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":378 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":385 * * # algorithmic parameters and settings * self.precomputed_collocations = {} # <<<<<<<<<<<<<< * self.precomputed_index = {} * self.use_index = use_index */ - __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 378; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->precomputed_collocations); @@ -43013,14 +43127,14 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ __pyx_v_self->precomputed_collocations = __pyx_t_2; __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":379 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":386 * # algorithmic parameters and settings * self.precomputed_collocations = {} * self.precomputed_index = {} # <<<<<<<<<<<<<< * self.use_index = use_index * self.use_collocations = use_collocations */ - __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 386; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->precomputed_index); @@ -43028,7 +43142,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ __pyx_v_self->precomputed_index = __pyx_t_2; __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":380 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":387 * self.precomputed_collocations = {} * self.precomputed_index = {} * self.use_index = use_index # <<<<<<<<<<<<<< @@ -43037,7 +43151,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ */ __pyx_v_self->use_index = __pyx_v_use_index; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":381 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":388 * self.precomputed_index = {} * self.use_index = use_index * self.use_collocations = use_collocations # <<<<<<<<<<<<<< @@ -43046,14 +43160,14 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ */ __pyx_v_self->use_collocations = __pyx_v_use_collocations; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":382 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":389 * self.use_index = use_index * self.use_collocations = use_collocations * self.max_rank = {} # <<<<<<<<<<<<<< * self.precompute_file = precompute_file * self.precompute_rank = precompute_rank */ - __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 389; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->max_rank); @@ -43061,7 +43175,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ __pyx_v_self->max_rank = __pyx_t_2; __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":383 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":390 * self.use_collocations = use_collocations * self.max_rank = {} * self.precompute_file = precompute_file # <<<<<<<<<<<<<< @@ -43074,7 +43188,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ __Pyx_DECREF(__pyx_v_self->precompute_file); __pyx_v_self->precompute_file = __pyx_v_precompute_file; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":384 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":391 * self.max_rank = {} * self.precompute_file = precompute_file * self.precompute_rank = precompute_rank # <<<<<<<<<<<<<< @@ -43083,7 +43197,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ */ __pyx_v_self->precompute_rank = __pyx_v_precompute_rank; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":385 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":392 * self.precompute_file = precompute_file * self.precompute_rank = precompute_rank * self.precompute_secondary_rank = precompute_secondary_rank # <<<<<<<<<<<<<< @@ -43092,7 +43206,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ */ __pyx_v_self->precompute_secondary_rank = __pyx_v_precompute_secondary_rank; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":386 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":393 * self.precompute_rank = precompute_rank * self.precompute_secondary_rank = precompute_secondary_rank * self.use_baeza_yates = use_baeza_yates # <<<<<<<<<<<<<< @@ -43101,7 +43215,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ */ __pyx_v_self->use_baeza_yates = __pyx_v_use_baeza_yates; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":387 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":394 * self.precompute_secondary_rank = precompute_secondary_rank * self.use_baeza_yates = use_baeza_yates * self.by_slack_factor = by_slack_factor # <<<<<<<<<<<<<< @@ -43110,7 +43224,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ */ __pyx_v_self->by_slack_factor = __pyx_v_by_slack_factor; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":388 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":395 * self.use_baeza_yates = use_baeza_yates * self.by_slack_factor = by_slack_factor * self.tight_phrases = tight_phrases # <<<<<<<<<<<<<< @@ -43119,7 +43233,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ */ __pyx_v_self->tight_phrases = __pyx_v_tight_phrases; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":390 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":397 * self.tight_phrases = tight_phrases * * if require_aligned_chunks: # <<<<<<<<<<<<<< @@ -43129,7 +43243,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ __pyx_t_3 = (__pyx_v_require_aligned_chunks != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":392 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":399 * if require_aligned_chunks: * # one condition is a stronger version of the other. * self.require_aligned_chunks = self.require_aligned_terminal = True # <<<<<<<<<<<<<< @@ -43141,7 +43255,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ goto __pyx_L7; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":393 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":400 * # one condition is a stronger version of the other. * self.require_aligned_chunks = self.require_aligned_terminal = True * elif require_aligned_terminal: # <<<<<<<<<<<<<< @@ -43151,7 +43265,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ __pyx_t_3 = (__pyx_v_require_aligned_terminal != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":394 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":401 * self.require_aligned_chunks = self.require_aligned_terminal = True * elif require_aligned_terminal: * self.require_aligned_chunks = False # <<<<<<<<<<<<<< @@ -43160,7 +43274,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ */ __pyx_v_self->require_aligned_chunks = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":395 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":402 * elif require_aligned_terminal: * self.require_aligned_chunks = False * self.require_aligned_terminal = True # <<<<<<<<<<<<<< @@ -43172,7 +43286,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":397 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":404 * self.require_aligned_terminal = True * else: * self.require_aligned_chunks = self.require_aligned_terminal = False # <<<<<<<<<<<<<< @@ -43184,7 +43298,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ } __pyx_L7:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":400 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":407 * * # diagnostics * self.prev_norm_prefix = () # <<<<<<<<<<<<<< @@ -43197,17 +43311,17 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ __Pyx_DECREF(__pyx_v_self->prev_norm_prefix); __pyx_v_self->prev_norm_prefix = __pyx_empty_tuple; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":402 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":409 * self.prev_norm_prefix = () * * self.findexes = IntList(initial_len=10) # <<<<<<<<<<<<<< * self.findexes1 = IntList(initial_len=10) * */ - __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_initial_len, __pyx_int_10) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_IntList)), __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_initial_len, __pyx_int_10) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_IntList)), __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GIVEREF(__pyx_t_1); @@ -43216,17 +43330,17 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ __pyx_v_self->findexes = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":403 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":410 * * self.findexes = IntList(initial_len=10) * self.findexes1 = IntList(initial_len=10) # <<<<<<<<<<<<<< * * # Online stats */ - __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_initial_len, __pyx_int_10) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_IntList)), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_initial_len, __pyx_int_10) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 410; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_IntList)), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 410; __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); @@ -43235,9 +43349,9 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ __pyx_v_self->findexes1 = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":408 - * + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":416 * # None if not online + * # Base bilex, also need one per instance * self.bilex = bilex # <<<<<<<<<<<<<< * * # True after data is added @@ -43248,7 +43362,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ __Pyx_DECREF(__pyx_v_self->bilex); __pyx_v_self->bilex = __pyx_v_bilex; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":411 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":419 * * # True after data is added * self.online = False # <<<<<<<<<<<<<< @@ -43257,21 +43371,21 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ */ __pyx_v_self->online = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":412 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":420 * # True after data is added * self.online = False * self.online_stats = defaultdict(OnlineStats) # <<<<<<<<<<<<<< * * def configure(self, SuffixArray fsarray, DataArray edarray, */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_defaultdict); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_defaultdict); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_OnlineStats))); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_OnlineStats))); __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_OnlineStats))); - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 420; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -43281,7 +43395,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ __pyx_v_self->online_stats = __pyx_t_6; __pyx_t_6 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":296 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":303 * cdef bilex * * def __cinit__(self, # <<<<<<<<<<<<<< @@ -43303,7 +43417,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory___cinit__(struct __ return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":414 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":422 * self.online_stats = defaultdict(OnlineStats) * * def configure(self, SuffixArray fsarray, DataArray edarray, # <<<<<<<<<<<<<< @@ -43347,21 +43461,21 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_3configure(Py case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_edarray)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("configure", 1, 4, 4, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("configure", 1, 4, 4, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_sampler)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("configure", 1, 4, 4, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("configure", 1, 4, 4, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_scorer)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("configure", 1, 4, 4, 3); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("configure", 1, 4, 4, 3); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "configure") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "configure") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; @@ -43378,16 +43492,16 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_3configure(Py } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("configure", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("configure", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.configure", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fsarray), __pyx_ptype_4cdec_2sa_3_sa_SuffixArray, 1, "fsarray", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_edarray), __pyx_ptype_4cdec_2sa_3_sa_DataArray, 1, "edarray", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 414; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sampler), __pyx_ptype_4cdec_2sa_3_sa_Sampler, 1, "sampler", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_scorer), __pyx_ptype_4cdec_2sa_3_sa_Scorer, 1, "scorer", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fsarray), __pyx_ptype_4cdec_2sa_3_sa_SuffixArray, 1, "fsarray", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_edarray), __pyx_ptype_4cdec_2sa_3_sa_DataArray, 1, "edarray", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_sampler), __pyx_ptype_4cdec_2sa_3_sa_Sampler, 1, "sampler", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_scorer), __pyx_ptype_4cdec_2sa_3_sa_Scorer, 1, "scorer", 0))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_2configure(((struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self), __pyx_v_fsarray, __pyx_v_edarray, __pyx_v_sampler, __pyx_v_scorer); /* function exit code */ @@ -43409,7 +43523,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_2configure(st int __pyx_clineno = 0; __Pyx_RefNannySetupContext("configure", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":419 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":427 * Here we also use it to precompute the most expensive intersections * in the corpus quickly.''' * self.fsa = fsarray # <<<<<<<<<<<<<< @@ -43422,7 +43536,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_2configure(st __Pyx_DECREF(((PyObject *)__pyx_v_self->fsa)); __pyx_v_self->fsa = __pyx_v_fsarray; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":420 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":428 * in the corpus quickly.''' * self.fsa = fsarray * self.fda = fsarray.darray # <<<<<<<<<<<<<< @@ -43437,7 +43551,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_2configure(st __pyx_v_self->fda = ((struct __pyx_obj_4cdec_2sa_3_sa_DataArray *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":421 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":429 * self.fsa = fsarray * self.fda = fsarray.darray * self.eda = edarray # <<<<<<<<<<<<<< @@ -43450,7 +43564,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_2configure(st __Pyx_DECREF(((PyObject *)__pyx_v_self->eda)); __pyx_v_self->eda = __pyx_v_edarray; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":422 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":430 * self.fda = fsarray.darray * self.eda = edarray * self.fid2symid = self.set_idmap(self.fda) # <<<<<<<<<<<<<< @@ -43459,17 +43573,17 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_2configure(st */ __pyx_t_1 = ((PyObject *)__pyx_v_self->fda); __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->set_idmap(__pyx_v_self, ((struct __pyx_obj_4cdec_2sa_3_sa_DataArray *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->set_idmap(__pyx_v_self, ((struct __pyx_obj_4cdec_2sa_3_sa_DataArray *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_4cdec_2sa_3_sa_IntList))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_4cdec_2sa_3_sa_IntList))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->fid2symid); __Pyx_DECREF(((PyObject *)__pyx_v_self->fid2symid)); __pyx_v_self->fid2symid = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":423 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":431 * self.eda = edarray * self.fid2symid = self.set_idmap(self.fda) * self.eid2symid = self.set_idmap(self.eda) # <<<<<<<<<<<<<< @@ -43478,31 +43592,31 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_2configure(st */ __pyx_t_2 = ((PyObject *)__pyx_v_self->eda); __Pyx_INCREF(__pyx_t_2); - __pyx_t_1 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->set_idmap(__pyx_v_self, ((struct __pyx_obj_4cdec_2sa_3_sa_DataArray *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->set_idmap(__pyx_v_self, ((struct __pyx_obj_4cdec_2sa_3_sa_DataArray *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4cdec_2sa_3_sa_IntList))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 423; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4cdec_2sa_3_sa_IntList))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->eid2symid); __Pyx_DECREF(((PyObject *)__pyx_v_self->eid2symid)); __pyx_v_self->eid2symid = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":424 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":432 * self.fid2symid = self.set_idmap(self.fda) * self.eid2symid = self.set_idmap(self.eda) * self.precompute() # <<<<<<<<<<<<<< * self.sampler = sampler * self.scorer = scorer */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_precompute); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_precompute); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":425 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":433 * self.eid2symid = self.set_idmap(self.eda) * self.precompute() * self.sampler = sampler # <<<<<<<<<<<<<< @@ -43515,7 +43629,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_2configure(st __Pyx_DECREF(((PyObject *)__pyx_v_self->sampler)); __pyx_v_self->sampler = __pyx_v_sampler; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":426 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":434 * self.precompute() * self.sampler = sampler * self.scorer = scorer # <<<<<<<<<<<<<< @@ -43528,7 +43642,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_2configure(st __Pyx_DECREF(((PyObject *)__pyx_v_self->scorer)); __pyx_v_self->scorer = __pyx_v_scorer; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":414 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":422 * self.online_stats = defaultdict(OnlineStats) * * def configure(self, SuffixArray fsarray, DataArray edarray, # <<<<<<<<<<<<<< @@ -43550,7 +43664,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_2configure(st return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":428 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":436 * self.scorer = scorer * * cdef set_idmap(self, DataArray darray): # <<<<<<<<<<<<<< @@ -43575,7 +43689,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_set_idmap(CYTH int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_idmap", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":432 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":440 * cdef IntList idmap * * N = len(darray.id2word) # <<<<<<<<<<<<<< @@ -43584,30 +43698,30 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_set_idmap(CYTH */ __pyx_t_1 = __pyx_v_darray->id2word; __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_N = __pyx_t_2; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":433 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":441 * * N = len(darray.id2word) * idmap = IntList(initial_len=N) # <<<<<<<<<<<<<< * for word_id from 0 <= word_id < N: * new_word_id = sym_fromstring(darray.id2word[word_id], True) */ - __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_N); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_N); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_initial_len, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_initial_len, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_IntList)), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_IntList)), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 441; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_idmap = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":434 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":442 * N = len(darray.id2word) * idmap = IntList(initial_len=N) * for word_id from 0 <= word_id < N: # <<<<<<<<<<<<<< @@ -43617,20 +43731,20 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_set_idmap(CYTH __pyx_t_4 = __pyx_v_N; for (__pyx_v_word_id = 0; __pyx_v_word_id < __pyx_t_4; __pyx_v_word_id++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":435 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":443 * idmap = IntList(initial_len=N) * for word_id from 0 <= word_id < N: * new_word_id = sym_fromstring(darray.id2word[word_id], True) # <<<<<<<<<<<<<< * idmap.arr[word_id] = new_word_id * return idmap */ - __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_darray->id2word, __pyx_v_word_id, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_darray->id2word, __pyx_v_word_id, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_t_3); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_t_3); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_new_word_id = __pyx_f_4cdec_2sa_3_sa_sym_fromstring(__pyx_t_5, 1); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":436 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":444 * for word_id from 0 <= word_id < N: * new_word_id = sym_fromstring(darray.id2word[word_id], True) * idmap.arr[word_id] = new_word_id # <<<<<<<<<<<<<< @@ -43640,7 +43754,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_set_idmap(CYTH (__pyx_v_idmap->arr[__pyx_v_word_id]) = __pyx_v_new_word_id; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":437 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":445 * new_word_id = sym_fromstring(darray.id2word[word_id], True) * idmap.arr[word_id] = new_word_id * return idmap # <<<<<<<<<<<<<< @@ -43652,7 +43766,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_set_idmap(CYTH __pyx_r = ((PyObject *)__pyx_v_idmap); goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":428 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":436 * self.scorer = scorer * * cdef set_idmap(self, DataArray darray): # <<<<<<<<<<<<<< @@ -43673,7 +43787,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_set_idmap(CYTH return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":440 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":448 * * * def pattern2phrase(self, pattern): # <<<<<<<<<<<<<< @@ -43714,7 +43828,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_4pattern2phra int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pattern2phrase", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":442 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":450 * def pattern2phrase(self, pattern): * # pattern is a tuple, which we must convert to a hiero Phrase * result = () # <<<<<<<<<<<<<< @@ -43724,7 +43838,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_4pattern2phra __Pyx_INCREF(__pyx_empty_tuple); __pyx_v_result = __pyx_empty_tuple; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":443 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":451 * # pattern is a tuple, which we must convert to a hiero Phrase * result = () * arity = 0 # <<<<<<<<<<<<<< @@ -43734,7 +43848,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_4pattern2phra __Pyx_INCREF(__pyx_int_0); __pyx_v_arity = __pyx_int_0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":444 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":452 * result = () * arity = 0 * for word_id in pattern: # <<<<<<<<<<<<<< @@ -43745,7 +43859,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_4pattern2phra __pyx_t_1 = __pyx_v_pattern; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = NULL; } else { - __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_pattern); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_pattern); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; } @@ -43753,16 +43867,16 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_4pattern2phra if (!__pyx_t_3 && PyList_CheckExact(__pyx_t_1)) { if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_3 && PyTuple_CheckExact(__pyx_t_1)) { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_4 = __pyx_t_3(__pyx_t_1); @@ -43770,7 +43884,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_4pattern2phra 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[8]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 452; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -43779,73 +43893,73 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_4pattern2phra __Pyx_XDECREF_SET(__pyx_v_word_id, __pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":445 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":453 * arity = 0 * for word_id in pattern: * if word_id == -1: # <<<<<<<<<<<<<< * arity = arity + 1 * new_id = sym_setindex(self.category, arity) */ - __pyx_t_4 = PyObject_RichCompare(__pyx_v_word_id, __pyx_int_neg_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 445; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyObject_RichCompare(__pyx_v_word_id, __pyx_int_neg_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 453; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_5) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":446 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":454 * for word_id in pattern: * if word_id == -1: * arity = arity + 1 # <<<<<<<<<<<<<< * new_id = sym_setindex(self.category, arity) * else: */ - __pyx_t_4 = PyNumber_Add(__pyx_v_arity, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyNumber_Add(__pyx_v_arity, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_arity, __pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":447 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":455 * if word_id == -1: * arity = arity + 1 * new_id = sym_setindex(self.category, arity) # <<<<<<<<<<<<<< * else: * new_id = sym_fromstring(self.fda.id2word[word_id], True) */ - __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_arity); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_arity); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 455; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_new_id = __pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, __pyx_t_6); goto __pyx_L5; } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":449 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":457 * new_id = sym_setindex(self.category, arity) * else: * new_id = sym_fromstring(self.fda.id2word[word_id], True) # <<<<<<<<<<<<<< * result = result + (new_id,) * return Phrase(result) */ - __pyx_t_4 = PyObject_GetItem(__pyx_v_self->fda->id2word, __pyx_v_word_id); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_4 = PyObject_GetItem(__pyx_v_self->fda->id2word, __pyx_v_word_id); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_t_4); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_t_4); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_new_id = __pyx_f_4cdec_2sa_3_sa_sym_fromstring(__pyx_t_7, 1); } __pyx_L5:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":450 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":458 * else: * new_id = sym_fromstring(self.fda.id2word[word_id], True) * result = result + (new_id,) # <<<<<<<<<<<<<< * return Phrase(result) * */ - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_new_id); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_new_id); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyNumber_Add(__pyx_v_result, __pyx_t_8); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 450; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyNumber_Add(__pyx_v_result, __pyx_t_8); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF_SET(__pyx_v_result, ((PyObject*)__pyx_t_4)); @@ -43853,7 +43967,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_4pattern2phra } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":451 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":459 * new_id = sym_fromstring(self.fda.id2word[word_id], True) * result = result + (new_id,) * return Phrase(result) # <<<<<<<<<<<<<< @@ -43861,19 +43975,19 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_4pattern2phra * def pattern2phrase_plus(self, pattern): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_result); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_result); __Pyx_GIVEREF(__pyx_v_result); - __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_Phrase)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 451; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_Phrase)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":440 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":448 * * * def pattern2phrase(self, pattern): # <<<<<<<<<<<<<< @@ -43897,7 +44011,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_4pattern2phra return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":453 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":461 * return Phrase(result) * * def pattern2phrase_plus(self, pattern): # <<<<<<<<<<<<<< @@ -43940,19 +44054,19 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_6pattern2phra int __pyx_clineno = 0; __Pyx_RefNannySetupContext("pattern2phrase_plus", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":456 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":464 * # returns a list containing both the pattern, and pattern * # suffixed/prefixed with the NT category. * patterns = [] # <<<<<<<<<<<<<< * result = () * arity = 0 */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_patterns = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":457 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":465 * # suffixed/prefixed with the NT category. * patterns = [] * result = () # <<<<<<<<<<<<<< @@ -43962,7 +44076,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_6pattern2phra __Pyx_INCREF(__pyx_empty_tuple); __pyx_v_result = __pyx_empty_tuple; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":458 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":466 * patterns = [] * result = () * arity = 0 # <<<<<<<<<<<<<< @@ -43972,7 +44086,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_6pattern2phra __Pyx_INCREF(__pyx_int_0); __pyx_v_arity = __pyx_int_0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":459 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":467 * result = () * arity = 0 * for word_id in pattern: # <<<<<<<<<<<<<< @@ -43983,7 +44097,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_6pattern2phra __pyx_t_1 = __pyx_v_pattern; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = NULL; } else { - __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_pattern); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_pattern); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; } @@ -43991,16 +44105,16 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_6pattern2phra if (!__pyx_t_3 && PyList_CheckExact(__pyx_t_1)) { if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_3 && PyTuple_CheckExact(__pyx_t_1)) { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_4 = __pyx_t_3(__pyx_t_1); @@ -44008,7 +44122,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_6pattern2phra 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[8]; __pyx_lineno = 459; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -44017,73 +44131,73 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_6pattern2phra __Pyx_XDECREF_SET(__pyx_v_word_id, __pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":460 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":468 * arity = 0 * for word_id in pattern: * if word_id == -1: # <<<<<<<<<<<<<< * arity = arity + 1 * new_id = sym_setindex(self.category, arity) */ - __pyx_t_4 = PyObject_RichCompare(__pyx_v_word_id, __pyx_int_neg_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyObject_RichCompare(__pyx_v_word_id, __pyx_int_neg_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_5) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":461 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":469 * for word_id in pattern: * if word_id == -1: * arity = arity + 1 # <<<<<<<<<<<<<< * new_id = sym_setindex(self.category, arity) * else: */ - __pyx_t_4 = PyNumber_Add(__pyx_v_arity, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 461; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyNumber_Add(__pyx_v_arity, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_arity, __pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":462 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":470 * if word_id == -1: * arity = arity + 1 * new_id = sym_setindex(self.category, arity) # <<<<<<<<<<<<<< * else: * new_id = sym_fromstring(self.fda.id2word[word_id], True) */ - __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_arity); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 462; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_arity); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_new_id = __pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, __pyx_t_6); goto __pyx_L5; } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":464 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":472 * new_id = sym_setindex(self.category, arity) * else: * new_id = sym_fromstring(self.fda.id2word[word_id], True) # <<<<<<<<<<<<<< * result = result + (new_id,) * patterns.append(Phrase(result)) */ - __pyx_t_4 = PyObject_GetItem(__pyx_v_self->fda->id2word, __pyx_v_word_id); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_4 = PyObject_GetItem(__pyx_v_self->fda->id2word, __pyx_v_word_id); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_t_4); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyObject_AsString(__pyx_t_4); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_new_id = __pyx_f_4cdec_2sa_3_sa_sym_fromstring(__pyx_t_7, 1); } __pyx_L5:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":465 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":473 * else: * new_id = sym_fromstring(self.fda.id2word[word_id], True) * result = result + (new_id,) # <<<<<<<<<<<<<< * patterns.append(Phrase(result)) * patterns.append(Phrase(result + (sym_setindex(self.category, 1),))) */ - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_new_id); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_new_id); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyNumber_Add(__pyx_v_result, __pyx_t_8); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyNumber_Add(__pyx_v_result, __pyx_t_8); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF_SET(__pyx_v_result, ((PyObject*)__pyx_t_4)); @@ -44091,81 +44205,81 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_6pattern2phra } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":466 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":474 * new_id = sym_fromstring(self.fda.id2word[word_id], True) * result = result + (new_id,) * patterns.append(Phrase(result)) # <<<<<<<<<<<<<< * patterns.append(Phrase(result + (sym_setindex(self.category, 1),))) * patterns.append(Phrase((sym_setindex(self.category, 1),) + result)) */ - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_result); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_result); __Pyx_GIVEREF(__pyx_v_result); - __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_Phrase)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_Phrase)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_patterns, __pyx_t_4); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_patterns, __pyx_t_4); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":467 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":475 * result = result + (new_id,) * patterns.append(Phrase(result)) * patterns.append(Phrase(result + (sym_setindex(self.category, 1),))) # <<<<<<<<<<<<<< * patterns.append(Phrase((sym_setindex(self.category, 1),) + result)) * return patterns */ - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, 1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, 1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyNumber_Add(__pyx_v_result, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyNumber_Add(__pyx_v_result, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_Phrase)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_Phrase)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_patterns, __pyx_t_4); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 467; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_patterns, __pyx_t_4); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":468 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":476 * patterns.append(Phrase(result)) * patterns.append(Phrase(result + (sym_setindex(self.category, 1),))) * patterns.append(Phrase((sym_setindex(self.category, 1),) + result)) # <<<<<<<<<<<<<< * return patterns * */ - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, 1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, 1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyNumber_Add(__pyx_t_1, __pyx_v_result); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyNumber_Add(__pyx_t_1, __pyx_v_result); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_Phrase)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_Phrase)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_patterns, __pyx_t_4); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_patterns, __pyx_t_4); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":469 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":477 * patterns.append(Phrase(result + (sym_setindex(self.category, 1),))) * patterns.append(Phrase((sym_setindex(self.category, 1),) + result)) * return patterns # <<<<<<<<<<<<<< @@ -44177,7 +44291,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_6pattern2phra __pyx_r = __pyx_v_patterns; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":453 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":461 * return Phrase(result) * * def pattern2phrase_plus(self, pattern): # <<<<<<<<<<<<<< @@ -44202,7 +44316,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_6pattern2phra return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":471 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":479 * return patterns * * def precompute(self): # <<<<<<<<<<<<<< @@ -44250,7 +44364,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8precompute(s int __pyx_clineno = 0; __Pyx_RefNannySetupContext("precompute", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":474 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":482 * cdef Precomputation pre * * if self.precompute_file is not None: # <<<<<<<<<<<<<< @@ -44261,34 +44375,34 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8precompute(s __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":475 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":483 * * if self.precompute_file is not None: * start_time = monitor_cpu() # <<<<<<<<<<<<<< * logger.info("Reading precomputed data from file %s... ", self.precompute_file) * pre = Precomputation(from_binary=self.precompute_file) */ - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_monitor_cpu); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_monitor_cpu); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_start_time = __pyx_t_4; __pyx_t_4 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":476 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":484 * if self.precompute_file is not None: * start_time = monitor_cpu() * logger.info("Reading precomputed data from file %s... ", self.precompute_file) # <<<<<<<<<<<<<< * pre = Precomputation(from_binary=self.precompute_file) * # check parameters of precomputation -- some are critical and some are not */ - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_logger); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_logger); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_info); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_info); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_kp_s_Reading_precomputed_data_from_fi); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_s_Reading_precomputed_data_from_fi); @@ -44296,29 +44410,29 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8precompute(s __Pyx_INCREF(__pyx_v_self->precompute_file); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_self->precompute_file); __Pyx_GIVEREF(__pyx_v_self->precompute_file); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":477 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":485 * start_time = monitor_cpu() * logger.info("Reading precomputed data from file %s... ", self.precompute_file) * pre = Precomputation(from_binary=self.precompute_file) # <<<<<<<<<<<<<< * # check parameters of precomputation -- some are critical and some are not * if pre.max_nonterminals != self.max_nonterminals: */ - __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_from_binary, __pyx_v_self->precompute_file) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_Precomputation)), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_from_binary, __pyx_v_self->precompute_file) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_Precomputation)), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_pre = ((struct __pyx_obj_4cdec_2sa_3_sa_Precomputation *)__pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":479 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":487 * pre = Precomputation(from_binary=self.precompute_file) * # check parameters of precomputation -- some are critical and some are not * if pre.max_nonterminals != self.max_nonterminals: # <<<<<<<<<<<<<< @@ -44328,23 +44442,23 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8precompute(s __pyx_t_2 = ((__pyx_v_pre->max_nonterminals != __pyx_v_self->max_nonterminals) != 0); if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":480 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":488 * # check parameters of precomputation -- some are critical and some are not * if pre.max_nonterminals != self.max_nonterminals: * logger.warn("Precomputation done with max nonterminals %d, decoder uses %d", pre.max_nonterminals, self.max_nonterminals) # <<<<<<<<<<<<<< * if pre.max_length != self.max_length: * logger.warn("Precomputation done with max terminals %d, decoder uses %d", pre.max_length, self.max_length) */ - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_logger); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_logger); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_warn); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_warn); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_pre->max_nonterminals); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_pre->max_nonterminals); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->max_nonterminals); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->max_nonterminals); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_kp_s_Precomputation_done_with_max_non); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_s_Precomputation_done_with_max_non); @@ -44355,7 +44469,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8precompute(s __Pyx_GIVEREF(__pyx_t_3); __pyx_t_4 = 0; __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -44364,7 +44478,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8precompute(s } __pyx_L4:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":481 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":489 * if pre.max_nonterminals != self.max_nonterminals: * logger.warn("Precomputation done with max nonterminals %d, decoder uses %d", pre.max_nonterminals, self.max_nonterminals) * if pre.max_length != self.max_length: # <<<<<<<<<<<<<< @@ -44374,23 +44488,23 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8precompute(s __pyx_t_2 = ((__pyx_v_pre->max_length != __pyx_v_self->max_length) != 0); if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":482 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":490 * logger.warn("Precomputation done with max nonterminals %d, decoder uses %d", pre.max_nonterminals, self.max_nonterminals) * if pre.max_length != self.max_length: * logger.warn("Precomputation done with max terminals %d, decoder uses %d", pre.max_length, self.max_length) # <<<<<<<<<<<<<< * if pre.train_max_initial_size != self.train_max_initial_size: * raise Exception("Precomputation done with max initial size %d, decoder uses %d" % (pre.train_max_initial_size, self.train_max_initial_size)) */ - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_logger); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_logger); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_warn); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_warn); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_pre->max_length); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_pre->max_length); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->max_length); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->max_length); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_kp_s_Precomputation_done_with_max_ter); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_s_Precomputation_done_with_max_ter); @@ -44401,7 +44515,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8precompute(s __Pyx_GIVEREF(__pyx_t_5); __pyx_t_3 = 0; __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -44410,7 +44524,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8precompute(s } __pyx_L5:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":483 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":491 * if pre.max_length != self.max_length: * logger.warn("Precomputation done with max terminals %d, decoder uses %d", pre.max_length, self.max_length) * if pre.train_max_initial_size != self.train_max_initial_size: # <<<<<<<<<<<<<< @@ -44420,18 +44534,18 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8precompute(s __pyx_t_2 = ((__pyx_v_pre->train_max_initial_size != __pyx_v_self->train_max_initial_size) != 0); if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":484 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":492 * logger.warn("Precomputation done with max terminals %d, decoder uses %d", pre.max_length, self.max_length) * if pre.train_max_initial_size != self.train_max_initial_size: * raise Exception("Precomputation done with max initial size %d, decoder uses %d" % (pre.train_max_initial_size, self.train_max_initial_size)) # <<<<<<<<<<<<<< * if pre.train_min_gap_size != self.train_min_gap_size: * raise Exception("Precomputation done with min gap size %d, decoder uses %d" % (pre.train_min_gap_size, self.train_min_gap_size)) */ - __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_pre->train_max_initial_size); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_pre->train_max_initial_size); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_self->train_max_initial_size); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_self->train_max_initial_size); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); @@ -44439,23 +44553,23 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8precompute(s __Pyx_GIVEREF(__pyx_t_4); __pyx_t_5 = 0; __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Precomputation_done_with_max_ini, __pyx_t_6); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Precomputation_done_with_max_ini, __pyx_t_6); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":485 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":493 * if pre.train_max_initial_size != self.train_max_initial_size: * raise Exception("Precomputation done with max initial size %d, decoder uses %d" % (pre.train_max_initial_size, self.train_max_initial_size)) * if pre.train_min_gap_size != self.train_min_gap_size: # <<<<<<<<<<<<<< @@ -44465,18 +44579,18 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8precompute(s __pyx_t_2 = ((__pyx_v_pre->train_min_gap_size != __pyx_v_self->train_min_gap_size) != 0); if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":486 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":494 * raise Exception("Precomputation done with max initial size %d, decoder uses %d" % (pre.train_max_initial_size, self.train_max_initial_size)) * if pre.train_min_gap_size != self.train_min_gap_size: * raise Exception("Precomputation done with min gap size %d, decoder uses %d" % (pre.train_min_gap_size, self.train_min_gap_size)) # <<<<<<<<<<<<<< * if self.use_index: * logger.info("Converting %d hash keys on precomputed inverted index... ", len(pre.precomputed_index)) */ - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_pre->train_min_gap_size); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_pre->train_min_gap_size); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_self->train_min_gap_size); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_self->train_min_gap_size); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); @@ -44484,23 +44598,23 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8precompute(s __Pyx_GIVEREF(__pyx_t_6); __pyx_t_4 = 0; __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_Precomputation_done_with_min_gap, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_Precomputation_done_with_min_gap, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":487 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":495 * if pre.train_min_gap_size != self.train_min_gap_size: * raise Exception("Precomputation done with min gap size %d, decoder uses %d" % (pre.train_min_gap_size, self.train_min_gap_size)) * if self.use_index: # <<<<<<<<<<<<<< @@ -44510,25 +44624,25 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8precompute(s __pyx_t_2 = (__pyx_v_self->use_index != 0); if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":488 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":496 * raise Exception("Precomputation done with min gap size %d, decoder uses %d" % (pre.train_min_gap_size, self.train_min_gap_size)) * if self.use_index: * logger.info("Converting %d hash keys on precomputed inverted index... ", len(pre.precomputed_index)) # <<<<<<<<<<<<<< * for pattern, arr in pre.precomputed_index.iteritems(): * phrases = self.pattern2phrase_plus(pattern) */ - __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_logger); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_logger); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_info); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_info); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __pyx_v_pre->precomputed_index; __Pyx_INCREF(__pyx_t_6); - __pyx_t_7 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_kp_s_Converting_d_hash_keys_on_precom); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_s_Converting_d_hash_keys_on_precom); @@ -44536,13 +44650,13 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8precompute(s PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":489 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":497 * if self.use_index: * logger.info("Converting %d hash keys on precomputed inverted index... ", len(pre.precomputed_index)) * for pattern, arr in pre.precomputed_index.iteritems(): # <<<<<<<<<<<<<< @@ -44552,9 +44666,9 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8precompute(s __pyx_t_7 = 0; if (unlikely(__pyx_v_pre->precomputed_index == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "iteritems"); - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 497; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_4 = __Pyx_dict_iterator(__pyx_v_pre->precomputed_index, 0, __pyx_n_s_iteritems, (&__pyx_t_8), (&__pyx_t_9)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_dict_iterator(__pyx_v_pre->precomputed_index, 0, __pyx_n_s_iteritems, (&__pyx_t_8), (&__pyx_t_9)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 497; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = __pyx_t_4; @@ -44562,7 +44676,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8precompute(s while (1) { __pyx_t_10 = __Pyx_dict_iter_next(__pyx_t_6, __pyx_t_8, &__pyx_t_7, &__pyx_t_4, &__pyx_t_5, NULL, __pyx_t_9); if (unlikely(__pyx_t_10 == 0)) break; - if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 497; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_pattern, __pyx_t_4); @@ -44570,28 +44684,28 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8precompute(s __Pyx_XDECREF_SET(__pyx_v_arr, __pyx_t_5); __pyx_t_5 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":490 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":498 * logger.info("Converting %d hash keys on precomputed inverted index... ", len(pre.precomputed_index)) * for pattern, arr in pre.precomputed_index.iteritems(): * phrases = self.pattern2phrase_plus(pattern) # <<<<<<<<<<<<<< * for phrase in phrases: * self.precomputed_index[phrase] = arr */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_pattern2phrase_plus); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_pattern2phrase_plus); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_pattern); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_pattern); __Pyx_GIVEREF(__pyx_v_pattern); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF_SET(__pyx_v_phrases, __pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":491 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":499 * for pattern, arr in pre.precomputed_index.iteritems(): * phrases = self.pattern2phrase_plus(pattern) * for phrase in phrases: # <<<<<<<<<<<<<< @@ -44602,7 +44716,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8precompute(s __pyx_t_3 = __pyx_v_phrases; __Pyx_INCREF(__pyx_t_3); __pyx_t_11 = 0; __pyx_t_12 = NULL; } else { - __pyx_t_11 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_phrases); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_phrases); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_12 = Py_TYPE(__pyx_t_3)->tp_iternext; } @@ -44610,16 +44724,16 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8precompute(s if (!__pyx_t_12 && PyList_CheckExact(__pyx_t_3)) { if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_11); __Pyx_INCREF(__pyx_t_4); __pyx_t_11++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_11); __Pyx_INCREF(__pyx_t_4); __pyx_t_11++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_12 && PyTuple_CheckExact(__pyx_t_3)) { if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_11); __Pyx_INCREF(__pyx_t_4); __pyx_t_11++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_11); __Pyx_INCREF(__pyx_t_4); __pyx_t_11++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_4 = __pyx_t_12(__pyx_t_3); @@ -44627,7 +44741,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8precompute(s 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[8]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -44636,14 +44750,14 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8precompute(s __Pyx_XDECREF_SET(__pyx_v_phrase, __pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":492 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":500 * phrases = self.pattern2phrase_plus(pattern) * for phrase in phrases: * self.precomputed_index[phrase] = arr # <<<<<<<<<<<<<< * if self.use_collocations: * logger.info("Converting %d hash keys on precomputed collocations... ", len(pre.precomputed_collocations)) */ - if (unlikely(PyObject_SetItem(__pyx_v_self->precomputed_index, __pyx_v_phrase, __pyx_v_arr) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(PyObject_SetItem(__pyx_v_self->precomputed_index, __pyx_v_phrase, __pyx_v_arr) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } @@ -44652,7 +44766,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8precompute(s } __pyx_L8:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":493 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":501 * for phrase in phrases: * self.precomputed_index[phrase] = arr * if self.use_collocations: # <<<<<<<<<<<<<< @@ -44662,25 +44776,25 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8precompute(s __pyx_t_2 = (__pyx_v_self->use_collocations != 0); if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":494 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":502 * self.precomputed_index[phrase] = arr * if self.use_collocations: * logger.info("Converting %d hash keys on precomputed collocations... ", len(pre.precomputed_collocations)) # <<<<<<<<<<<<<< * for pattern, arr in pre.precomputed_collocations.iteritems(): * phrase = self.pattern2phrase(pattern) */ - __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_logger); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_logger); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_info); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_info); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __pyx_v_pre->precomputed_collocations; __Pyx_INCREF(__pyx_t_6); - __pyx_t_8 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_kp_s_Converting_d_hash_keys_on_precom_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_s_Converting_d_hash_keys_on_precom_2); @@ -44688,13 +44802,13 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8precompute(s PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 502; __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_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":495 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":503 * if self.use_collocations: * logger.info("Converting %d hash keys on precomputed collocations... ", len(pre.precomputed_collocations)) * for pattern, arr in pre.precomputed_collocations.iteritems(): # <<<<<<<<<<<<<< @@ -44704,9 +44818,9 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8precompute(s __pyx_t_8 = 0; if (unlikely(__pyx_v_pre->precomputed_collocations == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "iteritems"); - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_4 = __Pyx_dict_iterator(__pyx_v_pre->precomputed_collocations, 0, __pyx_n_s_iteritems, (&__pyx_t_7), (&__pyx_t_9)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_dict_iterator(__pyx_v_pre->precomputed_collocations, 0, __pyx_n_s_iteritems, (&__pyx_t_7), (&__pyx_t_9)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = __pyx_t_4; @@ -44714,7 +44828,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8precompute(s while (1) { __pyx_t_10 = __Pyx_dict_iter_next(__pyx_t_6, __pyx_t_7, &__pyx_t_8, &__pyx_t_4, &__pyx_t_3, NULL, __pyx_t_9); if (unlikely(__pyx_t_10 == 0)) break; - if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_pattern, __pyx_t_4); @@ -44722,71 +44836,71 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8precompute(s __Pyx_XDECREF_SET(__pyx_v_arr, __pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":496 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":504 * logger.info("Converting %d hash keys on precomputed collocations... ", len(pre.precomputed_collocations)) * for pattern, arr in pre.precomputed_collocations.iteritems(): * phrase = self.pattern2phrase(pattern) # <<<<<<<<<<<<<< * self.precomputed_collocations[phrase] = arr * stop_time = monitor_cpu() */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_pattern2phrase); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_pattern2phrase); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 504; __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[8]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_pattern); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_pattern); __Pyx_GIVEREF(__pyx_v_pattern); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF_SET(__pyx_v_phrase, __pyx_t_5); __pyx_t_5 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":497 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":505 * for pattern, arr in pre.precomputed_collocations.iteritems(): * phrase = self.pattern2phrase(pattern) * self.precomputed_collocations[phrase] = arr # <<<<<<<<<<<<<< * stop_time = monitor_cpu() * logger.info("Processing precomputations took %f seconds", stop_time - start_time) */ - if (unlikely(PyObject_SetItem(__pyx_v_self->precomputed_collocations, __pyx_v_phrase, __pyx_v_arr) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 497; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(PyObject_SetItem(__pyx_v_self->precomputed_collocations, __pyx_v_phrase, __pyx_v_arr) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L13; } __pyx_L13:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":498 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":506 * phrase = self.pattern2phrase(pattern) * self.precomputed_collocations[phrase] = arr * stop_time = monitor_cpu() # <<<<<<<<<<<<<< * logger.info("Processing precomputations took %f seconds", stop_time - start_time) * */ - __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_monitor_cpu); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_monitor_cpu); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 506; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_stop_time = __pyx_t_5; __pyx_t_5 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":499 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":507 * self.precomputed_collocations[phrase] = arr * stop_time = monitor_cpu() * logger.info("Processing precomputations took %f seconds", stop_time - start_time) # <<<<<<<<<<<<<< * * */ - __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_logger); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_logger); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_info); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_info); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PyNumber_Subtract(__pyx_v_stop_time, __pyx_v_start_time); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyNumber_Subtract(__pyx_v_stop_time, __pyx_v_start_time); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_kp_s_Processing_precomputations_took); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_s_Processing_precomputations_took); @@ -44794,7 +44908,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8precompute(s PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -44803,7 +44917,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8precompute(s } __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":471 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":479 * return patterns * * def precompute(self): # <<<<<<<<<<<<<< @@ -44834,7 +44948,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8precompute(s return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":502 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":510 * * * def get_precomputed_collocation(self, phrase): # <<<<<<<<<<<<<< @@ -44870,30 +44984,30 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_10get_precomp int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_precomputed_collocation", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":503 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":511 * * def get_precomputed_collocation(self, phrase): * if phrase in self.precomputed_collocations: # <<<<<<<<<<<<<< * arr = self.precomputed_collocations[phrase] * return PhraseLocation(arr=arr, arr_low=0, arr_high=len(arr), num_subpatterns=phrase.arity()+1) */ - __pyx_t_1 = (__Pyx_PySequence_Contains(__pyx_v_phrase, __pyx_v_self->precomputed_collocations, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = (__Pyx_PySequence_Contains(__pyx_v_phrase, __pyx_v_self->precomputed_collocations, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":504 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":512 * def get_precomputed_collocation(self, phrase): * if phrase in self.precomputed_collocations: * arr = self.precomputed_collocations[phrase] # <<<<<<<<<<<<<< * return PhraseLocation(arr=arr, arr_low=0, arr_high=len(arr), num_subpatterns=phrase.arity()+1) * return None */ - __pyx_t_3 = PyObject_GetItem(__pyx_v_self->precomputed_collocations, __pyx_v_phrase); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_3 = PyObject_GetItem(__pyx_v_self->precomputed_collocations, __pyx_v_phrase); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); __pyx_v_arr = __pyx_t_3; __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":505 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":513 * if phrase in self.precomputed_collocations: * arr = self.precomputed_collocations[phrase] * return PhraseLocation(arr=arr, arr_low=0, arr_high=len(arr), num_subpatterns=phrase.arity()+1) # <<<<<<<<<<<<<< @@ -44901,26 +45015,26 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_10get_precomp * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_arr, __pyx_v_arr) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_arr_low, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_4 = PyObject_Length(__pyx_v_arr); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_arr, __pyx_v_arr) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_arr_low, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyObject_Length(__pyx_v_arr); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_arr_high, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_arr_high, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_phrase, __pyx_n_s_arity); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_phrase, __pyx_n_s_arity); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PyNumber_Add(__pyx_t_6, __pyx_int_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyNumber_Add(__pyx_t_6, __pyx_int_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_num_subpatterns, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_num_subpatterns, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_PhraseLocation)), __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 505; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_PhraseLocation)), __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_5; @@ -44928,7 +45042,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_10get_precomp goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":506 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":514 * arr = self.precomputed_collocations[phrase] * return PhraseLocation(arr=arr, arr_low=0, arr_high=len(arr), num_subpatterns=phrase.arity()+1) * return None # <<<<<<<<<<<<<< @@ -44940,7 +45054,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_10get_precomp __pyx_r = Py_None; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":502 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":510 * * * def get_precomputed_collocation(self, phrase): # <<<<<<<<<<<<<< @@ -44962,7 +45076,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_10get_precomp return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":509 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":517 * * * cdef int* baeza_yates_helper(self, int low1, int high1, int* arr1, int step1, # <<<<<<<<<<<<<< @@ -45008,7 +45122,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( int __pyx_clineno = 0; __Pyx_RefNannySetupContext("baeza_yates_helper", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":522 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":530 * cdef Matching loc1, loc2 * * result = malloc(0*sizeof(int*)) # <<<<<<<<<<<<<< @@ -45017,7 +45131,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_result = ((int *)malloc((0 * (sizeof(int *))))); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":524 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":532 * result = malloc(0*sizeof(int*)) * * d_first = 0 # <<<<<<<<<<<<<< @@ -45026,7 +45140,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_d_first = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":525 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":533 * * d_first = 0 * if high1 - low1 > high2 - low2: # <<<<<<<<<<<<<< @@ -45036,7 +45150,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( __pyx_t_1 = (((__pyx_v_high1 - __pyx_v_low1) > (__pyx_v_high2 - __pyx_v_low2)) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":526 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":534 * d_first = 0 * if high1 - low1 > high2 - low2: * d_first = 1 # <<<<<<<<<<<<<< @@ -45048,7 +45162,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( } __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":530 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":538 * # First, check to see if we are at any of the recursive base cases * # Case 1: one of the sets is empty * if low1 >= high1 or low2 >= high2: # <<<<<<<<<<<<<< @@ -45064,7 +45178,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( } if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":531 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":539 * # Case 1: one of the sets is empty * if low1 >= high1 or low2 >= high2: * return result # <<<<<<<<<<<<<< @@ -45075,7 +45189,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":534 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":542 * * # Case 2: sets are non-overlapping * assign_matching(&loc1, arr1, high1-step1, step1, self.fda.sent_id.arr) # <<<<<<<<<<<<<< @@ -45084,7 +45198,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_f_4cdec_2sa_3_sa_assign_matching((&__pyx_v_loc1), __pyx_v_arr1, (__pyx_v_high1 - __pyx_v_step1), __pyx_v_step1, __pyx_v_self->fda->sent_id->arr); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":535 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":543 * # Case 2: sets are non-overlapping * assign_matching(&loc1, arr1, high1-step1, step1, self.fda.sent_id.arr) * assign_matching(&loc2, arr2, low2, step2, self.fda.sent_id.arr) # <<<<<<<<<<<<<< @@ -45093,7 +45207,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_f_4cdec_2sa_3_sa_assign_matching((&__pyx_v_loc2), __pyx_v_arr2, __pyx_v_low2, __pyx_v_step2, __pyx_v_self->fda->sent_id->arr); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":536 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":544 * assign_matching(&loc1, arr1, high1-step1, step1, self.fda.sent_id.arr) * assign_matching(&loc2, arr2, low2, step2, self.fda.sent_id.arr) * if self.compare_matchings(&loc1, &loc2, offset_by_one, len_last) == -1: # <<<<<<<<<<<<<< @@ -45103,7 +45217,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( __pyx_t_3 = ((((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->compare_matchings(__pyx_v_self, (&__pyx_v_loc1), (&__pyx_v_loc2), __pyx_v_offset_by_one, __pyx_v_len_last) == -1) != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":537 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":545 * assign_matching(&loc2, arr2, low2, step2, self.fda.sent_id.arr) * if self.compare_matchings(&loc1, &loc2, offset_by_one, len_last) == -1: * return result # <<<<<<<<<<<<<< @@ -45114,7 +45228,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":539 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":547 * return result * * assign_matching(&loc1, arr1, low1, step1, self.fda.sent_id.arr) # <<<<<<<<<<<<<< @@ -45123,7 +45237,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_f_4cdec_2sa_3_sa_assign_matching((&__pyx_v_loc1), __pyx_v_arr1, __pyx_v_low1, __pyx_v_step1, __pyx_v_self->fda->sent_id->arr); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":540 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":548 * * assign_matching(&loc1, arr1, low1, step1, self.fda.sent_id.arr) * assign_matching(&loc2, arr2, high2-step2, step2, self.fda.sent_id.arr) # <<<<<<<<<<<<<< @@ -45132,7 +45246,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_f_4cdec_2sa_3_sa_assign_matching((&__pyx_v_loc2), __pyx_v_arr2, (__pyx_v_high2 - __pyx_v_step2), __pyx_v_step2, __pyx_v_self->fda->sent_id->arr); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":541 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":549 * assign_matching(&loc1, arr1, low1, step1, self.fda.sent_id.arr) * assign_matching(&loc2, arr2, high2-step2, step2, self.fda.sent_id.arr) * if self.compare_matchings(&loc1, &loc2, offset_by_one, len_last) == 1: # <<<<<<<<<<<<<< @@ -45142,7 +45256,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( __pyx_t_3 = ((((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->compare_matchings(__pyx_v_self, (&__pyx_v_loc1), (&__pyx_v_loc2), __pyx_v_offset_by_one, __pyx_v_len_last) == 1) != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":542 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":550 * assign_matching(&loc2, arr2, high2-step2, step2, self.fda.sent_id.arr) * if self.compare_matchings(&loc1, &loc2, offset_by_one, len_last) == 1: * return result # <<<<<<<<<<<<<< @@ -45153,7 +45267,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":546 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":554 * # Case 3: query set and data set do not meet size mismatch constraints; * # We use mergesort instead in this case * qsetsize = (high1-low1) / step1 # <<<<<<<<<<<<<< @@ -45169,7 +45283,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else if (sizeof(int) == sizeof(long) && (!(((int)-1) > 0)) && unlikely(__pyx_v_step1 == (int)-1) && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_t_4))) { #ifdef WITH_THREAD @@ -45179,11 +45293,11 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_qsetsize = __Pyx_div_int(__pyx_t_4, __pyx_v_step1); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":547 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":555 * # We use mergesort instead in this case * qsetsize = (high1-low1) / step1 * dsetsize = (high2-low2) / step2 # <<<<<<<<<<<<<< @@ -45199,7 +45313,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else if (sizeof(int) == sizeof(long) && (!(((int)-1) > 0)) && unlikely(__pyx_v_step2 == (int)-1) && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_t_4))) { #ifdef WITH_THREAD @@ -45209,11 +45323,11 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_dsetsize = __Pyx_div_int(__pyx_t_4, __pyx_v_step2); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":548 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":556 * qsetsize = (high1-low1) / step1 * dsetsize = (high2-low2) / step2 * if d_first: # <<<<<<<<<<<<<< @@ -45223,7 +45337,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( __pyx_t_3 = (__pyx_v_d_first != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":549 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":557 * dsetsize = (high2-low2) / step2 * if d_first: * tmp = qsetsize # <<<<<<<<<<<<<< @@ -45232,7 +45346,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_tmp = __pyx_v_qsetsize; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":550 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":558 * if d_first: * tmp = qsetsize * qsetsize = dsetsize # <<<<<<<<<<<<<< @@ -45241,7 +45355,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_qsetsize = __pyx_v_dsetsize; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":551 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":559 * tmp = qsetsize * qsetsize = dsetsize * dsetsize = tmp # <<<<<<<<<<<<<< @@ -45253,7 +45367,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( } __pyx_L7:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":553 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":561 * dsetsize = tmp * * if self.by_slack_factor * qsetsize * log(dsetsize) / log(2) > dsetsize: # <<<<<<<<<<<<<< @@ -45270,12 +45384,12 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = (((__pyx_t_5 / __pyx_t_6) > __pyx_v_dsetsize) != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":554 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":562 * * if self.by_slack_factor * qsetsize * log(dsetsize) / log(2) > dsetsize: * free(result) # <<<<<<<<<<<<<< @@ -45284,7 +45398,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ free(__pyx_v_result); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":555 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":563 * if self.by_slack_factor * qsetsize * log(dsetsize) / log(2) > dsetsize: * free(result) * return self.merge_helper(low1, high1, arr1, step1, low2, high2, arr2, step2, offset_by_one, len_last, num_subpatterns, result_len) # <<<<<<<<<<<<<< @@ -45295,7 +45409,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":559 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":567 * # binary search. There are two flavors, depending on * # whether the queryset or dataset is first * if d_first: # <<<<<<<<<<<<<< @@ -45305,7 +45419,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( __pyx_t_3 = (__pyx_v_d_first != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":560 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":568 * # whether the queryset or dataset is first * if d_first: * med2 = median(low2, high2, step2) # <<<<<<<<<<<<<< @@ -45314,7 +45428,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_med2 = __pyx_f_4cdec_2sa_3_sa_median(__pyx_v_low2, __pyx_v_high2, __pyx_v_step2); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":561 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":569 * if d_first: * med2 = median(low2, high2, step2) * assign_matching(&loc2, arr2, med2, step2, self.fda.sent_id.arr) # <<<<<<<<<<<<<< @@ -45323,7 +45437,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_f_4cdec_2sa_3_sa_assign_matching((&__pyx_v_loc2), __pyx_v_arr2, __pyx_v_med2, __pyx_v_step2, __pyx_v_self->fda->sent_id->arr); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":563 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":571 * assign_matching(&loc2, arr2, med2, step2, self.fda.sent_id.arr) * * search_low = low1 # <<<<<<<<<<<<<< @@ -45332,7 +45446,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_search_low = __pyx_v_low1; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":564 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":572 * * search_low = low1 * search_high = high1 # <<<<<<<<<<<<<< @@ -45341,7 +45455,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_search_high = __pyx_v_high1; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":565 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":573 * search_low = low1 * search_high = high1 * while search_low < search_high: # <<<<<<<<<<<<<< @@ -45352,7 +45466,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( __pyx_t_3 = ((__pyx_v_search_low < __pyx_v_search_high) != 0); if (!__pyx_t_3) break; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":566 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":574 * search_high = high1 * while search_low < search_high: * med1 = median(search_low, search_high, step1) # <<<<<<<<<<<<<< @@ -45361,7 +45475,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_med1 = __pyx_f_4cdec_2sa_3_sa_median(__pyx_v_search_low, __pyx_v_search_high, __pyx_v_step1); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":567 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":575 * while search_low < search_high: * med1 = median(search_low, search_high, step1) * find_comparable_matchings(low1, high1, arr1, step1, med1, &med1_minus, &med1_plus) # <<<<<<<<<<<<<< @@ -45370,7 +45484,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_f_4cdec_2sa_3_sa_find_comparable_matchings(__pyx_v_low1, __pyx_v_high1, __pyx_v_arr1, __pyx_v_step1, __pyx_v_med1, (&__pyx_v_med1_minus), (&__pyx_v_med1_plus)); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":568 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":576 * med1 = median(search_low, search_high, step1) * find_comparable_matchings(low1, high1, arr1, step1, med1, &med1_minus, &med1_plus) * comparison = self.compare_matchings_set(med1_minus, med1_plus, arr1, step1, &loc2, offset_by_one, len_last) # <<<<<<<<<<<<<< @@ -45379,7 +45493,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_comparison = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->compare_matchings_set(__pyx_v_self, __pyx_v_med1_minus, __pyx_v_med1_plus, __pyx_v_arr1, __pyx_v_step1, (&__pyx_v_loc2), __pyx_v_offset_by_one, __pyx_v_len_last); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":571 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":579 * if comparison == -1: * search_low = med1_plus * elif comparison == 1: # <<<<<<<<<<<<<< @@ -45388,7 +45502,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ switch (__pyx_v_comparison) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":569 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":577 * find_comparable_matchings(low1, high1, arr1, step1, med1, &med1_minus, &med1_plus) * comparison = self.compare_matchings_set(med1_minus, med1_plus, arr1, step1, &loc2, offset_by_one, len_last) * if comparison == -1: # <<<<<<<<<<<<<< @@ -45397,7 +45511,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ case -1: - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":570 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":578 * comparison = self.compare_matchings_set(med1_minus, med1_plus, arr1, step1, &loc2, offset_by_one, len_last) * if comparison == -1: * search_low = med1_plus # <<<<<<<<<<<<<< @@ -45407,7 +45521,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( __pyx_v_search_low = __pyx_v_med1_plus; break; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":571 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":579 * if comparison == -1: * search_low = med1_plus * elif comparison == 1: # <<<<<<<<<<<<<< @@ -45416,7 +45530,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ case 1: - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":572 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":580 * search_low = med1_plus * elif comparison == 1: * search_high = med1_minus # <<<<<<<<<<<<<< @@ -45427,7 +45541,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( break; default: - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":574 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":582 * search_high = med1_minus * else: * break # <<<<<<<<<<<<<< @@ -45443,7 +45557,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":576 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":584 * break * else: * med1 = median(low1, high1, step1) # <<<<<<<<<<<<<< @@ -45452,7 +45566,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_med1 = __pyx_f_4cdec_2sa_3_sa_median(__pyx_v_low1, __pyx_v_high1, __pyx_v_step1); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":577 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":585 * else: * med1 = median(low1, high1, step1) * find_comparable_matchings(low1, high1, arr1, step1, med1, &med1_minus, &med1_plus) # <<<<<<<<<<<<<< @@ -45461,7 +45575,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_f_4cdec_2sa_3_sa_find_comparable_matchings(__pyx_v_low1, __pyx_v_high1, __pyx_v_arr1, __pyx_v_step1, __pyx_v_med1, (&__pyx_v_med1_minus), (&__pyx_v_med1_plus)); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":579 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":587 * find_comparable_matchings(low1, high1, arr1, step1, med1, &med1_minus, &med1_plus) * * search_low = low2 # <<<<<<<<<<<<<< @@ -45470,7 +45584,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_search_low = __pyx_v_low2; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":580 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":588 * * search_low = low2 * search_high = high2 # <<<<<<<<<<<<<< @@ -45479,7 +45593,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_search_high = __pyx_v_high2; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":581 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":589 * search_low = low2 * search_high = high2 * while search_low < search_high: # <<<<<<<<<<<<<< @@ -45490,7 +45604,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( __pyx_t_3 = ((__pyx_v_search_low < __pyx_v_search_high) != 0); if (!__pyx_t_3) break; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":582 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":590 * search_high = high2 * while search_low < search_high: * med2 = median(search_low, search_high, step2) # <<<<<<<<<<<<<< @@ -45499,7 +45613,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_med2 = __pyx_f_4cdec_2sa_3_sa_median(__pyx_v_search_low, __pyx_v_search_high, __pyx_v_step2); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":583 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":591 * while search_low < search_high: * med2 = median(search_low, search_high, step2) * assign_matching(&loc2, arr2, med2, step2, self.fda.sent_id.arr) # <<<<<<<<<<<<<< @@ -45508,7 +45622,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_f_4cdec_2sa_3_sa_assign_matching((&__pyx_v_loc2), __pyx_v_arr2, __pyx_v_med2, __pyx_v_step2, __pyx_v_self->fda->sent_id->arr); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":584 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":592 * med2 = median(search_low, search_high, step2) * assign_matching(&loc2, arr2, med2, step2, self.fda.sent_id.arr) * comparison = self.compare_matchings_set(med1_minus, med1_plus, arr1, step1, &loc2, offset_by_one, len_last) # <<<<<<<<<<<<<< @@ -45517,7 +45631,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_comparison = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->compare_matchings_set(__pyx_v_self, __pyx_v_med1_minus, __pyx_v_med1_plus, __pyx_v_arr1, __pyx_v_step1, (&__pyx_v_loc2), __pyx_v_offset_by_one, __pyx_v_len_last); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":587 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":595 * if comparison == -1: * search_high = med2 * elif comparison == 1: # <<<<<<<<<<<<<< @@ -45526,7 +45640,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ switch (__pyx_v_comparison) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":585 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":593 * assign_matching(&loc2, arr2, med2, step2, self.fda.sent_id.arr) * comparison = self.compare_matchings_set(med1_minus, med1_plus, arr1, step1, &loc2, offset_by_one, len_last) * if comparison == -1: # <<<<<<<<<<<<<< @@ -45535,7 +45649,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ case -1: - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":586 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":594 * comparison = self.compare_matchings_set(med1_minus, med1_plus, arr1, step1, &loc2, offset_by_one, len_last) * if comparison == -1: * search_high = med2 # <<<<<<<<<<<<<< @@ -45545,7 +45659,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( __pyx_v_search_high = __pyx_v_med2; break; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":587 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":595 * if comparison == -1: * search_high = med2 * elif comparison == 1: # <<<<<<<<<<<<<< @@ -45554,7 +45668,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ case 1: - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":588 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":596 * search_high = med2 * elif comparison == 1: * search_low = med2 + step2 # <<<<<<<<<<<<<< @@ -45565,7 +45679,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( break; default: - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":590 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":598 * search_low = med2 + step2 * else: * break # <<<<<<<<<<<<<< @@ -45580,7 +45694,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( } __pyx_L9:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":592 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":600 * break * * med_result_len = 0 # <<<<<<<<<<<<<< @@ -45589,7 +45703,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_med_result_len = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":593 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":601 * * med_result_len = 0 * med_result = malloc(0*sizeof(int*)) # <<<<<<<<<<<<<< @@ -45598,7 +45712,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_med_result = ((int *)malloc((0 * (sizeof(int *))))); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":594 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":602 * med_result_len = 0 * med_result = malloc(0*sizeof(int*)) * if search_high > search_low: # <<<<<<<<<<<<<< @@ -45608,7 +45722,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( __pyx_t_3 = ((__pyx_v_search_high > __pyx_v_search_low) != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":600 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":608 * # want to store the bindings for all of those elements. We can * # subsequently throw all of them away. * med2_minus = med2 # <<<<<<<<<<<<<< @@ -45617,7 +45731,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_med2_minus = __pyx_v_med2; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":601 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":609 * # subsequently throw all of them away. * med2_minus = med2 * med2_plus = med2 + step2 # <<<<<<<<<<<<<< @@ -45626,7 +45740,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_med2_plus = (__pyx_v_med2 + __pyx_v_step2); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":602 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":610 * med2_minus = med2 * med2_plus = med2 + step2 * i1 = med1_minus # <<<<<<<<<<<<<< @@ -45635,7 +45749,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_i1 = __pyx_v_med1_minus; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":603 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":611 * med2_plus = med2 + step2 * i1 = med1_minus * while i1 < med1_plus: # <<<<<<<<<<<<<< @@ -45646,7 +45760,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( __pyx_t_3 = ((__pyx_v_i1 < __pyx_v_med1_plus) != 0); if (!__pyx_t_3) break; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":604 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":612 * i1 = med1_minus * while i1 < med1_plus: * assign_matching(&loc1, arr1, i1, step1, self.fda.sent_id.arr) # <<<<<<<<<<<<<< @@ -45655,7 +45769,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_f_4cdec_2sa_3_sa_assign_matching((&__pyx_v_loc1), __pyx_v_arr1, __pyx_v_i1, __pyx_v_step1, __pyx_v_self->fda->sent_id->arr); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":605 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":613 * while i1 < med1_plus: * assign_matching(&loc1, arr1, i1, step1, self.fda.sent_id.arr) * while med2_minus-step2 >= low2: # <<<<<<<<<<<<<< @@ -45666,7 +45780,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( __pyx_t_3 = (((__pyx_v_med2_minus - __pyx_v_step2) >= __pyx_v_low2) != 0); if (!__pyx_t_3) break; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":606 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":614 * assign_matching(&loc1, arr1, i1, step1, self.fda.sent_id.arr) * while med2_minus-step2 >= low2: * assign_matching(&loc2, arr2, med2_minus-step2, step2, self.fda.sent_id.arr) # <<<<<<<<<<<<<< @@ -45675,7 +45789,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_f_4cdec_2sa_3_sa_assign_matching((&__pyx_v_loc2), __pyx_v_arr2, (__pyx_v_med2_minus - __pyx_v_step2), __pyx_v_step2, __pyx_v_self->fda->sent_id->arr); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":607 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":615 * while med2_minus-step2 >= low2: * assign_matching(&loc2, arr2, med2_minus-step2, step2, self.fda.sent_id.arr) * if self.compare_matchings(&loc1, &loc2, offset_by_one, len_last) < 1: # <<<<<<<<<<<<<< @@ -45685,7 +45799,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( __pyx_t_3 = ((((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->compare_matchings(__pyx_v_self, (&__pyx_v_loc1), (&__pyx_v_loc2), __pyx_v_offset_by_one, __pyx_v_len_last) < 1) != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":608 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":616 * assign_matching(&loc2, arr2, med2_minus-step2, step2, self.fda.sent_id.arr) * if self.compare_matchings(&loc1, &loc2, offset_by_one, len_last) < 1: * med2_minus = med2_minus - step2 # <<<<<<<<<<<<<< @@ -45697,7 +45811,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":610 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":618 * med2_minus = med2_minus - step2 * else: * break # <<<<<<<<<<<<<< @@ -45710,7 +45824,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( } __pyx_L18_break:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":611 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":619 * else: * break * i2 = med2_minus # <<<<<<<<<<<<<< @@ -45719,7 +45833,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_i2 = __pyx_v_med2_minus; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":612 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":620 * break * i2 = med2_minus * while i2 < high2: # <<<<<<<<<<<<<< @@ -45730,7 +45844,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( __pyx_t_3 = ((__pyx_v_i2 < __pyx_v_high2) != 0); if (!__pyx_t_3) break; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":613 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":621 * i2 = med2_minus * while i2 < high2: * assign_matching(&loc2, arr2, i2, step2, self.fda.sent_id.arr) # <<<<<<<<<<<<<< @@ -45739,7 +45853,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_f_4cdec_2sa_3_sa_assign_matching((&__pyx_v_loc2), __pyx_v_arr2, __pyx_v_i2, __pyx_v_step2, __pyx_v_self->fda->sent_id->arr); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":614 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":622 * while i2 < high2: * assign_matching(&loc2, arr2, i2, step2, self.fda.sent_id.arr) * comparison = self.compare_matchings(&loc1, &loc2, offset_by_one, len_last) # <<<<<<<<<<<<<< @@ -45748,7 +45862,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_comparison = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->compare_matchings(__pyx_v_self, (&__pyx_v_loc1), (&__pyx_v_loc2), __pyx_v_offset_by_one, __pyx_v_len_last); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":615 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":623 * assign_matching(&loc2, arr2, i2, step2, self.fda.sent_id.arr) * comparison = self.compare_matchings(&loc1, &loc2, offset_by_one, len_last) * if comparison == 0: # <<<<<<<<<<<<<< @@ -45758,7 +45872,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( __pyx_t_3 = ((__pyx_v_comparison == 0) != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":617 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":625 * if comparison == 0: * pass * med_result = append_combined_matching(med_result, &loc1, &loc2, offset_by_one, num_subpatterns, &med_result_len) # <<<<<<<<<<<<<< @@ -45770,7 +45884,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( } __pyx_L22:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":618 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":626 * pass * med_result = append_combined_matching(med_result, &loc1, &loc2, offset_by_one, num_subpatterns, &med_result_len) * if comparison == -1: # <<<<<<<<<<<<<< @@ -45780,7 +45894,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( __pyx_t_3 = ((__pyx_v_comparison == -1) != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":619 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":627 * med_result = append_combined_matching(med_result, &loc1, &loc2, offset_by_one, num_subpatterns, &med_result_len) * if comparison == -1: * break # <<<<<<<<<<<<<< @@ -45790,7 +45904,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( goto __pyx_L21_break; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":620 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":628 * if comparison == -1: * break * i2 = i2 + step2 # <<<<<<<<<<<<<< @@ -45801,7 +45915,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( } __pyx_L21_break:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":621 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":629 * break * i2 = i2 + step2 * if i2 > med2_plus: # <<<<<<<<<<<<<< @@ -45811,7 +45925,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( __pyx_t_3 = ((__pyx_v_i2 > __pyx_v_med2_plus) != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":622 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":630 * i2 = i2 + step2 * if i2 > med2_plus: * med2_plus = i2 # <<<<<<<<<<<<<< @@ -45823,7 +45937,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( } __pyx_L24:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":623 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":631 * if i2 > med2_plus: * med2_plus = i2 * i1 = i1 + step1 # <<<<<<<<<<<<<< @@ -45833,7 +45947,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( __pyx_v_i1 = (__pyx_v_i1 + __pyx_v_step1); } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":625 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":633 * i1 = i1 + step1 * * tmp = med1_minus # <<<<<<<<<<<<<< @@ -45842,7 +45956,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_tmp = __pyx_v_med1_minus; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":626 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":634 * * tmp = med1_minus * med1_minus = med1_plus # <<<<<<<<<<<<<< @@ -45851,7 +45965,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_med1_minus = __pyx_v_med1_plus; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":627 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":635 * tmp = med1_minus * med1_minus = med1_plus * med1_plus = tmp # <<<<<<<<<<<<<< @@ -45863,7 +45977,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":630 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":638 * else: * # No match; need to figure out the point of division in D and Q * med2_minus = med2 # <<<<<<<<<<<<<< @@ -45872,7 +45986,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_med2_minus = __pyx_v_med2; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":631 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":639 * # No match; need to figure out the point of division in D and Q * med2_minus = med2 * med2_plus = med2 # <<<<<<<<<<<<<< @@ -45881,7 +45995,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_med2_plus = __pyx_v_med2; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":632 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":640 * med2_minus = med2 * med2_plus = med2 * if d_first: # <<<<<<<<<<<<<< @@ -45891,7 +46005,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( __pyx_t_3 = (__pyx_v_d_first != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":633 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":641 * med2_plus = med2 * if d_first: * med2_minus = med2_minus + step2 # <<<<<<<<<<<<<< @@ -45900,7 +46014,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_med2_minus = (__pyx_v_med2_minus + __pyx_v_step2); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":634 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":642 * if d_first: * med2_minus = med2_minus + step2 * if comparison == -1: # <<<<<<<<<<<<<< @@ -45910,7 +46024,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( __pyx_t_3 = ((__pyx_v_comparison == -1) != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":635 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":643 * med2_minus = med2_minus + step2 * if comparison == -1: * med1_minus = med1_plus # <<<<<<<<<<<<<< @@ -45922,7 +46036,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( } __pyx_L26:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":636 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":644 * if comparison == -1: * med1_minus = med1_plus * if comparison == 1: # <<<<<<<<<<<<<< @@ -45932,7 +46046,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( __pyx_t_3 = ((__pyx_v_comparison == 1) != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":637 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":645 * med1_minus = med1_plus * if comparison == 1: * med1_plus = med1_minus # <<<<<<<<<<<<<< @@ -45947,7 +46061,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":639 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":647 * med1_plus = med1_minus * else: * tmp = med1_minus # <<<<<<<<<<<<<< @@ -45956,7 +46070,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_tmp = __pyx_v_med1_minus; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":640 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":648 * else: * tmp = med1_minus * med1_minus = med1_plus # <<<<<<<<<<<<<< @@ -45965,7 +46079,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_med1_minus = __pyx_v_med1_plus; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":641 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":649 * tmp = med1_minus * med1_minus = med1_plus * med1_plus = tmp # <<<<<<<<<<<<<< @@ -45974,7 +46088,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_med1_plus = __pyx_v_tmp; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":642 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":650 * med1_minus = med1_plus * med1_plus = tmp * if comparison == 1: # <<<<<<<<<<<<<< @@ -45984,7 +46098,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( __pyx_t_3 = ((__pyx_v_comparison == 1) != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":643 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":651 * med1_plus = tmp * if comparison == 1: * med2_minus = med2_minus + step2 # <<<<<<<<<<<<<< @@ -45993,7 +46107,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_med2_minus = (__pyx_v_med2_minus + __pyx_v_step2); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":644 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":652 * if comparison == 1: * med2_minus = med2_minus + step2 * med2_plus = med2_plus + step2 # <<<<<<<<<<<<<< @@ -46009,7 +46123,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( } __pyx_L14:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":646 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":654 * med2_plus = med2_plus + step2 * * low_result_len = 0 # <<<<<<<<<<<<<< @@ -46018,7 +46132,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_low_result_len = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":647 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":655 * * low_result_len = 0 * low_result = self.baeza_yates_helper(low1, med1_plus, arr1, step1, low2, med2_plus, arr2, step2, offset_by_one, len_last, num_subpatterns, &low_result_len) # <<<<<<<<<<<<<< @@ -46027,7 +46141,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_low_result = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->baeza_yates_helper(__pyx_v_self, __pyx_v_low1, __pyx_v_med1_plus, __pyx_v_arr1, __pyx_v_step1, __pyx_v_low2, __pyx_v_med2_plus, __pyx_v_arr2, __pyx_v_step2, __pyx_v_offset_by_one, __pyx_v_len_last, __pyx_v_num_subpatterns, (&__pyx_v_low_result_len)); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":648 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":656 * low_result_len = 0 * low_result = self.baeza_yates_helper(low1, med1_plus, arr1, step1, low2, med2_plus, arr2, step2, offset_by_one, len_last, num_subpatterns, &low_result_len) * high_result_len = 0 # <<<<<<<<<<<<<< @@ -46036,7 +46150,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_high_result_len = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":649 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":657 * low_result = self.baeza_yates_helper(low1, med1_plus, arr1, step1, low2, med2_plus, arr2, step2, offset_by_one, len_last, num_subpatterns, &low_result_len) * high_result_len = 0 * high_result = self.baeza_yates_helper(med1_minus, high1, arr1, step1, med2_minus, high2, arr2, step2, offset_by_one, len_last, num_subpatterns, &high_result_len) # <<<<<<<<<<<<<< @@ -46045,7 +46159,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_high_result = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->baeza_yates_helper(__pyx_v_self, __pyx_v_med1_minus, __pyx_v_high1, __pyx_v_arr1, __pyx_v_step1, __pyx_v_med2_minus, __pyx_v_high2, __pyx_v_arr2, __pyx_v_step2, __pyx_v_offset_by_one, __pyx_v_len_last, __pyx_v_num_subpatterns, (&__pyx_v_high_result_len)); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":651 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":659 * high_result = self.baeza_yates_helper(med1_minus, high1, arr1, step1, med2_minus, high2, arr2, step2, offset_by_one, len_last, num_subpatterns, &high_result_len) * * result = extend_arr(result, result_len, low_result, low_result_len) # <<<<<<<<<<<<<< @@ -46054,7 +46168,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_result = __pyx_f_4cdec_2sa_3_sa_extend_arr(__pyx_v_result, __pyx_v_result_len, __pyx_v_low_result, __pyx_v_low_result_len); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":652 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":660 * * result = extend_arr(result, result_len, low_result, low_result_len) * result = extend_arr(result, result_len, med_result, med_result_len) # <<<<<<<<<<<<<< @@ -46063,7 +46177,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_result = __pyx_f_4cdec_2sa_3_sa_extend_arr(__pyx_v_result, __pyx_v_result_len, __pyx_v_med_result, __pyx_v_med_result_len); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":653 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":661 * result = extend_arr(result, result_len, low_result, low_result_len) * result = extend_arr(result, result_len, med_result, med_result_len) * result = extend_arr(result, result_len, high_result, high_result_len) # <<<<<<<<<<<<<< @@ -46072,7 +46186,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ __pyx_v_result = __pyx_f_4cdec_2sa_3_sa_extend_arr(__pyx_v_result, __pyx_v_result_len, __pyx_v_high_result, __pyx_v_high_result_len); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":654 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":662 * result = extend_arr(result, result_len, med_result, med_result_len) * result = extend_arr(result, result_len, high_result, high_result_len) * free(low_result) # <<<<<<<<<<<<<< @@ -46081,7 +46195,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ free(__pyx_v_low_result); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":655 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":663 * result = extend_arr(result, result_len, high_result, high_result_len) * free(low_result) * free(med_result) # <<<<<<<<<<<<<< @@ -46090,7 +46204,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ free(__pyx_v_med_result); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":656 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":664 * free(low_result) * free(med_result) * free(high_result) # <<<<<<<<<<<<<< @@ -46099,7 +46213,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( */ free(__pyx_v_high_result); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":658 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":666 * free(high_result) * * return result # <<<<<<<<<<<<<< @@ -46109,7 +46223,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":509 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":517 * * * cdef int* baeza_yates_helper(self, int low1, int high1, int* arr1, int step1, # <<<<<<<<<<<<<< @@ -46126,7 +46240,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_baeza_yates_helper( return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":662 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":670 * * * cdef long compare_matchings_set(self, int i1_minus, int i1_plus, int* arr1, int step1, # <<<<<<<<<<<<<< @@ -46145,7 +46259,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings_s int __pyx_t_1; __Pyx_RefNannySetupContext("compare_matchings_set", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":673 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":681 * cdef Matching* loc1 * * loc1 = &l1_stack # <<<<<<<<<<<<<< @@ -46154,7 +46268,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings_s */ __pyx_v_loc1 = (&__pyx_v_l1_stack); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":675 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":683 * loc1 = &l1_stack * * i1 = i1_minus # <<<<<<<<<<<<<< @@ -46163,7 +46277,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings_s */ __pyx_v_i1 = __pyx_v_i1_minus; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":676 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":684 * * i1 = i1_minus * while i1 < i1_plus: # <<<<<<<<<<<<<< @@ -46174,7 +46288,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings_s __pyx_t_1 = ((__pyx_v_i1 < __pyx_v_i1_plus) != 0); if (!__pyx_t_1) break; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":677 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":685 * i1 = i1_minus * while i1 < i1_plus: * assign_matching(loc1, arr1, i1, step1, self.fda.sent_id.arr) # <<<<<<<<<<<<<< @@ -46183,7 +46297,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings_s */ __pyx_f_4cdec_2sa_3_sa_assign_matching(__pyx_v_loc1, __pyx_v_arr1, __pyx_v_i1, __pyx_v_step1, __pyx_v_self->fda->sent_id->arr); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":678 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":686 * while i1 < i1_plus: * assign_matching(loc1, arr1, i1, step1, self.fda.sent_id.arr) * comparison = self.compare_matchings(loc1, loc2, offset_by_one, len_last) # <<<<<<<<<<<<<< @@ -46192,7 +46306,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings_s */ __pyx_v_comparison = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->compare_matchings(__pyx_v_self, __pyx_v_loc1, __pyx_v_loc2, __pyx_v_offset_by_one, __pyx_v_len_last); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":679 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":687 * assign_matching(loc1, arr1, i1, step1, self.fda.sent_id.arr) * comparison = self.compare_matchings(loc1, loc2, offset_by_one, len_last) * if comparison == 0: # <<<<<<<<<<<<<< @@ -46202,7 +46316,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings_s __pyx_t_1 = ((__pyx_v_comparison == 0) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":680 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":688 * comparison = self.compare_matchings(loc1, loc2, offset_by_one, len_last) * if comparison == 0: * prev_comparison = 0 # <<<<<<<<<<<<<< @@ -46211,7 +46325,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings_s */ __pyx_v_prev_comparison = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":681 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":689 * if comparison == 0: * prev_comparison = 0 * break # <<<<<<<<<<<<<< @@ -46221,7 +46335,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings_s goto __pyx_L4_break; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":682 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":690 * prev_comparison = 0 * break * elif i1 == i1_minus: # <<<<<<<<<<<<<< @@ -46231,7 +46345,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings_s __pyx_t_1 = ((__pyx_v_i1 == __pyx_v_i1_minus) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":683 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":691 * break * elif i1 == i1_minus: * prev_comparison = comparison # <<<<<<<<<<<<<< @@ -46243,7 +46357,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings_s } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":685 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":693 * prev_comparison = comparison * else: * if comparison != prev_comparison: # <<<<<<<<<<<<<< @@ -46253,7 +46367,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings_s __pyx_t_1 = ((__pyx_v_comparison != __pyx_v_prev_comparison) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":686 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":694 * else: * if comparison != prev_comparison: * prev_comparison = 0 # <<<<<<<<<<<<<< @@ -46262,7 +46376,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings_s */ __pyx_v_prev_comparison = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":687 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":695 * if comparison != prev_comparison: * prev_comparison = 0 * break # <<<<<<<<<<<<<< @@ -46274,7 +46388,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings_s } __pyx_L5:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":688 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":696 * prev_comparison = 0 * break * i1 = i1 + step1 # <<<<<<<<<<<<<< @@ -46285,7 +46399,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings_s } __pyx_L4_break:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":689 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":697 * break * i1 = i1 + step1 * return prev_comparison # <<<<<<<<<<<<<< @@ -46295,7 +46409,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings_s __pyx_r = __pyx_v_prev_comparison; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":662 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":670 * * * cdef long compare_matchings_set(self, int i1_minus, int i1_plus, int* arr1, int step1, # <<<<<<<<<<<<<< @@ -46309,7 +46423,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings_s return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":692 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":700 * * * cdef long compare_matchings(self, Matching* loc1, Matching* loc2, int offset_by_one, int len_last): # <<<<<<<<<<<<<< @@ -46327,7 +46441,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings(s int __pyx_t_4; __Pyx_RefNannySetupContext("compare_matchings", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":695 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":703 * cdef int i * * if loc1.sent_id > loc2.sent_id: # <<<<<<<<<<<<<< @@ -46337,7 +46451,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings(s __pyx_t_1 = ((__pyx_v_loc1->sent_id > __pyx_v_loc2->sent_id) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":696 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":704 * * if loc1.sent_id > loc2.sent_id: * return 1 # <<<<<<<<<<<<<< @@ -46348,7 +46462,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings(s goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":697 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":705 * if loc1.sent_id > loc2.sent_id: * return 1 * if loc2.sent_id > loc1.sent_id: # <<<<<<<<<<<<<< @@ -46358,7 +46472,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings(s __pyx_t_1 = ((__pyx_v_loc2->sent_id > __pyx_v_loc1->sent_id) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":698 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":706 * return 1 * if loc2.sent_id > loc1.sent_id: * return -1 # <<<<<<<<<<<<<< @@ -46369,7 +46483,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings(s goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":700 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":708 * return -1 * * if loc1.size == 1 and loc2.size == 1: # <<<<<<<<<<<<<< @@ -46385,7 +46499,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings(s } if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":701 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":709 * * if loc1.size == 1 and loc2.size == 1: * if loc2.arr[loc2.start] - loc1.arr[loc1.start] <= self.train_min_gap_size: # <<<<<<<<<<<<<< @@ -46395,7 +46509,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings(s __pyx_t_3 = ((((__pyx_v_loc2->arr[__pyx_v_loc2->start]) - (__pyx_v_loc1->arr[__pyx_v_loc1->start])) <= __pyx_v_self->train_min_gap_size) != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":702 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":710 * if loc1.size == 1 and loc2.size == 1: * if loc2.arr[loc2.start] - loc1.arr[loc1.start] <= self.train_min_gap_size: * return 1 # <<<<<<<<<<<<<< @@ -46408,7 +46522,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings(s goto __pyx_L5; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":704 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":712 * return 1 * * elif offset_by_one: # <<<<<<<<<<<<<< @@ -46418,7 +46532,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings(s __pyx_t_3 = (__pyx_v_offset_by_one != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":705 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":713 * * elif offset_by_one: * for i from 1 <= i < loc1.size: # <<<<<<<<<<<<<< @@ -46428,7 +46542,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings(s __pyx_t_4 = __pyx_v_loc1->size; for (__pyx_v_i = 1; __pyx_v_i < __pyx_t_4; __pyx_v_i++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":706 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":714 * elif offset_by_one: * for i from 1 <= i < loc1.size: * if loc1.arr[loc1.start+i] > loc2.arr[loc2.start+i-1]: # <<<<<<<<<<<<<< @@ -46438,7 +46552,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings(s __pyx_t_3 = (((__pyx_v_loc1->arr[(__pyx_v_loc1->start + __pyx_v_i)]) > (__pyx_v_loc2->arr[((__pyx_v_loc2->start + __pyx_v_i) - 1)])) != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":707 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":715 * for i from 1 <= i < loc1.size: * if loc1.arr[loc1.start+i] > loc2.arr[loc2.start+i-1]: * return 1 # <<<<<<<<<<<<<< @@ -46449,7 +46563,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings(s goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":708 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":716 * if loc1.arr[loc1.start+i] > loc2.arr[loc2.start+i-1]: * return 1 * if loc1.arr[loc1.start+i] < loc2.arr[loc2.start+i-1]: # <<<<<<<<<<<<<< @@ -46459,7 +46573,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings(s __pyx_t_3 = (((__pyx_v_loc1->arr[(__pyx_v_loc1->start + __pyx_v_i)]) < (__pyx_v_loc2->arr[((__pyx_v_loc2->start + __pyx_v_i) - 1)])) != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":709 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":717 * return 1 * if loc1.arr[loc1.start+i] < loc2.arr[loc2.start+i-1]: * return -1 # <<<<<<<<<<<<<< @@ -46474,7 +46588,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings(s } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":712 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":720 * * else: * if loc1.arr[loc1.start]+1 > loc2.arr[loc2.start]: # <<<<<<<<<<<<<< @@ -46484,7 +46598,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings(s __pyx_t_3 = ((((__pyx_v_loc1->arr[__pyx_v_loc1->start]) + 1) > (__pyx_v_loc2->arr[__pyx_v_loc2->start])) != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":713 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":721 * else: * if loc1.arr[loc1.start]+1 > loc2.arr[loc2.start]: * return 1 # <<<<<<<<<<<<<< @@ -46495,7 +46609,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings(s goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":714 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":722 * if loc1.arr[loc1.start]+1 > loc2.arr[loc2.start]: * return 1 * if loc1.arr[loc1.start]+1 < loc2.arr[loc2.start]: # <<<<<<<<<<<<<< @@ -46505,7 +46619,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings(s __pyx_t_3 = ((((__pyx_v_loc1->arr[__pyx_v_loc1->start]) + 1) < (__pyx_v_loc2->arr[__pyx_v_loc2->start])) != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":715 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":723 * return 1 * if loc1.arr[loc1.start]+1 < loc2.arr[loc2.start]: * return -1 # <<<<<<<<<<<<<< @@ -46516,7 +46630,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings(s goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":717 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":725 * return -1 * * for i from 1 <= i < loc1.size: # <<<<<<<<<<<<<< @@ -46526,7 +46640,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings(s __pyx_t_4 = __pyx_v_loc1->size; for (__pyx_v_i = 1; __pyx_v_i < __pyx_t_4; __pyx_v_i++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":718 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":726 * * for i from 1 <= i < loc1.size: * if loc1.arr[loc1.start+i] > loc2.arr[loc2.start+i]: # <<<<<<<<<<<<<< @@ -46536,7 +46650,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings(s __pyx_t_3 = (((__pyx_v_loc1->arr[(__pyx_v_loc1->start + __pyx_v_i)]) > (__pyx_v_loc2->arr[(__pyx_v_loc2->start + __pyx_v_i)])) != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":719 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":727 * for i from 1 <= i < loc1.size: * if loc1.arr[loc1.start+i] > loc2.arr[loc2.start+i]: * return 1 # <<<<<<<<<<<<<< @@ -46547,7 +46661,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings(s goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":720 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":728 * if loc1.arr[loc1.start+i] > loc2.arr[loc2.start+i]: * return 1 * if loc1.arr[loc1.start+i] < loc2.arr[loc2.start+i]: # <<<<<<<<<<<<<< @@ -46557,7 +46671,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings(s __pyx_t_3 = (((__pyx_v_loc1->arr[(__pyx_v_loc1->start + __pyx_v_i)]) < (__pyx_v_loc2->arr[(__pyx_v_loc2->start + __pyx_v_i)])) != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":721 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":729 * return 1 * if loc1.arr[loc1.start+i] < loc2.arr[loc2.start+i]: * return -1 # <<<<<<<<<<<<<< @@ -46571,7 +46685,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings(s } __pyx_L5:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":723 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":731 * return -1 * * if loc2.arr[loc2.end-1] + len_last - loc1.arr[loc1.start] > self.train_max_initial_size: # <<<<<<<<<<<<<< @@ -46581,7 +46695,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings(s __pyx_t_3 = (((((__pyx_v_loc2->arr[(__pyx_v_loc2->end - 1)]) + __pyx_v_len_last) - (__pyx_v_loc1->arr[__pyx_v_loc1->start])) > __pyx_v_self->train_max_initial_size) != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":724 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":732 * * if loc2.arr[loc2.end-1] + len_last - loc1.arr[loc1.start] > self.train_max_initial_size: * return -1 # <<<<<<<<<<<<<< @@ -46592,7 +46706,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings(s goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":725 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":733 * if loc2.arr[loc2.end-1] + len_last - loc1.arr[loc1.start] > self.train_max_initial_size: * return -1 * return 0 # <<<<<<<<<<<<<< @@ -46602,7 +46716,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings(s __pyx_r = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":692 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":700 * * * cdef long compare_matchings(self, Matching* loc1, Matching* loc2, int offset_by_one, int len_last): # <<<<<<<<<<<<<< @@ -46616,7 +46730,7 @@ static long __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_compare_matchings(s return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":728 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":736 * * * cdef int* merge_helper(self, int low1, int high1, int* arr1, int step1, # <<<<<<<<<<<<<< @@ -46640,7 +46754,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_merge_helper(struct int __pyx_t_3; __Pyx_RefNannySetupContext("merge_helper", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":736 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":744 * cdef Matching loc1, loc2 * * result_len[0] = 0 # <<<<<<<<<<<<<< @@ -46649,7 +46763,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_merge_helper(struct */ (__pyx_v_result_len[0]) = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":737 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":745 * * result_len[0] = 0 * result = malloc(0*sizeof(int)) # <<<<<<<<<<<<<< @@ -46658,7 +46772,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_merge_helper(struct */ __pyx_v_result = ((int *)malloc((0 * (sizeof(int))))); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":739 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":747 * result = malloc(0*sizeof(int)) * * i1 = low1 # <<<<<<<<<<<<<< @@ -46667,7 +46781,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_merge_helper(struct */ __pyx_v_i1 = __pyx_v_low1; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":740 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":748 * * i1 = low1 * i2 = low2 # <<<<<<<<<<<<<< @@ -46676,7 +46790,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_merge_helper(struct */ __pyx_v_i2 = __pyx_v_low2; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":741 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":749 * i1 = low1 * i2 = low2 * while i1 < high1 and i2 < high2: # <<<<<<<<<<<<<< @@ -46693,7 +46807,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_merge_helper(struct } if (!__pyx_t_3) break; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":744 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":752 * * # First, pop all unneeded loc2's off the stack * assign_matching(&loc1, arr1, i1, step1, self.fda.sent_id.arr) # <<<<<<<<<<<<<< @@ -46702,7 +46816,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_merge_helper(struct */ __pyx_f_4cdec_2sa_3_sa_assign_matching((&__pyx_v_loc1), __pyx_v_arr1, __pyx_v_i1, __pyx_v_step1, __pyx_v_self->fda->sent_id->arr); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":745 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":753 * # First, pop all unneeded loc2's off the stack * assign_matching(&loc1, arr1, i1, step1, self.fda.sent_id.arr) * while i2 < high2: # <<<<<<<<<<<<<< @@ -46713,7 +46827,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_merge_helper(struct __pyx_t_3 = ((__pyx_v_i2 < __pyx_v_high2) != 0); if (!__pyx_t_3) break; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":746 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":754 * assign_matching(&loc1, arr1, i1, step1, self.fda.sent_id.arr) * while i2 < high2: * assign_matching(&loc2, arr2, i2, step2, self.fda.sent_id.arr) # <<<<<<<<<<<<<< @@ -46722,7 +46836,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_merge_helper(struct */ __pyx_f_4cdec_2sa_3_sa_assign_matching((&__pyx_v_loc2), __pyx_v_arr2, __pyx_v_i2, __pyx_v_step2, __pyx_v_self->fda->sent_id->arr); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":747 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":755 * while i2 < high2: * assign_matching(&loc2, arr2, i2, step2, self.fda.sent_id.arr) * if self.compare_matchings(&loc1, &loc2, offset_by_one, len_last) == 1: # <<<<<<<<<<<<<< @@ -46732,7 +46846,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_merge_helper(struct __pyx_t_3 = ((((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->compare_matchings(__pyx_v_self, (&__pyx_v_loc1), (&__pyx_v_loc2), __pyx_v_offset_by_one, __pyx_v_len_last) == 1) != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":748 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":756 * assign_matching(&loc2, arr2, i2, step2, self.fda.sent_id.arr) * if self.compare_matchings(&loc1, &loc2, offset_by_one, len_last) == 1: * i2 = i2 + step2 # <<<<<<<<<<<<<< @@ -46744,7 +46858,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_merge_helper(struct } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":750 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":758 * i2 = i2 + step2 * else: * break # <<<<<<<<<<<<<< @@ -46757,7 +46871,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_merge_helper(struct } __pyx_L6_break:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":753 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":761 * * # Next: process all loc1's with the same starting val * j1 = i1 # <<<<<<<<<<<<<< @@ -46766,7 +46880,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_merge_helper(struct */ __pyx_v_j1 = __pyx_v_i1; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":754 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":762 * # Next: process all loc1's with the same starting val * j1 = i1 * while i1 < high1 and arr1[j1] == arr1[i1]: # <<<<<<<<<<<<<< @@ -46783,7 +46897,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_merge_helper(struct } if (!__pyx_t_2) break; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":755 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":763 * j1 = i1 * while i1 < high1 and arr1[j1] == arr1[i1]: * assign_matching(&loc1, arr1, i1, step1, self.fda.sent_id.arr) # <<<<<<<<<<<<<< @@ -46792,7 +46906,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_merge_helper(struct */ __pyx_f_4cdec_2sa_3_sa_assign_matching((&__pyx_v_loc1), __pyx_v_arr1, __pyx_v_i1, __pyx_v_step1, __pyx_v_self->fda->sent_id->arr); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":756 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":764 * while i1 < high1 and arr1[j1] == arr1[i1]: * assign_matching(&loc1, arr1, i1, step1, self.fda.sent_id.arr) * j2 = i2 # <<<<<<<<<<<<<< @@ -46801,7 +46915,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_merge_helper(struct */ __pyx_v_j2 = __pyx_v_i2; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":757 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":765 * assign_matching(&loc1, arr1, i1, step1, self.fda.sent_id.arr) * j2 = i2 * while j2 < high2: # <<<<<<<<<<<<<< @@ -46812,7 +46926,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_merge_helper(struct __pyx_t_2 = ((__pyx_v_j2 < __pyx_v_high2) != 0); if (!__pyx_t_2) break; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":758 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":766 * j2 = i2 * while j2 < high2: * assign_matching(&loc2, arr2, j2, step2, self.fda.sent_id.arr) # <<<<<<<<<<<<<< @@ -46821,7 +46935,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_merge_helper(struct */ __pyx_f_4cdec_2sa_3_sa_assign_matching((&__pyx_v_loc2), __pyx_v_arr2, __pyx_v_j2, __pyx_v_step2, __pyx_v_self->fda->sent_id->arr); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":759 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":767 * while j2 < high2: * assign_matching(&loc2, arr2, j2, step2, self.fda.sent_id.arr) * comparison = self.compare_matchings(&loc1, &loc2, offset_by_one, len_last) # <<<<<<<<<<<<<< @@ -46830,7 +46944,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_merge_helper(struct */ __pyx_v_comparison = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->compare_matchings(__pyx_v_self, (&__pyx_v_loc1), (&__pyx_v_loc2), __pyx_v_offset_by_one, __pyx_v_len_last); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":760 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":768 * assign_matching(&loc2, arr2, j2, step2, self.fda.sent_id.arr) * comparison = self.compare_matchings(&loc1, &loc2, offset_by_one, len_last) * if comparison == 0: # <<<<<<<<<<<<<< @@ -46840,7 +46954,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_merge_helper(struct __pyx_t_2 = ((__pyx_v_comparison == 0) != 0); if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":761 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":769 * comparison = self.compare_matchings(&loc1, &loc2, offset_by_one, len_last) * if comparison == 0: * result = append_combined_matching(result, &loc1, &loc2, offset_by_one, num_subpatterns, result_len) # <<<<<<<<<<<<<< @@ -46852,7 +46966,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_merge_helper(struct } __pyx_L12:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":762 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":770 * if comparison == 0: * result = append_combined_matching(result, &loc1, &loc2, offset_by_one, num_subpatterns, result_len) * if comparison == 1: # <<<<<<<<<<<<<< @@ -46865,7 +46979,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_merge_helper(struct } __pyx_L13:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":764 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":772 * if comparison == 1: * pass * if comparison == -1: # <<<<<<<<<<<<<< @@ -46875,7 +46989,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_merge_helper(struct __pyx_t_2 = ((__pyx_v_comparison == -1) != 0); if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":765 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":773 * pass * if comparison == -1: * break # <<<<<<<<<<<<<< @@ -46886,7 +47000,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_merge_helper(struct } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":767 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":775 * break * else: * j2 = j2 + step2 # <<<<<<<<<<<<<< @@ -46898,7 +47012,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_merge_helper(struct } __pyx_L11_break:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":768 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":776 * else: * j2 = j2 + step2 * i1 = i1 + step1 # <<<<<<<<<<<<<< @@ -46909,7 +47023,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_merge_helper(struct } } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":769 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":777 * j2 = j2 + step2 * i1 = i1 + step1 * return result # <<<<<<<<<<<<<< @@ -46919,7 +47033,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_merge_helper(struct __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":728 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":736 * * * cdef int* merge_helper(self, int low1, int high1, int* arr1, int step1, # <<<<<<<<<<<<<< @@ -46933,7 +47047,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_merge_helper(struct return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":772 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":780 * * * cdef void sort_phrase_loc(self, IntList arr, PhraseLocation loc, Phrase phrase): # <<<<<<<<<<<<<< @@ -46956,27 +47070,27 @@ static void __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_sort_phrase_loc(str int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sort_phrase_loc", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":777 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":785 * cdef IntList result * * if phrase in self.precomputed_index: # <<<<<<<<<<<<<< * loc.arr = self.precomputed_index[phrase] * else: */ - __pyx_t_1 = (__Pyx_PySequence_Contains(((PyObject *)__pyx_v_phrase), __pyx_v_self->precomputed_index, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = (__Pyx_PySequence_Contains(((PyObject *)__pyx_v_phrase), __pyx_v_self->precomputed_index, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":778 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":786 * * if phrase in self.precomputed_index: * loc.arr = self.precomputed_index[phrase] # <<<<<<<<<<<<<< * else: * loc.arr = IntList(initial_len=loc.sa_high-loc.sa_low) */ - __pyx_t_3 = PyObject_GetItem(__pyx_v_self->precomputed_index, ((PyObject *)__pyx_v_phrase)); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_3 = PyObject_GetItem(__pyx_v_self->precomputed_index, ((PyObject *)__pyx_v_phrase)); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); - if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_4cdec_2sa_3_sa_IntList))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_4cdec_2sa_3_sa_IntList))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_loc->arr); __Pyx_DECREF(((PyObject *)__pyx_v_loc->arr)); @@ -46986,20 +47100,20 @@ static void __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_sort_phrase_loc(str } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":780 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":788 * loc.arr = self.precomputed_index[phrase] * else: * loc.arr = IntList(initial_len=loc.sa_high-loc.sa_low) # <<<<<<<<<<<<<< * veb = VEB(arr.len) * for i from loc.sa_low <= i < loc.sa_high: */ - __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 788; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_loc->sa_high - __pyx_v_loc->sa_low)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_loc->sa_high - __pyx_v_loc->sa_low)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 788; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_initial_len, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_initial_len, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 788; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_IntList)), __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 780; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_IntList)), __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 788; __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); @@ -47008,27 +47122,27 @@ static void __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_sort_phrase_loc(str __pyx_v_loc->arr = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":781 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":789 * else: * loc.arr = IntList(initial_len=loc.sa_high-loc.sa_low) * veb = VEB(arr.len) # <<<<<<<<<<<<<< * for i from loc.sa_low <= i < loc.sa_high: * veb._insert(arr.arr[i]) */ - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_arr->len); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_arr->len); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 789; __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[8]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_VEB)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_VEB)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_veb = ((struct __pyx_obj_4cdec_2sa_3_sa_VEB *)__pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":782 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":790 * loc.arr = IntList(initial_len=loc.sa_high-loc.sa_low) * veb = VEB(arr.len) * for i from loc.sa_low <= i < loc.sa_high: # <<<<<<<<<<<<<< @@ -47038,7 +47152,7 @@ static void __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_sort_phrase_loc(str __pyx_t_5 = __pyx_v_loc->sa_high; for (__pyx_v_i = __pyx_v_loc->sa_low; __pyx_v_i < __pyx_t_5; __pyx_v_i++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":783 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":791 * veb = VEB(arr.len) * for i from loc.sa_low <= i < loc.sa_high: * veb._insert(arr.arr[i]) # <<<<<<<<<<<<<< @@ -47048,7 +47162,7 @@ static void __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_sort_phrase_loc(str ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_VEB *)__pyx_v_veb->__pyx_vtab)->_insert(__pyx_v_veb, (__pyx_v_arr->arr[__pyx_v_i])); } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":784 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":792 * for i from loc.sa_low <= i < loc.sa_high: * veb._insert(arr.arr[i]) * i = veb.veb.min_val # <<<<<<<<<<<<<< @@ -47058,7 +47172,7 @@ static void __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_sort_phrase_loc(str __pyx_t_5 = __pyx_v_veb->veb->min_val; __pyx_v_i = __pyx_t_5; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":785 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":793 * veb._insert(arr.arr[i]) * i = veb.veb.min_val * for j from 0 <= j < loc.sa_high-loc.sa_low: # <<<<<<<<<<<<<< @@ -47068,7 +47182,7 @@ static void __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_sort_phrase_loc(str __pyx_t_5 = (__pyx_v_loc->sa_high - __pyx_v_loc->sa_low); for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_5; __pyx_v_j++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":786 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":794 * i = veb.veb.min_val * for j from 0 <= j < loc.sa_high-loc.sa_low: * loc.arr.arr[j] = i # <<<<<<<<<<<<<< @@ -47077,7 +47191,7 @@ static void __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_sort_phrase_loc(str */ (__pyx_v_loc->arr->arr[__pyx_v_j]) = __pyx_v_i; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":787 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":795 * for j from 0 <= j < loc.sa_high-loc.sa_low: * loc.arr.arr[j] = i * i = veb._findsucc(i) # <<<<<<<<<<<<<< @@ -47089,7 +47203,7 @@ static void __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_sort_phrase_loc(str } __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":788 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":796 * loc.arr.arr[j] = i * i = veb._findsucc(i) * loc.arr_low = 0 # <<<<<<<<<<<<<< @@ -47098,7 +47212,7 @@ static void __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_sort_phrase_loc(str */ __pyx_v_loc->arr_low = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":789 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":797 * i = veb._findsucc(i) * loc.arr_low = 0 * loc.arr_high = loc.arr.len # <<<<<<<<<<<<<< @@ -47108,7 +47222,7 @@ static void __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_sort_phrase_loc(str __pyx_t_5 = __pyx_v_loc->arr->len; __pyx_v_loc->arr_high = __pyx_t_5; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":772 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":780 * * * cdef void sort_phrase_loc(self, IntList arr, PhraseLocation loc, Phrase phrase): # <<<<<<<<<<<<<< @@ -47127,7 +47241,7 @@ static void __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_sort_phrase_loc(str __Pyx_RefNannyFinishContext(); } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":792 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":800 * * * cdef intersect_helper(self, Phrase prefix, Phrase suffix, # <<<<<<<<<<<<<< @@ -47164,7 +47278,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_intersect_help int __pyx_clineno = 0; __Pyx_RefNannySetupContext("intersect_helper", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":799 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":807 * cdef int* result_ptr * * result_len = 0 # <<<<<<<<<<<<<< @@ -47173,21 +47287,21 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_intersect_help */ __pyx_v_result_len = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":801 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":809 * result_len = 0 * * if sym_isvar(suffix[0]): # <<<<<<<<<<<<<< * offset_by_one = 1 * else: */ - __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_suffix), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_suffix), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 809; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 809; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_f_4cdec_2sa_3_sa_sym_isvar(__pyx_t_2) != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":802 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":810 * * if sym_isvar(suffix[0]): * offset_by_one = 1 # <<<<<<<<<<<<<< @@ -47199,7 +47313,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_intersect_help } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":804 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":812 * offset_by_one = 1 * else: * offset_by_one = 0 # <<<<<<<<<<<<<< @@ -47210,34 +47324,34 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_intersect_help } __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":806 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":814 * offset_by_one = 0 * * len_last = len(suffix.getchunk(suffix.arity())) # <<<<<<<<<<<<<< * * if prefix_loc.arr is None: */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_suffix), __pyx_n_s_getchunk); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 806; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_suffix), __pyx_n_s_getchunk); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_suffix), __pyx_n_s_arity); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 806; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_suffix), __pyx_n_s_arity); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 806; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 806; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 806; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 814; __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_6 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 806; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_len_last = __pyx_t_6; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":808 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":816 * len_last = len(suffix.getchunk(suffix.arity())) * * if prefix_loc.arr is None: # <<<<<<<<<<<<<< @@ -47248,7 +47362,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_intersect_help __pyx_t_7 = (__pyx_t_3 != 0); if (__pyx_t_7) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":809 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":817 * * if prefix_loc.arr is None: * self.sort_phrase_loc(self.fsa.sa, prefix_loc, prefix) # <<<<<<<<<<<<<< @@ -47263,7 +47377,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_intersect_help } __pyx_L4:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":810 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":818 * if prefix_loc.arr is None: * self.sort_phrase_loc(self.fsa.sa, prefix_loc, prefix) * arr1 = prefix_loc.arr # <<<<<<<<<<<<<< @@ -47275,7 +47389,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_intersect_help __pyx_v_arr1 = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_5); __pyx_t_5 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":811 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":819 * self.sort_phrase_loc(self.fsa.sa, prefix_loc, prefix) * arr1 = prefix_loc.arr * low1 = prefix_loc.arr_low # <<<<<<<<<<<<<< @@ -47285,7 +47399,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_intersect_help __pyx_t_2 = __pyx_v_prefix_loc->arr_low; __pyx_v_low1 = __pyx_t_2; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":812 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":820 * arr1 = prefix_loc.arr * low1 = prefix_loc.arr_low * high1 = prefix_loc.arr_high # <<<<<<<<<<<<<< @@ -47295,7 +47409,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_intersect_help __pyx_t_2 = __pyx_v_prefix_loc->arr_high; __pyx_v_high1 = __pyx_t_2; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":813 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":821 * low1 = prefix_loc.arr_low * high1 = prefix_loc.arr_high * step1 = prefix_loc.num_subpatterns # <<<<<<<<<<<<<< @@ -47305,7 +47419,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_intersect_help __pyx_t_2 = __pyx_v_prefix_loc->num_subpatterns; __pyx_v_step1 = __pyx_t_2; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":815 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":823 * step1 = prefix_loc.num_subpatterns * * if suffix_loc.arr is None: # <<<<<<<<<<<<<< @@ -47316,7 +47430,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_intersect_help __pyx_t_3 = (__pyx_t_7 != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":816 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":824 * * if suffix_loc.arr is None: * self.sort_phrase_loc(self.fsa.sa, suffix_loc, suffix) # <<<<<<<<<<<<<< @@ -47331,7 +47445,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_intersect_help } __pyx_L5:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":817 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":825 * if suffix_loc.arr is None: * self.sort_phrase_loc(self.fsa.sa, suffix_loc, suffix) * arr2 = suffix_loc.arr # <<<<<<<<<<<<<< @@ -47343,7 +47457,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_intersect_help __pyx_v_arr2 = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_5); __pyx_t_5 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":818 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":826 * self.sort_phrase_loc(self.fsa.sa, suffix_loc, suffix) * arr2 = suffix_loc.arr * low2 = suffix_loc.arr_low # <<<<<<<<<<<<<< @@ -47353,7 +47467,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_intersect_help __pyx_t_2 = __pyx_v_suffix_loc->arr_low; __pyx_v_low2 = __pyx_t_2; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":819 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":827 * arr2 = suffix_loc.arr * low2 = suffix_loc.arr_low * high2 = suffix_loc.arr_high # <<<<<<<<<<<<<< @@ -47363,7 +47477,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_intersect_help __pyx_t_2 = __pyx_v_suffix_loc->arr_high; __pyx_v_high2 = __pyx_t_2; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":820 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":828 * low2 = suffix_loc.arr_low * high2 = suffix_loc.arr_high * step2 = suffix_loc.num_subpatterns # <<<<<<<<<<<<<< @@ -47373,26 +47487,26 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_intersect_help __pyx_t_2 = __pyx_v_suffix_loc->num_subpatterns; __pyx_v_step2 = __pyx_t_2; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":822 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":830 * step2 = suffix_loc.num_subpatterns * * num_subpatterns = prefix.arity()+1 # <<<<<<<<<<<<<< * * if algorithm == MERGE: */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_prefix), __pyx_n_s_arity); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_prefix), __pyx_n_s_arity); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_int_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_int_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 822; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_num_subpatterns = __pyx_t_2; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":824 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":832 * num_subpatterns = prefix.arity()+1 * * if algorithm == MERGE: # <<<<<<<<<<<<<< @@ -47402,7 +47516,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_intersect_help __pyx_t_3 = ((__pyx_v_algorithm == __pyx_v_4cdec_2sa_3_sa_MERGE) != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":825 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":833 * * if algorithm == MERGE: * result_ptr = self.merge_helper(low1, high1, arr1.arr, step1, # <<<<<<<<<<<<<< @@ -47414,7 +47528,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_intersect_help } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":829 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":837 * offset_by_one, len_last, num_subpatterns, &result_len) * else: * result_ptr = self.baeza_yates_helper(low1, high1, arr1.arr, step1, # <<<<<<<<<<<<<< @@ -47425,7 +47539,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_intersect_help } __pyx_L6:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":833 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":841 * offset_by_one, len_last, num_subpatterns, &result_len) * * if result_len == 0: # <<<<<<<<<<<<<< @@ -47435,7 +47549,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_intersect_help __pyx_t_3 = ((__pyx_v_result_len == 0) != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":834 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":842 * * if result_len == 0: * free(result_ptr) # <<<<<<<<<<<<<< @@ -47444,7 +47558,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_intersect_help */ free(__pyx_v_result_ptr); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":835 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":843 * if result_len == 0: * free(result_ptr) * return None # <<<<<<<<<<<<<< @@ -47458,19 +47572,19 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_intersect_help } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":837 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":845 * return None * else: * result = IntList() # <<<<<<<<<<<<<< * free(result.arr) * result.arr = result_ptr */ - __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_IntList)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_IntList)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_v_result = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_5); __pyx_t_5 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":838 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":846 * else: * result = IntList() * free(result.arr) # <<<<<<<<<<<<<< @@ -47479,7 +47593,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_intersect_help */ free(__pyx_v_result->arr); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":839 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":847 * result = IntList() * free(result.arr) * result.arr = result_ptr # <<<<<<<<<<<<<< @@ -47488,7 +47602,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_intersect_help */ __pyx_v_result->arr = __pyx_v_result_ptr; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":840 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":848 * free(result.arr) * result.arr = result_ptr * result.len = result_len # <<<<<<<<<<<<<< @@ -47497,7 +47611,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_intersect_help */ __pyx_v_result->len = __pyx_v_result_len; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":841 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":849 * result.arr = result_ptr * result.len = result_len * result.size = result_len # <<<<<<<<<<<<<< @@ -47506,7 +47620,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_intersect_help */ __pyx_v_result->size = __pyx_v_result_len; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":842 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":850 * result.len = result_len * result.size = result_len * return PhraseLocation(arr_low=0, arr_high=result_len, arr=result, num_subpatterns=num_subpatterns) # <<<<<<<<<<<<<< @@ -47514,19 +47628,19 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_intersect_help * cdef loc2str(self, PhraseLocation loc): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_arr_low, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_result_len); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_arr_low, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_result_len); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_arr_high, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_arr_high, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_arr, ((PyObject *)__pyx_v_result)) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_num_subpatterns); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_arr, ((PyObject *)__pyx_v_result)) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_num_subpatterns); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_num_subpatterns, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_num_subpatterns, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_PhraseLocation)), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_PhraseLocation)), __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = __pyx_t_4; @@ -47534,7 +47648,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_intersect_help goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":792 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":800 * * * cdef intersect_helper(self, Phrase prefix, Phrase suffix, # <<<<<<<<<<<<<< @@ -47558,7 +47672,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_intersect_help return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":844 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":852 * return PhraseLocation(arr_low=0, arr_high=result_len, arr=result, num_subpatterns=num_subpatterns) * * cdef loc2str(self, PhraseLocation loc): # <<<<<<<<<<<<<< @@ -47581,7 +47695,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_loc2str(CYTHON int __pyx_clineno = 0; __Pyx_RefNannySetupContext("loc2str", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":846 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":854 * cdef loc2str(self, PhraseLocation loc): * cdef int i, j * result = "{" # <<<<<<<<<<<<<< @@ -47591,7 +47705,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_loc2str(CYTHON __Pyx_INCREF(__pyx_kp_s__63); __pyx_v_result = __pyx_kp_s__63; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":847 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":855 * cdef int i, j * result = "{" * i = 0 # <<<<<<<<<<<<<< @@ -47600,7 +47714,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_loc2str(CYTHON */ __pyx_v_i = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":848 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":856 * result = "{" * i = 0 * while i < loc.arr_high: # <<<<<<<<<<<<<< @@ -47611,19 +47725,19 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_loc2str(CYTHON __pyx_t_1 = ((__pyx_v_i < __pyx_v_loc->arr_high) != 0); if (!__pyx_t_1) break; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":849 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":857 * i = 0 * while i < loc.arr_high: * result = result + "(" # <<<<<<<<<<<<<< * for j from i <= j < i + loc.num_subpatterns: * result = result + ("%d " %loc.arr[j]) */ - __pyx_t_2 = PyNumber_Add(__pyx_v_result, __pyx_kp_s__64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 849; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyNumber_Add(__pyx_v_result, __pyx_kp_s__64); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":850 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":858 * while i < loc.arr_high: * result = result + "(" * for j from i <= j < i + loc.num_subpatterns: # <<<<<<<<<<<<<< @@ -47633,38 +47747,38 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_loc2str(CYTHON __pyx_t_3 = (__pyx_v_i + __pyx_v_loc->num_subpatterns); for (__pyx_v_j = __pyx_v_i; __pyx_v_j < __pyx_t_3; __pyx_v_j++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":851 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":859 * result = result + "(" * for j from i <= j < i + loc.num_subpatterns: * result = result + ("%d " %loc.arr[j]) # <<<<<<<<<<<<<< * result = result + ")" * i = i + loc.num_subpatterns */ - __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_loc->arr), __pyx_v_j, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_loc->arr), __pyx_v_j, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 859; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_d, __pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_d, __pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 859; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyNumber_Add(__pyx_v_result, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyNumber_Add(__pyx_v_result, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 859; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_2); __pyx_t_2 = 0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":852 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":860 * for j from i <= j < i + loc.num_subpatterns: * result = result + ("%d " %loc.arr[j]) * result = result + ")" # <<<<<<<<<<<<<< * i = i + loc.num_subpatterns * result = result + "}" */ - __pyx_t_2 = PyNumber_Add(__pyx_v_result, __pyx_kp_s__42); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 852; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyNumber_Add(__pyx_v_result, __pyx_kp_s__42); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 860; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":853 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":861 * result = result + ("%d " %loc.arr[j]) * result = result + ")" * i = i + loc.num_subpatterns # <<<<<<<<<<<<<< @@ -47674,19 +47788,19 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_loc2str(CYTHON __pyx_v_i = (__pyx_v_i + __pyx_v_loc->num_subpatterns); } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":854 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":862 * result = result + ")" * i = i + loc.num_subpatterns * result = result + "}" # <<<<<<<<<<<<<< * return result * */ - __pyx_t_2 = PyNumber_Add(__pyx_v_result, __pyx_kp_s__65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 854; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyNumber_Add(__pyx_v_result, __pyx_kp_s__65); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 862; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":855 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":863 * i = i + loc.num_subpatterns * result = result + "}" * return result # <<<<<<<<<<<<<< @@ -47698,7 +47812,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_loc2str(CYTHON __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":844 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":852 * return PhraseLocation(arr_low=0, arr_high=result_len, arr=result, num_subpatterns=num_subpatterns) * * cdef loc2str(self, PhraseLocation loc): # <<<<<<<<<<<<<< @@ -47719,7 +47833,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_loc2str(CYTHON return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":857 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":865 * return result * * cdef PhraseLocation intersect(self, prefix_node, suffix_node, Phrase phrase): # <<<<<<<<<<<<<< @@ -47746,81 +47860,81 @@ static struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *__pyx_f_4cdec_2sa_3_sa_23 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("intersect", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":861 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":869 * cdef PhraseLocation prefix_loc, suffix_loc, result * * prefix = prefix_node.phrase # <<<<<<<<<<<<<< * suffix = suffix_node.phrase * prefix_loc = prefix_node.phrase_location */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_prefix_node, __pyx_n_s_phrase); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_prefix_node, __pyx_n_s_phrase); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4cdec_2sa_3_sa_Phrase))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4cdec_2sa_3_sa_Phrase))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_prefix = ((struct __pyx_obj_4cdec_2sa_3_sa_Phrase *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":862 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":870 * * prefix = prefix_node.phrase * suffix = suffix_node.phrase # <<<<<<<<<<<<<< * prefix_loc = prefix_node.phrase_location * suffix_loc = suffix_node.phrase_location */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_suffix_node, __pyx_n_s_phrase); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 862; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_suffix_node, __pyx_n_s_phrase); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4cdec_2sa_3_sa_Phrase))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 862; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4cdec_2sa_3_sa_Phrase))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 870; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_suffix = ((struct __pyx_obj_4cdec_2sa_3_sa_Phrase *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":863 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":871 * prefix = prefix_node.phrase * suffix = suffix_node.phrase * prefix_loc = prefix_node.phrase_location # <<<<<<<<<<<<<< * suffix_loc = suffix_node.phrase_location * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_prefix_node, __pyx_n_s_phrase_location); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_prefix_node, __pyx_n_s_phrase_location); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 871; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4cdec_2sa_3_sa_PhraseLocation))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4cdec_2sa_3_sa_PhraseLocation))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 871; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_prefix_loc = ((struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":864 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":872 * suffix = suffix_node.phrase * prefix_loc = prefix_node.phrase_location * suffix_loc = suffix_node.phrase_location # <<<<<<<<<<<<<< * * result = self.get_precomputed_collocation(phrase) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_suffix_node, __pyx_n_s_phrase_location); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_suffix_node, __pyx_n_s_phrase_location); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 872; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4cdec_2sa_3_sa_PhraseLocation))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 864; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4cdec_2sa_3_sa_PhraseLocation))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 872; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_suffix_loc = ((struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":866 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":874 * suffix_loc = suffix_node.phrase_location * * result = self.get_precomputed_collocation(phrase) # <<<<<<<<<<<<<< * if result is not None: * intersect_method = "precomputed" */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_precomputed_collocation); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_precomputed_collocation); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 874; __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[8]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_phrase)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_phrase)); __Pyx_GIVEREF(((PyObject *)__pyx_v_phrase)); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_4cdec_2sa_3_sa_PhraseLocation))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 866; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_4cdec_2sa_3_sa_PhraseLocation))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_result = ((struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *)__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":867 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":875 * * result = self.get_precomputed_collocation(phrase) * if result is not None: # <<<<<<<<<<<<<< @@ -47831,7 +47945,7 @@ static struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *__pyx_f_4cdec_2sa_3_sa_23 __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":868 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":876 * result = self.get_precomputed_collocation(phrase) * if result is not None: * intersect_method = "precomputed" # <<<<<<<<<<<<<< @@ -47844,7 +47958,7 @@ static struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *__pyx_f_4cdec_2sa_3_sa_23 } __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":870 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":878 * intersect_method = "precomputed" * * if result is None: # <<<<<<<<<<<<<< @@ -47855,7 +47969,7 @@ static struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *__pyx_f_4cdec_2sa_3_sa_23 __pyx_t_4 = (__pyx_t_5 != 0); if (__pyx_t_4) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":871 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":879 * * if result is None: * if self.use_baeza_yates: # <<<<<<<<<<<<<< @@ -47865,20 +47979,20 @@ static struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *__pyx_f_4cdec_2sa_3_sa_23 __pyx_t_4 = (__pyx_v_self->use_baeza_yates != 0); if (__pyx_t_4) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":872 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":880 * if result is None: * if self.use_baeza_yates: * result = self.intersect_helper(prefix, suffix, prefix_loc, suffix_loc, BAEZA_YATES) # <<<<<<<<<<<<<< * intersect_method="double binary" * else: */ - __pyx_t_3 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->intersect_helper(__pyx_v_self, __pyx_v_prefix, __pyx_v_suffix, __pyx_v_prefix_loc, __pyx_v_suffix_loc, __pyx_v_4cdec_2sa_3_sa_BAEZA_YATES); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 872; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->intersect_helper(__pyx_v_self, __pyx_v_prefix, __pyx_v_suffix, __pyx_v_prefix_loc, __pyx_v_suffix_loc, __pyx_v_4cdec_2sa_3_sa_BAEZA_YATES); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_4cdec_2sa_3_sa_PhraseLocation))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 872; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_4cdec_2sa_3_sa_PhraseLocation))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF_SET(__pyx_v_result, ((struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *)__pyx_t_3)); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":873 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":881 * if self.use_baeza_yates: * result = self.intersect_helper(prefix, suffix, prefix_loc, suffix_loc, BAEZA_YATES) * intersect_method="double binary" # <<<<<<<<<<<<<< @@ -47891,20 +48005,20 @@ static struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *__pyx_f_4cdec_2sa_3_sa_23 } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":875 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":883 * intersect_method="double binary" * else: * result = self.intersect_helper(prefix, suffix, prefix_loc, suffix_loc, MERGE) # <<<<<<<<<<<<<< * intersect_method="merge" * return result */ - __pyx_t_3 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->intersect_helper(__pyx_v_self, __pyx_v_prefix, __pyx_v_suffix, __pyx_v_prefix_loc, __pyx_v_suffix_loc, __pyx_v_4cdec_2sa_3_sa_MERGE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->intersect_helper(__pyx_v_self, __pyx_v_prefix, __pyx_v_suffix, __pyx_v_prefix_loc, __pyx_v_suffix_loc, __pyx_v_4cdec_2sa_3_sa_MERGE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 883; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_4cdec_2sa_3_sa_PhraseLocation))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_4cdec_2sa_3_sa_PhraseLocation))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 883; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF_SET(__pyx_v_result, ((struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *)__pyx_t_3)); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":876 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":884 * else: * result = self.intersect_helper(prefix, suffix, prefix_loc, suffix_loc, MERGE) * intersect_method="merge" # <<<<<<<<<<<<<< @@ -47919,7 +48033,7 @@ static struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *__pyx_f_4cdec_2sa_3_sa_23 } __pyx_L4:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":877 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":885 * result = self.intersect_helper(prefix, suffix, prefix_loc, suffix_loc, MERGE) * intersect_method="merge" * return result # <<<<<<<<<<<<<< @@ -47931,7 +48045,7 @@ static struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *__pyx_f_4cdec_2sa_3_sa_23 __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":857 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":865 * return result * * cdef PhraseLocation intersect(self, prefix_node, suffix_node, Phrase phrase): # <<<<<<<<<<<<<< @@ -47958,7 +48072,7 @@ static struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *__pyx_f_4cdec_2sa_3_sa_23 return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":879 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":887 * return result * * def advance(self, frontier, res, fwords): # <<<<<<<<<<<<<< @@ -47999,16 +48113,16 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_13advance(PyO case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_res)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("advance", 1, 3, 3, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 879; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("advance", 1, 3, 3, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fwords)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("advance", 1, 3, 3, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 879; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("advance", 1, 3, 3, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "advance") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 879; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "advance") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -48023,7 +48137,7 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_13advance(PyO } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("advance", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 879; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("advance", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.advance", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -48069,19 +48183,19 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12advance(str int __pyx_clineno = 0; __Pyx_RefNannySetupContext("advance", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":881 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":889 * def advance(self, frontier, res, fwords): * cdef unsigned na * nf = [] # <<<<<<<<<<<<<< * for toskip, (i, alt, pathlen) in frontier: * spanlen = fwords[i][alt][2] */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 881; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_nf = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":882 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":890 * cdef unsigned na * nf = [] * for toskip, (i, alt, pathlen) in frontier: # <<<<<<<<<<<<<< @@ -48092,7 +48206,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12advance(str __pyx_t_1 = __pyx_v_frontier; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = NULL; } else { - __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_frontier); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_frontier); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; } @@ -48100,16 +48214,16 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12advance(str if (!__pyx_t_3 && PyList_CheckExact(__pyx_t_1)) { if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_3 && PyTuple_CheckExact(__pyx_t_1)) { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_4 = __pyx_t_3(__pyx_t_1); @@ -48117,7 +48231,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12advance(str 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[8]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -48133,7 +48247,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12advance(str if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { @@ -48146,15 +48260,15 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12advance(str __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); #else - __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; - __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext; @@ -48162,7 +48276,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12advance(str __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L6_unpacking_done; @@ -48170,7 +48284,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12advance(str __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L6_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_toskip, __pyx_t_5); @@ -48185,7 +48299,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12advance(str if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { @@ -48201,17 +48315,17 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12advance(str __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(__pyx_t_10); #else - __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); - __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); - __pyx_t_10 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); #endif __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { Py_ssize_t index = -1; - __pyx_t_11 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_8 = Py_TYPE(__pyx_t_11)->tp_iternext; @@ -48221,7 +48335,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12advance(str __Pyx_GOTREF(__pyx_t_9); index = 2; __pyx_t_10 = __pyx_t_8(__pyx_t_11); if (unlikely(!__pyx_t_10)) goto __pyx_L7_unpacking_failed; __Pyx_GOTREF(__pyx_t_10); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_11), 3) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_11), 3) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L8_unpacking_done; @@ -48229,7 +48343,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12advance(str __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L8_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_7); @@ -48239,44 +48353,44 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12advance(str __Pyx_XDECREF_SET(__pyx_v_pathlen, __pyx_t_10); __pyx_t_10 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":883 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":891 * nf = [] * for toskip, (i, alt, pathlen) in frontier: * spanlen = fwords[i][alt][2] # <<<<<<<<<<<<<< * if toskip == 0: * res.append((i, alt, pathlen)) */ - __pyx_t_4 = PyObject_GetItem(__pyx_v_fwords, __pyx_v_i); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 883; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_4 = PyObject_GetItem(__pyx_v_fwords, __pyx_v_i); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = PyObject_GetItem(__pyx_t_4, __pyx_v_alt); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 883; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_6 = PyObject_GetItem(__pyx_t_4, __pyx_v_alt); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_6, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 883; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_6, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF_SET(__pyx_v_spanlen, __pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":884 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":892 * for toskip, (i, alt, pathlen) in frontier: * spanlen = fwords[i][alt][2] * if toskip == 0: # <<<<<<<<<<<<<< * res.append((i, alt, pathlen)) * ni = i + spanlen */ - __pyx_t_4 = PyObject_RichCompare(__pyx_v_toskip, __pyx_int_0, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyObject_RichCompare(__pyx_v_toskip, __pyx_int_0, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_12) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":885 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":893 * spanlen = fwords[i][alt][2] * if toskip == 0: * res.append((i, alt, pathlen)) # <<<<<<<<<<<<<< * ni = i + spanlen * if ni < len(fwords) and pathlen + 1 < self.max_initial_size: */ - __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_i); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_i); @@ -48287,47 +48401,47 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12advance(str __Pyx_INCREF(__pyx_v_pathlen); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_pathlen); __Pyx_GIVEREF(__pyx_v_pathlen); - __pyx_t_13 = __Pyx_PyObject_Append(__pyx_v_res, __pyx_t_4); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 885; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_13 = __Pyx_PyObject_Append(__pyx_v_res, __pyx_t_4); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L9; } __pyx_L9:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":886 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":894 * if toskip == 0: * res.append((i, alt, pathlen)) * ni = i + spanlen # <<<<<<<<<<<<<< * if ni < len(fwords) and pathlen + 1 < self.max_initial_size: * for na in range(len(fwords[ni])): */ - __pyx_t_4 = PyNumber_Add(__pyx_v_i, __pyx_v_spanlen); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 886; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyNumber_Add(__pyx_v_i, __pyx_v_spanlen); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_ni, __pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":887 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":895 * res.append((i, alt, pathlen)) * ni = i + spanlen * if ni < len(fwords) and pathlen + 1 < self.max_initial_size: # <<<<<<<<<<<<<< * for na in range(len(fwords[ni])): * nf.append((toskip - 1, (ni, na, pathlen + 1))) */ - __pyx_t_14 = PyObject_Length(__pyx_v_fwords); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_14); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_14 = PyObject_Length(__pyx_v_fwords); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 895; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_14); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 895; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = PyObject_RichCompare(__pyx_v_ni, __pyx_t_4, Py_LT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyObject_RichCompare(__pyx_v_ni, __pyx_t_4, Py_LT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 895; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 895; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_12) { - __pyx_t_6 = PyNumber_Add(__pyx_v_pathlen, __pyx_int_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyNumber_Add(__pyx_v_pathlen, __pyx_int_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 895; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_self->max_initial_size); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_self->max_initial_size); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 895; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyObject_RichCompare(__pyx_t_6, __pyx_t_4, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyObject_RichCompare(__pyx_t_6, __pyx_t_4, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 895; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_15 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 895; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_16 = __pyx_t_15; } else { @@ -48335,34 +48449,34 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12advance(str } if (__pyx_t_16) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":888 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":896 * ni = i + spanlen * if ni < len(fwords) and pathlen + 1 < self.max_initial_size: * for na in range(len(fwords[ni])): # <<<<<<<<<<<<<< * nf.append((toskip - 1, (ni, na, pathlen + 1))) * if len(nf) > 0: */ - __pyx_t_5 = PyObject_GetItem(__pyx_v_fwords, __pyx_v_ni); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_5 = PyObject_GetItem(__pyx_v_fwords, __pyx_v_ni); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_5); - __pyx_t_14 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_14 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 896; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_14; __pyx_t_17+=1) { __pyx_v_na = __pyx_t_17; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":889 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":897 * if ni < len(fwords) and pathlen + 1 < self.max_initial_size: * for na in range(len(fwords[ni])): * nf.append((toskip - 1, (ni, na, pathlen + 1))) # <<<<<<<<<<<<<< * if len(nf) > 0: * return self.advance(nf, res, fwords) */ - __pyx_t_5 = PyNumber_Subtract(__pyx_v_toskip, __pyx_int_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyNumber_Subtract(__pyx_v_toskip, __pyx_int_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 897; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_na); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_na); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 897; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = PyNumber_Add(__pyx_v_pathlen, __pyx_int_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyNumber_Add(__pyx_v_pathlen, __pyx_int_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 897; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 897; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(__pyx_v_ni); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_ni); @@ -48373,7 +48487,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12advance(str __Pyx_GIVEREF(__pyx_t_6); __pyx_t_4 = 0; __pyx_t_6 = 0; - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 897; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); @@ -48381,7 +48495,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12advance(str __Pyx_GIVEREF(__pyx_t_10); __pyx_t_5 = 0; __pyx_t_10 = 0; - __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_nf, __pyx_t_6); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_nf, __pyx_t_6); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 897; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } goto __pyx_L10; @@ -48390,18 +48504,18 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12advance(str } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":890 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":898 * for na in range(len(fwords[ni])): * nf.append((toskip - 1, (ni, na, pathlen + 1))) * if len(nf) > 0: # <<<<<<<<<<<<<< * return self.advance(nf, res, fwords) * else: */ - __pyx_t_2 = PyList_GET_SIZE(__pyx_v_nf); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyList_GET_SIZE(__pyx_v_nf); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 898; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_16 = ((__pyx_t_2 > 0) != 0); if (__pyx_t_16) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":891 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":899 * nf.append((toskip - 1, (ni, na, pathlen + 1))) * if len(nf) > 0: * return self.advance(nf, res, fwords) # <<<<<<<<<<<<<< @@ -48409,9 +48523,9 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12advance(str * return res */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_advance); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_advance); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_nf); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_nf); @@ -48422,7 +48536,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12advance(str __Pyx_INCREF(__pyx_v_fwords); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_fwords); __Pyx_GIVEREF(__pyx_v_fwords); - __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 891; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -48432,7 +48546,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12advance(str } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":893 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":901 * return self.advance(nf, res, fwords) * else: * return res # <<<<<<<<<<<<<< @@ -48445,7 +48559,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12advance(str goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":879 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":887 * return result * * def advance(self, frontier, res, fwords): # <<<<<<<<<<<<<< @@ -48478,7 +48592,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12advance(str return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":895 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":903 * return res * * def get_all_nodes_isteps_away(self, skip, i, spanlen, pathlen, fwords, next_states, reachable_buffer): # <<<<<<<<<<<<<< @@ -48527,36 +48641,36 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_15get_all_nod case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("get_all_nodes_isteps_away", 1, 7, 7, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 895; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("get_all_nodes_isteps_away", 1, 7, 7, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 903; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_spanlen)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("get_all_nodes_isteps_away", 1, 7, 7, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 895; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("get_all_nodes_isteps_away", 1, 7, 7, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 903; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_pathlen)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("get_all_nodes_isteps_away", 1, 7, 7, 3); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 895; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("get_all_nodes_isteps_away", 1, 7, 7, 3); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 903; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fwords)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("get_all_nodes_isteps_away", 1, 7, 7, 4); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 895; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("get_all_nodes_isteps_away", 1, 7, 7, 4); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 903; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 5: if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_next_states)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("get_all_nodes_isteps_away", 1, 7, 7, 5); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 895; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("get_all_nodes_isteps_away", 1, 7, 7, 5); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 903; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 6: if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_reachable_buffer)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("get_all_nodes_isteps_away", 1, 7, 7, 6); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 895; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("get_all_nodes_isteps_away", 1, 7, 7, 6); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 903; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_all_nodes_isteps_away") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 895; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_all_nodes_isteps_away") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 903; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 7) { goto __pyx_L5_argtuple_error; @@ -48579,7 +48693,7 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_15get_all_nod } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("get_all_nodes_isteps_away", 1, 7, 7, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 895; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("get_all_nodes_isteps_away", 1, 7, 7, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 903; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.get_all_nodes_isteps_away", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -48622,41 +48736,41 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_14get_all_nod int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_all_nodes_isteps_away", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":897 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":905 * def get_all_nodes_isteps_away(self, skip, i, spanlen, pathlen, fwords, next_states, reachable_buffer): * cdef unsigned alt_it * frontier = [] # <<<<<<<<<<<<<< * if i+spanlen+skip >= len(next_states): * return frontier */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 897; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 905; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_frontier = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":898 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":906 * cdef unsigned alt_it * frontier = [] * if i+spanlen+skip >= len(next_states): # <<<<<<<<<<<<<< * return frontier * key = tuple([i,spanlen]) */ - __pyx_t_1 = PyNumber_Add(__pyx_v_i, __pyx_v_spanlen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 898; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyNumber_Add(__pyx_v_i, __pyx_v_spanlen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_v_skip); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 898; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_v_skip); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_3 = PyObject_Length(__pyx_v_next_states); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 898; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 898; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_Length(__pyx_v_next_states); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_GE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 898; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_GE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 898; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_5) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":899 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":907 * frontier = [] * if i+spanlen+skip >= len(next_states): * return frontier # <<<<<<<<<<<<<< @@ -48669,14 +48783,14 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_14get_all_nod goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":900 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":908 * if i+spanlen+skip >= len(next_states): * return frontier * key = tuple([i,spanlen]) # <<<<<<<<<<<<<< * reachable = [] * if key in reachable_buffer: */ - __pyx_t_4 = PyList_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyList_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_i); PyList_SET_ITEM(__pyx_t_4, 0, __pyx_v_i); @@ -48684,43 +48798,43 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_14get_all_nod __Pyx_INCREF(__pyx_v_spanlen); PyList_SET_ITEM(__pyx_t_4, 1, __pyx_v_spanlen); __Pyx_GIVEREF(__pyx_v_spanlen); - __pyx_t_1 = PyList_AsTuple(((PyObject*)__pyx_t_4)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 900; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_AsTuple(((PyObject*)__pyx_t_4)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_key = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":901 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":909 * return frontier * key = tuple([i,spanlen]) * reachable = [] # <<<<<<<<<<<<<< * if key in reachable_buffer: * reachable = reachable_buffer[key] */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 909; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_reachable = __pyx_t_1; __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":902 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":910 * key = tuple([i,spanlen]) * reachable = [] * if key in reachable_buffer: # <<<<<<<<<<<<<< * reachable = reachable_buffer[key] * else: */ - __pyx_t_5 = (__Pyx_PySequence_Contains(__pyx_v_key, __pyx_v_reachable_buffer, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = (__Pyx_PySequence_Contains(__pyx_v_key, __pyx_v_reachable_buffer, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 910; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":903 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":911 * reachable = [] * if key in reachable_buffer: * reachable = reachable_buffer[key] # <<<<<<<<<<<<<< * else: * reachable = self.reachable(fwords, i, spanlen) */ - __pyx_t_1 = PyObject_GetItem(__pyx_v_reachable_buffer, __pyx_v_key); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 903; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = PyObject_GetItem(__pyx_v_reachable_buffer, __pyx_v_key); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 911; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_reachable, __pyx_t_1); __pyx_t_1 = 0; @@ -48728,16 +48842,16 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_14get_all_nod } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":905 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":913 * reachable = reachable_buffer[key] * else: * reachable = self.reachable(fwords, i, spanlen) # <<<<<<<<<<<<<< * reachable_buffer[key] = reachable * for nextreachable in reachable: */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reachable); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 905; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reachable); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 905; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_fwords); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_fwords); @@ -48748,25 +48862,25 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_14get_all_nod __Pyx_INCREF(__pyx_v_spanlen); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_spanlen); __Pyx_GIVEREF(__pyx_v_spanlen); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 905; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_reachable, __pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":906 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":914 * else: * reachable = self.reachable(fwords, i, spanlen) * reachable_buffer[key] = reachable # <<<<<<<<<<<<<< * for nextreachable in reachable: * for next_id in next_states[nextreachable]: */ - if (unlikely(PyObject_SetItem(__pyx_v_reachable_buffer, __pyx_v_key, __pyx_v_reachable) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(PyObject_SetItem(__pyx_v_reachable_buffer, __pyx_v_key, __pyx_v_reachable) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L4:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":907 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":915 * reachable = self.reachable(fwords, i, spanlen) * reachable_buffer[key] = reachable * for nextreachable in reachable: # <<<<<<<<<<<<<< @@ -48777,7 +48891,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_14get_all_nod __pyx_t_2 = __pyx_v_reachable; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; __pyx_t_7 = NULL; } else { - __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_reachable); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_reachable); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 915; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = Py_TYPE(__pyx_t_2)->tp_iternext; } @@ -48785,16 +48899,16 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_14get_all_nod if (!__pyx_t_7 && PyList_CheckExact(__pyx_t_2)) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 915; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 915; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_7 && PyTuple_CheckExact(__pyx_t_2)) { if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 915; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 915; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_4 = __pyx_t_7(__pyx_t_2); @@ -48802,7 +48916,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_14get_all_nod 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[8]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 915; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -48811,20 +48925,20 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_14get_all_nod __Pyx_XDECREF_SET(__pyx_v_nextreachable, __pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":908 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":916 * reachable_buffer[key] = reachable * for nextreachable in reachable: * for next_id in next_states[nextreachable]: # <<<<<<<<<<<<<< * jump = self.shortest(fwords,i,next_id) * if jump < skip: */ - __pyx_t_4 = PyObject_GetItem(__pyx_v_next_states, __pyx_v_nextreachable); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_4 = PyObject_GetItem(__pyx_v_next_states, __pyx_v_nextreachable); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 916; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); if (PyList_CheckExact(__pyx_t_4) || PyTuple_CheckExact(__pyx_t_4)) { __pyx_t_1 = __pyx_t_4; __Pyx_INCREF(__pyx_t_1); __pyx_t_8 = 0; __pyx_t_9 = NULL; } else { - __pyx_t_8 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 916; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = Py_TYPE(__pyx_t_1)->tp_iternext; } @@ -48833,16 +48947,16 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_14get_all_nod if (!__pyx_t_9 && PyList_CheckExact(__pyx_t_1)) { if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 916; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 916; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_9 && PyTuple_CheckExact(__pyx_t_1)) { if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 916; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 916; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_4 = __pyx_t_9(__pyx_t_1); @@ -48850,7 +48964,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_14get_all_nod 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[8]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 916; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -48859,16 +48973,16 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_14get_all_nod __Pyx_XDECREF_SET(__pyx_v_next_id, __pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":909 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":917 * for nextreachable in reachable: * for next_id in next_states[nextreachable]: * jump = self.shortest(fwords,i,next_id) # <<<<<<<<<<<<<< * if jump < skip: * continue */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_shortest); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 909; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_shortest); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 909; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(__pyx_v_fwords); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_fwords); @@ -48879,26 +48993,26 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_14get_all_nod __Pyx_INCREF(__pyx_v_next_id); PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_v_next_id); __Pyx_GIVEREF(__pyx_v_next_id); - __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_10, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 909; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_10, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF_SET(__pyx_v_jump, __pyx_t_11); __pyx_t_11 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":910 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":918 * for next_id in next_states[nextreachable]: * jump = self.shortest(fwords,i,next_id) * if jump < skip: # <<<<<<<<<<<<<< * continue * if pathlen+jump <= self.max_initial_size: */ - __pyx_t_11 = PyObject_RichCompare(__pyx_v_jump, __pyx_v_skip, Py_LT); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 910; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 910; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = PyObject_RichCompare(__pyx_v_jump, __pyx_v_skip, Py_LT); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (__pyx_t_6) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":911 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":919 * jump = self.shortest(fwords,i,next_id) * if jump < skip: * continue # <<<<<<<<<<<<<< @@ -48908,74 +49022,74 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_14get_all_nod goto __pyx_L7_continue; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":912 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":920 * if jump < skip: * continue * if pathlen+jump <= self.max_initial_size: # <<<<<<<<<<<<<< * for alt_id in range(len(fwords[next_id])): * if fwords[next_id][alt_id][0] != EPSILON: */ - __pyx_t_11 = PyNumber_Add(__pyx_v_pathlen, __pyx_v_jump); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = PyNumber_Add(__pyx_v_pathlen, __pyx_v_jump); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); - __pyx_t_10 = __Pyx_PyInt_From_int(__pyx_v_self->max_initial_size); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = __Pyx_PyInt_From_int(__pyx_v_self->max_initial_size); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); - __pyx_t_4 = PyObject_RichCompare(__pyx_t_11, __pyx_t_10, Py_LE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyObject_RichCompare(__pyx_t_11, __pyx_t_10, Py_LE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":913 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":921 * continue * if pathlen+jump <= self.max_initial_size: * for alt_id in range(len(fwords[next_id])): # <<<<<<<<<<<<<< * if fwords[next_id][alt_id][0] != EPSILON: * newel = (next_id,alt_id,pathlen+jump) */ - __pyx_t_4 = PyObject_GetItem(__pyx_v_fwords, __pyx_v_next_id); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_4 = PyObject_GetItem(__pyx_v_fwords, __pyx_v_next_id); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); - __pyx_t_12 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 913; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_12 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_12; __pyx_t_13+=1) { __pyx_v_alt_id = __pyx_t_13; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":914 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":922 * if pathlen+jump <= self.max_initial_size: * for alt_id in range(len(fwords[next_id])): * if fwords[next_id][alt_id][0] != EPSILON: # <<<<<<<<<<<<<< * newel = (next_id,alt_id,pathlen+jump) * if newel not in frontier: */ - __pyx_t_4 = PyObject_GetItem(__pyx_v_fwords, __pyx_v_next_id); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_4 = PyObject_GetItem(__pyx_v_fwords, __pyx_v_next_id); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); - __pyx_t_10 = __Pyx_GetItemInt(__pyx_t_4, __pyx_v_alt_id, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_10 = __Pyx_GetItemInt(__pyx_t_4, __pyx_v_alt_id, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_10, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_10, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_10 = __Pyx_PyInt_From_int(__pyx_v_4cdec_2sa_3_sa_EPSILON); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = __Pyx_PyInt_From_int(__pyx_v_4cdec_2sa_3_sa_EPSILON); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); - __pyx_t_11 = PyObject_RichCompare(__pyx_t_4, __pyx_t_10, Py_NE); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = PyObject_RichCompare(__pyx_t_4, __pyx_t_10, Py_NE); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 914; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (__pyx_t_6) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":915 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":923 * for alt_id in range(len(fwords[next_id])): * if fwords[next_id][alt_id][0] != EPSILON: * newel = (next_id,alt_id,pathlen+jump) # <<<<<<<<<<<<<< * if newel not in frontier: * frontier.append((next_id,alt_id,pathlen+jump)) */ - __pyx_t_11 = PyInt_FromSsize_t(__pyx_v_alt_id); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 915; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = PyInt_FromSsize_t(__pyx_v_alt_id); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); - __pyx_t_10 = PyNumber_Add(__pyx_v_pathlen, __pyx_v_jump); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 915; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = PyNumber_Add(__pyx_v_pathlen, __pyx_v_jump); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); - __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 915; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_next_id); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_next_id); @@ -48989,29 +49103,29 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_14get_all_nod __Pyx_XDECREF_SET(__pyx_v_newel, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":916 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":924 * if fwords[next_id][alt_id][0] != EPSILON: * newel = (next_id,alt_id,pathlen+jump) * if newel not in frontier: # <<<<<<<<<<<<<< * frontier.append((next_id,alt_id,pathlen+jump)) * return frontier */ - __pyx_t_6 = (__Pyx_PySequence_Contains(__pyx_v_newel, __pyx_v_frontier, Py_NE)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 916; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = (__Pyx_PySequence_Contains(__pyx_v_newel, __pyx_v_frontier, Py_NE)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_5 = (__pyx_t_6 != 0); if (__pyx_t_5) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":917 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":925 * newel = (next_id,alt_id,pathlen+jump) * if newel not in frontier: * frontier.append((next_id,alt_id,pathlen+jump)) # <<<<<<<<<<<<<< * return frontier * */ - __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_alt_id); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_alt_id); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_10 = PyNumber_Add(__pyx_v_pathlen, __pyx_v_jump); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = PyNumber_Add(__pyx_v_pathlen, __pyx_v_jump); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); - __pyx_t_11 = PyTuple_New(3); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = PyTuple_New(3); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_INCREF(__pyx_v_next_id); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_next_id); @@ -49022,7 +49136,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_14get_all_nod __Pyx_GIVEREF(__pyx_t_10); __pyx_t_4 = 0; __pyx_t_10 = 0; - __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_frontier, __pyx_t_11); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_frontier, __pyx_t_11); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L14; } @@ -49040,7 +49154,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_14get_all_nod } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":918 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":926 * if newel not in frontier: * frontier.append((next_id,alt_id,pathlen+jump)) * return frontier # <<<<<<<<<<<<<< @@ -49052,7 +49166,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_14get_all_nod __pyx_r = __pyx_v_frontier; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":895 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":903 * return res * * def get_all_nodes_isteps_away(self, skip, i, spanlen, pathlen, fwords, next_states, reachable_buffer): # <<<<<<<<<<<<<< @@ -49082,7 +49196,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_14get_all_nod return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":920 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":928 * return frontier * * def reachable(self, fwords, ifrom, dist): # <<<<<<<<<<<<<< @@ -49123,16 +49237,16 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_17reachable(P case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ifrom)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("reachable", 1, 3, 3, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("reachable", 1, 3, 3, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_dist)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("reachable", 1, 3, 3, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("reachable", 1, 3, 3, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "reachable") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "reachable") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -49147,7 +49261,7 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_17reachable(P } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("reachable", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("reachable", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.reachable", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -49182,35 +49296,35 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_16reachable(s int __pyx_clineno = 0; __Pyx_RefNannySetupContext("reachable", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":921 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":929 * * def reachable(self, fwords, ifrom, dist): * ret = [] # <<<<<<<<<<<<<< * if ifrom >= len(fwords): * return ret */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_ret = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":922 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":930 * def reachable(self, fwords, ifrom, dist): * ret = [] * if ifrom >= len(fwords): # <<<<<<<<<<<<<< * return ret * for alt_id in range(len(fwords[ifrom])): */ - __pyx_t_2 = PyObject_Length(__pyx_v_fwords); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_Length(__pyx_v_fwords); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PyObject_RichCompare(__pyx_v_ifrom, __pyx_t_1, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_RichCompare(__pyx_v_ifrom, __pyx_t_1, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_4) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":923 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":931 * ret = [] * if ifrom >= len(fwords): * return ret # <<<<<<<<<<<<<< @@ -49223,65 +49337,65 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_16reachable(s goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":924 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":932 * if ifrom >= len(fwords): * return ret * for alt_id in range(len(fwords[ifrom])): # <<<<<<<<<<<<<< * if fwords[ifrom][alt_id][0] == EPSILON: * ret.extend(self.reachable(fwords,ifrom+fwords[ifrom][alt_id][2],dist)) */ - __pyx_t_3 = PyObject_GetItem(__pyx_v_fwords, __pyx_v_ifrom); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_3 = PyObject_GetItem(__pyx_v_fwords, __pyx_v_ifrom); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_2; __pyx_t_5+=1) { __pyx_v_alt_id = __pyx_t_5; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":925 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":933 * return ret * for alt_id in range(len(fwords[ifrom])): * if fwords[ifrom][alt_id][0] == EPSILON: # <<<<<<<<<<<<<< * ret.extend(self.reachable(fwords,ifrom+fwords[ifrom][alt_id][2],dist)) * else: */ - __pyx_t_3 = PyObject_GetItem(__pyx_v_fwords, __pyx_v_ifrom); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_3 = PyObject_GetItem(__pyx_v_fwords, __pyx_v_ifrom); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 933; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, __pyx_v_alt_id, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, __pyx_v_alt_id, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 933; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 933; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_4cdec_2sa_3_sa_EPSILON); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_4cdec_2sa_3_sa_EPSILON); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 933; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PyObject_RichCompare(__pyx_t_3, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyObject_RichCompare(__pyx_t_3, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 933; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 933; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_4) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":926 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":934 * for alt_id in range(len(fwords[ifrom])): * if fwords[ifrom][alt_id][0] == EPSILON: * ret.extend(self.reachable(fwords,ifrom+fwords[ifrom][alt_id][2],dist)) # <<<<<<<<<<<<<< * else: * if dist == 0: */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reachable); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reachable); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = PyObject_GetItem(__pyx_v_fwords, __pyx_v_ifrom); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = PyObject_GetItem(__pyx_v_fwords, __pyx_v_ifrom); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, __pyx_v_alt_id, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, __pyx_v_alt_id, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyNumber_Add(__pyx_v_ifrom, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyNumber_Add(__pyx_v_ifrom, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_fwords); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_fwords); @@ -49292,47 +49406,47 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_16reachable(s PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_dist); __Pyx_GIVEREF(__pyx_v_dist); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_7 = __Pyx_PyList_Extend(__pyx_v_ret, __pyx_t_3); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyList_Extend(__pyx_v_ret, __pyx_t_3); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L6; } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":928 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":936 * ret.extend(self.reachable(fwords,ifrom+fwords[ifrom][alt_id][2],dist)) * else: * if dist == 0: # <<<<<<<<<<<<<< * if ifrom not in ret: * ret.append(ifrom) */ - __pyx_t_3 = PyObject_RichCompare(__pyx_v_dist, __pyx_int_0, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_RichCompare(__pyx_v_dist, __pyx_int_0, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 936; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 936; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_4) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":929 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":937 * else: * if dist == 0: * if ifrom not in ret: # <<<<<<<<<<<<<< * ret.append(ifrom) * else: */ - __pyx_t_4 = (__Pyx_PySequence_Contains(__pyx_v_ifrom, __pyx_v_ret, Py_NE)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 929; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = (__Pyx_PySequence_Contains(__pyx_v_ifrom, __pyx_v_ret, Py_NE)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = (__pyx_t_4 != 0); if (__pyx_t_8) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":930 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":938 * if dist == 0: * if ifrom not in ret: * ret.append(ifrom) # <<<<<<<<<<<<<< * else: * for ifromchild in self.reachable(fwords,ifrom+fwords[ifrom][alt_id][2],dist-1): */ - __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_ret, __pyx_v_ifrom); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_ret, __pyx_v_ifrom); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 938; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L8; } __pyx_L8:; @@ -49340,29 +49454,29 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_16reachable(s } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":932 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":940 * ret.append(ifrom) * else: * for ifromchild in self.reachable(fwords,ifrom+fwords[ifrom][alt_id][2],dist-1): # <<<<<<<<<<<<<< * if ifromchild not in ret: * ret.append(ifromchild) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reachable); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reachable); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = PyObject_GetItem(__pyx_v_fwords, __pyx_v_ifrom); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = PyObject_GetItem(__pyx_v_fwords, __pyx_v_ifrom); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_1, __pyx_v_alt_id, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_1, __pyx_v_alt_id, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_6, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_6, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyNumber_Add(__pyx_v_ifrom, __pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyNumber_Add(__pyx_v_ifrom, __pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyNumber_Subtract(__pyx_v_dist, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyNumber_Subtract(__pyx_v_dist, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_v_fwords); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_fwords); @@ -49373,7 +49487,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_16reachable(s __Pyx_GIVEREF(__pyx_t_1); __pyx_t_6 = 0; __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; @@ -49381,7 +49495,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_16reachable(s __pyx_t_9 = __pyx_t_1; __Pyx_INCREF(__pyx_t_9); __pyx_t_10 = 0; __pyx_t_11 = NULL; } else { - __pyx_t_10 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_t_11 = Py_TYPE(__pyx_t_9)->tp_iternext; } @@ -49390,16 +49504,16 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_16reachable(s if (!__pyx_t_11 && PyList_CheckExact(__pyx_t_9)) { if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_9)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_10); __Pyx_INCREF(__pyx_t_1); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_10); __Pyx_INCREF(__pyx_t_1); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_9, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySequence_ITEM(__pyx_t_9, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_11 && PyTuple_CheckExact(__pyx_t_9)) { if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_9)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_10); __Pyx_INCREF(__pyx_t_1); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_10); __Pyx_INCREF(__pyx_t_1); __pyx_t_10++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_9, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySequence_ITEM(__pyx_t_9, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_1 = __pyx_t_11(__pyx_t_9); @@ -49407,7 +49521,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_16reachable(s 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[8]; __pyx_lineno = 932; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -49416,25 +49530,25 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_16reachable(s __Pyx_XDECREF_SET(__pyx_v_ifromchild, __pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":933 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":941 * else: * for ifromchild in self.reachable(fwords,ifrom+fwords[ifrom][alt_id][2],dist-1): * if ifromchild not in ret: # <<<<<<<<<<<<<< * ret.append(ifromchild) * */ - __pyx_t_8 = (__Pyx_PySequence_Contains(__pyx_v_ifromchild, __pyx_v_ret, Py_NE)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 933; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = (__Pyx_PySequence_Contains(__pyx_v_ifromchild, __pyx_v_ret, Py_NE)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 941; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = (__pyx_t_8 != 0); if (__pyx_t_4) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":934 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":942 * for ifromchild in self.reachable(fwords,ifrom+fwords[ifrom][alt_id][2],dist-1): * if ifromchild not in ret: * ret.append(ifromchild) # <<<<<<<<<<<<<< * * return ret */ - __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_ret, __pyx_v_ifromchild); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_ret, __pyx_v_ifromchild); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 942; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L11; } __pyx_L11:; @@ -49446,7 +49560,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_16reachable(s __pyx_L6:; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":936 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":944 * ret.append(ifromchild) * * return ret # <<<<<<<<<<<<<< @@ -49458,7 +49572,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_16reachable(s __pyx_r = __pyx_v_ret; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":920 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":928 * return frontier * * def reachable(self, fwords, ifrom, dist): # <<<<<<<<<<<<<< @@ -49482,7 +49596,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_16reachable(s return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":938 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":946 * return ret * * def shortest(self, fwords, ifrom, ito): # <<<<<<<<<<<<<< @@ -49523,16 +49637,16 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_19shortest(Py case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ifrom)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("shortest", 1, 3, 3, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 938; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("shortest", 1, 3, 3, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ito)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("shortest", 1, 3, 3, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 938; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("shortest", 1, 3, 3, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "shortest") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 938; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "shortest") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -49547,7 +49661,7 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_19shortest(Py } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("shortest", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 938; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("shortest", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.shortest", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -49577,7 +49691,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_18shortest(st int __pyx_clineno = 0; __Pyx_RefNannySetupContext("shortest", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":940 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":948 * def shortest(self, fwords, ifrom, ito): * cdef unsigned alt_id * min = 1000 # <<<<<<<<<<<<<< @@ -49587,19 +49701,19 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_18shortest(st __Pyx_INCREF(__pyx_int_1000); __pyx_v_min = __pyx_int_1000; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":941 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":949 * cdef unsigned alt_id * min = 1000 * if ifrom > ito: # <<<<<<<<<<<<<< * return min * if ifrom == ito: */ - __pyx_t_1 = PyObject_RichCompare(__pyx_v_ifrom, __pyx_v_ito, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 941; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 941; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_RichCompare(__pyx_v_ifrom, __pyx_v_ito, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 949; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 949; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":942 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":950 * min = 1000 * if ifrom > ito: * return min # <<<<<<<<<<<<<< @@ -49612,19 +49726,19 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_18shortest(st goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":943 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":951 * if ifrom > ito: * return min * if ifrom == ito: # <<<<<<<<<<<<<< * return 0 * for alt_id in range(len(fwords[ifrom])): */ - __pyx_t_1 = PyObject_RichCompare(__pyx_v_ifrom, __pyx_v_ito, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 943; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 943; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_RichCompare(__pyx_v_ifrom, __pyx_v_ito, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 951; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 951; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":944 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":952 * return min * if ifrom == ito: * return 0 # <<<<<<<<<<<<<< @@ -49637,41 +49751,41 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_18shortest(st goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":945 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":953 * if ifrom == ito: * return 0 * for alt_id in range(len(fwords[ifrom])): # <<<<<<<<<<<<<< * currmin = self.shortest(fwords,ifrom+fwords[ifrom][alt_id][2],ito) * if fwords[ifrom][alt_id][0] != EPSILON: */ - __pyx_t_1 = PyObject_GetItem(__pyx_v_fwords, __pyx_v_ifrom); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = PyObject_GetItem(__pyx_v_fwords, __pyx_v_ifrom); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 953; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 945; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 953; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_alt_id = __pyx_t_4; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":946 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":954 * return 0 * for alt_id in range(len(fwords[ifrom])): * currmin = self.shortest(fwords,ifrom+fwords[ifrom][alt_id][2],ito) # <<<<<<<<<<<<<< * if fwords[ifrom][alt_id][0] != EPSILON: * currmin += 1 */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_shortest); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_shortest); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = PyObject_GetItem(__pyx_v_fwords, __pyx_v_ifrom); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_5 = PyObject_GetItem(__pyx_v_fwords, __pyx_v_ifrom); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_5, __pyx_v_alt_id, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_5, __pyx_v_alt_id, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_6, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_6, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyNumber_Add(__pyx_v_ifrom, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyNumber_Add(__pyx_v_ifrom, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_fwords); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_fwords); @@ -49682,45 +49796,45 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_18shortest(st PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_ito); __Pyx_GIVEREF(__pyx_v_ito); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF_SET(__pyx_v_currmin, __pyx_t_6); __pyx_t_6 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":947 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":955 * for alt_id in range(len(fwords[ifrom])): * currmin = self.shortest(fwords,ifrom+fwords[ifrom][alt_id][2],ito) * if fwords[ifrom][alt_id][0] != EPSILON: # <<<<<<<<<<<<<< * currmin += 1 * if currmin < min: */ - __pyx_t_6 = PyObject_GetItem(__pyx_v_fwords, __pyx_v_ifrom); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 947; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_6 = PyObject_GetItem(__pyx_v_fwords, __pyx_v_ifrom); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_6, __pyx_v_alt_id, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 947; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_6, __pyx_v_alt_id, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 947; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_4cdec_2sa_3_sa_EPSILON); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 947; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_4cdec_2sa_3_sa_EPSILON); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = PyObject_RichCompare(__pyx_t_6, __pyx_t_5, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 947; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_RichCompare(__pyx_t_6, __pyx_t_5, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 947; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":948 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":956 * currmin = self.shortest(fwords,ifrom+fwords[ifrom][alt_id][2],ito) * if fwords[ifrom][alt_id][0] != EPSILON: * currmin += 1 # <<<<<<<<<<<<<< * if currmin < min: * min = currmin */ - __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_currmin, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 948; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_currmin, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_currmin, __pyx_t_1); __pyx_t_1 = 0; @@ -49728,19 +49842,19 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_18shortest(st } __pyx_L7:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":949 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":957 * if fwords[ifrom][alt_id][0] != EPSILON: * currmin += 1 * if currmin < min: # <<<<<<<<<<<<<< * min = currmin * return min */ - __pyx_t_1 = PyObject_RichCompare(__pyx_v_currmin, __pyx_v_min, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 949; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 949; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_RichCompare(__pyx_v_currmin, __pyx_v_min, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":950 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":958 * currmin += 1 * if currmin < min: * min = currmin # <<<<<<<<<<<<<< @@ -49754,7 +49868,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_18shortest(st __pyx_L8:; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":951 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":959 * if currmin < min: * min = currmin * return min # <<<<<<<<<<<<<< @@ -49766,7 +49880,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_18shortest(st __pyx_r = __pyx_v_min; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":938 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":946 * return ret * * def shortest(self, fwords, ifrom, ito): # <<<<<<<<<<<<<< @@ -49789,7 +49903,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_18shortest(st return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":953 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":961 * return min * * def get_next_states(self, _columns, curr_idx, min_dist=2): # <<<<<<<<<<<<<< @@ -49831,7 +49945,7 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_21get_next_st case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_curr_idx)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("get_next_states", 0, 2, 3, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 953; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("get_next_states", 0, 2, 3, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { @@ -49840,7 +49954,7 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_21get_next_st } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_next_states") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 953; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_next_states") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -49857,7 +49971,7 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_21get_next_st } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("get_next_states", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 953; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("get_next_states", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.get_next_states", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -49895,26 +50009,26 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_20get_next_st int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_next_states", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":954 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":962 * * def get_next_states(self, _columns, curr_idx, min_dist=2): * result = [] # <<<<<<<<<<<<<< * candidate = [[curr_idx,0]] * */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_result = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":955 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":963 * def get_next_states(self, _columns, curr_idx, min_dist=2): * result = [] * candidate = [[curr_idx,0]] # <<<<<<<<<<<<<< * * while len(candidate) > 0: */ - __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 963; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_curr_idx); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_curr_idx); @@ -49922,7 +50036,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_20get_next_st __Pyx_INCREF(__pyx_int_0); PyList_SET_ITEM(__pyx_t_1, 1, __pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); - __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 955; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 963; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -49930,7 +50044,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_20get_next_st __pyx_v_candidate = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":957 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":965 * candidate = [[curr_idx,0]] * * while len(candidate) > 0: # <<<<<<<<<<<<<< @@ -49938,42 +50052,42 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_20get_next_st * if curr[0] >= len(_columns): */ while (1) { - __pyx_t_3 = PyList_GET_SIZE(__pyx_v_candidate); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 957; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyList_GET_SIZE(__pyx_v_candidate); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 965; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((__pyx_t_3 > 0) != 0); if (!__pyx_t_4) break; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":958 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":966 * * while len(candidate) > 0: * curr = candidate.pop() # <<<<<<<<<<<<<< * if curr[0] >= len(_columns): * continue */ - __pyx_t_2 = __Pyx_PyList_Pop(__pyx_v_candidate); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 958; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyList_Pop(__pyx_v_candidate); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 966; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_curr, __pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":959 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":967 * while len(candidate) > 0: * curr = candidate.pop() * if curr[0] >= len(_columns): # <<<<<<<<<<<<<< * continue * if curr[0] not in result and min_dist <= curr[1] <= self.max_initial_size: */ - __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_curr, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_curr, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 967; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyObject_Length(__pyx_v__columns); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_Length(__pyx_v__columns); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 967; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 967; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_GE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_GE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 967; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 967; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_4) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":960 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":968 * curr = candidate.pop() * if curr[0] >= len(_columns): * continue # <<<<<<<<<<<<<< @@ -49983,30 +50097,30 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_20get_next_st goto __pyx_L3_continue; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":961 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":969 * if curr[0] >= len(_columns): * continue * if curr[0] not in result and min_dist <= curr[1] <= self.max_initial_size: # <<<<<<<<<<<<<< * result.append(curr[0]); * curr_col = _columns[curr[0]] */ - __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_curr, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_curr, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = (__Pyx_PySequence_Contains(__pyx_t_5, __pyx_v_result, Py_NE)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = (__Pyx_PySequence_Contains(__pyx_t_5, __pyx_v_result, Py_NE)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_4) { - __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_curr, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_curr, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = PyObject_RichCompare(__pyx_v_min_dist, __pyx_t_5, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_RichCompare(__pyx_v_min_dist, __pyx_t_5, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_PyObject_IsTrue(__pyx_t_1)) { __Pyx_DECREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->max_initial_size); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->max_initial_size); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyObject_RichCompare(__pyx_t_5, __pyx_t_2, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_RichCompare(__pyx_t_5, __pyx_t_2, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_7 = __pyx_t_6; } else { @@ -50014,37 +50128,37 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_20get_next_st } if (__pyx_t_7) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":962 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":970 * continue * if curr[0] not in result and min_dist <= curr[1] <= self.max_initial_size: * result.append(curr[0]); # <<<<<<<<<<<<<< * curr_col = _columns[curr[0]] * for alt in curr_col: */ - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_curr, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_curr, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_1); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_1); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L6; } __pyx_L6:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":963 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":971 * if curr[0] not in result and min_dist <= curr[1] <= self.max_initial_size: * result.append(curr[0]); * curr_col = _columns[curr[0]] # <<<<<<<<<<<<<< * for alt in curr_col: * next_id = curr[0]+alt[2] */ - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_curr, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 963; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_curr, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = PyObject_GetItem(__pyx_v__columns, __pyx_t_1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 963; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_5 = PyObject_GetItem(__pyx_v__columns, __pyx_t_1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF_SET(__pyx_v_curr_col, __pyx_t_5); __pyx_t_5 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":964 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":972 * result.append(curr[0]); * curr_col = _columns[curr[0]] * for alt in curr_col: # <<<<<<<<<<<<<< @@ -50055,7 +50169,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_20get_next_st __pyx_t_5 = __pyx_v_curr_col; __Pyx_INCREF(__pyx_t_5); __pyx_t_3 = 0; __pyx_t_9 = NULL; } else { - __pyx_t_3 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_curr_col); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_curr_col); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_9 = Py_TYPE(__pyx_t_5)->tp_iternext; } @@ -50063,16 +50177,16 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_20get_next_st if (!__pyx_t_9 && PyList_CheckExact(__pyx_t_5)) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_5)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_9 && PyTuple_CheckExact(__pyx_t_5)) { if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_5)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_1 = __pyx_t_9(__pyx_t_5); @@ -50080,7 +50194,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_20get_next_st 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[8]; __pyx_lineno = 964; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -50089,25 +50203,25 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_20get_next_st __Pyx_XDECREF_SET(__pyx_v_alt, __pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":965 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":973 * curr_col = _columns[curr[0]] * for alt in curr_col: * next_id = curr[0]+alt[2] # <<<<<<<<<<<<<< * jump = 1 * if alt[0] == EPSILON: */ - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_curr, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 965; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_curr, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_alt, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 965; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_alt, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); - __pyx_t_10 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 965; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF_SET(__pyx_v_next_id, __pyx_t_10); __pyx_t_10 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":966 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":974 * for alt in curr_col: * next_id = curr[0]+alt[2] * jump = 1 # <<<<<<<<<<<<<< @@ -50117,25 +50231,25 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_20get_next_st __Pyx_INCREF(__pyx_int_1); __Pyx_XDECREF_SET(__pyx_v_jump, __pyx_int_1); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":967 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":975 * next_id = curr[0]+alt[2] * jump = 1 * if alt[0] == EPSILON: # <<<<<<<<<<<<<< * jump = 0 * if next_id not in result and min_dist <= curr[1]+jump <= self.max_initial_size+1: */ - __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_alt, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 967; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_alt, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_10); - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_4cdec_2sa_3_sa_EPSILON); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 967; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_4cdec_2sa_3_sa_EPSILON); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyObject_RichCompare(__pyx_t_10, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 967; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_RichCompare(__pyx_t_10, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 967; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 975; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_7) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":968 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":976 * jump = 1 * if alt[0] == EPSILON: * jump = 0 # <<<<<<<<<<<<<< @@ -50148,30 +50262,30 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_20get_next_st } __pyx_L9:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":969 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":977 * if alt[0] == EPSILON: * jump = 0 * if next_id not in result and min_dist <= curr[1]+jump <= self.max_initial_size+1: # <<<<<<<<<<<<<< * candidate.append([next_id,curr[1]+jump]) * return sorted(result); */ - __pyx_t_7 = (__Pyx_PySequence_Contains(__pyx_v_next_id, __pyx_v_result, Py_NE)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = (__Pyx_PySequence_Contains(__pyx_v_next_id, __pyx_v_result, Py_NE)); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 977; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_7) { - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_curr, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_curr, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 977; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_v_jump); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_v_jump); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 977; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_RichCompare(__pyx_v_min_dist, __pyx_t_2, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_RichCompare(__pyx_v_min_dist, __pyx_t_2, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 977; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_PyObject_IsTrue(__pyx_t_1)) { __Pyx_DECREF(__pyx_t_1); - __pyx_t_10 = __Pyx_PyInt_From_long((__pyx_v_self->max_initial_size + 1)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = __Pyx_PyInt_From_long((__pyx_v_self->max_initial_size + 1)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 977; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); - __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_t_10, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_t_10, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 977; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 969; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 977; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = __pyx_t_4; } else { @@ -50179,19 +50293,19 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_20get_next_st } if (__pyx_t_6) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":970 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":978 * jump = 0 * if next_id not in result and min_dist <= curr[1]+jump <= self.max_initial_size+1: * candidate.append([next_id,curr[1]+jump]) # <<<<<<<<<<<<<< * return sorted(result); * */ - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_curr, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_curr, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 978; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_v_jump); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_v_jump); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 978; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 978; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_next_id); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_next_id); @@ -50199,7 +50313,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_20get_next_st PyList_SET_ITEM(__pyx_t_1, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_candidate, __pyx_t_1); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 970; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_candidate, __pyx_t_1); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 978; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L10; } @@ -50209,7 +50323,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_20get_next_st __pyx_L3_continue:; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":971 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":979 * if next_id not in result and min_dist <= curr[1]+jump <= self.max_initial_size+1: * candidate.append([next_id,curr[1]+jump]) * return sorted(result); # <<<<<<<<<<<<<< @@ -50217,19 +50331,19 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_20get_next_st * def input(self, fwords, meta, ctx_name=None): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 979; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_result); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_result); __Pyx_GIVEREF(__pyx_v_result); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_sorted, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_sorted, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 979; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":953 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":961 * return min * * def get_next_states(self, _columns, curr_idx, min_dist=2): # <<<<<<<<<<<<<< @@ -50259,7 +50373,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_20get_next_st } static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":973 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":981 * return sorted(result); * * def input(self, fwords, meta, ctx_name=None): # <<<<<<<<<<<<<< @@ -50302,7 +50416,7 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_23input(PyObj case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_meta)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("input", 0, 2, 3, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("input", 0, 2, 3, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 981; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { @@ -50311,7 +50425,7 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_23input(PyObj } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "input") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "input") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 981; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -50328,7 +50442,7 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_23input(PyObj } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("input", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("input", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 981; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.input", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -50341,7 +50455,7 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_23input(PyObj return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1142 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1150 * if len(extracts) > 0: * fcount = Counter() * fphrases = defaultdict(lambda: defaultdict(lambda: defaultdict(list))) # <<<<<<<<<<<<<< @@ -50388,14 +50502,14 @@ static PyObject *__pyx_lambda_funcdef_lambda4(CYTHON_UNUSED PyObject *__pyx_self int __pyx_clineno = 0; __Pyx_RefNannySetupContext("lambda4", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_defaultdict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_defaultdict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1150; __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[8]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)((PyObject*)(&PyList_Type)))); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)((PyObject*)(&PyList_Type)))); __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyList_Type)))); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -50427,16 +50541,16 @@ static PyObject *__pyx_lambda_funcdef_lambda3(CYTHON_UNUSED PyObject *__pyx_self int __pyx_clineno = 0; __Pyx_RefNannySetupContext("lambda3", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_defaultdict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_defaultdict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cdec_2sa_3_sa_23HieroCachingRuleFactory_5input_7lambda3_lambda4, 0, __pyx_n_s_input_locals_lambda_locals_lambd, NULL, __pyx_n_s_cdec_sa__sa, PyModule_GetDict(__pyx_m), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cdec_2sa_3_sa_23HieroCachingRuleFactory_5input_7lambda3_lambda4, 0, __pyx_n_s_input_locals_lambda_locals_lambd, NULL, __pyx_n_s_cdec_sa__sa, PyModule_GetDict(__pyx_m), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -50457,7 +50571,7 @@ static PyObject *__pyx_lambda_funcdef_lambda3(CYTHON_UNUSED PyObject *__pyx_self return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1148 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1156 * for f, elist in fphrases.iteritems(): * for e, alslist in elist.iteritems(): * alignment, max_locs = max(alslist.iteritems(), key=lambda x: len(x[1])) # <<<<<<<<<<<<<< @@ -50489,11 +50603,11 @@ static PyObject *__pyx_lambda_funcdef_lambda5(CYTHON_UNUSED PyObject *__pyx_self int __pyx_clineno = 0; __Pyx_RefNannySetupContext("lambda5", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_x, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_x, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -50511,7 +50625,7 @@ static PyObject *__pyx_lambda_funcdef_lambda5(CYTHON_UNUSED PyObject *__pyx_self } static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_5input_4generator14(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1188 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1196 * if self.online: * stats = self.online_stats[ctx_name] * f_syms = tuple(word[0][0] for word in fwords) # <<<<<<<<<<<<<< @@ -50537,7 +50651,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_5input_2genex __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); { - __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_5input_4generator14, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_5input_4generator14, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -50578,13 +50692,13 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_5input_4gener return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fwords)) { __Pyx_RaiseClosureNameError("fwords"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fwords)) { __Pyx_RaiseClosureNameError("fwords"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fwords) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fwords)) { __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_fwords; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = NULL; } else { - __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fwords); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_fwords); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; } @@ -50592,16 +50706,16 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_5input_4gener if (!__pyx_t_3 && PyList_CheckExact(__pyx_t_1)) { if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_3 && PyTuple_CheckExact(__pyx_t_1)) { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_4 = __pyx_t_3(__pyx_t_1); @@ -50609,7 +50723,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_5input_4gener 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[8]; __pyx_lineno = 1188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -50619,9 +50733,9 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_5input_4gener __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_word, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_word, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_4 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_word, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_5; @@ -50641,7 +50755,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_5input_4gener __Pyx_XGOTREF(__pyx_t_1); __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; __pyx_t_3 = __pyx_cur_scope->__pyx_t_2; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -50661,7 +50775,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_5input_4gener return NULL; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":973 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":981 * return sorted(result); * * def input(self, fwords, meta, ctx_name=None): # <<<<<<<<<<<<<< @@ -50696,7 +50810,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_22input(struc __Pyx_INCREF(__pyx_cur_scope->__pyx_v_ctx_name); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_ctx_name); { - __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 981; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -50762,9 +50876,9 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 981; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":984 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":992 * cdef Phrase hiero_phrase * * flen = len(fwords) # <<<<<<<<<<<<<< @@ -50773,27 +50887,27 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( */ __pyx_t_1 = __pyx_cur_scope->__pyx_v_fwords; __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 984; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_cur_scope->__pyx_v_flen = __pyx_t_2; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":985 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":993 * * flen = len(fwords) * start_time = monitor_cpu() # <<<<<<<<<<<<<< * self.extract_time = 0.0 * self.intersect_time = 0.0 */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_monitor_cpu); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 985; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_monitor_cpu); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 985; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_4 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_4 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 985; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_4 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_cur_scope->__pyx_v_start_time = __pyx_t_4; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":986 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":994 * flen = len(fwords) * start_time = monitor_cpu() * self.extract_time = 0.0 # <<<<<<<<<<<<<< @@ -50802,7 +50916,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( */ __pyx_cur_scope->__pyx_v_self->extract_time = 0.0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":987 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":995 * start_time = monitor_cpu() * self.extract_time = 0.0 * self.intersect_time = 0.0 # <<<<<<<<<<<<<< @@ -50811,20 +50925,20 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( */ __pyx_cur_scope->__pyx_v_self->intersect_time = 0.0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":988 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":996 * self.extract_time = 0.0 * self.intersect_time = 0.0 * nodes_isteps_away_buffer = {} # <<<<<<<<<<<<<< * hit = 0 * reachable_buffer = {} */ - __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 988; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 996; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_cur_scope->__pyx_v_nodes_isteps_away_buffer = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":989 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":997 * self.intersect_time = 0.0 * nodes_isteps_away_buffer = {} * hit = 0 # <<<<<<<<<<<<<< @@ -50833,46 +50947,46 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( */ __pyx_cur_scope->__pyx_v_hit = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":990 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":998 * nodes_isteps_away_buffer = {} * hit = 0 * reachable_buffer = {} # <<<<<<<<<<<<<< * * # Phrase pairs processed by suffix array extractor. Do not re-extract */ - __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 998; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_cur_scope->__pyx_v_reachable_buffer = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":995 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1003 * # during online extraction. This is probably the hackiest part of * # online grammar extraction. * seen_phrases = set() # <<<<<<<<<<<<<< * * # Do not cache between sentences */ - __pyx_t_3 = PySet_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 995; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PySet_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_cur_scope->__pyx_v_seen_phrases = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":998 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1006 * * # Do not cache between sentences * self.rules.root = ExtendedTrieNode(phrase_location=PhraseLocation()) # <<<<<<<<<<<<<< * * frontier = [] */ - __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 998; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1006; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_PhraseLocation)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 998; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_PhraseLocation)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1006; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_phrase_location, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 998; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_phrase_location, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1006; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_ExtendedTrieNode)), __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 998; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_ExtendedTrieNode)), __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1006; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GIVEREF(__pyx_t_1); @@ -50881,20 +50995,20 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_cur_scope->__pyx_v_self->rules->root = __pyx_t_1; __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1000 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1008 * self.rules.root = ExtendedTrieNode(phrase_location=PhraseLocation()) * * frontier = [] # <<<<<<<<<<<<<< * for i in range(len(fwords)): * for alt in range(0, len(fwords[i])): */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_v_frontier = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1001 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1009 * * frontier = [] * for i in range(len(fwords)): # <<<<<<<<<<<<<< @@ -50903,70 +51017,70 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( */ __pyx_t_1 = __pyx_cur_scope->__pyx_v_fwords; __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_2; __pyx_t_5+=1) { __pyx_cur_scope->__pyx_v_i = __pyx_t_5; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1002 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1010 * frontier = [] * for i in range(len(fwords)): * for alt in range(0, len(fwords[i])): # <<<<<<<<<<<<<< * if fwords[i][alt][0] != EPSILON: * frontier.append((i, i, (i,), alt, 0, self.rules.root, (), False)) */ - __pyx_t_1 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_fwords, __pyx_cur_scope->__pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1002; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_fwords, __pyx_cur_scope->__pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1010; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1002; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1010; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) { __pyx_cur_scope->__pyx_v_alt = __pyx_t_7; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1003 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1011 * for i in range(len(fwords)): * for alt in range(0, len(fwords[i])): * if fwords[i][alt][0] != EPSILON: # <<<<<<<<<<<<<< * frontier.append((i, i, (i,), alt, 0, self.rules.root, (), False)) * */ - __pyx_t_1 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_fwords, __pyx_cur_scope->__pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_fwords, __pyx_cur_scope->__pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, __pyx_cur_scope->__pyx_v_alt, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, __pyx_cur_scope->__pyx_v_alt, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_4cdec_2sa_3_sa_EPSILON); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_4cdec_2sa_3_sa_EPSILON); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_9) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1004 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1012 * for alt in range(0, len(fwords[i])): * if fwords[i][alt][0] != EPSILON: * frontier.append((i, i, (i,), alt, 0, self.rules.root, (), False)) # <<<<<<<<<<<<<< * * xroot = None */ - __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1004; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1012; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1004; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1012; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1004; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1012; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1004; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1012; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_alt); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1004; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_alt); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1012; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_11 = PyTuple_New(8); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1004; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = PyTuple_New(8); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1012; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); @@ -50992,7 +51106,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_t_3 = 0; __pyx_t_10 = 0; __pyx_t_1 = 0; - __pyx_t_12 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_frontier, __pyx_t_11); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1004; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_12 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_frontier, __pyx_t_11); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1012; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L8; } @@ -51000,7 +51114,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( } } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1006 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1014 * frontier.append((i, i, (i,), alt, 0, self.rules.root, (), False)) * * xroot = None # <<<<<<<<<<<<<< @@ -51011,7 +51125,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(Py_None); __pyx_cur_scope->__pyx_v_xroot = Py_None; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1007 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1015 * * xroot = None * x1 = sym_setindex(self.category, 1) # <<<<<<<<<<<<<< @@ -51020,33 +51134,33 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( */ __pyx_cur_scope->__pyx_v_x1 = __pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_cur_scope->__pyx_v_self->category, 1); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1008 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1016 * xroot = None * x1 = sym_setindex(self.category, 1) * if x1 in self.rules.root.children: # <<<<<<<<<<<<<< * xroot = self.rules.root.children[x1] * else: */ - __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_x1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_x1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->rules->root, __pyx_n_s_children); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->rules->root, __pyx_n_s_children); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = (__Pyx_PySequence_Contains(__pyx_t_11, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = (__Pyx_PySequence_Contains(__pyx_t_11, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_13 = (__pyx_t_9 != 0); if (__pyx_t_13) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1009 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1017 * x1 = sym_setindex(self.category, 1) * if x1 in self.rules.root.children: * xroot = self.rules.root.children[x1] # <<<<<<<<<<<<<< * else: * xroot = ExtendedTrieNode(suffix_link=self.rules.root, phrase_location=PhraseLocation()) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->rules->root, __pyx_n_s_children); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->rules->root, __pyx_n_s_children); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_11 = __Pyx_GetItemInt(__pyx_t_1, __pyx_cur_scope->__pyx_v_x1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_11 = __Pyx_GetItemInt(__pyx_t_1, __pyx_cur_scope->__pyx_v_x1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_xroot); @@ -51057,21 +51171,21 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1011 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1019 * xroot = self.rules.root.children[x1] * else: * xroot = ExtendedTrieNode(suffix_link=self.rules.root, phrase_location=PhraseLocation()) # <<<<<<<<<<<<<< * self.rules.root.children[x1] = xroot * */ - __pyx_t_11 = PyDict_New(); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = PyDict_New(); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); - if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_suffix_link, __pyx_cur_scope->__pyx_v_self->rules->root) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_PhraseLocation)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_suffix_link, __pyx_cur_scope->__pyx_v_self->rules->root) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_PhraseLocation)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_phrase_location, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_phrase_location, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_ExtendedTrieNode)), __pyx_empty_tuple, __pyx_t_11); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_ExtendedTrieNode)), __pyx_empty_tuple, __pyx_t_11); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_xroot); @@ -51079,21 +51193,21 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1012 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1020 * else: * xroot = ExtendedTrieNode(suffix_link=self.rules.root, phrase_location=PhraseLocation()) * self.rules.root.children[x1] = xroot # <<<<<<<<<<<<<< * * for i in range(self.min_gap_size, len(fwords)): */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->rules->root, __pyx_n_s_children); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1012; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->rules->root, __pyx_n_s_children); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1020; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (unlikely(__Pyx_SetItemInt(__pyx_t_1, __pyx_cur_scope->__pyx_v_x1, __pyx_cur_scope->__pyx_v_xroot, int, 1, __Pyx_PyInt_From_int, 0, 1, 1) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1012; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(__Pyx_SetItemInt(__pyx_t_1, __pyx_cur_scope->__pyx_v_x1, __pyx_cur_scope->__pyx_v_xroot, int, 1, __Pyx_PyInt_From_int, 0, 1, 1) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1020; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L9:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1014 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1022 * self.rules.root.children[x1] = xroot * * for i in range(self.min_gap_size, len(fwords)): # <<<<<<<<<<<<<< @@ -51102,79 +51216,79 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( */ __pyx_t_1 = __pyx_cur_scope->__pyx_v_fwords; __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1014; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1022; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (__pyx_t_5 = __pyx_cur_scope->__pyx_v_self->min_gap_size; __pyx_t_5 < __pyx_t_2; __pyx_t_5+=1) { __pyx_cur_scope->__pyx_v_i = __pyx_t_5; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1015 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1023 * * for i in range(self.min_gap_size, len(fwords)): * for alt in range(0, len(fwords[i])): # <<<<<<<<<<<<<< * if fwords[i][alt][0] != EPSILON: * frontier.append((i-self.min_gap_size, i, (i,), alt, self.min_gap_size, xroot, (x1,), True)) */ - __pyx_t_1 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_fwords, __pyx_cur_scope->__pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_fwords, __pyx_cur_scope->__pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) { __pyx_cur_scope->__pyx_v_alt = __pyx_t_7; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1016 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1024 * for i in range(self.min_gap_size, len(fwords)): * for alt in range(0, len(fwords[i])): * if fwords[i][alt][0] != EPSILON: # <<<<<<<<<<<<<< * frontier.append((i-self.min_gap_size, i, (i,), alt, self.min_gap_size, xroot, (x1,), True)) * */ - __pyx_t_1 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_fwords, __pyx_cur_scope->__pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_fwords, __pyx_cur_scope->__pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1024; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); - __pyx_t_11 = __Pyx_GetItemInt(__pyx_t_1, __pyx_cur_scope->__pyx_v_alt, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_11 = __Pyx_GetItemInt(__pyx_t_1, __pyx_cur_scope->__pyx_v_alt, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1024; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_11, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_11, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1024; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_v_4cdec_2sa_3_sa_EPSILON); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_v_4cdec_2sa_3_sa_EPSILON); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1024; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); - __pyx_t_10 = PyObject_RichCompare(__pyx_t_1, __pyx_t_11, Py_NE); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = PyObject_RichCompare(__pyx_t_1, __pyx_t_11, Py_NE); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1024; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1024; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (__pyx_t_13) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1017 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1025 * for alt in range(0, len(fwords[i])): * if fwords[i][alt][0] != EPSILON: * frontier.append((i-self.min_gap_size, i, (i,), alt, self.min_gap_size, xroot, (x1,), True)) # <<<<<<<<<<<<<< * * next_states = [] */ - __pyx_t_10 = __Pyx_PyInt_From_int((__pyx_cur_scope->__pyx_v_i - __pyx_cur_scope->__pyx_v_self->min_gap_size)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = __Pyx_PyInt_From_int((__pyx_cur_scope->__pyx_v_i - __pyx_cur_scope->__pyx_v_self->min_gap_size)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); - __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_alt); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_alt); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_self->min_gap_size); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_self->min_gap_size); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); - __pyx_t_14 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_x1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_14 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_x1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); - __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_14); __Pyx_GIVEREF(__pyx_t_14); __pyx_t_14 = 0; - __pyx_t_14 = PyTuple_New(8); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_14 = PyTuple_New(8); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); @@ -51200,7 +51314,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_t_1 = 0; __pyx_t_8 = 0; __pyx_t_15 = 0; - __pyx_t_12 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_frontier, __pyx_t_14); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_12 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_frontier, __pyx_t_14); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; goto __pyx_L14; } @@ -51208,20 +51322,20 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( } } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1019 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1027 * frontier.append((i-self.min_gap_size, i, (i,), alt, self.min_gap_size, xroot, (x1,), True)) * * next_states = [] # <<<<<<<<<<<<<< * for i in range(len(fwords)): * next_states.append(self.get_next_states(fwords,i,self.min_gap_size)) */ - __pyx_t_14 = PyList_New(0); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1019; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_14 = PyList_New(0); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1027; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_GIVEREF(__pyx_t_14); __pyx_cur_scope->__pyx_v_next_states = ((PyObject*)__pyx_t_14); __pyx_t_14 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1020 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1028 * * next_states = [] * for i in range(len(fwords)): # <<<<<<<<<<<<<< @@ -51230,25 +51344,25 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( */ __pyx_t_14 = __pyx_cur_scope->__pyx_v_fwords; __Pyx_INCREF(__pyx_t_14); - __pyx_t_2 = PyObject_Length(__pyx_t_14); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1020; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_Length(__pyx_t_14); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1028; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_2; __pyx_t_5+=1) { __pyx_cur_scope->__pyx_v_i = __pyx_t_5; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1021 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1029 * next_states = [] * for i in range(len(fwords)): * next_states.append(self.get_next_states(fwords,i,self.min_gap_size)) # <<<<<<<<<<<<<< * * while len(frontier) > 0: */ - __pyx_t_14 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_get_next_states); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_get_next_states); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); - __pyx_t_15 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_15 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); - __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_self->min_gap_size); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_self->min_gap_size); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_fwords); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_cur_scope->__pyx_v_fwords); @@ -51259,15 +51373,15 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_8); __pyx_t_15 = 0; __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_1, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_1, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_12 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_next_states, __pyx_t_8); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_12 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_next_states, __pyx_t_8); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1023 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1031 * next_states.append(self.get_next_states(fwords,i,self.min_gap_size)) * * while len(frontier) > 0: # <<<<<<<<<<<<<< @@ -51275,25 +51389,25 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( * for k, i, input_match, alt, pathlen, node, prefix, is_shadow_path in frontier: */ while (1) { - __pyx_t_2 = PyList_GET_SIZE(__pyx_cur_scope->__pyx_v_frontier); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyList_GET_SIZE(__pyx_cur_scope->__pyx_v_frontier); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_13 = ((__pyx_t_2 > 0) != 0); if (!__pyx_t_13) break; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1024 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1032 * * while len(frontier) > 0: * new_frontier = [] # <<<<<<<<<<<<<< * for k, i, input_match, alt, pathlen, node, prefix, is_shadow_path in frontier: * word_id = fwords[i][alt][0] */ - __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1024; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1032; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_new_frontier); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_new_frontier, ((PyObject*)__pyx_t_8)); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1025 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1033 * while len(frontier) > 0: * new_frontier = [] * for k, i, input_match, alt, pathlen, node, prefix, is_shadow_path in frontier: # <<<<<<<<<<<<<< @@ -51304,9 +51418,9 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( for (;;) { if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_8)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_2); __Pyx_INCREF(__pyx_t_1); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_2); __Pyx_INCREF(__pyx_t_1); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1033; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_8, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySequence_ITEM(__pyx_t_8, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1033; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; @@ -51318,7 +51432,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( if (unlikely(size != 8)) { if (size > 8) __Pyx_RaiseTooManyValuesError(8); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1033; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { @@ -51353,7 +51467,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( Py_ssize_t i; PyObject** temps[8] = {&__pyx_t_14,&__pyx_t_15,&__pyx_t_3,&__pyx_t_11,&__pyx_t_10,&__pyx_t_16,&__pyx_t_17,&__pyx_t_18}; for (i=0; i < 8; i++) { - PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1033; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(item); *(temps[i]) = item; } @@ -51363,7 +51477,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( } else { Py_ssize_t index = -1; PyObject** temps[8] = {&__pyx_t_14,&__pyx_t_15,&__pyx_t_3,&__pyx_t_11,&__pyx_t_10,&__pyx_t_16,&__pyx_t_17,&__pyx_t_18}; - __pyx_t_19 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_19 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_19)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1033; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_20 = Py_TYPE(__pyx_t_19)->tp_iternext; @@ -51372,7 +51486,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GOTREF(item); *(temps[index]) = item; } - if (__Pyx_IternextUnpackEndCheck(__pyx_t_20(__pyx_t_19), 8) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_IternextUnpackEndCheck(__pyx_t_20(__pyx_t_19), 8) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1033; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_20 = NULL; __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; goto __pyx_L22_unpacking_done; @@ -51380,14 +51494,14 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; __pyx_t_20 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1033; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L22_unpacking_done:; } - __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_14); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_14); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1033; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_15); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_15); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1033; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; - __pyx_t_21 = __Pyx_PyInt_As_int(__pyx_t_11); if (unlikely((__pyx_t_21 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1025; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_21 = __Pyx_PyInt_As_int(__pyx_t_11); if (unlikely((__pyx_t_21 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1033; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_cur_scope->__pyx_v_k = __pyx_t_5; __pyx_cur_scope->__pyx_v_i = __pyx_t_7; @@ -51413,19 +51527,19 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_18); __pyx_t_18 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1026 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1034 * new_frontier = [] * for k, i, input_match, alt, pathlen, node, prefix, is_shadow_path in frontier: * word_id = fwords[i][alt][0] # <<<<<<<<<<<<<< * spanlen = fwords[i][alt][2] * # TODO get rid of k -- pathlen is replacing it */ - __pyx_t_1 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_fwords, __pyx_cur_scope->__pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_fwords, __pyx_cur_scope->__pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1034; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); - __pyx_t_18 = __Pyx_GetItemInt(__pyx_t_1, __pyx_cur_scope->__pyx_v_alt, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_18 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_18 = __Pyx_GetItemInt(__pyx_t_1, __pyx_cur_scope->__pyx_v_alt, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_18 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1034; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_18, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_18, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1034; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_word_id); @@ -51433,19 +51547,19 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1027 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1035 * for k, i, input_match, alt, pathlen, node, prefix, is_shadow_path in frontier: * word_id = fwords[i][alt][0] * spanlen = fwords[i][alt][2] # <<<<<<<<<<<<<< * # TODO get rid of k -- pathlen is replacing it * if word_id == EPSILON: */ - __pyx_t_1 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_fwords, __pyx_cur_scope->__pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1027; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_fwords, __pyx_cur_scope->__pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); - __pyx_t_18 = __Pyx_GetItemInt(__pyx_t_1, __pyx_cur_scope->__pyx_v_alt, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_18 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1027; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_18 = __Pyx_GetItemInt(__pyx_t_1, __pyx_cur_scope->__pyx_v_alt, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_18 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_18, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1027; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_18, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1035; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_spanlen); @@ -51453,47 +51567,47 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1029 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1037 * spanlen = fwords[i][alt][2] * # TODO get rid of k -- pathlen is replacing it * if word_id == EPSILON: # <<<<<<<<<<<<<< * # skipping because word_id is epsilon * if i+spanlen >= len(fwords): */ - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_4cdec_2sa_3_sa_EPSILON); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_4cdec_2sa_3_sa_EPSILON); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1037; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_18 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_word_id, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_18); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_word_id, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_18); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1037; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_18); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_18); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1037; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; if (__pyx_t_13) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1031 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1039 * if word_id == EPSILON: * # skipping because word_id is epsilon * if i+spanlen >= len(fwords): # <<<<<<<<<<<<<< * continue * for nualt in range(0,len(fwords[i+spanlen])): */ - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1039; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_1 = PyNumber_Add(__pyx_t_18, __pyx_cur_scope->__pyx_v_spanlen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyNumber_Add(__pyx_t_18, __pyx_cur_scope->__pyx_v_spanlen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1039; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_18 = __pyx_cur_scope->__pyx_v_fwords; __Pyx_INCREF(__pyx_t_18); - __pyx_t_6 = PyObject_Length(__pyx_t_18); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyObject_Length(__pyx_t_18); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1039; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; - __pyx_t_18 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1039; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_17 = PyObject_RichCompare(__pyx_t_1, __pyx_t_18, Py_GE); __Pyx_XGOTREF(__pyx_t_17); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_17 = PyObject_RichCompare(__pyx_t_1, __pyx_t_18, Py_GE); __Pyx_XGOTREF(__pyx_t_17); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1039; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; - __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_17); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1031; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_17); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1039; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; if (__pyx_t_13) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1032 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1040 * # skipping because word_id is epsilon * if i+spanlen >= len(fwords): * continue # <<<<<<<<<<<<<< @@ -51503,43 +51617,43 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( goto __pyx_L19_continue; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1033 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1041 * if i+spanlen >= len(fwords): * continue * for nualt in range(0,len(fwords[i+spanlen])): # <<<<<<<<<<<<<< * frontier.append((k, i+spanlen, input_match, nualt, pathlen, node, prefix, is_shadow_path)) * continue */ - __pyx_t_17 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1033; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_17 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); - __pyx_t_18 = PyNumber_Add(__pyx_t_17, __pyx_cur_scope->__pyx_v_spanlen); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1033; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = PyNumber_Add(__pyx_t_17, __pyx_cur_scope->__pyx_v_spanlen); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; - __pyx_t_17 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_fwords, __pyx_t_18); if (unlikely(__pyx_t_17 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1033; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_17 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_fwords, __pyx_t_18); if (unlikely(__pyx_t_17 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; - __pyx_t_6 = PyObject_Length(__pyx_t_17); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1033; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyObject_Length(__pyx_t_17); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; for (__pyx_t_21 = 0; __pyx_t_21 < __pyx_t_6; __pyx_t_21+=1) { __pyx_cur_scope->__pyx_v_nualt = __pyx_t_21; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1034 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1042 * continue * for nualt in range(0,len(fwords[i+spanlen])): * frontier.append((k, i+spanlen, input_match, nualt, pathlen, node, prefix, is_shadow_path)) # <<<<<<<<<<<<<< * continue * */ - __pyx_t_17 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_k); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1034; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_17 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_k); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1042; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1034; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1042; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_1 = PyNumber_Add(__pyx_t_18, __pyx_cur_scope->__pyx_v_spanlen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1034; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyNumber_Add(__pyx_t_18, __pyx_cur_scope->__pyx_v_spanlen); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1042; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_nualt); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1034; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_nualt); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1042; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_16 = PyTuple_New(8); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1034; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_16 = PyTuple_New(8); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1042; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_17); __Pyx_GIVEREF(__pyx_t_17); @@ -51565,11 +51679,11 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_t_17 = 0; __pyx_t_1 = 0; __pyx_t_18 = 0; - __pyx_t_12 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_frontier, __pyx_t_16); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1034; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_12 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_frontier, __pyx_t_16); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1042; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1035 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1043 * for nualt in range(0,len(fwords[i+spanlen])): * frontier.append((k, i+spanlen, input_match, nualt, pathlen, node, prefix, is_shadow_path)) * continue # <<<<<<<<<<<<<< @@ -51579,19 +51693,19 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( goto __pyx_L19_continue; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1037 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1045 * continue * * phrase = prefix + (word_id,) # <<<<<<<<<<<<<< * hiero_phrase = Phrase(phrase) * arity = hiero_phrase.arity() */ - __pyx_t_16 = PyTuple_New(1); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1037; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_16 = PyTuple_New(1); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1045; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_word_id); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_cur_scope->__pyx_v_word_id); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_word_id); - __pyx_t_18 = PyNumber_Add(__pyx_cur_scope->__pyx_v_prefix, __pyx_t_16); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1037; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = PyNumber_Add(__pyx_cur_scope->__pyx_v_prefix, __pyx_t_16); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1045; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_phrase); @@ -51599,19 +51713,19 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_18); __pyx_t_18 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1038 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1046 * * phrase = prefix + (word_id,) * hiero_phrase = Phrase(phrase) # <<<<<<<<<<<<<< * arity = hiero_phrase.arity() * */ - __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_phrase); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_cur_scope->__pyx_v_phrase); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_phrase); - __pyx_t_16 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_Phrase)), __pyx_t_18, NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_16 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_Phrase)), __pyx_t_18, NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_hiero_phrase)); @@ -51619,23 +51733,23 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_16); __pyx_t_16 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1039 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1047 * phrase = prefix + (word_id,) * hiero_phrase = Phrase(phrase) * arity = hiero_phrase.arity() # <<<<<<<<<<<<<< * * lookup_required = False */ - __pyx_t_16 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_hiero_phrase), __pyx_n_s_arity); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1039; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_hiero_phrase), __pyx_n_s_arity); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); - __pyx_t_18 = __Pyx_PyObject_Call(__pyx_t_16, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1039; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyObject_Call(__pyx_t_16, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; - __pyx_t_21 = __Pyx_PyInt_As_int(__pyx_t_18); if (unlikely((__pyx_t_21 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1039; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_21 = __Pyx_PyInt_As_int(__pyx_t_18); if (unlikely((__pyx_t_21 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_cur_scope->__pyx_v_arity = __pyx_t_21; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1041 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1049 * arity = hiero_phrase.arity() * * lookup_required = False # <<<<<<<<<<<<<< @@ -51644,30 +51758,30 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( */ __pyx_cur_scope->__pyx_v_lookup_required = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1042 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1050 * * lookup_required = False * if word_id in node.children: # <<<<<<<<<<<<<< * if node.children[word_id] is None: * # Path dead-ends at this node */ - __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_children); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1042; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_children); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1050; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_13 = (__Pyx_PySequence_Contains(__pyx_cur_scope->__pyx_v_word_id, __pyx_t_18, Py_EQ)); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1042; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_13 = (__Pyx_PySequence_Contains(__pyx_cur_scope->__pyx_v_word_id, __pyx_t_18, Py_EQ)); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1050; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_9 = (__pyx_t_13 != 0); if (__pyx_t_9) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1043 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1051 * lookup_required = False * if word_id in node.children: * if node.children[word_id] is None: # <<<<<<<<<<<<<< * # Path dead-ends at this node * continue */ - __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_children); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1043; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_children); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1051; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_16 = PyObject_GetItem(__pyx_t_18, __pyx_cur_scope->__pyx_v_word_id); if (unlikely(__pyx_t_16 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_16 = PyObject_GetItem(__pyx_t_18, __pyx_cur_scope->__pyx_v_word_id); if (unlikely(__pyx_t_16 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1051; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_9 = (__pyx_t_16 == Py_None); @@ -51675,7 +51789,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_t_13 = (__pyx_t_9 != 0); if (__pyx_t_13) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1045 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1053 * if node.children[word_id] is None: * # Path dead-ends at this node * continue # <<<<<<<<<<<<<< @@ -51686,16 +51800,16 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1048 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1056 * else: * # Path continues at this node * node = node.children[word_id] # <<<<<<<<<<<<<< * else: * if node.suffix_link is None: */ - __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_children); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_children); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1056; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); - __pyx_t_18 = PyObject_GetItem(__pyx_t_16, __pyx_cur_scope->__pyx_v_word_id); if (unlikely(__pyx_t_18 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_18 = PyObject_GetItem(__pyx_t_16, __pyx_cur_scope->__pyx_v_word_id); if (unlikely(__pyx_t_18 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1056; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_node); @@ -51707,21 +51821,21 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1050 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1058 * node = node.children[word_id] * else: * if node.suffix_link is None: # <<<<<<<<<<<<<< * # Current node is root; lookup required * lookup_required = True */ - __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_suffix_link); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1050; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_suffix_link); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1058; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_13 = (__pyx_t_18 == Py_None); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_9 = (__pyx_t_13 != 0); if (__pyx_t_9) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1052 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1060 * if node.suffix_link is None: * # Current node is root; lookup required * lookup_required = True # <<<<<<<<<<<<<< @@ -51733,36 +51847,36 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1054 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1062 * lookup_required = True * else: * if word_id in node.suffix_link.children: # <<<<<<<<<<<<<< * if node.suffix_link.children[word_id] is None: * # Suffix link reports path is dead end */ - __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_suffix_link); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_suffix_link); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1062; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_18, __pyx_n_s_children); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_18, __pyx_n_s_children); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1062; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; - __pyx_t_9 = (__Pyx_PySequence_Contains(__pyx_cur_scope->__pyx_v_word_id, __pyx_t_16, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1054; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = (__Pyx_PySequence_Contains(__pyx_cur_scope->__pyx_v_word_id, __pyx_t_16, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1062; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_t_13 = (__pyx_t_9 != 0); if (__pyx_t_13) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1055 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1063 * else: * if word_id in node.suffix_link.children: * if node.suffix_link.children[word_id] is None: # <<<<<<<<<<<<<< * # Suffix link reports path is dead end * node.children[word_id] = None */ - __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_suffix_link); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1055; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_suffix_link); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1063; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); - __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_children); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1055; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_children); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1063; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; - __pyx_t_16 = PyObject_GetItem(__pyx_t_18, __pyx_cur_scope->__pyx_v_word_id); if (unlikely(__pyx_t_16 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_16 = PyObject_GetItem(__pyx_t_18, __pyx_cur_scope->__pyx_v_word_id); if (unlikely(__pyx_t_16 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1063; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_13 = (__pyx_t_16 == Py_None); @@ -51770,19 +51884,19 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_t_9 = (__pyx_t_13 != 0); if (__pyx_t_9) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1057 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1065 * if node.suffix_link.children[word_id] is None: * # Suffix link reports path is dead end * node.children[word_id] = None # <<<<<<<<<<<<<< * continue * else: */ - __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_children); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1057; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_children); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1065; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); - if (unlikely(PyObject_SetItem(__pyx_t_16, __pyx_cur_scope->__pyx_v_word_id, Py_None) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1057; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(PyObject_SetItem(__pyx_t_16, __pyx_cur_scope->__pyx_v_word_id, Py_None) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1065; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1058 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1066 * # Suffix link reports path is dead end * node.children[word_id] = None * continue # <<<<<<<<<<<<<< @@ -51793,7 +51907,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1061 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1069 * else: * # Suffix link indicates lookup is reqired * lookup_required = True # <<<<<<<<<<<<<< @@ -51806,18 +51920,18 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1064 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1072 * else: * #ERROR: We never get here * raise Exception("Keyword trie error") # <<<<<<<<<<<<<< * # checking whether lookup_required * if lookup_required: */ - __pyx_t_16 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_tuple__66, NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1064; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_16 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_tuple__66, NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1072; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_Raise(__pyx_t_16, 0, 0, 0); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1064; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1072; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L30:; } @@ -51825,7 +51939,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( } __pyx_L27:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1066 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1074 * raise Exception("Keyword trie error") * # checking whether lookup_required * if lookup_required: # <<<<<<<<<<<<<< @@ -51835,7 +51949,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_t_9 = (__pyx_cur_scope->__pyx_v_lookup_required != 0); if (__pyx_t_9) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1067 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1075 * # checking whether lookup_required * if lookup_required: * new_node = None # <<<<<<<<<<<<<< @@ -51847,74 +51961,74 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_new_node, Py_None); __Pyx_GIVEREF(Py_None); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1068 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1076 * if lookup_required: * new_node = None * if is_shadow_path: # <<<<<<<<<<<<<< * # Extending shadow path * # on the shadow path we don't do any search, we just use info from suffix link */ - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_is_shadow_path); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1068; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_is_shadow_path); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1076; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_9) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1071 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1079 * # Extending shadow path * # on the shadow path we don't do any search, we just use info from suffix link * new_node = ExtendedTrieNode(phrase_location=node.suffix_link.children[word_id].phrase_location, # <<<<<<<<<<<<<< * suffix_link=node.suffix_link.children[word_id], * phrase=hiero_phrase) */ - __pyx_t_16 = PyDict_New(); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_16 = PyDict_New(); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); - __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_suffix_link); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_suffix_link); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_18, __pyx_n_s_children); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_18, __pyx_n_s_children); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; - __pyx_t_18 = PyObject_GetItem(__pyx_t_1, __pyx_cur_scope->__pyx_v_word_id); if (unlikely(__pyx_t_18 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_18 = PyObject_GetItem(__pyx_t_1, __pyx_cur_scope->__pyx_v_word_id); if (unlikely(__pyx_t_18 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_18, __pyx_n_s_phrase_location); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_18, __pyx_n_s_phrase_location); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; - if (PyDict_SetItem(__pyx_t_16, __pyx_n_s_phrase_location, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_16, __pyx_n_s_phrase_location, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1072 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1080 * # on the shadow path we don't do any search, we just use info from suffix link * new_node = ExtendedTrieNode(phrase_location=node.suffix_link.children[word_id].phrase_location, * suffix_link=node.suffix_link.children[word_id], # <<<<<<<<<<<<<< * phrase=hiero_phrase) * else: */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_suffix_link); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1072; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_suffix_link); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1080; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_children); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1072; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_children); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1080; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_GetItem(__pyx_t_18, __pyx_cur_scope->__pyx_v_word_id); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1072; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = PyObject_GetItem(__pyx_t_18, __pyx_cur_scope->__pyx_v_word_id); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1080; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; - if (PyDict_SetItem(__pyx_t_16, __pyx_n_s_suffix_link, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_16, __pyx_n_s_suffix_link, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1073 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1081 * new_node = ExtendedTrieNode(phrase_location=node.suffix_link.children[word_id].phrase_location, * suffix_link=node.suffix_link.children[word_id], * phrase=hiero_phrase) # <<<<<<<<<<<<<< * else: * if arity > 0: */ - if (PyDict_SetItem(__pyx_t_16, __pyx_n_s_phrase, ((PyObject *)__pyx_cur_scope->__pyx_v_hiero_phrase)) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_16, __pyx_n_s_phrase, ((PyObject *)__pyx_cur_scope->__pyx_v_hiero_phrase)) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1071 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1079 * # Extending shadow path * # on the shadow path we don't do any search, we just use info from suffix link * new_node = ExtendedTrieNode(phrase_location=node.suffix_link.children[word_id].phrase_location, # <<<<<<<<<<<<<< * suffix_link=node.suffix_link.children[word_id], * phrase=hiero_phrase) */ - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_ExtendedTrieNode)), __pyx_empty_tuple, __pyx_t_16); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_ExtendedTrieNode)), __pyx_empty_tuple, __pyx_t_16); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_new_node); @@ -51925,7 +52039,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1075 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1083 * phrase=hiero_phrase) * else: * if arity > 0: # <<<<<<<<<<<<<< @@ -51935,16 +52049,16 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_t_9 = ((__pyx_cur_scope->__pyx_v_arity > 0) != 0); if (__pyx_t_9) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1077 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1085 * if arity > 0: * # Intersecting because of arity > 0 * intersect_start_time = monitor_cpu() # <<<<<<<<<<<<<< * phrase_location = self.intersect(node, node.suffix_link.children[word_id], hiero_phrase) * intersect_stop_time = monitor_cpu() */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_monitor_cpu); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1077; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_monitor_cpu); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1085; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1077; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1085; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_intersect_start_time); @@ -51952,22 +52066,22 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_16); __pyx_t_16 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1078 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1086 * # Intersecting because of arity > 0 * intersect_start_time = monitor_cpu() * phrase_location = self.intersect(node, node.suffix_link.children[word_id], hiero_phrase) # <<<<<<<<<<<<<< * intersect_stop_time = monitor_cpu() * self.intersect_time += intersect_stop_time - intersect_start_time */ - __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_suffix_link); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1078; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_suffix_link); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_children); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1078; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_children); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; - __pyx_t_16 = PyObject_GetItem(__pyx_t_1, __pyx_cur_scope->__pyx_v_word_id); if (unlikely(__pyx_t_16 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1078; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_16 = PyObject_GetItem(__pyx_t_1, __pyx_cur_scope->__pyx_v_word_id); if (unlikely(__pyx_t_16 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->intersect(__pyx_cur_scope->__pyx_v_self, __pyx_cur_scope->__pyx_v_node, __pyx_t_16, __pyx_cur_scope->__pyx_v_hiero_phrase)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1078; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->intersect(__pyx_cur_scope->__pyx_v_self, __pyx_cur_scope->__pyx_v_node, __pyx_t_16, __pyx_cur_scope->__pyx_v_hiero_phrase)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_phrase_location)); @@ -51975,16 +52089,16 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1079 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1087 * intersect_start_time = monitor_cpu() * phrase_location = self.intersect(node, node.suffix_link.children[word_id], hiero_phrase) * intersect_stop_time = monitor_cpu() # <<<<<<<<<<<<<< * self.intersect_time += intersect_stop_time - intersect_start_time * else: */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_monitor_cpu); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_monitor_cpu); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1087; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_intersect_stop_time); @@ -51992,66 +52106,66 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_16); __pyx_t_16 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1080 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1088 * phrase_location = self.intersect(node, node.suffix_link.children[word_id], hiero_phrase) * intersect_stop_time = monitor_cpu() * self.intersect_time += intersect_stop_time - intersect_start_time # <<<<<<<<<<<<<< * else: * # Suffix array search */ - __pyx_t_16 = PyFloat_FromDouble(__pyx_cur_scope->__pyx_v_self->intersect_time); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1080; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_16 = PyFloat_FromDouble(__pyx_cur_scope->__pyx_v_self->intersect_time); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); - __pyx_t_1 = PyNumber_Subtract(__pyx_cur_scope->__pyx_v_intersect_stop_time, __pyx_cur_scope->__pyx_v_intersect_start_time); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1080; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyNumber_Subtract(__pyx_cur_scope->__pyx_v_intersect_stop_time, __pyx_cur_scope->__pyx_v_intersect_start_time); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_18 = PyNumber_InPlaceAdd(__pyx_t_16, __pyx_t_1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1080; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = PyNumber_InPlaceAdd(__pyx_t_16, __pyx_t_1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_4 = __pyx_PyFloat_AsFloat(__pyx_t_18); if (unlikely((__pyx_t_4 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1080; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __pyx_PyFloat_AsFloat(__pyx_t_18); if (unlikely((__pyx_t_4 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_cur_scope->__pyx_v_self->intersect_time = __pyx_t_4; goto __pyx_L34; } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1083 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1091 * else: * # Suffix array search * phrase_location = node.phrase_location # <<<<<<<<<<<<<< * sa_range = self.fsa.lookup(sym_tostring(phrase[-1]), len(phrase)-1, phrase_location.sa_low, phrase_location.sa_high) * if sa_range is not None: */ - __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_phrase_location); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_phrase_location); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1091; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - if (!(likely(((__pyx_t_18) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_18, __pyx_ptype_4cdec_2sa_3_sa_PhraseLocation))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(((__pyx_t_18) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_18, __pyx_ptype_4cdec_2sa_3_sa_PhraseLocation))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1091; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_phrase_location)); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_phrase_location, ((struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *)__pyx_t_18)); __Pyx_GIVEREF(__pyx_t_18); __pyx_t_18 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1084 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1092 * # Suffix array search * phrase_location = node.phrase_location * sa_range = self.fsa.lookup(sym_tostring(phrase[-1]), len(phrase)-1, phrase_location.sa_low, phrase_location.sa_high) # <<<<<<<<<<<<<< * if sa_range is not None: * phrase_location = PhraseLocation(sa_low=sa_range[0], sa_high=sa_range[1]) */ - __pyx_t_18 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self->fsa), __pyx_n_s_lookup); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self->fsa), __pyx_n_s_lookup); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_1 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_phrase, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_phrase, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1092; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); - __pyx_t_21 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_21 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_21 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_21 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_f_4cdec_2sa_3_sa_sym_tostring(__pyx_t_21)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_f_4cdec_2sa_3_sa_sym_tostring(__pyx_t_21)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PyObject_Length(__pyx_cur_scope->__pyx_v_phrase); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_16 = PyInt_FromSsize_t((__pyx_t_6 - 1)); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyObject_Length(__pyx_cur_scope->__pyx_v_phrase); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_16 = PyInt_FromSsize_t((__pyx_t_6 - 1)); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); - __pyx_t_17 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_phrase_location->sa_low); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_17 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_phrase_location->sa_low); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); - __pyx_t_10 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_phrase_location->sa_high); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_phrase_location->sa_high); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); - __pyx_t_11 = PyTuple_New(4); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = PyTuple_New(4); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -52065,7 +52179,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_10 = 0; - __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_18, __pyx_t_11, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1084; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_18, __pyx_t_11, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; @@ -52074,7 +52188,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_10); __pyx_t_10 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1085 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1093 * phrase_location = node.phrase_location * sa_range = self.fsa.lookup(sym_tostring(phrase[-1]), len(phrase)-1, phrase_location.sa_low, phrase_location.sa_high) * if sa_range is not None: # <<<<<<<<<<<<<< @@ -52085,24 +52199,24 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_t_13 = (__pyx_t_9 != 0); if (__pyx_t_13) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1086 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1094 * sa_range = self.fsa.lookup(sym_tostring(phrase[-1]), len(phrase)-1, phrase_location.sa_low, phrase_location.sa_high) * if sa_range is not None: * phrase_location = PhraseLocation(sa_low=sa_range[0], sa_high=sa_range[1]) # <<<<<<<<<<<<<< * else: * phrase_location = None */ - __pyx_t_10 = PyDict_New(); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = PyDict_New(); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1094; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); - __pyx_t_11 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_sa_range, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_11 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_sa_range, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1094; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_11); - if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_sa_low, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_sa_low, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1094; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_11 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_sa_range, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_11 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_sa_range, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1094; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_11); - if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_sa_high, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_sa_high, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1094; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_11 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_PhraseLocation)), __pyx_empty_tuple, __pyx_t_10); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1086; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_PhraseLocation)), __pyx_empty_tuple, __pyx_t_10); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1094; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_phrase_location)); @@ -52113,7 +52227,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1088 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1096 * phrase_location = PhraseLocation(sa_low=sa_range[0], sa_high=sa_range[1]) * else: * phrase_location = None # <<<<<<<<<<<<<< @@ -52129,7 +52243,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( } __pyx_L34:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1090 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1098 * phrase_location = None * * if phrase_location is None: # <<<<<<<<<<<<<< @@ -52140,19 +52254,19 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_t_9 = (__pyx_t_13 != 0); if (__pyx_t_9) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1091 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1099 * * if phrase_location is None: * node.children[word_id] = None # <<<<<<<<<<<<<< * # Search failed * continue */ - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_children); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1091; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_children); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1099; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); - if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_cur_scope->__pyx_v_word_id, Py_None) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1091; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_cur_scope->__pyx_v_word_id, Py_None) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1099; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1093 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1101 * node.children[word_id] = None * # Search failed * continue # <<<<<<<<<<<<<< @@ -52162,7 +52276,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( goto __pyx_L19_continue; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1095 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1103 * continue * # Search succeeded * suffix_link = self.rules.root # <<<<<<<<<<<<<< @@ -52176,33 +52290,33 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_11); __pyx_t_11 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1096 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1104 * # Search succeeded * suffix_link = self.rules.root * if node.suffix_link is not None: # <<<<<<<<<<<<<< * suffix_link = node.suffix_link.children[word_id] * new_node = ExtendedTrieNode(phrase_location=phrase_location, */ - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_suffix_link); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1096; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_suffix_link); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_9 = (__pyx_t_11 != Py_None); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_13 = (__pyx_t_9 != 0); if (__pyx_t_13) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1097 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1105 * suffix_link = self.rules.root * if node.suffix_link is not None: * suffix_link = node.suffix_link.children[word_id] # <<<<<<<<<<<<<< * new_node = ExtendedTrieNode(phrase_location=phrase_location, * suffix_link=suffix_link, */ - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_suffix_link); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1097; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_suffix_link); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_children); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1097; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_children); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_11 = PyObject_GetItem(__pyx_t_10, __pyx_cur_scope->__pyx_v_word_id); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1097; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_11 = PyObject_GetItem(__pyx_t_10, __pyx_cur_scope->__pyx_v_word_id); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_suffix_link); @@ -52213,43 +52327,43 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( } __pyx_L37:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1098 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1106 * if node.suffix_link is not None: * suffix_link = node.suffix_link.children[word_id] * new_node = ExtendedTrieNode(phrase_location=phrase_location, # <<<<<<<<<<<<<< * suffix_link=suffix_link, * phrase=hiero_phrase) */ - __pyx_t_11 = PyDict_New(); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = PyDict_New(); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); - if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_phrase_location, ((PyObject *)__pyx_cur_scope->__pyx_v_phrase_location)) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_phrase_location, ((PyObject *)__pyx_cur_scope->__pyx_v_phrase_location)) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1099 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1107 * suffix_link = node.suffix_link.children[word_id] * new_node = ExtendedTrieNode(phrase_location=phrase_location, * suffix_link=suffix_link, # <<<<<<<<<<<<<< * phrase=hiero_phrase) * node.children[word_id] = new_node */ - if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_suffix_link, __pyx_cur_scope->__pyx_v_suffix_link) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_suffix_link, __pyx_cur_scope->__pyx_v_suffix_link) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1100 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1108 * new_node = ExtendedTrieNode(phrase_location=phrase_location, * suffix_link=suffix_link, * phrase=hiero_phrase) # <<<<<<<<<<<<<< * node.children[word_id] = new_node * node = new_node */ - if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_phrase, ((PyObject *)__pyx_cur_scope->__pyx_v_hiero_phrase)) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_phrase, ((PyObject *)__pyx_cur_scope->__pyx_v_hiero_phrase)) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1098 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1106 * if node.suffix_link is not None: * suffix_link = node.suffix_link.children[word_id] * new_node = ExtendedTrieNode(phrase_location=phrase_location, # <<<<<<<<<<<<<< * suffix_link=suffix_link, * phrase=hiero_phrase) */ - __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_ExtendedTrieNode)), __pyx_empty_tuple, __pyx_t_11); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_ExtendedTrieNode)), __pyx_empty_tuple, __pyx_t_11); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_new_node); @@ -52259,19 +52373,19 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( } __pyx_L33:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1101 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1109 * suffix_link=suffix_link, * phrase=hiero_phrase) * node.children[word_id] = new_node # <<<<<<<<<<<<<< * node = new_node * */ - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_children); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_children); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); - if (unlikely(PyObject_SetItem(__pyx_t_10, __pyx_cur_scope->__pyx_v_word_id, __pyx_cur_scope->__pyx_v_new_node) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(PyObject_SetItem(__pyx_t_10, __pyx_cur_scope->__pyx_v_word_id, __pyx_cur_scope->__pyx_v_new_node) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1102 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1110 * phrase=hiero_phrase) * node.children[word_id] = new_node * node = new_node # <<<<<<<<<<<<<< @@ -52283,7 +52397,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_node, __pyx_cur_scope->__pyx_v_new_node); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_new_node); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1107 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1115 * This should happen before we get to extraction (so that * the node will exist if needed)''' * if arity < self.max_nonterminals: # <<<<<<<<<<<<<< @@ -52293,31 +52407,31 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_t_13 = ((__pyx_cur_scope->__pyx_v_arity < __pyx_cur_scope->__pyx_v_self->max_nonterminals) != 0); if (__pyx_t_13) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1108 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1116 * the node will exist if needed)''' * if arity < self.max_nonterminals: * xcat_index = arity+1 # <<<<<<<<<<<<<< * xcat = sym_setindex(self.category, xcat_index) * suffix_link_xcat_index = xcat_index */ - __pyx_t_10 = __Pyx_PyInt_From_long((__pyx_cur_scope->__pyx_v_arity + 1)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = __Pyx_PyInt_From_long((__pyx_cur_scope->__pyx_v_arity + 1)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_xcat_index); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_xcat_index, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); __pyx_t_10 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1109 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1117 * if arity < self.max_nonterminals: * xcat_index = arity+1 * xcat = sym_setindex(self.category, xcat_index) # <<<<<<<<<<<<<< * suffix_link_xcat_index = xcat_index * if is_shadow_path: */ - __pyx_t_21 = __Pyx_PyInt_As_int(__pyx_cur_scope->__pyx_v_xcat_index); if (unlikely((__pyx_t_21 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_21 = __Pyx_PyInt_As_int(__pyx_cur_scope->__pyx_v_xcat_index); if (unlikely((__pyx_t_21 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_cur_scope->__pyx_v_xcat = __pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_cur_scope->__pyx_v_self->category, __pyx_t_21); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1110 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1118 * xcat_index = arity+1 * xcat = sym_setindex(self.category, xcat_index) * suffix_link_xcat_index = xcat_index # <<<<<<<<<<<<<< @@ -52329,24 +52443,24 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_suffix_link_xcat_index, __pyx_cur_scope->__pyx_v_xcat_index); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_xcat_index); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1111 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1119 * xcat = sym_setindex(self.category, xcat_index) * suffix_link_xcat_index = xcat_index * if is_shadow_path: # <<<<<<<<<<<<<< * suffix_link_xcat_index = xcat_index-1 * suffix_link_xcat = sym_setindex(self.category, suffix_link_xcat_index) */ - __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_is_shadow_path); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_is_shadow_path); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_13) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1112 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1120 * suffix_link_xcat_index = xcat_index * if is_shadow_path: * suffix_link_xcat_index = xcat_index-1 # <<<<<<<<<<<<<< * suffix_link_xcat = sym_setindex(self.category, suffix_link_xcat_index) * node.children[xcat] = ExtendedTrieNode(phrase_location=node.phrase_location, */ - __pyx_t_10 = PyNumber_Subtract(__pyx_cur_scope->__pyx_v_xcat_index, __pyx_int_1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = PyNumber_Subtract(__pyx_cur_scope->__pyx_v_xcat_index, __pyx_int_1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_suffix_link_xcat_index); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_suffix_link_xcat_index, __pyx_t_10); @@ -52356,159 +52470,159 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( } __pyx_L39:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1113 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1121 * if is_shadow_path: * suffix_link_xcat_index = xcat_index-1 * suffix_link_xcat = sym_setindex(self.category, suffix_link_xcat_index) # <<<<<<<<<<<<<< * node.children[xcat] = ExtendedTrieNode(phrase_location=node.phrase_location, * suffix_link=node.suffix_link.children[suffix_link_xcat], */ - __pyx_t_21 = __Pyx_PyInt_As_int(__pyx_cur_scope->__pyx_v_suffix_link_xcat_index); if (unlikely((__pyx_t_21 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_21 = __Pyx_PyInt_As_int(__pyx_cur_scope->__pyx_v_suffix_link_xcat_index); if (unlikely((__pyx_t_21 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_cur_scope->__pyx_v_suffix_link_xcat = __pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_cur_scope->__pyx_v_self->category, __pyx_t_21); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1114 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1122 * suffix_link_xcat_index = xcat_index-1 * suffix_link_xcat = sym_setindex(self.category, suffix_link_xcat_index) * node.children[xcat] = ExtendedTrieNode(phrase_location=node.phrase_location, # <<<<<<<<<<<<<< * suffix_link=node.suffix_link.children[suffix_link_xcat], * phrase= Phrase(phrase + (xcat,))) */ - __pyx_t_10 = PyDict_New(); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = PyDict_New(); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_phrase_location); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_phrase_location); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); - if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_phrase_location, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_phrase_location, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1115 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1123 * suffix_link_xcat = sym_setindex(self.category, suffix_link_xcat_index) * node.children[xcat] = ExtendedTrieNode(phrase_location=node.phrase_location, * suffix_link=node.suffix_link.children[suffix_link_xcat], # <<<<<<<<<<<<<< * phrase= Phrase(phrase + (xcat,))) * */ - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_suffix_link); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_suffix_link); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); - __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_children); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_children); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_11 = __Pyx_GetItemInt(__pyx_t_18, __pyx_cur_scope->__pyx_v_suffix_link_xcat, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_11 = __Pyx_GetItemInt(__pyx_t_18, __pyx_cur_scope->__pyx_v_suffix_link_xcat, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1123; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; - if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_suffix_link, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_suffix_link, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1116 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1124 * node.children[xcat] = ExtendedTrieNode(phrase_location=node.phrase_location, * suffix_link=node.suffix_link.children[suffix_link_xcat], * phrase= Phrase(phrase + (xcat,))) # <<<<<<<<<<<<<< * * # sample from range */ - __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_xcat); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_xcat); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); - __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_11 = PyNumber_Add(__pyx_cur_scope->__pyx_v_phrase, __pyx_t_18); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = PyNumber_Add(__pyx_cur_scope->__pyx_v_phrase, __pyx_t_18); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; - __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_11 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_Phrase)), __pyx_t_18, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_Phrase)), __pyx_t_18, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; - if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_phrase, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_phrase, __pyx_t_11) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1114 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1122 * suffix_link_xcat_index = xcat_index-1 * suffix_link_xcat = sym_setindex(self.category, suffix_link_xcat_index) * node.children[xcat] = ExtendedTrieNode(phrase_location=node.phrase_location, # <<<<<<<<<<<<<< * suffix_link=node.suffix_link.children[suffix_link_xcat], * phrase= Phrase(phrase + (xcat,))) */ - __pyx_t_11 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_ExtendedTrieNode)), __pyx_empty_tuple, __pyx_t_10); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_ExtendedTrieNode)), __pyx_empty_tuple, __pyx_t_10); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_children); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_children); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); - if (unlikely(__Pyx_SetItemInt(__pyx_t_10, __pyx_cur_scope->__pyx_v_xcat, __pyx_t_11, int, 1, __Pyx_PyInt_From_int, 0, 1, 1) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(__Pyx_SetItemInt(__pyx_t_10, __pyx_cur_scope->__pyx_v_xcat, __pyx_t_11, int, 1, __Pyx_PyInt_From_int, 0, 1, 1) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L38; } __pyx_L38:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1119 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1127 * * # sample from range * if not is_shadow_path: # <<<<<<<<<<<<<< * sample = self.sampler.sample(node.phrase_location) * num_subpatterns = ( node.phrase_location).num_subpatterns */ - __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_is_shadow_path); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_is_shadow_path); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = ((!__pyx_t_13) != 0); if (__pyx_t_9) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1120 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1128 * # sample from range * if not is_shadow_path: * sample = self.sampler.sample(node.phrase_location) # <<<<<<<<<<<<<< * num_subpatterns = ( node.phrase_location).num_subpatterns * chunklen = IntList(initial_len=num_subpatterns) */ - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self->sampler), __pyx_n_s_sample); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self->sampler), __pyx_n_s_sample); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_phrase_location); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_phrase_location); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); - __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_18, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_18, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; - if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_4cdec_2sa_3_sa_IntList))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_4cdec_2sa_3_sa_IntList))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_sample)); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_sample, ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_10)); __Pyx_GIVEREF(__pyx_t_10); __pyx_t_10 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1121 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1129 * if not is_shadow_path: * sample = self.sampler.sample(node.phrase_location) * num_subpatterns = ( node.phrase_location).num_subpatterns # <<<<<<<<<<<<<< * chunklen = IntList(initial_len=num_subpatterns) * for j from 0 <= j < num_subpatterns: */ - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_phrase_location); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_phrase_location); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_21 = ((struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *)__pyx_t_10)->num_subpatterns; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_cur_scope->__pyx_v_num_subpatterns = __pyx_t_21; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1122 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1130 * sample = self.sampler.sample(node.phrase_location) * num_subpatterns = ( node.phrase_location).num_subpatterns * chunklen = IntList(initial_len=num_subpatterns) # <<<<<<<<<<<<<< * for j from 0 <= j < num_subpatterns: * chunklen.arr[j] = hiero_phrase.chunklen(j) */ - __pyx_t_10 = PyDict_New(); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = PyDict_New(); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_num_subpatterns); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_num_subpatterns); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_initial_len, __pyx_t_18) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_initial_len, __pyx_t_18) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; - __pyx_t_18 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_IntList)), __pyx_empty_tuple, __pyx_t_10); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_IntList)), __pyx_empty_tuple, __pyx_t_10); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_chunklen)); @@ -52516,7 +52630,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_18); __pyx_t_18 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1123 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1131 * num_subpatterns = ( node.phrase_location).num_subpatterns * chunklen = IntList(initial_len=num_subpatterns) * for j from 0 <= j < num_subpatterns: # <<<<<<<<<<<<<< @@ -52526,7 +52640,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_t_21 = __pyx_cur_scope->__pyx_v_num_subpatterns; for (__pyx_cur_scope->__pyx_v_j = 0; __pyx_cur_scope->__pyx_v_j < __pyx_t_21; __pyx_cur_scope->__pyx_v_j++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1124 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1132 * chunklen = IntList(initial_len=num_subpatterns) * for j from 0 <= j < num_subpatterns: * chunklen.arr[j] = hiero_phrase.chunklen(j) # <<<<<<<<<<<<<< @@ -52536,21 +52650,21 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( (__pyx_cur_scope->__pyx_v_chunklen->arr[__pyx_cur_scope->__pyx_v_j]) = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Phrase *)__pyx_cur_scope->__pyx_v_hiero_phrase->__pyx_vtab)->chunklen(__pyx_cur_scope->__pyx_v_hiero_phrase, __pyx_cur_scope->__pyx_v_j); } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1125 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1133 * for j from 0 <= j < num_subpatterns: * chunklen.arr[j] = hiero_phrase.chunklen(j) * extracts = [] # <<<<<<<<<<<<<< * j = 0 * extract_start = monitor_cpu() */ - __pyx_t_18 = PyList_New(0); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = PyList_New(0); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_extracts); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_extracts, ((PyObject*)__pyx_t_18)); __Pyx_GIVEREF(__pyx_t_18); __pyx_t_18 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1126 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1134 * chunklen.arr[j] = hiero_phrase.chunklen(j) * extracts = [] * j = 0 # <<<<<<<<<<<<<< @@ -52559,16 +52673,16 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( */ __pyx_cur_scope->__pyx_v_j = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1127 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1135 * extracts = [] * j = 0 * extract_start = monitor_cpu() # <<<<<<<<<<<<<< * while j < sample.len: * extract = [] */ - __pyx_t_18 = __Pyx_GetModuleGlobalName(__pyx_n_s_monitor_cpu); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_GetModuleGlobalName(__pyx_n_s_monitor_cpu); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_18, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_18, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_extract_start); @@ -52576,7 +52690,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_10); __pyx_t_10 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1128 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1136 * j = 0 * extract_start = monitor_cpu() * while j < sample.len: # <<<<<<<<<<<<<< @@ -52587,21 +52701,21 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_t_9 = ((__pyx_cur_scope->__pyx_v_j < __pyx_cur_scope->__pyx_v_sample->len) != 0); if (!__pyx_t_9) break; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1129 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1137 * extract_start = monitor_cpu() * while j < sample.len: * extract = [] # <<<<<<<<<<<<<< * * assign_matching(&matching, sample.arr, j, num_subpatterns, self.fda.sent_id.arr) */ - __pyx_t_10 = PyList_New(0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = PyList_New(0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_extract); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_extract, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); __pyx_t_10 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1131 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1139 * extract = [] * * assign_matching(&matching, sample.arr, j, num_subpatterns, self.fda.sent_id.arr) # <<<<<<<<<<<<<< @@ -52610,21 +52724,21 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( */ __pyx_f_4cdec_2sa_3_sa_assign_matching((&__pyx_cur_scope->__pyx_v_matching), __pyx_cur_scope->__pyx_v_sample->arr, __pyx_cur_scope->__pyx_v_j, __pyx_cur_scope->__pyx_v_num_subpatterns, __pyx_cur_scope->__pyx_v_self->fda->sent_id->arr); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1132 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1140 * * assign_matching(&matching, sample.arr, j, num_subpatterns, self.fda.sent_id.arr) * loc = tuple(sample[j:j+num_subpatterns]) # <<<<<<<<<<<<<< * extract = self.extract(hiero_phrase, &matching, chunklen.arr, num_subpatterns) * extracts.extend([(e, loc) for e in extract]) */ - __pyx_t_10 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_cur_scope->__pyx_v_sample), __pyx_cur_scope->__pyx_v_j, (__pyx_cur_scope->__pyx_v_j + __pyx_cur_scope->__pyx_v_num_subpatterns), NULL, NULL, NULL, 1, 1, 1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_cur_scope->__pyx_v_sample), __pyx_cur_scope->__pyx_v_j, (__pyx_cur_scope->__pyx_v_j + __pyx_cur_scope->__pyx_v_num_subpatterns), NULL, NULL, NULL, 1, 1, 1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); - __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_18, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_18, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_loc); @@ -52632,34 +52746,34 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_10); __pyx_t_10 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1133 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1141 * assign_matching(&matching, sample.arr, j, num_subpatterns, self.fda.sent_id.arr) * loc = tuple(sample[j:j+num_subpatterns]) * extract = self.extract(hiero_phrase, &matching, chunklen.arr, num_subpatterns) # <<<<<<<<<<<<<< * extracts.extend([(e, loc) for e in extract]) * j = j + num_subpatterns */ - __pyx_t_10 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->extract(__pyx_cur_scope->__pyx_v_self, __pyx_cur_scope->__pyx_v_hiero_phrase, (&__pyx_cur_scope->__pyx_v_matching), __pyx_cur_scope->__pyx_v_chunklen->arr, __pyx_cur_scope->__pyx_v_num_subpatterns); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->extract(__pyx_cur_scope->__pyx_v_self, __pyx_cur_scope->__pyx_v_hiero_phrase, (&__pyx_cur_scope->__pyx_v_matching), __pyx_cur_scope->__pyx_v_chunklen->arr, __pyx_cur_scope->__pyx_v_num_subpatterns); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_extract); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_extract, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); __pyx_t_10 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1134 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1142 * loc = tuple(sample[j:j+num_subpatterns]) * extract = self.extract(hiero_phrase, &matching, chunklen.arr, num_subpatterns) * extracts.extend([(e, loc) for e in extract]) # <<<<<<<<<<<<<< * j = j + num_subpatterns * */ - __pyx_t_10 = PyList_New(0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = PyList_New(0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); if (PyList_CheckExact(__pyx_cur_scope->__pyx_v_extract) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_extract)) { __pyx_t_18 = __pyx_cur_scope->__pyx_v_extract; __Pyx_INCREF(__pyx_t_18); __pyx_t_6 = 0; __pyx_t_22 = NULL; } else { - __pyx_t_6 = -1; __pyx_t_18 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_extract); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = -1; __pyx_t_18 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_extract); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __pyx_t_22 = Py_TYPE(__pyx_t_18)->tp_iternext; } @@ -52667,16 +52781,16 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( if (!__pyx_t_22 && PyList_CheckExact(__pyx_t_18)) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_18)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_11 = PyList_GET_ITEM(__pyx_t_18, __pyx_t_6); __Pyx_INCREF(__pyx_t_11); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = PyList_GET_ITEM(__pyx_t_18, __pyx_t_6); __Pyx_INCREF(__pyx_t_11); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_11 = PySequence_ITEM(__pyx_t_18, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = PySequence_ITEM(__pyx_t_18, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_22 && PyTuple_CheckExact(__pyx_t_18)) { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_18)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_11 = PyTuple_GET_ITEM(__pyx_t_18, __pyx_t_6); __Pyx_INCREF(__pyx_t_11); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = PyTuple_GET_ITEM(__pyx_t_18, __pyx_t_6); __Pyx_INCREF(__pyx_t_11); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_11 = PySequence_ITEM(__pyx_t_18, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = PySequence_ITEM(__pyx_t_18, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_11 = __pyx_t_22(__pyx_t_18); @@ -52684,7 +52798,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( 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[8]; __pyx_lineno = 1134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -52694,7 +52808,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_e, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_e); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_cur_scope->__pyx_v_e); @@ -52702,14 +52816,14 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_INCREF(__pyx_cur_scope->__pyx_v_loc); PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_cur_scope->__pyx_v_loc); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_loc); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_10, (PyObject*)__pyx_t_11))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(__Pyx_ListComp_Append(__pyx_t_10, (PyObject*)__pyx_t_11))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; - __pyx_t_12 = __Pyx_PyList_Extend(__pyx_cur_scope->__pyx_v_extracts, __pyx_t_10); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_12 = __Pyx_PyList_Extend(__pyx_cur_scope->__pyx_v_extracts, __pyx_t_10); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1135 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1143 * extract = self.extract(hiero_phrase, &matching, chunklen.arr, num_subpatterns) * extracts.extend([(e, loc) for e in extract]) * j = j + num_subpatterns # <<<<<<<<<<<<<< @@ -52719,7 +52833,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_cur_scope->__pyx_v_j = (__pyx_cur_scope->__pyx_v_j + __pyx_cur_scope->__pyx_v_num_subpatterns); } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1137 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1145 * j = j + num_subpatterns * * num_samples = sample.len/num_subpatterns # <<<<<<<<<<<<<< @@ -52734,7 +52848,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else if (sizeof(int) == sizeof(long) && (!(((int)-1) > 0)) && unlikely(__pyx_cur_scope->__pyx_v_num_subpatterns == (int)-1) && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_cur_scope->__pyx_v_sample->len))) { #ifdef WITH_THREAD @@ -52744,20 +52858,20 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_cur_scope->__pyx_v_num_samples = __Pyx_div_int(__pyx_cur_scope->__pyx_v_sample->len, __pyx_cur_scope->__pyx_v_num_subpatterns); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1138 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1146 * * num_samples = sample.len/num_subpatterns * extract_stop = monitor_cpu() # <<<<<<<<<<<<<< * self.extract_time = self.extract_time + extract_stop - extract_start * if len(extracts) > 0: */ - __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_monitor_cpu); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_monitor_cpu); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); - __pyx_t_18 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_extract_stop); @@ -52765,46 +52879,46 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_18); __pyx_t_18 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1139 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1147 * num_samples = sample.len/num_subpatterns * extract_stop = monitor_cpu() * self.extract_time = self.extract_time + extract_stop - extract_start # <<<<<<<<<<<<<< * if len(extracts) > 0: * fcount = Counter() */ - __pyx_t_18 = PyFloat_FromDouble(__pyx_cur_scope->__pyx_v_self->extract_time); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = PyFloat_FromDouble(__pyx_cur_scope->__pyx_v_self->extract_time); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_10 = PyNumber_Add(__pyx_t_18, __pyx_cur_scope->__pyx_v_extract_stop); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = PyNumber_Add(__pyx_t_18, __pyx_cur_scope->__pyx_v_extract_stop); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; - __pyx_t_18 = PyNumber_Subtract(__pyx_t_10, __pyx_cur_scope->__pyx_v_extract_start); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = PyNumber_Subtract(__pyx_t_10, __pyx_cur_scope->__pyx_v_extract_start); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_4 = __pyx_PyFloat_AsFloat(__pyx_t_18); if (unlikely((__pyx_t_4 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __pyx_PyFloat_AsFloat(__pyx_t_18); if (unlikely((__pyx_t_4 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_cur_scope->__pyx_v_self->extract_time = __pyx_t_4; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1140 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1148 * extract_stop = monitor_cpu() * self.extract_time = self.extract_time + extract_stop - extract_start * if len(extracts) > 0: # <<<<<<<<<<<<<< * fcount = Counter() * fphrases = defaultdict(lambda: defaultdict(lambda: defaultdict(list))) */ - __pyx_t_6 = PyList_GET_SIZE(__pyx_cur_scope->__pyx_v_extracts); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyList_GET_SIZE(__pyx_cur_scope->__pyx_v_extracts); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = ((__pyx_t_6 > 0) != 0); if (__pyx_t_9) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1141 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1149 * self.extract_time = self.extract_time + extract_stop - extract_start * if len(extracts) > 0: * fcount = Counter() # <<<<<<<<<<<<<< * fphrases = defaultdict(lambda: defaultdict(lambda: defaultdict(list))) * for (f, e, count, als), loc in extracts: */ - __pyx_t_18 = __Pyx_GetModuleGlobalName(__pyx_n_s_Counter); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_GetModuleGlobalName(__pyx_n_s_Counter); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_18, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_18, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_fcount); @@ -52812,23 +52926,23 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_10); __pyx_t_10 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1142 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1150 * if len(extracts) > 0: * fcount = Counter() * fphrases = defaultdict(lambda: defaultdict(lambda: defaultdict(list))) # <<<<<<<<<<<<<< * for (f, e, count, als), loc in extracts: * fcount[f] += count */ - __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_defaultdict); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_defaultdict); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); - __pyx_t_18 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cdec_2sa_3_sa_23HieroCachingRuleFactory_5input_lambda3, 0, __pyx_n_s_input_locals_lambda, NULL, __pyx_n_s_cdec_sa__sa, PyModule_GetDict(__pyx_m), NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cdec_2sa_3_sa_23HieroCachingRuleFactory_5input_lambda3, 0, __pyx_n_s_input_locals_lambda, NULL, __pyx_n_s_cdec_sa__sa, PyModule_GetDict(__pyx_m), NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); __pyx_t_18 = 0; - __pyx_t_18 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_11, NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_11, NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; @@ -52837,7 +52951,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_18); __pyx_t_18 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1143 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1151 * fcount = Counter() * fphrases = defaultdict(lambda: defaultdict(lambda: defaultdict(list))) * for (f, e, count, als), loc in extracts: # <<<<<<<<<<<<<< @@ -52848,9 +52962,9 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( for (;;) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_18)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_11 = PyList_GET_ITEM(__pyx_t_18, __pyx_t_6); __Pyx_INCREF(__pyx_t_11); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = PyList_GET_ITEM(__pyx_t_18, __pyx_t_6); __Pyx_INCREF(__pyx_t_11); __pyx_t_6++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_11 = PySequence_ITEM(__pyx_t_18, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = PySequence_ITEM(__pyx_t_18, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif if ((likely(PyTuple_CheckExact(__pyx_t_11))) || (PyList_CheckExact(__pyx_t_11))) { PyObject* sequence = __pyx_t_11; @@ -52862,7 +52976,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { @@ -52875,15 +52989,15 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(__pyx_t_17); #else - __pyx_t_10 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); - __pyx_t_17 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_17 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); #endif __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } else { Py_ssize_t index = -1; - __pyx_t_16 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_16 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_20 = Py_TYPE(__pyx_t_16)->tp_iternext; @@ -52891,7 +53005,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GOTREF(__pyx_t_10); index = 1; __pyx_t_17 = __pyx_t_20(__pyx_t_16); if (unlikely(!__pyx_t_17)) goto __pyx_L50_unpacking_failed; __Pyx_GOTREF(__pyx_t_17); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_20(__pyx_t_16), 2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_IternextUnpackEndCheck(__pyx_t_20(__pyx_t_16), 2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_20 = NULL; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; goto __pyx_L51_unpacking_done; @@ -52899,7 +53013,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_t_20 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L51_unpacking_done:; } if ((likely(PyTuple_CheckExact(__pyx_t_10))) || (PyList_CheckExact(__pyx_t_10))) { @@ -52912,7 +53026,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( if (unlikely(size != 4)) { if (size > 4) __Pyx_RaiseTooManyValuesError(4); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { @@ -52935,7 +53049,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( Py_ssize_t i; PyObject** temps[4] = {&__pyx_t_16,&__pyx_t_1,&__pyx_t_3,&__pyx_t_15}; for (i=0; i < 4; i++) { - PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(item); *(temps[i]) = item; } @@ -52945,7 +53059,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( } else { Py_ssize_t index = -1; PyObject** temps[4] = {&__pyx_t_16,&__pyx_t_1,&__pyx_t_3,&__pyx_t_15}; - __pyx_t_14 = PyObject_GetIter(__pyx_t_10); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_14 = PyObject_GetIter(__pyx_t_10); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_20 = Py_TYPE(__pyx_t_14)->tp_iternext; @@ -52954,7 +53068,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GOTREF(item); *(temps[index]) = item; } - if (__Pyx_IternextUnpackEndCheck(__pyx_t_20(__pyx_t_14), 4) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_IternextUnpackEndCheck(__pyx_t_20(__pyx_t_14), 4) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_20 = NULL; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; goto __pyx_L53_unpacking_done; @@ -52962,7 +53076,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_t_20 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L53_unpacking_done:; } __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_f); @@ -52986,7 +53100,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_17); __pyx_t_17 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1144 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1152 * fphrases = defaultdict(lambda: defaultdict(lambda: defaultdict(list))) * for (f, e, count, als), loc in extracts: * fcount[f] += count # <<<<<<<<<<<<<< @@ -52995,36 +53109,36 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( */ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_f); __pyx_t_11 = __pyx_cur_scope->__pyx_v_f; - __pyx_t_17 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_fcount, __pyx_t_11); if (unlikely(__pyx_t_17 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_17 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_fcount, __pyx_t_11); if (unlikely(__pyx_t_17 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_17); - __pyx_t_10 = PyNumber_InPlaceAdd(__pyx_t_17, __pyx_cur_scope->__pyx_v_count); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = PyNumber_InPlaceAdd(__pyx_t_17, __pyx_cur_scope->__pyx_v_count); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; - if (unlikely(PyObject_SetItem(__pyx_cur_scope->__pyx_v_fcount, __pyx_t_11, __pyx_t_10) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(PyObject_SetItem(__pyx_cur_scope->__pyx_v_fcount, __pyx_t_11, __pyx_t_10) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1145 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1153 * for (f, e, count, als), loc in extracts: * fcount[f] += count * fphrases[f][e][als].append(loc) # <<<<<<<<<<<<<< * for f, elist in fphrases.iteritems(): * for e, alslist in elist.iteritems(): */ - __pyx_t_11 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_fphrases, __pyx_cur_scope->__pyx_v_f); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_11 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_fphrases, __pyx_cur_scope->__pyx_v_f); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_11); - __pyx_t_10 = PyObject_GetItem(__pyx_t_11, __pyx_cur_scope->__pyx_v_e); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_10 = PyObject_GetItem(__pyx_t_11, __pyx_cur_scope->__pyx_v_e); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_11 = PyObject_GetItem(__pyx_t_10, __pyx_cur_scope->__pyx_v_als); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_11 = PyObject_GetItem(__pyx_t_10, __pyx_cur_scope->__pyx_v_als); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_12 = __Pyx_PyObject_Append(__pyx_t_11, __pyx_cur_scope->__pyx_v_loc); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_12 = __Pyx_PyObject_Append(__pyx_t_11, __pyx_cur_scope->__pyx_v_loc); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1146 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1154 * fcount[f] += count * fphrases[f][e][als].append(loc) * for f, elist in fphrases.iteritems(): # <<<<<<<<<<<<<< @@ -53034,9 +53148,9 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_t_6 = 0; if (unlikely(__pyx_cur_scope->__pyx_v_fphrases == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "iteritems"); - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1154; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_11 = __Pyx_dict_iterator(__pyx_cur_scope->__pyx_v_fphrases, 0, __pyx_n_s_iteritems, (&__pyx_t_23), (&__pyx_t_21)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = __Pyx_dict_iterator(__pyx_cur_scope->__pyx_v_fphrases, 0, __pyx_n_s_iteritems, (&__pyx_t_23), (&__pyx_t_21)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1154; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = __pyx_t_11; @@ -53044,7 +53158,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( while (1) { __pyx_t_7 = __Pyx_dict_iter_next(__pyx_t_18, __pyx_t_23, &__pyx_t_6, &__pyx_t_11, &__pyx_t_10, NULL, __pyx_t_21); if (unlikely(__pyx_t_7 == 0)) break; - if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1146; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1154; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_GOTREF(__pyx_t_10); __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_f); @@ -53056,7 +53170,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_10); __pyx_t_10 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1147 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1155 * fphrases[f][e][als].append(loc) * for f, elist in fphrases.iteritems(): * for e, alslist in elist.iteritems(): # <<<<<<<<<<<<<< @@ -53066,9 +53180,9 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_t_24 = 0; if (unlikely(__pyx_cur_scope->__pyx_v_elist == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "iteritems"); - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_11 = __Pyx_dict_iterator(__pyx_cur_scope->__pyx_v_elist, 0, __pyx_n_s_iteritems, (&__pyx_t_25), (&__pyx_t_7)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = __Pyx_dict_iterator(__pyx_cur_scope->__pyx_v_elist, 0, __pyx_n_s_iteritems, (&__pyx_t_25), (&__pyx_t_7)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = __pyx_t_11; @@ -53076,7 +53190,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( while (1) { __pyx_t_5 = __Pyx_dict_iter_next(__pyx_t_10, __pyx_t_25, &__pyx_t_24, &__pyx_t_11, &__pyx_t_17, NULL, __pyx_t_7); if (unlikely(__pyx_t_5 == 0)) break; - if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_GOTREF(__pyx_t_17); __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_e); @@ -53088,30 +53202,30 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_17); __pyx_t_17 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1148 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1156 * for f, elist in fphrases.iteritems(): * for e, alslist in elist.iteritems(): * alignment, max_locs = max(alslist.iteritems(), key=lambda x: len(x[1])) # <<<<<<<<<<<<<< * locs = tuple(itertools.chain.from_iterable(alslist.itervalues())) * count = len(locs) */ - __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_alslist, __pyx_n_s_iteritems); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_alslist, __pyx_n_s_iteritems); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); - __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_17, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_17, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; - __pyx_t_17 = PyTuple_New(1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_17 = PyTuple_New(1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_11 = PyDict_New(); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = PyDict_New(); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); - __pyx_t_15 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cdec_2sa_3_sa_23HieroCachingRuleFactory_5input_1lambda5, 0, __pyx_n_s_input_locals_lambda, NULL, __pyx_n_s_cdec_sa__sa, PyModule_GetDict(__pyx_m), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_15 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cdec_2sa_3_sa_23HieroCachingRuleFactory_5input_1lambda5, 0, __pyx_n_s_input_locals_lambda, NULL, __pyx_n_s_cdec_sa__sa, PyModule_GetDict(__pyx_m), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); - if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_key, __pyx_t_15) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_key, __pyx_t_15) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; - __pyx_t_15 = __Pyx_PyObject_Call(__pyx_builtin_max, __pyx_t_17, __pyx_t_11); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_15 = __Pyx_PyObject_Call(__pyx_builtin_max, __pyx_t_17, __pyx_t_11); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1156; __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_11); __pyx_t_11 = 0; @@ -53125,7 +53239,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { @@ -53138,15 +53252,15 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(__pyx_t_17); #else - __pyx_t_11 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); - __pyx_t_17 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_17 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); #endif __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; } else { Py_ssize_t index = -1; - __pyx_t_3 = PyObject_GetIter(__pyx_t_15); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_GetIter(__pyx_t_15); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __pyx_t_20 = Py_TYPE(__pyx_t_3)->tp_iternext; @@ -53154,7 +53268,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GOTREF(__pyx_t_11); index = 1; __pyx_t_17 = __pyx_t_20(__pyx_t_3); if (unlikely(!__pyx_t_17)) goto __pyx_L58_unpacking_failed; __Pyx_GOTREF(__pyx_t_17); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_20(__pyx_t_3), 2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_IternextUnpackEndCheck(__pyx_t_20(__pyx_t_3), 2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_20 = NULL; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L59_unpacking_done; @@ -53162,7 +53276,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_20 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L59_unpacking_done:; } __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_alignment); @@ -53174,41 +53288,41 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_17); __pyx_t_17 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1149 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1157 * for e, alslist in elist.iteritems(): * alignment, max_locs = max(alslist.iteritems(), key=lambda x: len(x[1])) * locs = tuple(itertools.chain.from_iterable(alslist.itervalues())) # <<<<<<<<<<<<<< * count = len(locs) * scores = self.scorer.score(FeatureContext( */ - __pyx_t_15 = __Pyx_GetModuleGlobalName(__pyx_n_s_itertools); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_15 = __Pyx_GetModuleGlobalName(__pyx_n_s_itertools); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); - __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_chain); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_chain); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; - __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_from_iterable); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_from_iterable); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; - __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_alslist, __pyx_n_s_itervalues); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_alslist, __pyx_n_s_itervalues); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); - __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_17, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_17, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; - __pyx_t_17 = PyTuple_New(1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_17 = PyTuple_New(1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_17, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_17, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; - __pyx_t_17 = PyTuple_New(1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_17 = PyTuple_New(1); if (unlikely(!__pyx_t_17)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_11 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_17, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_17, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_locs); @@ -53216,58 +53330,58 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_11); __pyx_t_11 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1150 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1158 * alignment, max_locs = max(alslist.iteritems(), key=lambda x: len(x[1])) * locs = tuple(itertools.chain.from_iterable(alslist.itervalues())) * count = len(locs) # <<<<<<<<<<<<<< * scores = self.scorer.score(FeatureContext( * f, e, count, fcount[f], num_samples, */ - __pyx_t_26 = PyTuple_GET_SIZE(__pyx_cur_scope->__pyx_v_locs); if (unlikely(__pyx_t_26 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_11 = PyInt_FromSsize_t(__pyx_t_26); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_26 = PyTuple_GET_SIZE(__pyx_cur_scope->__pyx_v_locs); if (unlikely(__pyx_t_26 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = PyInt_FromSsize_t(__pyx_t_26); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_count); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_count, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_11); __pyx_t_11 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1151 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1159 * locs = tuple(itertools.chain.from_iterable(alslist.itervalues())) * count = len(locs) * scores = self.scorer.score(FeatureContext( # <<<<<<<<<<<<<< * f, e, count, fcount[f], num_samples, * (k,i+spanlen), locs, input_match, */ - __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_FeatureContext); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_FeatureContext); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1152 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1160 * count = len(locs) * scores = self.scorer.score(FeatureContext( * f, e, count, fcount[f], num_samples, # <<<<<<<<<<<<<< * (k,i+spanlen), locs, input_match, * fwords, self.fda, self.eda, */ - __pyx_t_17 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_fcount, __pyx_cur_scope->__pyx_v_f); if (unlikely(__pyx_t_17 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_17 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_fcount, __pyx_cur_scope->__pyx_v_f); if (unlikely(__pyx_t_17 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_17); - __pyx_t_15 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_num_samples); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_15 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_num_samples); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1153 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1161 * scores = self.scorer.score(FeatureContext( * f, e, count, fcount[f], num_samples, * (k,i+spanlen), locs, input_match, # <<<<<<<<<<<<<< * fwords, self.fda, self.eda, * meta, */ - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_k); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_k); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_16 = PyNumber_Add(__pyx_t_1, __pyx_cur_scope->__pyx_v_spanlen); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_16 = PyNumber_Add(__pyx_t_1, __pyx_cur_scope->__pyx_v_spanlen); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); @@ -53276,16 +53390,16 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_t_3 = 0; __pyx_t_16 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1157 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1165 * meta, * # Include online stats. None if none. * self.online_ctx_lookup(f, e, ctx_name))) # <<<<<<<<<<<<<< * # Phrase pair processed * if self.online: */ - __pyx_t_16 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_online_ctx_lookup); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_online_ctx_lookup); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_16); - __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_f); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_cur_scope->__pyx_v_f); @@ -53296,19 +53410,19 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_INCREF(__pyx_cur_scope->__pyx_v_ctx_name); PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_cur_scope->__pyx_v_ctx_name); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_ctx_name); - __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_16, __pyx_t_3, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_16, __pyx_t_3, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1151 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1159 * locs = tuple(itertools.chain.from_iterable(alslist.itervalues())) * count = len(locs) * scores = self.scorer.score(FeatureContext( # <<<<<<<<<<<<<< * f, e, count, fcount[f], num_samples, * (k,i+spanlen), locs, input_match, */ - __pyx_t_3 = PyTuple_New(13); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyTuple_New(13); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_f); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_cur_scope->__pyx_v_f); @@ -53349,11 +53463,11 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_t_15 = 0; __pyx_t_1 = 0; __pyx_t_14 = 0; - __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_3, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_3, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = ((PyObject *)((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Scorer *)__pyx_cur_scope->__pyx_v_self->scorer->__pyx_vtab)->score(__pyx_cur_scope->__pyx_v_self->scorer, __pyx_t_14)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = ((PyObject *)((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Scorer *)__pyx_cur_scope->__pyx_v_self->scorer->__pyx_vtab)->score(__pyx_cur_scope->__pyx_v_self->scorer, __pyx_t_14)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_scores)); @@ -53361,7 +53475,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1159 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1167 * self.online_ctx_lookup(f, e, ctx_name))) * # Phrase pair processed * if self.online: # <<<<<<<<<<<<<< @@ -53371,14 +53485,14 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_t_9 = (__pyx_cur_scope->__pyx_v_self->online != 0); if (__pyx_t_9) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1160 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1168 * # Phrase pair processed * if self.online: * seen_phrases.add((f, e)) # <<<<<<<<<<<<<< * yield Rule(self.category, f, e, scores, alignment) * */ - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_f); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_cur_scope->__pyx_v_f); @@ -53386,22 +53500,22 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_INCREF(__pyx_cur_scope->__pyx_v_e); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_cur_scope->__pyx_v_e); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_e); - __pyx_t_12 = PySet_Add(__pyx_cur_scope->__pyx_v_seen_phrases, __pyx_t_3); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_12 = PySet_Add(__pyx_cur_scope->__pyx_v_seen_phrases, __pyx_t_3); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L60; } __pyx_L60:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1161 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1169 * if self.online: * seen_phrases.add((f, e)) * yield Rule(self.category, f, e, scores, alignment) # <<<<<<<<<<<<<< * * if len(phrase) < self.max_length and i+spanlen < len(fwords) and pathlen+1 <= self.max_initial_size: */ - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_self->category); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_self->category); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_14 = PyTuple_New(5); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_14 = PyTuple_New(5); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); @@ -53418,7 +53532,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( PyTuple_SET_ITEM(__pyx_t_14, 4, __pyx_cur_scope->__pyx_v_alignment); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_alignment); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_Rule)), __pyx_t_14, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_Rule)), __pyx_t_14, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_r = __pyx_t_3; @@ -53458,7 +53572,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_t_23 = __pyx_cur_scope->__pyx_t_7; __pyx_t_24 = __pyx_cur_scope->__pyx_t_8; __pyx_t_25 = __pyx_cur_scope->__pyx_t_9; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } @@ -53473,41 +53587,41 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( } __pyx_L32:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1163 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1171 * yield Rule(self.category, f, e, scores, alignment) * * if len(phrase) < self.max_length and i+spanlen < len(fwords) and pathlen+1 <= self.max_initial_size: # <<<<<<<<<<<<<< * for alt_id in range(len(fwords[i+spanlen])): * new_frontier.append((k, i+spanlen, input_match, alt_id, pathlen + 1, node, phrase, is_shadow_path)) */ - __pyx_t_23 = PyObject_Length(__pyx_cur_scope->__pyx_v_phrase); if (unlikely(__pyx_t_23 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_23 = PyObject_Length(__pyx_cur_scope->__pyx_v_phrase); if (unlikely(__pyx_t_23 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = (__pyx_t_23 < __pyx_cur_scope->__pyx_v_self->max_length); if (__pyx_t_9) { - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_10 = PyNumber_Add(__pyx_t_18, __pyx_cur_scope->__pyx_v_spanlen); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = PyNumber_Add(__pyx_t_18, __pyx_cur_scope->__pyx_v_spanlen); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_18 = __pyx_cur_scope->__pyx_v_fwords; __Pyx_INCREF(__pyx_t_18); - __pyx_t_23 = PyObject_Length(__pyx_t_18); if (unlikely(__pyx_t_23 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_23 = PyObject_Length(__pyx_t_18); if (unlikely(__pyx_t_23 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; - __pyx_t_18 = PyInt_FromSsize_t(__pyx_t_23); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = PyInt_FromSsize_t(__pyx_t_23); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_3 = PyObject_RichCompare(__pyx_t_10, __pyx_t_18, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_RichCompare(__pyx_t_10, __pyx_t_18, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; - __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_13) { - __pyx_t_3 = PyNumber_Add(__pyx_cur_scope->__pyx_v_pathlen, __pyx_int_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyNumber_Add(__pyx_cur_scope->__pyx_v_pathlen, __pyx_int_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_self->max_initial_size); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_self->max_initial_size); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_10 = PyObject_RichCompare(__pyx_t_3, __pyx_t_18, Py_LE); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = PyObject_RichCompare(__pyx_t_3, __pyx_t_18, Py_LE); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; - __pyx_t_27 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_27 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_27 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_27 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_28 = __pyx_t_27; } else { @@ -53519,45 +53633,45 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( } if (__pyx_t_13) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1164 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1172 * * if len(phrase) < self.max_length and i+spanlen < len(fwords) and pathlen+1 <= self.max_initial_size: * for alt_id in range(len(fwords[i+spanlen])): # <<<<<<<<<<<<<< * new_frontier.append((k, i+spanlen, input_match, alt_id, pathlen + 1, node, phrase, is_shadow_path)) * num_subpatterns = arity */ - __pyx_t_10 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); - __pyx_t_18 = PyNumber_Add(__pyx_t_10, __pyx_cur_scope->__pyx_v_spanlen); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = PyNumber_Add(__pyx_t_10, __pyx_cur_scope->__pyx_v_spanlen); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_10 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_fwords, __pyx_t_18); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_10 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_fwords, __pyx_t_18); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; - __pyx_t_23 = PyObject_Length(__pyx_t_10); if (unlikely(__pyx_t_23 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_23 = PyObject_Length(__pyx_t_10); if (unlikely(__pyx_t_23 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; for (__pyx_t_21 = 0; __pyx_t_21 < __pyx_t_23; __pyx_t_21+=1) { __pyx_cur_scope->__pyx_v_alt_id = __pyx_t_21; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1165 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1173 * if len(phrase) < self.max_length and i+spanlen < len(fwords) and pathlen+1 <= self.max_initial_size: * for alt_id in range(len(fwords[i+spanlen])): * new_frontier.append((k, i+spanlen, input_match, alt_id, pathlen + 1, node, phrase, is_shadow_path)) # <<<<<<<<<<<<<< * num_subpatterns = arity * if not is_shadow_path: */ - __pyx_t_10 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_k); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_k); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_3 = PyNumber_Add(__pyx_t_18, __pyx_cur_scope->__pyx_v_spanlen); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyNumber_Add(__pyx_t_18, __pyx_cur_scope->__pyx_v_spanlen); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_alt_id); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_alt_id); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_14 = PyNumber_Add(__pyx_cur_scope->__pyx_v_pathlen, __pyx_int_1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_14 = PyNumber_Add(__pyx_cur_scope->__pyx_v_pathlen, __pyx_int_1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); - __pyx_t_11 = PyTuple_New(8); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = PyTuple_New(8); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_10); @@ -53583,11 +53697,11 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_t_3 = 0; __pyx_t_18 = 0; __pyx_t_14 = 0; - __pyx_t_12 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_new_frontier, __pyx_t_11); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_12 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_new_frontier, __pyx_t_11); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1166 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1174 * for alt_id in range(len(fwords[i+spanlen])): * new_frontier.append((k, i+spanlen, input_match, alt_id, pathlen + 1, node, phrase, is_shadow_path)) * num_subpatterns = arity # <<<<<<<<<<<<<< @@ -53596,18 +53710,18 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( */ __pyx_cur_scope->__pyx_v_num_subpatterns = __pyx_cur_scope->__pyx_v_arity; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1167 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1175 * new_frontier.append((k, i+spanlen, input_match, alt_id, pathlen + 1, node, phrase, is_shadow_path)) * num_subpatterns = arity * if not is_shadow_path: # <<<<<<<<<<<<<< * num_subpatterns = num_subpatterns + 1 * if len(phrase)+1 < self.max_length and arity < self.max_nonterminals and num_subpatterns < self.max_chunks: */ - __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_is_shadow_path); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_is_shadow_path); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = ((!__pyx_t_13) != 0); if (__pyx_t_9) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1168 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1176 * num_subpatterns = arity * if not is_shadow_path: * num_subpatterns = num_subpatterns + 1 # <<<<<<<<<<<<<< @@ -53619,14 +53733,14 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( } __pyx_L65:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1169 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1177 * if not is_shadow_path: * num_subpatterns = num_subpatterns + 1 * if len(phrase)+1 < self.max_length and arity < self.max_nonterminals and num_subpatterns < self.max_chunks: # <<<<<<<<<<<<<< * xcat = sym_setindex(self.category, arity+1) * xnode = node.children[xcat] */ - __pyx_t_23 = PyObject_Length(__pyx_cur_scope->__pyx_v_phrase); if (unlikely(__pyx_t_23 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_23 = PyObject_Length(__pyx_cur_scope->__pyx_v_phrase); if (unlikely(__pyx_t_23 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1177; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = (((__pyx_t_23 + 1) < __pyx_cur_scope->__pyx_v_self->max_length) != 0); if (__pyx_t_9) { __pyx_t_13 = ((__pyx_cur_scope->__pyx_v_arity < __pyx_cur_scope->__pyx_v_self->max_nonterminals) != 0); @@ -53642,7 +53756,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( } if (__pyx_t_13) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1170 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1178 * num_subpatterns = num_subpatterns + 1 * if len(phrase)+1 < self.max_length and arity < self.max_nonterminals and num_subpatterns < self.max_chunks: * xcat = sym_setindex(self.category, arity+1) # <<<<<<<<<<<<<< @@ -53651,16 +53765,16 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( */ __pyx_cur_scope->__pyx_v_xcat = __pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_cur_scope->__pyx_v_self->category, (__pyx_cur_scope->__pyx_v_arity + 1)); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1171 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1179 * if len(phrase)+1 < self.max_length and arity < self.max_nonterminals and num_subpatterns < self.max_chunks: * xcat = sym_setindex(self.category, arity+1) * xnode = node.children[xcat] # <<<<<<<<<<<<<< * # I put spanlen=1 below * key = tuple([self.min_gap_size, i, 1, pathlen]) */ - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_children); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_children); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); - __pyx_t_14 = __Pyx_GetItemInt(__pyx_t_11, __pyx_cur_scope->__pyx_v_xcat, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_14 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_14 = __Pyx_GetItemInt(__pyx_t_11, __pyx_cur_scope->__pyx_v_xcat, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_14 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_xnode); @@ -53668,18 +53782,18 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_14); __pyx_t_14 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1173 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1181 * xnode = node.children[xcat] * # I put spanlen=1 below * key = tuple([self.min_gap_size, i, 1, pathlen]) # <<<<<<<<<<<<<< * frontier_nodes = [] * if key in nodes_isteps_away_buffer: */ - __pyx_t_14 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_self->min_gap_size); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_14 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_self->min_gap_size); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); - __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); - __pyx_t_18 = PyList_New(4); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = PyList_New(4); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); PyList_SET_ITEM(__pyx_t_18, 0, __pyx_t_14); __Pyx_GIVEREF(__pyx_t_14); @@ -53693,7 +53807,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_pathlen); __pyx_t_14 = 0; __pyx_t_11 = 0; - __pyx_t_11 = PyList_AsTuple(((PyObject*)__pyx_t_18)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = PyList_AsTuple(((PyObject*)__pyx_t_18)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_key); @@ -53701,39 +53815,39 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_11); __pyx_t_11 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1174 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1182 * # I put spanlen=1 below * key = tuple([self.min_gap_size, i, 1, pathlen]) * frontier_nodes = [] # <<<<<<<<<<<<<< * if key in nodes_isteps_away_buffer: * frontier_nodes = nodes_isteps_away_buffer[key] */ - __pyx_t_11 = PyList_New(0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = PyList_New(0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_frontier_nodes); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_frontier_nodes, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_11); __pyx_t_11 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1175 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1183 * key = tuple([self.min_gap_size, i, 1, pathlen]) * frontier_nodes = [] * if key in nodes_isteps_away_buffer: # <<<<<<<<<<<<<< * frontier_nodes = nodes_isteps_away_buffer[key] * else: */ - __pyx_t_13 = (__Pyx_PyDict_Contains(__pyx_cur_scope->__pyx_v_key, __pyx_cur_scope->__pyx_v_nodes_isteps_away_buffer, Py_EQ)); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_13 = (__Pyx_PyDict_Contains(__pyx_cur_scope->__pyx_v_key, __pyx_cur_scope->__pyx_v_nodes_isteps_away_buffer, Py_EQ)); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = (__pyx_t_13 != 0); if (__pyx_t_9) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1176 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1184 * frontier_nodes = [] * if key in nodes_isteps_away_buffer: * frontier_nodes = nodes_isteps_away_buffer[key] # <<<<<<<<<<<<<< * else: * frontier_nodes = self.get_all_nodes_isteps_away(self.min_gap_size, i, 1, pathlen, fwords, next_states, reachable_buffer) */ - __pyx_t_11 = __Pyx_PyDict_GetItem(__pyx_cur_scope->__pyx_v_nodes_isteps_away_buffer, __pyx_cur_scope->__pyx_v_key); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_11 = __Pyx_PyDict_GetItem(__pyx_cur_scope->__pyx_v_nodes_isteps_away_buffer, __pyx_cur_scope->__pyx_v_key); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1184; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_11); __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_frontier_nodes); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_frontier_nodes, __pyx_t_11); @@ -53743,20 +53857,20 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1178 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1186 * frontier_nodes = nodes_isteps_away_buffer[key] * else: * frontier_nodes = self.get_all_nodes_isteps_away(self.min_gap_size, i, 1, pathlen, fwords, next_states, reachable_buffer) # <<<<<<<<<<<<<< * nodes_isteps_away_buffer[key] = frontier_nodes * */ - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_get_all_nodes_isteps_away); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_get_all_nodes_isteps_away); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_self->min_gap_size); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_self->min_gap_size); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_14 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_14 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); - __pyx_t_3 = PyTuple_New(7); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyTuple_New(7); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); @@ -53779,7 +53893,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_reachable_buffer); __pyx_t_18 = 0; __pyx_t_14 = 0; - __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_3, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_3, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -53788,18 +53902,18 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_14); __pyx_t_14 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1179 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1187 * else: * frontier_nodes = self.get_all_nodes_isteps_away(self.min_gap_size, i, 1, pathlen, fwords, next_states, reachable_buffer) * nodes_isteps_away_buffer[key] = frontier_nodes # <<<<<<<<<<<<<< * * for i, alt, pathlen in frontier_nodes: */ - if (unlikely(PyDict_SetItem(__pyx_cur_scope->__pyx_v_nodes_isteps_away_buffer, __pyx_cur_scope->__pyx_v_key, __pyx_cur_scope->__pyx_v_frontier_nodes) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(PyDict_SetItem(__pyx_cur_scope->__pyx_v_nodes_isteps_away_buffer, __pyx_cur_scope->__pyx_v_key, __pyx_cur_scope->__pyx_v_frontier_nodes) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L67:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1181 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1189 * nodes_isteps_away_buffer[key] = frontier_nodes * * for i, alt, pathlen in frontier_nodes: # <<<<<<<<<<<<<< @@ -53810,7 +53924,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_t_14 = __pyx_cur_scope->__pyx_v_frontier_nodes; __Pyx_INCREF(__pyx_t_14); __pyx_t_23 = 0; __pyx_t_22 = NULL; } else { - __pyx_t_23 = -1; __pyx_t_14 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_frontier_nodes); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_23 = -1; __pyx_t_14 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_frontier_nodes); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_22 = Py_TYPE(__pyx_t_14)->tp_iternext; } @@ -53818,16 +53932,16 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( if (!__pyx_t_22 && PyList_CheckExact(__pyx_t_14)) { if (__pyx_t_23 >= PyList_GET_SIZE(__pyx_t_14)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_14, __pyx_t_23); __Pyx_INCREF(__pyx_t_3); __pyx_t_23++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_14, __pyx_t_23); __Pyx_INCREF(__pyx_t_3); __pyx_t_23++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_14, __pyx_t_23); __pyx_t_23++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PySequence_ITEM(__pyx_t_14, __pyx_t_23); __pyx_t_23++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_22 && PyTuple_CheckExact(__pyx_t_14)) { if (__pyx_t_23 >= PyTuple_GET_SIZE(__pyx_t_14)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_14, __pyx_t_23); __Pyx_INCREF(__pyx_t_3); __pyx_t_23++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_14, __pyx_t_23); __Pyx_INCREF(__pyx_t_3); __pyx_t_23++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_14, __pyx_t_23); __pyx_t_23++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PySequence_ITEM(__pyx_t_14, __pyx_t_23); __pyx_t_23++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_3 = __pyx_t_22(__pyx_t_14); @@ -53835,7 +53949,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( 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[8]; __pyx_lineno = 1181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -53851,7 +53965,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { @@ -53867,17 +53981,17 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_INCREF(__pyx_t_18); __Pyx_INCREF(__pyx_t_10); #else - __pyx_t_11 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); - __pyx_t_18 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_10 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); #endif __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { Py_ssize_t index = -1; - __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_20 = Py_TYPE(__pyx_t_1)->tp_iternext; @@ -53887,7 +54001,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GOTREF(__pyx_t_18); index = 2; __pyx_t_10 = __pyx_t_20(__pyx_t_1); if (unlikely(!__pyx_t_10)) goto __pyx_L70_unpacking_failed; __Pyx_GOTREF(__pyx_t_10); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_20(__pyx_t_1), 3) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_IternextUnpackEndCheck(__pyx_t_20(__pyx_t_1), 3) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_20 = NULL; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L71_unpacking_done; @@ -53895,12 +54009,12 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_20 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L71_unpacking_done:; } - __pyx_t_21 = __Pyx_PyInt_As_int(__pyx_t_11); if (unlikely((__pyx_t_21 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_21 = __Pyx_PyInt_As_int(__pyx_t_11); if (unlikely((__pyx_t_21 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_18); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_18); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_cur_scope->__pyx_v_i = __pyx_t_21; __pyx_cur_scope->__pyx_v_alt = __pyx_t_7; @@ -53909,40 +54023,40 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_10); __pyx_t_10 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1182 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1190 * * for i, alt, pathlen in frontier_nodes: * new_frontier.append((k, i, input_match + (i,), alt, pathlen, xnode, phrase +(xcat,), is_shadow_path)) # <<<<<<<<<<<<<< * frontier = new_frontier * */ - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_k); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_k); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_10 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); - __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); __pyx_t_18 = 0; - __pyx_t_18 = PyNumber_Add(__pyx_cur_scope->__pyx_v_input_match, __pyx_t_11); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = PyNumber_Add(__pyx_cur_scope->__pyx_v_input_match, __pyx_t_11); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_alt); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_alt); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_xcat); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_xcat); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyNumber_Add(__pyx_cur_scope->__pyx_v_phrase, __pyx_t_15); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyNumber_Add(__pyx_cur_scope->__pyx_v_phrase, __pyx_t_15); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; - __pyx_t_15 = PyTuple_New(8); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_15 = PyTuple_New(8); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); @@ -53968,7 +54082,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_t_18 = 0; __pyx_t_11 = 0; __pyx_t_1 = 0; - __pyx_t_12 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_new_frontier, __pyx_t_15); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1182; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_12 = __Pyx_PyList_Append(__pyx_cur_scope->__pyx_v_new_frontier, __pyx_t_15); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; } __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; @@ -53982,7 +54096,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1183 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1191 * for i, alt, pathlen in frontier_nodes: * new_frontier.append((k, i, input_match + (i,), alt, pathlen, xnode, phrase +(xcat,), is_shadow_path)) * frontier = new_frontier # <<<<<<<<<<<<<< @@ -53995,7 +54109,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_new_frontier); } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1186 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1194 * * # Online rule extraction and scoring * if self.online: # <<<<<<<<<<<<<< @@ -54005,55 +54119,55 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_t_9 = (__pyx_cur_scope->__pyx_v_self->online != 0); if (__pyx_t_9) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1187 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1195 * # Online rule extraction and scoring * if self.online: * stats = self.online_stats[ctx_name] # <<<<<<<<<<<<<< * f_syms = tuple(word[0][0] for word in fwords) * for f, lex_i, lex_j in self.get_f_phrases(f_syms): */ - __pyx_t_8 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_self->online_stats, __pyx_cur_scope->__pyx_v_ctx_name); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_8 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_self->online_stats, __pyx_cur_scope->__pyx_v_ctx_name); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_cur_scope->__pyx_v_stats = __pyx_t_8; __pyx_t_8 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1188 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1196 * if self.online: * stats = self.online_stats[ctx_name] * f_syms = tuple(word[0][0] for word in fwords) # <<<<<<<<<<<<<< * for f, lex_i, lex_j in self.get_f_phrases(f_syms): * spanlen = (lex_j - lex_i) + 1 */ - __pyx_t_8 = __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_5input_2genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_5input_2genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); - __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_14, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_14, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_GIVEREF(__pyx_t_8); __pyx_cur_scope->__pyx_v_f_syms = ((PyObject*)__pyx_t_8); __pyx_t_8 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1189 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1197 * stats = self.online_stats[ctx_name] * f_syms = tuple(word[0][0] for word in fwords) * for f, lex_i, lex_j in self.get_f_phrases(f_syms): # <<<<<<<<<<<<<< * spanlen = (lex_j - lex_i) + 1 * if not sym_isvar(f[0]): */ - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_get_f_phrases); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_get_f_phrases); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); - __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_f_syms); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_cur_scope->__pyx_v_f_syms); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_f_syms); - __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_14, NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_14, NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; @@ -54061,7 +54175,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_t_14 = __pyx_t_15; __Pyx_INCREF(__pyx_t_14); __pyx_t_2 = 0; __pyx_t_22 = NULL; } else { - __pyx_t_2 = -1; __pyx_t_14 = PyObject_GetIter(__pyx_t_15); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = -1; __pyx_t_14 = PyObject_GetIter(__pyx_t_15); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_22 = Py_TYPE(__pyx_t_14)->tp_iternext; } @@ -54070,16 +54184,16 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( if (!__pyx_t_22 && PyList_CheckExact(__pyx_t_14)) { if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_14)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_15 = PyList_GET_ITEM(__pyx_t_14, __pyx_t_2); __Pyx_INCREF(__pyx_t_15); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_15 = PyList_GET_ITEM(__pyx_t_14, __pyx_t_2); __Pyx_INCREF(__pyx_t_15); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_15 = PySequence_ITEM(__pyx_t_14, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_15 = PySequence_ITEM(__pyx_t_14, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_22 && PyTuple_CheckExact(__pyx_t_14)) { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_14)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_15 = PyTuple_GET_ITEM(__pyx_t_14, __pyx_t_2); __Pyx_INCREF(__pyx_t_15); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_15 = PyTuple_GET_ITEM(__pyx_t_14, __pyx_t_2); __Pyx_INCREF(__pyx_t_15); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_15 = PySequence_ITEM(__pyx_t_14, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_15 = PySequence_ITEM(__pyx_t_14, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_15 = __pyx_t_22(__pyx_t_14); @@ -54087,7 +54201,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( 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[8]; __pyx_lineno = 1189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -54103,7 +54217,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { @@ -54119,17 +54233,17 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_11); #else - __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); - __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_11 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); #endif __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; } else { Py_ssize_t index = -1; - __pyx_t_18 = PyObject_GetIter(__pyx_t_15); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = PyObject_GetIter(__pyx_t_15); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __pyx_t_20 = Py_TYPE(__pyx_t_18)->tp_iternext; @@ -54139,7 +54253,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GOTREF(__pyx_t_1); index = 2; __pyx_t_11 = __pyx_t_20(__pyx_t_18); if (unlikely(!__pyx_t_11)) goto __pyx_L75_unpacking_failed; __Pyx_GOTREF(__pyx_t_11); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_20(__pyx_t_18), 3) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_IternextUnpackEndCheck(__pyx_t_20(__pyx_t_18), 3) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_20 = NULL; __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; goto __pyx_L76_unpacking_done; @@ -54147,7 +54261,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_20 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L76_unpacking_done:; } __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_f); @@ -54163,16 +54277,16 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_11); __pyx_t_11 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1190 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1198 * f_syms = tuple(word[0][0] for word in fwords) * for f, lex_i, lex_j in self.get_f_phrases(f_syms): * spanlen = (lex_j - lex_i) + 1 # <<<<<<<<<<<<<< * if not sym_isvar(f[0]): * spanlen += 1 */ - __pyx_t_15 = PyNumber_Subtract(__pyx_cur_scope->__pyx_v_lex_j, __pyx_cur_scope->__pyx_v_lex_i); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_15 = PyNumber_Subtract(__pyx_cur_scope->__pyx_v_lex_j, __pyx_cur_scope->__pyx_v_lex_i); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); - __pyx_t_11 = PyNumber_Add(__pyx_t_15, __pyx_int_1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = PyNumber_Add(__pyx_t_15, __pyx_int_1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_spanlen); @@ -54180,28 +54294,28 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_11); __pyx_t_11 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1191 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1199 * for f, lex_i, lex_j in self.get_f_phrases(f_syms): * spanlen = (lex_j - lex_i) + 1 * if not sym_isvar(f[0]): # <<<<<<<<<<<<<< * spanlen += 1 * if not sym_isvar(f[1]): */ - __pyx_t_11 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_f, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_11 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_f, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_11); - __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_11); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_11); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_9 = ((!(__pyx_f_4cdec_2sa_3_sa_sym_isvar(__pyx_t_7) != 0)) != 0); if (__pyx_t_9) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1192 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1200 * spanlen = (lex_j - lex_i) + 1 * if not sym_isvar(f[0]): * spanlen += 1 # <<<<<<<<<<<<<< * if not sym_isvar(f[1]): * spanlen += 1 */ - __pyx_t_11 = PyNumber_InPlaceAdd(__pyx_cur_scope->__pyx_v_spanlen, __pyx_int_1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = PyNumber_InPlaceAdd(__pyx_cur_scope->__pyx_v_spanlen, __pyx_int_1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_spanlen); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_spanlen, __pyx_t_11); @@ -54211,28 +54325,28 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( } __pyx_L77:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1193 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1201 * if not sym_isvar(f[0]): * spanlen += 1 * if not sym_isvar(f[1]): # <<<<<<<<<<<<<< * spanlen += 1 * for e in stats.phrases_fe.get(f, ()): */ - __pyx_t_11 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_f, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_11 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_f, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_11 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_11); - __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_11); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_11); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_9 = ((!(__pyx_f_4cdec_2sa_3_sa_sym_isvar(__pyx_t_7) != 0)) != 0); if (__pyx_t_9) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1194 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1202 * spanlen += 1 * if not sym_isvar(f[1]): * spanlen += 1 # <<<<<<<<<<<<<< * for e in stats.phrases_fe.get(f, ()): * if (f, e) not in seen_phrases: */ - __pyx_t_11 = PyNumber_InPlaceAdd(__pyx_cur_scope->__pyx_v_spanlen, __pyx_int_1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = PyNumber_InPlaceAdd(__pyx_cur_scope->__pyx_v_spanlen, __pyx_int_1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1202; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_spanlen); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_spanlen, __pyx_t_11); @@ -54242,19 +54356,19 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( } __pyx_L78:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1195 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1203 * if not sym_isvar(f[1]): * spanlen += 1 * for e in stats.phrases_fe.get(f, ()): # <<<<<<<<<<<<<< * if (f, e) not in seen_phrases: * # Don't add multiple instances of the same phrase here */ - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_stats, __pyx_n_s_phrases_fe); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_stats, __pyx_n_s_phrases_fe); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1203; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); - __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_get); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_get); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1203; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1203; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_f); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_cur_scope->__pyx_v_f); @@ -54262,7 +54376,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_INCREF(__pyx_empty_tuple); PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_empty_tuple); __Pyx_GIVEREF(__pyx_empty_tuple); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1203; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; @@ -54270,7 +54384,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_t_11 = __pyx_t_1; __Pyx_INCREF(__pyx_t_11); __pyx_t_23 = 0; __pyx_t_29 = NULL; } else { - __pyx_t_23 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_23 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1203; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __pyx_t_29 = Py_TYPE(__pyx_t_11)->tp_iternext; } @@ -54279,16 +54393,16 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( if (!__pyx_t_29 && PyList_CheckExact(__pyx_t_11)) { if (__pyx_t_23 >= PyList_GET_SIZE(__pyx_t_11)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_11, __pyx_t_23); __Pyx_INCREF(__pyx_t_1); __pyx_t_23++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_11, __pyx_t_23); __Pyx_INCREF(__pyx_t_1); __pyx_t_23++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1203; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_11, __pyx_t_23); __pyx_t_23++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySequence_ITEM(__pyx_t_11, __pyx_t_23); __pyx_t_23++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1203; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_29 && PyTuple_CheckExact(__pyx_t_11)) { if (__pyx_t_23 >= PyTuple_GET_SIZE(__pyx_t_11)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_11, __pyx_t_23); __Pyx_INCREF(__pyx_t_1); __pyx_t_23++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_11, __pyx_t_23); __Pyx_INCREF(__pyx_t_1); __pyx_t_23++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1203; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_11, __pyx_t_23); __pyx_t_23++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySequence_ITEM(__pyx_t_11, __pyx_t_23); __pyx_t_23++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1203; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_1 = __pyx_t_29(__pyx_t_11); @@ -54296,7 +54410,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( 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[8]; __pyx_lineno = 1195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1203; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -54307,14 +54421,14 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1196 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1204 * spanlen += 1 * for e in stats.phrases_fe.get(f, ()): * if (f, e) not in seen_phrases: # <<<<<<<<<<<<<< * # Don't add multiple instances of the same phrase here * seen_phrases.add((f, e)) */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_f); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_cur_scope->__pyx_v_f); @@ -54322,19 +54436,19 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_INCREF(__pyx_cur_scope->__pyx_v_e); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_cur_scope->__pyx_v_e); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_e); - __pyx_t_9 = (__Pyx_PySequence_Contains(__pyx_t_1, __pyx_cur_scope->__pyx_v_seen_phrases, Py_NE)); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = (__Pyx_PySequence_Contains(__pyx_t_1, __pyx_cur_scope->__pyx_v_seen_phrases, Py_NE)); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_13 = (__pyx_t_9 != 0); if (__pyx_t_13) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1198 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1206 * if (f, e) not in seen_phrases: * # Don't add multiple instances of the same phrase here * seen_phrases.add((f, e)) # <<<<<<<<<<<<<< * scores = self.scorer.score(FeatureContext( * f, e, 0, 0, 0, */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_f); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_cur_scope->__pyx_v_f); @@ -54342,29 +54456,29 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_INCREF(__pyx_cur_scope->__pyx_v_e); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_cur_scope->__pyx_v_e); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_e); - __pyx_t_12 = PySet_Add(__pyx_cur_scope->__pyx_v_seen_phrases, __pyx_t_1); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_12 = PySet_Add(__pyx_cur_scope->__pyx_v_seen_phrases, __pyx_t_1); if (unlikely(__pyx_t_12 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1199 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1207 * # Don't add multiple instances of the same phrase here * seen_phrases.add((f, e)) * scores = self.scorer.score(FeatureContext( # <<<<<<<<<<<<<< * f, e, 0, 0, 0, * spanlen, None, None, */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_FeatureContext); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_FeatureContext); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1204 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1212 * fwords, self.fda, self.eda, * meta, * self.online_ctx_lookup(f, e, ctx_name))) # <<<<<<<<<<<<<< * alignment = stats.phrases_al[f][e] * yield Rule(self.category, f, e, scores, alignment) */ - __pyx_t_15 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_online_ctx_lookup); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_15 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_online_ctx_lookup); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); - __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_f); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_cur_scope->__pyx_v_f); @@ -54375,19 +54489,19 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_INCREF(__pyx_cur_scope->__pyx_v_ctx_name); PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_cur_scope->__pyx_v_ctx_name); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_ctx_name); - __pyx_t_18 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_8, NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_8, NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1199 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1207 * # Don't add multiple instances of the same phrase here * seen_phrases.add((f, e)) * scores = self.scorer.score(FeatureContext( # <<<<<<<<<<<<<< * f, e, 0, 0, 0, * spanlen, None, None, */ - __pyx_t_8 = PyTuple_New(13); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = PyTuple_New(13); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_f); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_cur_scope->__pyx_v_f); @@ -54428,11 +54542,11 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( PyTuple_SET_ITEM(__pyx_t_8, 12, __pyx_t_18); __Pyx_GIVEREF(__pyx_t_18); __pyx_t_18 = 0; - __pyx_t_18 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = ((PyObject *)((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Scorer *)__pyx_cur_scope->__pyx_v_self->scorer->__pyx_vtab)->score(__pyx_cur_scope->__pyx_v_self->scorer, __pyx_t_18)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = ((PyObject *)((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Scorer *)__pyx_cur_scope->__pyx_v_self->scorer->__pyx_vtab)->score(__pyx_cur_scope->__pyx_v_self->scorer, __pyx_t_18)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_scores)); @@ -54440,19 +54554,19 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1205 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1213 * meta, * self.online_ctx_lookup(f, e, ctx_name))) * alignment = stats.phrases_al[f][e] # <<<<<<<<<<<<<< * yield Rule(self.category, f, e, scores, alignment) * */ - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_stats, __pyx_n_s_phrases_al); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_stats, __pyx_n_s_phrases_al); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); - __pyx_t_18 = PyObject_GetItem(__pyx_t_8, __pyx_cur_scope->__pyx_v_f); if (unlikely(__pyx_t_18 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_18 = PyObject_GetItem(__pyx_t_8, __pyx_cur_scope->__pyx_v_f); if (unlikely(__pyx_t_18 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = PyObject_GetItem(__pyx_t_18, __pyx_cur_scope->__pyx_v_e); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_8 = PyObject_GetItem(__pyx_t_18, __pyx_cur_scope->__pyx_v_e); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_alignment); @@ -54460,16 +54574,16 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1206 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1214 * self.online_ctx_lookup(f, e, ctx_name))) * alignment = stats.phrases_al[f][e] * yield Rule(self.category, f, e, scores, alignment) # <<<<<<<<<<<<<< * * stop_time = monitor_cpu() */ - __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_self->category); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_self->category); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); - __pyx_t_18 = PyTuple_New(5); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_18 = PyTuple_New(5); if (unlikely(!__pyx_t_18)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); @@ -54486,7 +54600,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( PyTuple_SET_ITEM(__pyx_t_18, 4, __pyx_cur_scope->__pyx_v_alignment); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_alignment); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_Rule)), __pyx_t_18, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_Rule)), __pyx_t_18, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_r = __pyx_t_8; @@ -54515,7 +54629,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( __pyx_t_22 = __pyx_cur_scope->__pyx_t_10; __pyx_t_23 = __pyx_cur_scope->__pyx_t_1; __pyx_t_29 = __pyx_cur_scope->__pyx_t_11; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L81; } __pyx_L81:; @@ -54527,40 +54641,40 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( } __pyx_L72:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1208 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1216 * yield Rule(self.category, f, e, scores, alignment) * * stop_time = monitor_cpu() # <<<<<<<<<<<<<< * logger.info("Total time for rule lookup, extraction, and scoring = %f seconds", (stop_time - start_time)) * gc.collect() */ - __pyx_t_14 = __Pyx_GetModuleGlobalName(__pyx_n_s_monitor_cpu); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_14 = __Pyx_GetModuleGlobalName(__pyx_n_s_monitor_cpu); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); - __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_GIVEREF(__pyx_t_11); __pyx_cur_scope->__pyx_v_stop_time = __pyx_t_11; __pyx_t_11 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1209 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1217 * * stop_time = monitor_cpu() * logger.info("Total time for rule lookup, extraction, and scoring = %f seconds", (stop_time - start_time)) # <<<<<<<<<<<<<< * gc.collect() * logger.info(" Extract time = %f seconds", self.extract_time) */ - __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_logger); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_logger); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); - __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_info); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_info); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_11 = PyFloat_FromDouble(__pyx_cur_scope->__pyx_v_start_time); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = PyFloat_FromDouble(__pyx_cur_scope->__pyx_v_start_time); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); - __pyx_t_8 = PyNumber_Subtract(__pyx_cur_scope->__pyx_v_stop_time, __pyx_t_11); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = PyNumber_Subtract(__pyx_cur_scope->__pyx_v_stop_time, __pyx_t_11); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_INCREF(__pyx_kp_s_Total_time_for_rule_lookup_extra); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_kp_s_Total_time_for_rule_lookup_extra); @@ -54568,44 +54682,44 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_11, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_11, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1210 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1218 * stop_time = monitor_cpu() * logger.info("Total time for rule lookup, extraction, and scoring = %f seconds", (stop_time - start_time)) * gc.collect() # <<<<<<<<<<<<<< * logger.info(" Extract time = %f seconds", self.extract_time) * logger.info(" Intersect time = %f seconds", self.intersect_time) */ - __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_gc); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_gc); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_collect); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_collect); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1211 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1219 * logger.info("Total time for rule lookup, extraction, and scoring = %f seconds", (stop_time - start_time)) * gc.collect() * logger.info(" Extract time = %f seconds", self.extract_time) # <<<<<<<<<<<<<< * logger.info(" Intersect time = %f seconds", self.intersect_time) * */ - __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_logger); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_logger); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_info); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_info); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = PyFloat_FromDouble(__pyx_cur_scope->__pyx_v_self->extract_time); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = PyFloat_FromDouble(__pyx_cur_scope->__pyx_v_self->extract_time); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); - __pyx_t_14 = PyTuple_New(2); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_14 = PyTuple_New(2); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_INCREF(__pyx_kp_s_Extract_time_f_seconds); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_kp_s_Extract_time_f_seconds); @@ -54613,27 +54727,27 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_14, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_14, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1212 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1220 * gc.collect() * logger.info(" Extract time = %f seconds", self.extract_time) * logger.info(" Intersect time = %f seconds", self.intersect_time) # <<<<<<<<<<<<<< * * */ - __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_logger); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_logger); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); - __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_info); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_info); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = PyFloat_FromDouble(__pyx_cur_scope->__pyx_v_self->intersect_time); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = PyFloat_FromDouble(__pyx_cur_scope->__pyx_v_self->intersect_time); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); - __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_INCREF(__pyx_kp_s_Intersect_time_f_seconds); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_kp_s_Intersect_time_f_seconds); @@ -54641,13 +54755,13 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_11, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_11, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":973 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":981 * return sorted(result); * * def input(self, fwords, meta, ctx_name=None): # <<<<<<<<<<<<<< @@ -54679,7 +54793,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_24generator4( return NULL; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1215 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1223 * * * cdef int find_fixpoint(self, # <<<<<<<<<<<<<< @@ -54709,7 +54823,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("find_fixpoint", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1230 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1238 * cdef int e_low_prev, e_high_prev, f_low_prev, f_high_prev, new_x, new_low_x, new_high_x * * e_low[0] = e_in_low # <<<<<<<<<<<<<< @@ -54718,7 +54832,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct */ (__pyx_v_e_low[0]) = __pyx_v_e_in_low; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1231 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1239 * * e_low[0] = e_in_low * e_high[0] = e_in_high # <<<<<<<<<<<<<< @@ -54727,19 +54841,19 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct */ (__pyx_v_e_high[0]) = __pyx_v_e_in_high; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1232 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1240 * e_low[0] = e_in_low * e_high[0] = e_in_high * self.find_projection(f_low, f_high, f_links_low, f_links_high, e_low, e_high) # <<<<<<<<<<<<<< * if e_low[0] == -1: * # low-priority corner case: if phrase w is unaligned, */ - __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_f_high); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_2 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->find_projection(__pyx_v_self, __pyx_v_f_low, __pyx_t_1, __pyx_v_f_links_low, __pyx_v_f_links_high, __pyx_v_e_low, __pyx_v_e_high); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_f_high); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->find_projection(__pyx_v_self, __pyx_v_f_low, __pyx_t_1, __pyx_v_f_links_low, __pyx_v_f_links_high, __pyx_v_e_low, __pyx_v_e_high); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1233 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1241 * e_high[0] = e_in_high * self.find_projection(f_low, f_high, f_links_low, f_links_high, e_low, e_high) * if e_low[0] == -1: # <<<<<<<<<<<<<< @@ -54749,7 +54863,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_t_3 = (((__pyx_v_e_low[0]) == -1) != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1239 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1247 * # rule X -> X_1 w X_2 / X_1 X_2. This is probably * # not worth the bother, though. * return 0 # <<<<<<<<<<<<<< @@ -54760,7 +54874,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1240 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1248 * # not worth the bother, though. * return 0 * elif e_in_low != -1 and e_low[0] != e_in_low: # <<<<<<<<<<<<<< @@ -54776,7 +54890,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct } if (__pyx_t_5) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1241 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1249 * return 0 * elif e_in_low != -1 and e_low[0] != e_in_low: * if e_in_low - e_low[0] < min_ex_size: # <<<<<<<<<<<<<< @@ -54786,7 +54900,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_t_5 = (((__pyx_v_e_in_low - (__pyx_v_e_low[0])) < __pyx_v_min_ex_size) != 0); if (__pyx_t_5) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1242 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1250 * elif e_in_low != -1 and e_low[0] != e_in_low: * if e_in_low - e_low[0] < min_ex_size: * e_low[0] = e_in_low - min_ex_size # <<<<<<<<<<<<<< @@ -54795,7 +54909,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct */ (__pyx_v_e_low[0]) = (__pyx_v_e_in_low - __pyx_v_min_ex_size); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1243 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1251 * if e_in_low - e_low[0] < min_ex_size: * e_low[0] = e_in_low - min_ex_size * if e_low[0] < 0: # <<<<<<<<<<<<<< @@ -54805,7 +54919,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_t_5 = (((__pyx_v_e_low[0]) < 0) != 0); if (__pyx_t_5) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1244 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1252 * e_low[0] = e_in_low - min_ex_size * if e_low[0] < 0: * return 0 # <<<<<<<<<<<<<< @@ -54822,7 +54936,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct } __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1246 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1254 * return 0 * * if e_high[0] - e_low[0] > max_e_len: # <<<<<<<<<<<<<< @@ -54832,7 +54946,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_t_5 = ((((__pyx_v_e_high[0]) - (__pyx_v_e_low[0])) > __pyx_v_max_e_len) != 0); if (__pyx_t_5) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1247 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1255 * * if e_high[0] - e_low[0] > max_e_len: * return 0 # <<<<<<<<<<<<<< @@ -54843,7 +54957,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1248 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1256 * if e_high[0] - e_low[0] > max_e_len: * return 0 * elif e_in_high != -1 and e_high[0] != e_in_high: # <<<<<<<<<<<<<< @@ -54859,7 +54973,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct } if (__pyx_t_4) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1249 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1257 * return 0 * elif e_in_high != -1 and e_high[0] != e_in_high: * if e_high[0] - e_in_high < min_ex_size: # <<<<<<<<<<<<<< @@ -54869,7 +54983,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_t_4 = ((((__pyx_v_e_high[0]) - __pyx_v_e_in_high) < __pyx_v_min_ex_size) != 0); if (__pyx_t_4) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1250 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1258 * elif e_in_high != -1 and e_high[0] != e_in_high: * if e_high[0] - e_in_high < min_ex_size: * e_high[0] = e_in_high + min_ex_size # <<<<<<<<<<<<<< @@ -54878,7 +54992,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct */ (__pyx_v_e_high[0]) = (__pyx_v_e_in_high + __pyx_v_min_ex_size); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1251 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1259 * if e_high[0] - e_in_high < min_ex_size: * e_high[0] = e_in_high + min_ex_size * if e_high[0] > e_sent_len: # <<<<<<<<<<<<<< @@ -54888,7 +55002,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_t_4 = (((__pyx_v_e_high[0]) > __pyx_v_e_sent_len) != 0); if (__pyx_t_4) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1252 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1260 * e_high[0] = e_in_high + min_ex_size * if e_high[0] > e_sent_len: * return 0 # <<<<<<<<<<<<<< @@ -54905,7 +55019,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct } __pyx_L6:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1254 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1262 * return 0 * * f_back_low[0] = -1 # <<<<<<<<<<<<<< @@ -54914,7 +55028,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct */ (__pyx_v_f_back_low[0]) = -1; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1255 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1263 * * f_back_low[0] = -1 * f_back_high[0] = -1 # <<<<<<<<<<<<<< @@ -54923,7 +55037,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct */ (__pyx_v_f_back_high[0]) = -1; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1256 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1264 * f_back_low[0] = -1 * f_back_high[0] = -1 * f_low_prev = f_low # <<<<<<<<<<<<<< @@ -54932,17 +55046,17 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct */ __pyx_v_f_low_prev = __pyx_v_f_low; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1257 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1265 * f_back_high[0] = -1 * f_low_prev = f_low * f_high_prev = f_high # <<<<<<<<<<<<<< * new_x = 0 * new_low_x = 0 */ - __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_f_high); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_f_high); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1265; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_f_high_prev = __pyx_t_1; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1258 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1266 * f_low_prev = f_low * f_high_prev = f_high * new_x = 0 # <<<<<<<<<<<<<< @@ -54951,7 +55065,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct */ __pyx_v_new_x = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1259 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1267 * f_high_prev = f_high * new_x = 0 * new_low_x = 0 # <<<<<<<<<<<<<< @@ -54960,7 +55074,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct */ __pyx_v_new_low_x = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1260 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1268 * new_x = 0 * new_low_x = 0 * new_high_x = 0 # <<<<<<<<<<<<<< @@ -54969,7 +55083,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct */ __pyx_v_new_high_x = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1262 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1270 * new_high_x = 0 * * while True: # <<<<<<<<<<<<<< @@ -54978,7 +55092,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct */ while (1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1264 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1272 * while True: * * if f_back_low[0] == -1: # <<<<<<<<<<<<<< @@ -54988,45 +55102,45 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_t_4 = (((__pyx_v_f_back_low[0]) == -1) != 0); if (__pyx_t_4) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1265 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1273 * * if f_back_low[0] == -1: * self.find_projection(e_low[0], e_high[0], e_links_low, e_links_high, f_back_low, f_back_high) # <<<<<<<<<<<<<< * else: * self.find_projection(e_low[0], e_low_prev, e_links_low, e_links_high, f_back_low, f_back_high) */ - __pyx_t_2 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->find_projection(__pyx_v_self, (__pyx_v_e_low[0]), (__pyx_v_e_high[0]), __pyx_v_e_links_low, __pyx_v_e_links_high, __pyx_v_f_back_low, __pyx_v_f_back_high); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1265; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->find_projection(__pyx_v_self, (__pyx_v_e_low[0]), (__pyx_v_e_high[0]), __pyx_v_e_links_low, __pyx_v_e_links_high, __pyx_v_f_back_low, __pyx_v_f_back_high); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L11; } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1267 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1275 * self.find_projection(e_low[0], e_high[0], e_links_low, e_links_high, f_back_low, f_back_high) * else: * self.find_projection(e_low[0], e_low_prev, e_links_low, e_links_high, f_back_low, f_back_high) # <<<<<<<<<<<<<< * self.find_projection(e_high_prev, e_high[0], e_links_low, e_links_high, f_back_low, f_back_high) * */ - __pyx_t_2 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->find_projection(__pyx_v_self, (__pyx_v_e_low[0]), __pyx_v_e_low_prev, __pyx_v_e_links_low, __pyx_v_e_links_high, __pyx_v_f_back_low, __pyx_v_f_back_high); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->find_projection(__pyx_v_self, (__pyx_v_e_low[0]), __pyx_v_e_low_prev, __pyx_v_e_links_low, __pyx_v_e_links_high, __pyx_v_f_back_low, __pyx_v_f_back_high); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1268 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1276 * else: * self.find_projection(e_low[0], e_low_prev, e_links_low, e_links_high, f_back_low, f_back_high) * self.find_projection(e_high_prev, e_high[0], e_links_low, e_links_high, f_back_low, f_back_high) # <<<<<<<<<<<<<< * * if f_back_low[0] > f_low: */ - __pyx_t_2 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->find_projection(__pyx_v_self, __pyx_v_e_high_prev, (__pyx_v_e_high[0]), __pyx_v_e_links_low, __pyx_v_e_links_high, __pyx_v_f_back_low, __pyx_v_f_back_high); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1268; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->find_projection(__pyx_v_self, __pyx_v_e_high_prev, (__pyx_v_e_high[0]), __pyx_v_e_links_low, __pyx_v_e_links_high, __pyx_v_f_back_low, __pyx_v_f_back_high); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1276; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_L11:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1270 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1278 * self.find_projection(e_high_prev, e_high[0], e_links_low, e_links_high, f_back_low, f_back_high) * * if f_back_low[0] > f_low: # <<<<<<<<<<<<<< @@ -55036,7 +55150,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_t_4 = (((__pyx_v_f_back_low[0]) > __pyx_v_f_low) != 0); if (__pyx_t_4) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1271 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1279 * * if f_back_low[0] > f_low: * f_back_low[0] = f_low # <<<<<<<<<<<<<< @@ -55048,35 +55162,35 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct } __pyx_L12:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1273 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1281 * f_back_low[0] = f_low * * if f_back_high[0] < f_high: # <<<<<<<<<<<<<< * f_back_high[0] = f_high * */ - __pyx_t_2 = __Pyx_PyInt_From_int((__pyx_v_f_back_high[0])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyInt_From_int((__pyx_v_f_back_high[0])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1281; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = PyObject_RichCompare(__pyx_t_2, __pyx_v_f_high, Py_LT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyObject_RichCompare(__pyx_t_2, __pyx_v_f_high, Py_LT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1281; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1281; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_4) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1274 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1282 * * if f_back_high[0] < f_high: * f_back_high[0] = f_high # <<<<<<<<<<<<<< * * if f_back_low[0] == f_low_prev and f_back_high[0] == f_high_prev: */ - __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_f_high); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1274; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_f_high); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1282; __pyx_clineno = __LINE__; goto __pyx_L1_error;} (__pyx_v_f_back_high[0]) = __pyx_t_1; goto __pyx_L13; } __pyx_L13:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1276 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1284 * f_back_high[0] = f_high * * if f_back_low[0] == f_low_prev and f_back_high[0] == f_high_prev: # <<<<<<<<<<<<<< @@ -55092,7 +55206,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct } if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1277 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1285 * * if f_back_low[0] == f_low_prev and f_back_high[0] == f_high_prev: * return 1 # <<<<<<<<<<<<<< @@ -55103,7 +55217,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1279 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1287 * return 1 * * if allow_low_x == 0 and f_back_low[0] < f_low: # <<<<<<<<<<<<<< @@ -55119,7 +55233,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct } if (__pyx_t_5) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1281 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1289 * if allow_low_x == 0 and f_back_low[0] < f_low: * # FAIL: f phrase is not tight * return 0 # <<<<<<<<<<<<<< @@ -55130,7 +55244,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1283 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1291 * return 0 * * if f_back_high[0] - f_back_low[0] > max_f_len: # <<<<<<<<<<<<<< @@ -55140,7 +55254,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_t_5 = ((((__pyx_v_f_back_high[0]) - (__pyx_v_f_back_low[0])) > __pyx_v_max_f_len) != 0); if (__pyx_t_5) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1285 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1293 * if f_back_high[0] - f_back_low[0] > max_f_len: * # FAIL: f back projection is too wide * return 0 # <<<<<<<<<<<<<< @@ -55151,7 +55265,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1287 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1295 * return 0 * * if allow_high_x == 0 and f_back_high[0] > f_high: # <<<<<<<<<<<<<< @@ -55160,11 +55274,11 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct */ __pyx_t_5 = (__pyx_v_allow_high_x == 0); if (__pyx_t_5) { - __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_f_back_high[0])); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_f_back_high[0])); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - __pyx_t_2 = PyObject_RichCompare(__pyx_t_6, __pyx_v_f_high, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_RichCompare(__pyx_t_6, __pyx_v_f_high, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = __pyx_t_3; } else { @@ -55172,7 +55286,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct } if (__pyx_t_4) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1289 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1297 * if allow_high_x == 0 and f_back_high[0] > f_high: * # FAIL: extension on high side not allowed * return 0 # <<<<<<<<<<<<<< @@ -55183,7 +55297,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1291 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1299 * return 0 * * if f_low != f_back_low[0]: # <<<<<<<<<<<<<< @@ -55193,7 +55307,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_t_4 = ((__pyx_v_f_low != (__pyx_v_f_back_low[0])) != 0); if (__pyx_t_4) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1292 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1300 * * if f_low != f_back_low[0]: * if new_low_x == 0: # <<<<<<<<<<<<<< @@ -55203,7 +55317,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_t_4 = ((__pyx_v_new_low_x == 0) != 0); if (__pyx_t_4) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1293 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1301 * if f_low != f_back_low[0]: * if new_low_x == 0: * if new_x >= max_new_x: # <<<<<<<<<<<<<< @@ -55213,7 +55327,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_t_4 = ((__pyx_v_new_x >= __pyx_v_max_new_x) != 0); if (__pyx_t_4) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1295 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1303 * if new_x >= max_new_x: * # FAIL: extension required on low side violates max # of gaps * return 0 # <<<<<<<<<<<<<< @@ -55225,7 +55339,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1297 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1305 * return 0 * else: * new_x = new_x + 1 # <<<<<<<<<<<<<< @@ -55234,7 +55348,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct */ __pyx_v_new_x = (__pyx_v_new_x + 1); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1298 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1306 * else: * new_x = new_x + 1 * new_low_x = 1 # <<<<<<<<<<<<<< @@ -55247,7 +55361,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct } __pyx_L19:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1299 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1307 * new_x = new_x + 1 * new_low_x = 1 * if f_low - f_back_low[0] < min_fx_size: # <<<<<<<<<<<<<< @@ -55257,7 +55371,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_t_4 = (((__pyx_v_f_low - (__pyx_v_f_back_low[0])) < __pyx_v_min_fx_size) != 0); if (__pyx_t_4) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1300 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1308 * new_low_x = 1 * if f_low - f_back_low[0] < min_fx_size: * f_back_low[0] = f_low - min_fx_size # <<<<<<<<<<<<<< @@ -55266,7 +55380,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct */ (__pyx_v_f_back_low[0]) = (__pyx_v_f_low - __pyx_v_min_fx_size); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1301 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1309 * if f_low - f_back_low[0] < min_fx_size: * f_back_low[0] = f_low - min_fx_size * if f_back_high[0] - f_back_low[0] > max_f_len: # <<<<<<<<<<<<<< @@ -55276,7 +55390,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_t_4 = ((((__pyx_v_f_back_high[0]) - (__pyx_v_f_back_low[0])) > __pyx_v_max_f_len) != 0); if (__pyx_t_4) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1303 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1311 * if f_back_high[0] - f_back_low[0] > max_f_len: * # FAIL: extension required on low side violates max initial length * return 0 # <<<<<<<<<<<<<< @@ -55287,7 +55401,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1304 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1312 * # FAIL: extension required on low side violates max initial length * return 0 * if f_back_low[0] < 0: # <<<<<<<<<<<<<< @@ -55297,7 +55411,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_t_4 = (((__pyx_v_f_back_low[0]) < 0) != 0); if (__pyx_t_4) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1306 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1314 * if f_back_low[0] < 0: * # FAIL: extension required on low side violates sentence boundary * return 0 # <<<<<<<<<<<<<< @@ -55314,22 +55428,22 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct } __pyx_L18:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1308 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1316 * return 0 * * if f_high != f_back_high[0]: # <<<<<<<<<<<<<< * if new_high_x == 0: * if new_x >= max_new_x: */ - __pyx_t_2 = __Pyx_PyInt_From_int((__pyx_v_f_back_high[0])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyInt_From_int((__pyx_v_f_back_high[0])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = PyObject_RichCompare(__pyx_v_f_high, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyObject_RichCompare(__pyx_v_f_high, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_4) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1309 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1317 * * if f_high != f_back_high[0]: * if new_high_x == 0: # <<<<<<<<<<<<<< @@ -55339,7 +55453,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_t_4 = ((__pyx_v_new_high_x == 0) != 0); if (__pyx_t_4) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1310 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1318 * if f_high != f_back_high[0]: * if new_high_x == 0: * if new_x >= max_new_x: # <<<<<<<<<<<<<< @@ -55349,7 +55463,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_t_4 = ((__pyx_v_new_x >= __pyx_v_max_new_x) != 0); if (__pyx_t_4) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1312 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1320 * if new_x >= max_new_x: * # FAIL: extension required on high side violates max # of gaps * return 0 # <<<<<<<<<<<<<< @@ -55361,7 +55475,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1314 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1322 * return 0 * else: * new_x = new_x + 1 # <<<<<<<<<<<<<< @@ -55370,7 +55484,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct */ __pyx_v_new_x = (__pyx_v_new_x + 1); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1315 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1323 * else: * new_x = new_x + 1 * new_high_x = 1 # <<<<<<<<<<<<<< @@ -55383,44 +55497,44 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct } __pyx_L25:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1316 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1324 * new_x = new_x + 1 * new_high_x = 1 * if f_back_high[0] - f_high < min_fx_size: # <<<<<<<<<<<<<< * f_back_high[0] = f_high + min_fx_size * if f_back_high[0] - f_back_low[0] > max_f_len: */ - __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_f_back_high[0])); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_f_back_high[0])); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - __pyx_t_2 = PyNumber_Subtract(__pyx_t_6, __pyx_v_f_high); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyNumber_Subtract(__pyx_t_6, __pyx_v_f_high); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_min_fx_size); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_min_fx_size); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = PyObject_RichCompare(__pyx_t_2, __pyx_t_6, Py_LT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = PyObject_RichCompare(__pyx_t_2, __pyx_t_6, Py_LT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1324; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_4) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1317 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1325 * new_high_x = 1 * if f_back_high[0] - f_high < min_fx_size: * f_back_high[0] = f_high + min_fx_size # <<<<<<<<<<<<<< * if f_back_high[0] - f_back_low[0] > max_f_len: * # FAIL: extension required on high side violates max initial length */ - __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_min_fx_size); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_min_fx_size); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = PyNumber_Add(__pyx_v_f_high, __pyx_t_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyNumber_Add(__pyx_v_f_high, __pyx_t_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; (__pyx_v_f_back_high[0]) = __pyx_t_1; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1318 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1326 * if f_back_high[0] - f_high < min_fx_size: * f_back_high[0] = f_high + min_fx_size * if f_back_high[0] - f_back_low[0] > max_f_len: # <<<<<<<<<<<<<< @@ -55430,7 +55544,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_t_4 = ((((__pyx_v_f_back_high[0]) - (__pyx_v_f_back_low[0])) > __pyx_v_max_f_len) != 0); if (__pyx_t_4) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1320 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1328 * if f_back_high[0] - f_back_low[0] > max_f_len: * # FAIL: extension required on high side violates max initial length * return 0 # <<<<<<<<<<<<<< @@ -55441,7 +55555,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1321 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1329 * # FAIL: extension required on high side violates max initial length * return 0 * if f_back_high[0] > f_sent_len: # <<<<<<<<<<<<<< @@ -55451,7 +55565,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_t_4 = (((__pyx_v_f_back_high[0]) > __pyx_v_f_sent_len) != 0); if (__pyx_t_4) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1323 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1331 * if f_back_high[0] > f_sent_len: * # FAIL: extension required on high side violates sentence boundary * return 0 # <<<<<<<<<<<<<< @@ -55468,7 +55582,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct } __pyx_L24:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1325 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1333 * return 0 * * e_low_prev = e_low[0] # <<<<<<<<<<<<<< @@ -55477,7 +55591,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct */ __pyx_v_e_low_prev = (__pyx_v_e_low[0]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1326 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1334 * * e_low_prev = e_low[0] * e_high_prev = e_high[0] # <<<<<<<<<<<<<< @@ -55486,29 +55600,29 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct */ __pyx_v_e_high_prev = (__pyx_v_e_high[0]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1328 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1336 * e_high_prev = e_high[0] * * self.find_projection(f_back_low[0], f_low_prev, f_links_low, f_links_high, e_low, e_high) # <<<<<<<<<<<<<< * self.find_projection(f_high_prev, f_back_high[0], f_links_low, f_links_high, e_low, e_high) * if e_low[0] == e_low_prev and e_high[0] == e_high_prev: */ - __pyx_t_6 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->find_projection(__pyx_v_self, (__pyx_v_f_back_low[0]), __pyx_v_f_low_prev, __pyx_v_f_links_low, __pyx_v_f_links_high, __pyx_v_e_low, __pyx_v_e_high); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1328; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->find_projection(__pyx_v_self, (__pyx_v_f_back_low[0]), __pyx_v_f_low_prev, __pyx_v_f_links_low, __pyx_v_f_links_high, __pyx_v_e_low, __pyx_v_e_high); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1336; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1329 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1337 * * self.find_projection(f_back_low[0], f_low_prev, f_links_low, f_links_high, e_low, e_high) * self.find_projection(f_high_prev, f_back_high[0], f_links_low, f_links_high, e_low, e_high) # <<<<<<<<<<<<<< * if e_low[0] == e_low_prev and e_high[0] == e_high_prev: * return 1 */ - __pyx_t_6 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->find_projection(__pyx_v_self, __pyx_v_f_high_prev, (__pyx_v_f_back_high[0]), __pyx_v_f_links_low, __pyx_v_f_links_high, __pyx_v_e_low, __pyx_v_e_high); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->find_projection(__pyx_v_self, __pyx_v_f_high_prev, (__pyx_v_f_back_high[0]), __pyx_v_f_links_low, __pyx_v_f_links_high, __pyx_v_e_low, __pyx_v_e_high); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1337; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1330 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1338 * self.find_projection(f_back_low[0], f_low_prev, f_links_low, f_links_high, e_low, e_high) * self.find_projection(f_high_prev, f_back_high[0], f_links_low, f_links_high, e_low, e_high) * if e_low[0] == e_low_prev and e_high[0] == e_high_prev: # <<<<<<<<<<<<<< @@ -55524,7 +55638,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct } if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1331 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1339 * self.find_projection(f_high_prev, f_back_high[0], f_links_low, f_links_high, e_low, e_high) * if e_low[0] == e_low_prev and e_high[0] == e_high_prev: * return 1 # <<<<<<<<<<<<<< @@ -55535,7 +55649,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1332 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1340 * if e_low[0] == e_low_prev and e_high[0] == e_high_prev: * return 1 * if allow_arbitrary_x == 0: # <<<<<<<<<<<<<< @@ -55545,7 +55659,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_t_3 = ((__pyx_v_allow_arbitrary_x == 0) != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1334 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1342 * if allow_arbitrary_x == 0: * # FAIL: arbitrary expansion not permitted * return 0 # <<<<<<<<<<<<<< @@ -55556,7 +55670,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1335 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1343 * # FAIL: arbitrary expansion not permitted * return 0 * if e_high[0] - e_low[0] > max_e_len: # <<<<<<<<<<<<<< @@ -55566,7 +55680,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_t_3 = ((((__pyx_v_e_high[0]) - (__pyx_v_e_low[0])) > __pyx_v_max_e_len) != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1337 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1345 * if e_high[0] - e_low[0] > max_e_len: * # FAIL: re-projection violates sentence max phrase length * return 0 # <<<<<<<<<<<<<< @@ -55577,7 +55691,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1338 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1346 * # FAIL: re-projection violates sentence max phrase length * return 0 * f_low_prev = f_back_low[0] # <<<<<<<<<<<<<< @@ -55586,7 +55700,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct */ __pyx_v_f_low_prev = (__pyx_v_f_back_low[0]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1339 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1347 * return 0 * f_low_prev = f_back_low[0] * f_high_prev = f_back_high[0] # <<<<<<<<<<<<<< @@ -55596,7 +55710,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct __pyx_v_f_high_prev = (__pyx_v_f_back_high[0]); } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1215 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1223 * * * cdef int find_fixpoint(self, # <<<<<<<<<<<<<< @@ -55618,7 +55732,7 @@ static int __pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_fixpoint(struct return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1342 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1350 * * * cdef find_projection(self, int in_low, int in_high, int* in_links_low, int* in_links_high, # <<<<<<<<<<<<<< @@ -55636,7 +55750,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_projectio int __pyx_t_4; __Pyx_RefNannySetupContext("find_projection", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1345 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1353 * int* out_low, int* out_high): * cdef int i * for i from in_low <= i < in_high: # <<<<<<<<<<<<<< @@ -55646,7 +55760,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_projectio __pyx_t_1 = __pyx_v_in_high; for (__pyx_v_i = __pyx_v_in_low; __pyx_v_i < __pyx_t_1; __pyx_v_i++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1346 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1354 * cdef int i * for i from in_low <= i < in_high: * if in_links_low[i] != -1: # <<<<<<<<<<<<<< @@ -55656,7 +55770,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_projectio __pyx_t_2 = (((__pyx_v_in_links_low[__pyx_v_i]) != -1) != 0); if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1347 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1355 * for i from in_low <= i < in_high: * if in_links_low[i] != -1: * if out_low[0] == -1 or in_links_low[i] < out_low[0]: # <<<<<<<<<<<<<< @@ -55672,7 +55786,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_projectio } if (__pyx_t_4) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1348 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1356 * if in_links_low[i] != -1: * if out_low[0] == -1 or in_links_low[i] < out_low[0]: * out_low[0] = in_links_low[i] # <<<<<<<<<<<<<< @@ -55684,7 +55798,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_projectio } __pyx_L6:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1349 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1357 * if out_low[0] == -1 or in_links_low[i] < out_low[0]: * out_low[0] = in_links_low[i] * if out_high[0] == -1 or in_links_high[i] > out_high[0]: # <<<<<<<<<<<<<< @@ -55700,7 +55814,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_projectio } if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1350 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1358 * out_low[0] = in_links_low[i] * if out_high[0] == -1 or in_links_high[i] > out_high[0]: * out_high[0] = in_links_high[i] # <<<<<<<<<<<<<< @@ -55716,7 +55830,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_projectio __pyx_L5:; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1342 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1350 * * * cdef find_projection(self, int in_low, int in_high, int* in_links_low, int* in_links_high, # <<<<<<<<<<<<<< @@ -55731,7 +55845,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_find_projectio return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1353 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1361 * * * cdef int* int_arr_extend(self, int* arr, int* arr_len, int* data, int data_len): # <<<<<<<<<<<<<< @@ -55745,7 +55859,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_int_arr_extend(CYTH __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("int_arr_extend", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1355 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1363 * cdef int* int_arr_extend(self, int* arr, int* arr_len, int* data, int data_len): * cdef int new_len * new_len = arr_len[0] + data_len # <<<<<<<<<<<<<< @@ -55754,7 +55868,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_int_arr_extend(CYTH */ __pyx_v_new_len = ((__pyx_v_arr_len[0]) + __pyx_v_data_len); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1356 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1364 * cdef int new_len * new_len = arr_len[0] + data_len * arr = realloc(arr, new_len*sizeof(int)) # <<<<<<<<<<<<<< @@ -55763,7 +55877,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_int_arr_extend(CYTH */ __pyx_v_arr = ((int *)realloc(__pyx_v_arr, (__pyx_v_new_len * (sizeof(int))))); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1357 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1365 * new_len = arr_len[0] + data_len * arr = realloc(arr, new_len*sizeof(int)) * memcpy(arr+arr_len[0], data, data_len*sizeof(int)) # <<<<<<<<<<<<<< @@ -55772,7 +55886,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_int_arr_extend(CYTH */ memcpy((__pyx_v_arr + (__pyx_v_arr_len[0])), __pyx_v_data, (__pyx_v_data_len * (sizeof(int)))); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1358 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1366 * arr = realloc(arr, new_len*sizeof(int)) * memcpy(arr+arr_len[0], data, data_len*sizeof(int)) * arr_len[0] = new_len # <<<<<<<<<<<<<< @@ -55781,7 +55895,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_int_arr_extend(CYTH */ (__pyx_v_arr_len[0]) = __pyx_v_new_len; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1359 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1367 * memcpy(arr+arr_len[0], data, data_len*sizeof(int)) * arr_len[0] = new_len * return arr # <<<<<<<<<<<<<< @@ -55791,7 +55905,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_int_arr_extend(CYTH __pyx_r = __pyx_v_arr; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1353 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1361 * * * cdef int* int_arr_extend(self, int* arr, int* arr_len, int* data, int data_len): # <<<<<<<<<<<<<< @@ -55805,7 +55919,7 @@ static int *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_int_arr_extend(CYTH return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1362 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1370 * * * cdef extract_phrases(self, int e_low, int e_high, int* e_gap_low, int* e_gap_high, int* e_links_low, int num_gaps, # <<<<<<<<<<<<<< @@ -55851,19 +55965,19 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase int __pyx_clineno = 0; __Pyx_RefNannySetupContext("extract_phrases", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1370 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1378 * cdef result * * result = [] # <<<<<<<<<<<<<< * len1 = 0 * e_gaps1 = malloc(0) */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1370; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1378; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_result = __pyx_t_1; __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1371 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1379 * * result = [] * len1 = 0 # <<<<<<<<<<<<<< @@ -55872,7 +55986,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase */ __pyx_v_len1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1372 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1380 * result = [] * len1 = 0 * e_gaps1 = malloc(0) # <<<<<<<<<<<<<< @@ -55881,19 +55995,19 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase */ __pyx_v_e_gaps1 = ((int *)malloc(0)); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1373 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1381 * len1 = 0 * e_gaps1 = malloc(0) * ephr_arr = IntList() # <<<<<<<<<<<<<< * * e_gap_order = malloc(num_gaps*sizeof(int)) */ - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_IntList)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1373; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_IntList)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1381; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_ephr_arr = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1375 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1383 * ephr_arr = IntList() * * e_gap_order = malloc(num_gaps*sizeof(int)) # <<<<<<<<<<<<<< @@ -55902,7 +56016,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase */ __pyx_v_e_gap_order = ((int *)malloc((__pyx_v_num_gaps * (sizeof(int))))); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1376 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1384 * * e_gap_order = malloc(num_gaps*sizeof(int)) * if num_gaps > 0: # <<<<<<<<<<<<<< @@ -55912,7 +56026,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase __pyx_t_2 = ((__pyx_v_num_gaps > 0) != 0); if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1377 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1385 * e_gap_order = malloc(num_gaps*sizeof(int)) * if num_gaps > 0: * e_gap_order[0] = 0 # <<<<<<<<<<<<<< @@ -55921,7 +56035,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase */ (__pyx_v_e_gap_order[0]) = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1378 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1386 * if num_gaps > 0: * e_gap_order[0] = 0 * for i from 1 <= i < num_gaps: # <<<<<<<<<<<<<< @@ -55931,7 +56045,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase __pyx_t_3 = __pyx_v_num_gaps; for (__pyx_v_i = 1; __pyx_v_i < __pyx_t_3; __pyx_v_i++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1379 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1387 * e_gap_order[0] = 0 * for i from 1 <= i < num_gaps: * for j from 0 <= j < i: # <<<<<<<<<<<<<< @@ -55941,7 +56055,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase __pyx_t_4 = __pyx_v_i; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_4; __pyx_v_j++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1380 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1388 * for i from 1 <= i < num_gaps: * for j from 0 <= j < i: * if e_gap_low[i] < e_gap_low[j]: # <<<<<<<<<<<<<< @@ -55951,7 +56065,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase __pyx_t_2 = (((__pyx_v_e_gap_low[__pyx_v_i]) < (__pyx_v_e_gap_low[__pyx_v_j])) != 0); if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1381 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1389 * for j from 0 <= j < i: * if e_gap_low[i] < e_gap_low[j]: * for k from j <= k < i: # <<<<<<<<<<<<<< @@ -55961,7 +56075,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase __pyx_t_5 = __pyx_v_i; for (__pyx_v_k = __pyx_v_j; __pyx_v_k < __pyx_t_5; __pyx_v_k++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1382 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1390 * if e_gap_low[i] < e_gap_low[j]: * for k from j <= k < i: * e_gap_order[k+1] = e_gap_order[k] # <<<<<<<<<<<<<< @@ -55971,7 +56085,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase (__pyx_v_e_gap_order[(__pyx_v_k + 1)]) = (__pyx_v_e_gap_order[__pyx_v_k]); } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1383 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1391 * for k from j <= k < i: * e_gap_order[k+1] = e_gap_order[k] * e_gap_order[j] = i # <<<<<<<<<<<<<< @@ -55980,7 +56094,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase */ (__pyx_v_e_gap_order[__pyx_v_j]) = __pyx_v_i; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1384 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1392 * e_gap_order[k+1] = e_gap_order[k] * e_gap_order[j] = i * break # <<<<<<<<<<<<<< @@ -55992,7 +56106,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1386 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1394 * break * else: * e_gap_order[i] = i # <<<<<<<<<<<<<< @@ -56007,7 +56121,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase } __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1388 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1396 * e_gap_order[i] = i * * e_x_low = e_low # <<<<<<<<<<<<<< @@ -56016,7 +56130,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase */ __pyx_v_e_x_low = __pyx_v_e_low; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1389 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1397 * * e_x_low = e_low * e_x_high = e_high # <<<<<<<<<<<<<< @@ -56025,7 +56139,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase */ __pyx_v_e_x_high = __pyx_v_e_high; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1390 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1398 * e_x_low = e_low * e_x_high = e_high * if not self.tight_phrases: # <<<<<<<<<<<<<< @@ -56035,7 +56149,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase __pyx_t_2 = ((!(__pyx_v_self->tight_phrases != 0)) != 0); if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1391 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1399 * e_x_high = e_high * if not self.tight_phrases: * while e_x_low > 0 and e_high - e_x_low < self.train_max_initial_size and e_links_low[e_x_low-1] == -1: # <<<<<<<<<<<<<< @@ -56058,7 +56172,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase } if (!__pyx_t_6) break; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1392 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1400 * if not self.tight_phrases: * while e_x_low > 0 and e_high - e_x_low < self.train_max_initial_size and e_links_low[e_x_low-1] == -1: * e_x_low = e_x_low - 1 # <<<<<<<<<<<<<< @@ -56068,7 +56182,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase __pyx_v_e_x_low = (__pyx_v_e_x_low - 1); } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1393 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1401 * while e_x_low > 0 and e_high - e_x_low < self.train_max_initial_size and e_links_low[e_x_low-1] == -1: * e_x_low = e_x_low - 1 * while e_x_high < e_sent_len and e_x_high - e_low < self.train_max_initial_size and e_links_low[e_x_high] == -1: # <<<<<<<<<<<<<< @@ -56091,7 +56205,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase } if (!__pyx_t_2) break; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1394 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1402 * e_x_low = e_x_low - 1 * while e_x_high < e_sent_len and e_x_high - e_low < self.train_max_initial_size and e_links_low[e_x_high] == -1: * e_x_high = e_x_high + 1 # <<<<<<<<<<<<<< @@ -56104,7 +56218,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase } __pyx_L11:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1396 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1404 * e_x_high = e_x_high + 1 * * for i from e_x_low <= i <= e_low: # <<<<<<<<<<<<<< @@ -56114,7 +56228,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase __pyx_t_3 = __pyx_v_e_low; for (__pyx_v_i = __pyx_v_e_x_low; __pyx_v_i <= __pyx_t_3; __pyx_v_i++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1397 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1405 * * for i from e_x_low <= i <= e_low: * e_gaps1 = self.int_arr_extend(e_gaps1, &len1, &i, 1) # <<<<<<<<<<<<<< @@ -56124,7 +56238,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase __pyx_v_e_gaps1 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->int_arr_extend(__pyx_v_self, __pyx_v_e_gaps1, (&__pyx_v_len1), (&__pyx_v_i), 1); } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1399 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1407 * e_gaps1 = self.int_arr_extend(e_gaps1, &len1, &i, 1) * * for i from 0 <= i < num_gaps: # <<<<<<<<<<<<<< @@ -56134,7 +56248,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase __pyx_t_3 = __pyx_v_num_gaps; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_3; __pyx_v_i++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1400 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1408 * * for i from 0 <= i < num_gaps: * e_gaps2 = malloc(0) # <<<<<<<<<<<<<< @@ -56143,7 +56257,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase */ __pyx_v_e_gaps2 = ((int *)malloc(0)); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1401 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1409 * for i from 0 <= i < num_gaps: * e_gaps2 = malloc(0) * len2 = 0 # <<<<<<<<<<<<<< @@ -56152,7 +56266,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase */ __pyx_v_len2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1403 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1411 * len2 = 0 * * j = e_gap_order[i] # <<<<<<<<<<<<<< @@ -56161,7 +56275,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase */ __pyx_v_j = (__pyx_v_e_gap_order[__pyx_v_i]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1404 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1412 * * j = e_gap_order[i] * e_x_gap_low = e_gap_low[j] # <<<<<<<<<<<<<< @@ -56170,7 +56284,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase */ __pyx_v_e_x_gap_low = (__pyx_v_e_gap_low[__pyx_v_j]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1405 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1413 * j = e_gap_order[i] * e_x_gap_low = e_gap_low[j] * e_x_gap_high = e_gap_high[j] # <<<<<<<<<<<<<< @@ -56179,7 +56293,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase */ __pyx_v_e_x_gap_high = (__pyx_v_e_gap_high[__pyx_v_j]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1406 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1414 * e_x_gap_low = e_gap_low[j] * e_x_gap_high = e_gap_high[j] * if not self.tight_phrases: # <<<<<<<<<<<<<< @@ -56189,7 +56303,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase __pyx_t_2 = ((!(__pyx_v_self->tight_phrases != 0)) != 0); if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1407 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1415 * e_x_gap_high = e_gap_high[j] * if not self.tight_phrases: * while e_x_gap_low > e_x_low and e_links_low[e_x_gap_low-1] == -1: # <<<<<<<<<<<<<< @@ -56206,7 +56320,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase } if (!__pyx_t_7) break; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1408 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1416 * if not self.tight_phrases: * while e_x_gap_low > e_x_low and e_links_low[e_x_gap_low-1] == -1: * e_x_gap_low = e_x_gap_low - 1 # <<<<<<<<<<<<<< @@ -56216,7 +56330,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase __pyx_v_e_x_gap_low = (__pyx_v_e_x_gap_low - 1); } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1409 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1417 * while e_x_gap_low > e_x_low and e_links_low[e_x_gap_low-1] == -1: * e_x_gap_low = e_x_gap_low - 1 * while e_x_gap_high < e_x_high and e_links_low[e_x_gap_high] == -1: # <<<<<<<<<<<<<< @@ -56233,7 +56347,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase } if (!__pyx_t_6) break; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1410 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1418 * e_x_gap_low = e_x_gap_low - 1 * while e_x_gap_high < e_x_high and e_links_low[e_x_gap_high] == -1: * e_x_gap_high = e_x_gap_high + 1 # <<<<<<<<<<<<<< @@ -56246,7 +56360,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase } __pyx_L20:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1412 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1420 * e_x_gap_high = e_x_gap_high + 1 * * k = 0 # <<<<<<<<<<<<<< @@ -56255,7 +56369,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase */ __pyx_v_k = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1413 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1421 * * k = 0 * step = 1+(i*2) # <<<<<<<<<<<<<< @@ -56264,7 +56378,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase */ __pyx_v_step = (1 + (__pyx_v_i * 2)); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1414 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1422 * k = 0 * step = 1+(i*2) * while k < len1: # <<<<<<<<<<<<<< @@ -56275,7 +56389,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase __pyx_t_6 = ((__pyx_v_k < __pyx_v_len1) != 0); if (!__pyx_t_6) break; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1415 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1423 * step = 1+(i*2) * while k < len1: * for m from e_x_gap_low <= m <= e_gap_low[j]: # <<<<<<<<<<<<<< @@ -56285,7 +56399,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase __pyx_t_4 = (__pyx_v_e_gap_low[__pyx_v_j]); for (__pyx_v_m = __pyx_v_e_x_gap_low; __pyx_v_m <= __pyx_t_4; __pyx_v_m++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1416 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1424 * while k < len1: * for m from e_x_gap_low <= m <= e_gap_low[j]: * if m >= e_gaps1[k+step-1]: # <<<<<<<<<<<<<< @@ -56295,7 +56409,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase __pyx_t_6 = ((__pyx_v_m >= (__pyx_v_e_gaps1[((__pyx_v_k + __pyx_v_step) - 1)])) != 0); if (__pyx_t_6) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1417 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1425 * for m from e_x_gap_low <= m <= e_gap_low[j]: * if m >= e_gaps1[k+step-1]: * for n from e_gap_high[j] <= n <= e_x_gap_high: # <<<<<<<<<<<<<< @@ -56305,7 +56419,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase __pyx_t_5 = __pyx_v_e_x_gap_high; for (__pyx_v_n = (__pyx_v_e_gap_high[__pyx_v_j]); __pyx_v_n <= __pyx_t_5; __pyx_v_n++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1418 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1426 * if m >= e_gaps1[k+step-1]: * for n from e_gap_high[j] <= n <= e_x_gap_high: * if n-m >= 1: # extractor.py doesn't restrict target-side gap length # <<<<<<<<<<<<<< @@ -56315,7 +56429,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase __pyx_t_6 = (((__pyx_v_n - __pyx_v_m) >= 1) != 0); if (__pyx_t_6) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1419 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1427 * for n from e_gap_high[j] <= n <= e_x_gap_high: * if n-m >= 1: # extractor.py doesn't restrict target-side gap length * e_gaps2 = self.int_arr_extend(e_gaps2, &len2, e_gaps1+k, step) # <<<<<<<<<<<<<< @@ -56324,7 +56438,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase */ __pyx_v_e_gaps2 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->int_arr_extend(__pyx_v_self, __pyx_v_e_gaps2, (&__pyx_v_len2), (__pyx_v_e_gaps1 + __pyx_v_k), __pyx_v_step); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1420 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1428 * if n-m >= 1: # extractor.py doesn't restrict target-side gap length * e_gaps2 = self.int_arr_extend(e_gaps2, &len2, e_gaps1+k, step) * e_gaps2 = self.int_arr_extend(e_gaps2, &len2, &m, 1) # <<<<<<<<<<<<<< @@ -56333,7 +56447,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase */ __pyx_v_e_gaps2 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->int_arr_extend(__pyx_v_self, __pyx_v_e_gaps2, (&__pyx_v_len2), (&__pyx_v_m), 1); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1421 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1429 * e_gaps2 = self.int_arr_extend(e_gaps2, &len2, e_gaps1+k, step) * e_gaps2 = self.int_arr_extend(e_gaps2, &len2, &m, 1) * e_gaps2 = self.int_arr_extend(e_gaps2, &len2, &n, 1) # <<<<<<<<<<<<<< @@ -56350,7 +56464,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase __pyx_L29:; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1422 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1430 * e_gaps2 = self.int_arr_extend(e_gaps2, &len2, &m, 1) * e_gaps2 = self.int_arr_extend(e_gaps2, &len2, &n, 1) * k = k + step # <<<<<<<<<<<<<< @@ -56360,7 +56474,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase __pyx_v_k = (__pyx_v_k + __pyx_v_step); } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1423 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1431 * e_gaps2 = self.int_arr_extend(e_gaps2, &len2, &n, 1) * k = k + step * free(e_gaps1) # <<<<<<<<<<<<<< @@ -56369,7 +56483,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase */ free(__pyx_v_e_gaps1); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1424 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1432 * k = k + step * free(e_gaps1) * e_gaps1 = e_gaps2 # <<<<<<<<<<<<<< @@ -56378,7 +56492,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase */ __pyx_v_e_gaps1 = __pyx_v_e_gaps2; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1425 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1433 * free(e_gaps1) * e_gaps1 = e_gaps2 * len1 = len2 # <<<<<<<<<<<<<< @@ -56388,7 +56502,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase __pyx_v_len1 = __pyx_v_len2; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1427 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1435 * len1 = len2 * * step = 1+(num_gaps*2) # <<<<<<<<<<<<<< @@ -56397,7 +56511,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase */ __pyx_v_step = (1 + (__pyx_v_num_gaps * 2)); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1428 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1436 * * step = 1+(num_gaps*2) * e_gaps2 = malloc(0) # <<<<<<<<<<<<<< @@ -56406,7 +56520,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase */ __pyx_v_e_gaps2 = ((int *)malloc(0)); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1429 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1437 * step = 1+(num_gaps*2) * e_gaps2 = malloc(0) * len2 = 0 # <<<<<<<<<<<<<< @@ -56415,7 +56529,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase */ __pyx_v_len2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1430 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1438 * e_gaps2 = malloc(0) * len2 = 0 * for i from e_high <= i <= e_x_high: # <<<<<<<<<<<<<< @@ -56425,7 +56539,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase __pyx_t_3 = __pyx_v_e_x_high; for (__pyx_v_i = __pyx_v_e_high; __pyx_v_i <= __pyx_t_3; __pyx_v_i++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1431 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1439 * len2 = 0 * for i from e_high <= i <= e_x_high: * j = 0 # <<<<<<<<<<<<<< @@ -56434,7 +56548,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase */ __pyx_v_j = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1432 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1440 * for i from e_high <= i <= e_x_high: * j = 0 * while j < len1: # <<<<<<<<<<<<<< @@ -56445,7 +56559,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase __pyx_t_6 = ((__pyx_v_j < __pyx_v_len1) != 0); if (!__pyx_t_6) break; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1433 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1441 * j = 0 * while j < len1: * if i - e_gaps1[j] <= self.train_max_initial_size and i >= e_gaps1[j+step-1]: # <<<<<<<<<<<<<< @@ -56461,7 +56575,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase } if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1434 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1442 * while j < len1: * if i - e_gaps1[j] <= self.train_max_initial_size and i >= e_gaps1[j+step-1]: * e_gaps2 = self.int_arr_extend(e_gaps2, &len2, e_gaps1+j, step) # <<<<<<<<<<<<<< @@ -56470,7 +56584,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase */ __pyx_v_e_gaps2 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->int_arr_extend(__pyx_v_self, __pyx_v_e_gaps2, (&__pyx_v_len2), (__pyx_v_e_gaps1 + __pyx_v_j), __pyx_v_step); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1435 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1443 * if i - e_gaps1[j] <= self.train_max_initial_size and i >= e_gaps1[j+step-1]: * e_gaps2 = self.int_arr_extend(e_gaps2, &len2, e_gaps1+j, step) * e_gaps2 = self.int_arr_extend(e_gaps2, &len2, &i, 1) # <<<<<<<<<<<<<< @@ -56482,7 +56596,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase } __pyx_L37:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1436 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1444 * e_gaps2 = self.int_arr_extend(e_gaps2, &len2, e_gaps1+j, step) * e_gaps2 = self.int_arr_extend(e_gaps2, &len2, &i, 1) * j = j + step # <<<<<<<<<<<<<< @@ -56493,7 +56607,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase } } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1437 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1445 * e_gaps2 = self.int_arr_extend(e_gaps2, &len2, &i, 1) * j = j + step * free(e_gaps1) # <<<<<<<<<<<<<< @@ -56502,7 +56616,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase */ free(__pyx_v_e_gaps1); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1438 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1446 * j = j + step * free(e_gaps1) * e_gaps1 = e_gaps2 # <<<<<<<<<<<<<< @@ -56511,7 +56625,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase */ __pyx_v_e_gaps1 = __pyx_v_e_gaps2; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1439 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1447 * free(e_gaps1) * e_gaps1 = e_gaps2 * len1 = len2 # <<<<<<<<<<<<<< @@ -56520,7 +56634,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase */ __pyx_v_len1 = __pyx_v_len2; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1441 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1449 * len1 = len2 * * step = (num_gaps+1)*2 # <<<<<<<<<<<<<< @@ -56529,7 +56643,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase */ __pyx_v_step = ((__pyx_v_num_gaps + 1) * 2); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1442 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1450 * * step = (num_gaps+1)*2 * i = 0 # <<<<<<<<<<<<<< @@ -56538,7 +56652,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase */ __pyx_v_i = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1445 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1453 * * cdef IntList indexes * while i < len1: # <<<<<<<<<<<<<< @@ -56549,7 +56663,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase __pyx_t_2 = ((__pyx_v_i < __pyx_v_len1) != 0); if (!__pyx_t_2) break; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1446 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1454 * cdef IntList indexes * while i < len1: * ephr_arr._clear() # <<<<<<<<<<<<<< @@ -56558,7 +56672,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_ephr_arr->__pyx_vtab)->_clear(__pyx_v_ephr_arr); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1447 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1455 * while i < len1: * ephr_arr._clear() * num_chunks = 0 # <<<<<<<<<<<<<< @@ -56567,19 +56681,19 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase */ __pyx_v_num_chunks = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1448 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1456 * ephr_arr._clear() * num_chunks = 0 * indexes = IntList() # <<<<<<<<<<<<<< * for j from 0 <= j < num_gaps+1: * if e_gaps1[i+2*j] < e_gaps1[i+(2*j)+1]: */ - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_IntList)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1448; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_IntList)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_indexes, ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1)); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1449 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1457 * num_chunks = 0 * indexes = IntList() * for j from 0 <= j < num_gaps+1: # <<<<<<<<<<<<<< @@ -56589,7 +56703,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase __pyx_t_9 = (__pyx_v_num_gaps + 1); for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_9; __pyx_v_j++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1450 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1458 * indexes = IntList() * for j from 0 <= j < num_gaps+1: * if e_gaps1[i+2*j] < e_gaps1[i+(2*j)+1]: # <<<<<<<<<<<<<< @@ -56599,7 +56713,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase __pyx_t_2 = (((__pyx_v_e_gaps1[(__pyx_v_i + (2 * __pyx_v_j))]) < (__pyx_v_e_gaps1[((__pyx_v_i + (2 * __pyx_v_j)) + 1)])) != 0); if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1451 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1459 * for j from 0 <= j < num_gaps+1: * if e_gaps1[i+2*j] < e_gaps1[i+(2*j)+1]: * num_chunks = num_chunks + 1 # <<<<<<<<<<<<<< @@ -56611,7 +56725,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase } __pyx_L42:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1452 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1460 * if e_gaps1[i+2*j] < e_gaps1[i+(2*j)+1]: * num_chunks = num_chunks + 1 * for k from e_gaps1[i+2*j] <= k < e_gaps1[i+(2*j)+1]: # <<<<<<<<<<<<<< @@ -56621,19 +56735,19 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase __pyx_t_3 = (__pyx_v_e_gaps1[((__pyx_v_i + (2 * __pyx_v_j)) + 1)]); for (__pyx_v_k = (__pyx_v_e_gaps1[(__pyx_v_i + (2 * __pyx_v_j))]); __pyx_v_k < __pyx_t_3; __pyx_v_k++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1453 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1461 * num_chunks = num_chunks + 1 * for k from e_gaps1[i+2*j] <= k < e_gaps1[i+(2*j)+1]: * indexes.append(k) # <<<<<<<<<<<<<< * ephr_arr._append(self.eid2symid[self.eda.data.arr[e_sent_start+k]]) * if j < num_gaps: */ - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_k); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1453; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_k); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1461; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_10 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_indexes), __pyx_t_1); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1453; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_indexes), __pyx_t_1); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1461; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1454 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1462 * for k from e_gaps1[i+2*j] <= k < e_gaps1[i+(2*j)+1]: * indexes.append(k) * ephr_arr._append(self.eid2symid[self.eda.data.arr[e_sent_start+k]]) # <<<<<<<<<<<<<< @@ -56641,14 +56755,14 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase * indexes.append(sym_setindex(self.category, e_gap_order[j]+1)) */ __pyx_t_4 = (__pyx_v_self->eda->data->arr[(__pyx_v_e_sent_start + __pyx_v_k)]); - __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_self->eid2symid), __pyx_t_4, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_self->eid2symid), __pyx_t_4, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1462; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1454; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1462; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_ephr_arr->__pyx_vtab)->_append(__pyx_v_ephr_arr, __pyx_t_4); } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1455 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1463 * indexes.append(k) * ephr_arr._append(self.eid2symid[self.eda.data.arr[e_sent_start+k]]) * if j < num_gaps: # <<<<<<<<<<<<<< @@ -56658,19 +56772,19 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase __pyx_t_2 = ((__pyx_v_j < __pyx_v_num_gaps) != 0); if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1456 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1464 * ephr_arr._append(self.eid2symid[self.eda.data.arr[e_sent_start+k]]) * if j < num_gaps: * indexes.append(sym_setindex(self.category, e_gap_order[j]+1)) # <<<<<<<<<<<<<< * ephr_arr._append(sym_setindex(self.category, e_gap_order[j]+1)) * i = i + step */ - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, ((__pyx_v_e_gap_order[__pyx_v_j]) + 1))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, ((__pyx_v_e_gap_order[__pyx_v_j]) + 1))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1464; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_10 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_indexes), __pyx_t_1); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1456; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_indexes), __pyx_t_1); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1464; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1457 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1465 * if j < num_gaps: * indexes.append(sym_setindex(self.category, e_gap_order[j]+1)) * ephr_arr._append(sym_setindex(self.category, e_gap_order[j]+1)) # <<<<<<<<<<<<<< @@ -56683,7 +56797,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase __pyx_L45:; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1458 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1466 * indexes.append(sym_setindex(self.category, e_gap_order[j]+1)) * ephr_arr._append(sym_setindex(self.category, e_gap_order[j]+1)) * i = i + step # <<<<<<<<<<<<<< @@ -56692,7 +56806,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase */ __pyx_v_i = (__pyx_v_i + __pyx_v_step); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1459 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1467 * ephr_arr._append(sym_setindex(self.category, e_gap_order[j]+1)) * i = i + step * if ephr_arr.len <= self.max_target_length and num_chunks <= self.max_target_chunks: # <<<<<<<<<<<<<< @@ -56708,22 +56822,22 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase } if (__pyx_t_7) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1460 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1468 * i = i + step * if ephr_arr.len <= self.max_target_length and num_chunks <= self.max_target_chunks: * result.append((Phrase(ephr_arr),indexes)) # <<<<<<<<<<<<<< * * free(e_gaps1) */ - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1460; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_ephr_arr)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_ephr_arr)); __Pyx_GIVEREF(((PyObject *)__pyx_v_ephr_arr)); - __pyx_t_11 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_Phrase)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1460; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_Phrase)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1460; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_11); @@ -56731,14 +56845,14 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_indexes)); __Pyx_GIVEREF(((PyObject *)__pyx_v_indexes)); __pyx_t_11 = 0; - __pyx_t_10 = __Pyx_PyObject_Append(__pyx_v_result, __pyx_t_1); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1460; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = __Pyx_PyObject_Append(__pyx_v_result, __pyx_t_1); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L46; } __pyx_L46:; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1462 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1470 * result.append((Phrase(ephr_arr),indexes)) * * free(e_gaps1) # <<<<<<<<<<<<<< @@ -56747,7 +56861,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase */ free(__pyx_v_e_gaps1); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1463 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1471 * * free(e_gaps1) * free(e_gap_order) # <<<<<<<<<<<<<< @@ -56756,7 +56870,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase */ free(__pyx_v_e_gap_order); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1464 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1472 * free(e_gaps1) * free(e_gap_order) * return result # <<<<<<<<<<<<<< @@ -56768,7 +56882,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1362 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1370 * * * cdef extract_phrases(self, int e_low, int e_high, int* e_gap_low, int* e_gap_high, int* e_links_low, int num_gaps, # <<<<<<<<<<<<<< @@ -56791,7 +56905,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrase return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1466 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1474 * return result * * cdef IntList create_alignments(self, int* sent_links, int num_links, # <<<<<<<<<<<<<< @@ -56820,19 +56934,19 @@ static struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_f_4cdec_2sa_3_sa_23HieroCa int __pyx_clineno = 0; __Pyx_RefNannySetupContext("create_alignments", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1469 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1477 * IntList findexes, IntList eindexes): * cdef unsigned i * cdef IntList ret = IntList() # <<<<<<<<<<<<<< * for i in range(findexes.len): * s = findexes.arr[i] */ - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_IntList)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1469; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_IntList)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1477; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_ret = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1470 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1478 * cdef unsigned i * cdef IntList ret = IntList() * for i in range(findexes.len): # <<<<<<<<<<<<<< @@ -56843,7 +56957,7 @@ static struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_f_4cdec_2sa_3_sa_23HieroCa for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { __pyx_v_i = __pyx_t_3; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1471 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1479 * cdef IntList ret = IntList() * for i in range(findexes.len): * s = findexes.arr[i] # <<<<<<<<<<<<<< @@ -56852,7 +56966,7 @@ static struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_f_4cdec_2sa_3_sa_23HieroCa */ __pyx_v_s = (__pyx_v_findexes->arr[__pyx_v_i]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1472 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1480 * for i in range(findexes.len): * s = findexes.arr[i] * if s < 0: continue # <<<<<<<<<<<<<< @@ -56864,7 +56978,7 @@ static struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_f_4cdec_2sa_3_sa_23HieroCa goto __pyx_L3_continue; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1473 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1481 * s = findexes.arr[i] * if s < 0: continue * idx = 0 # <<<<<<<<<<<<<< @@ -56874,7 +56988,7 @@ static struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_f_4cdec_2sa_3_sa_23HieroCa __Pyx_INCREF(__pyx_int_0); __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_int_0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1474 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1482 * if s < 0: continue * idx = 0 * while idx < num_links * 2: # <<<<<<<<<<<<<< @@ -56882,78 +56996,78 @@ static struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_f_4cdec_2sa_3_sa_23HieroCa * j = eindexes.index(sent_links[idx+1]) */ while (1) { - __pyx_t_1 = __Pyx_PyInt_From_long((__pyx_v_num_links * 2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_From_long((__pyx_v_num_links * 2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1482; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = PyObject_RichCompare(__pyx_v_idx, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyObject_RichCompare(__pyx_v_idx, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1482; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1474; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1482; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!__pyx_t_4) break; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1475 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1483 * idx = 0 * while idx < num_links * 2: * if sent_links[idx] == s: # <<<<<<<<<<<<<< * j = eindexes.index(sent_links[idx+1]) * ret.append(i * ALIGNMENT_CODE + j) */ - __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1475; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1483; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = (((__pyx_v_sent_links[__pyx_t_6]) == __pyx_v_s) != 0); if (__pyx_t_4) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1476 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1484 * while idx < num_links * 2: * if sent_links[idx] == s: * j = eindexes.index(sent_links[idx+1]) # <<<<<<<<<<<<<< * ret.append(i * ALIGNMENT_CODE + j) * idx += 2 */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_eindexes), __pyx_n_s_index); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_eindexes), __pyx_n_s_index); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = PyNumber_Add(__pyx_v_idx, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyNumber_Add(__pyx_v_idx, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_sent_links[__pyx_t_6])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_sent_links[__pyx_t_6])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1484; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1476; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1484; __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_7); __pyx_t_7 = 0; __Pyx_XDECREF_SET(__pyx_v_j, __pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1477 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1485 * if sent_links[idx] == s: * j = eindexes.index(sent_links[idx+1]) * ret.append(i * ALIGNMENT_CODE + j) # <<<<<<<<<<<<<< * idx += 2 * return ret */ - __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_i * __pyx_v_4cdec_2sa_3_sa_ALIGNMENT_CODE)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1477; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_i * __pyx_v_4cdec_2sa_3_sa_ALIGNMENT_CODE)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1485; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = PyNumber_Add(__pyx_t_1, __pyx_v_j); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1477; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = PyNumber_Add(__pyx_t_1, __pyx_v_j); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1485; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_8 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_ret), __pyx_t_7); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1477; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_ret), __pyx_t_7); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1485; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L8; } __pyx_L8:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1478 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1486 * j = eindexes.index(sent_links[idx+1]) * ret.append(i * ALIGNMENT_CODE + j) * idx += 2 # <<<<<<<<<<<<<< * return ret * */ - __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_v_idx, __pyx_int_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1478; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_v_idx, __pyx_int_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1486; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF_SET(__pyx_v_idx, __pyx_t_7); __pyx_t_7 = 0; @@ -56961,7 +57075,7 @@ static struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_f_4cdec_2sa_3_sa_23HieroCa __pyx_L3_continue:; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1479 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1487 * ret.append(i * ALIGNMENT_CODE + j) * idx += 2 * return ret # <<<<<<<<<<<<<< @@ -56973,7 +57087,7 @@ static struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_f_4cdec_2sa_3_sa_23HieroCa __pyx_r = __pyx_v_ret; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1466 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1474 * return result * * cdef IntList create_alignments(self, int* sent_links, int num_links, # <<<<<<<<<<<<<< @@ -56997,7 +57111,7 @@ static struct __pyx_obj_4cdec_2sa_3_sa_IntList *__pyx_f_4cdec_2sa_3_sa_23HieroCa return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1481 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1489 * return ret * * cdef extract(self, Phrase phrase, Matching* matching, int* chunklen, int num_chunks): # <<<<<<<<<<<<<< @@ -57091,19 +57205,19 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("extract", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1494 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1502 * cdef reason_for_failure * * fphr_arr = IntList() # <<<<<<<<<<<<<< * phrase_len = phrase.n * extracts = [] */ - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_IntList)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1494; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_IntList)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1502; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_fphr_arr = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1495 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1503 * * fphr_arr = IntList() * phrase_len = phrase.n # <<<<<<<<<<<<<< @@ -57113,19 +57227,19 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_2 = __pyx_v_phrase->n; __pyx_v_phrase_len = __pyx_t_2; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1496 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1504 * fphr_arr = IntList() * phrase_len = phrase.n * extracts = [] # <<<<<<<<<<<<<< * sent_links = self.alignment._get_sent_links(matching.sent_id, &num_links) * */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1496; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1504; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_extracts = __pyx_t_1; __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1497 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1505 * phrase_len = phrase.n * extracts = [] * sent_links = self.alignment._get_sent_links(matching.sent_id, &num_links) # <<<<<<<<<<<<<< @@ -57134,7 +57248,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_sent_links = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Alignment *)__pyx_v_self->alignment->__pyx_vtab)->_get_sent_links(__pyx_v_self->alignment, __pyx_v_matching->sent_id, (&__pyx_v_num_links)); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1499 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1507 * sent_links = self.alignment._get_sent_links(matching.sent_id, &num_links) * * e_sent_start = self.eda.sent_index.arr[matching.sent_id] # <<<<<<<<<<<<<< @@ -57143,7 +57257,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_e_sent_start = (__pyx_v_self->eda->sent_index->arr[__pyx_v_matching->sent_id]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1500 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1508 * * e_sent_start = self.eda.sent_index.arr[matching.sent_id] * e_sent_end = self.eda.sent_index.arr[matching.sent_id+1] # <<<<<<<<<<<<<< @@ -57152,7 +57266,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_e_sent_end = (__pyx_v_self->eda->sent_index->arr[(__pyx_v_matching->sent_id + 1)]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1501 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1509 * e_sent_start = self.eda.sent_index.arr[matching.sent_id] * e_sent_end = self.eda.sent_index.arr[matching.sent_id+1] * e_sent_len = e_sent_end - e_sent_start - 1 # <<<<<<<<<<<<<< @@ -57161,7 +57275,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_e_sent_len = ((__pyx_v_e_sent_end - __pyx_v_e_sent_start) - 1); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1502 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1510 * e_sent_end = self.eda.sent_index.arr[matching.sent_id+1] * e_sent_len = e_sent_end - e_sent_start - 1 * f_sent_start = self.fda.sent_index.arr[matching.sent_id] # <<<<<<<<<<<<<< @@ -57170,7 +57284,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_f_sent_start = (__pyx_v_self->fda->sent_index->arr[__pyx_v_matching->sent_id]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1503 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1511 * e_sent_len = e_sent_end - e_sent_start - 1 * f_sent_start = self.fda.sent_index.arr[matching.sent_id] * f_sent_end = self.fda.sent_index.arr[matching.sent_id+1] # <<<<<<<<<<<<<< @@ -57179,7 +57293,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_f_sent_end = (__pyx_v_self->fda->sent_index->arr[(__pyx_v_matching->sent_id + 1)]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1504 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1512 * f_sent_start = self.fda.sent_index.arr[matching.sent_id] * f_sent_end = self.fda.sent_index.arr[matching.sent_id+1] * f_sent_len = f_sent_end - f_sent_start - 1 # <<<<<<<<<<<<<< @@ -57188,21 +57302,21 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_f_sent_len = ((__pyx_v_f_sent_end - __pyx_v_f_sent_start) - 1); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1506 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1514 * f_sent_len = f_sent_end - f_sent_start - 1 * * self.findexes1.reset() # <<<<<<<<<<<<<< * sofar = 0 * for i in range(num_chunks): */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->findexes1), __pyx_n_s_reset); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1506; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->findexes1), __pyx_n_s_reset); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1514; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1506; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1514; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1507 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1515 * * self.findexes1.reset() * sofar = 0 # <<<<<<<<<<<<<< @@ -57212,7 +57326,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_INCREF(__pyx_int_0); __pyx_v_sofar = __pyx_int_0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1508 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1516 * self.findexes1.reset() * sofar = 0 * for i in range(num_chunks): # <<<<<<<<<<<<<< @@ -57223,7 +57337,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_2; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1509 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1517 * sofar = 0 * for i in range(num_chunks): * for j in range(chunklen[i]): # <<<<<<<<<<<<<< @@ -57234,32 +57348,32 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_v_j = __pyx_t_6; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1510 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1518 * for i in range(num_chunks): * for j in range(chunklen[i]): * self.findexes1.append(matching.arr[matching.start+i]+j-f_sent_start); # <<<<<<<<<<<<<< * sofar += 1 * if i+1 < num_chunks: */ - __pyx_t_3 = __Pyx_PyInt_From_int((((__pyx_v_matching->arr[(__pyx_v_matching->start + __pyx_v_i)]) + __pyx_v_j) - __pyx_v_f_sent_start)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyInt_From_int((((__pyx_v_matching->arr[(__pyx_v_matching->start + __pyx_v_i)]) + __pyx_v_j) - __pyx_v_f_sent_start)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_self->findexes1), __pyx_t_3); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1510; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_self->findexes1), __pyx_t_3); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1511 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1519 * for j in range(chunklen[i]): * self.findexes1.append(matching.arr[matching.start+i]+j-f_sent_start); * sofar += 1 # <<<<<<<<<<<<<< * if i+1 < num_chunks: * self.findexes1.append(phrase[sofar]) */ - __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_sofar, __pyx_int_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1511; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_sofar, __pyx_int_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1519; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_sofar, __pyx_t_3); __pyx_t_3 = 0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1512 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1520 * self.findexes1.append(matching.arr[matching.start+i]+j-f_sent_start); * sofar += 1 * if i+1 < num_chunks: # <<<<<<<<<<<<<< @@ -57269,26 +57383,26 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_8 = (((__pyx_v_i + 1) < __pyx_v_num_chunks) != 0); if (__pyx_t_8) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1513 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1521 * sofar += 1 * if i+1 < num_chunks: * self.findexes1.append(phrase[sofar]) # <<<<<<<<<<<<<< * sofar += 1 * */ - __pyx_t_3 = PyObject_GetItem(((PyObject *)__pyx_v_phrase), __pyx_v_sofar); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_3 = PyObject_GetItem(((PyObject *)__pyx_v_phrase), __pyx_v_sofar); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_self->findexes1), __pyx_t_3); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1513; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_self->findexes1), __pyx_t_3); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1521; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1514 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1522 * if i+1 < num_chunks: * self.findexes1.append(phrase[sofar]) * sofar += 1 # <<<<<<<<<<<<<< * * */ - __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_sofar, __pyx_int_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1514; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_sofar, __pyx_int_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1522; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_sofar, __pyx_t_3); __pyx_t_3 = 0; @@ -57297,7 +57411,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_L7:; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1517 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1525 * * * e_links_low = malloc(e_sent_len*sizeof(int)) # <<<<<<<<<<<<<< @@ -57306,7 +57420,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_e_links_low = ((int *)malloc((__pyx_v_e_sent_len * (sizeof(int))))); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1518 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1526 * * e_links_low = malloc(e_sent_len*sizeof(int)) * e_links_high = malloc(e_sent_len*sizeof(int)) # <<<<<<<<<<<<<< @@ -57315,7 +57429,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_e_links_high = ((int *)malloc((__pyx_v_e_sent_len * (sizeof(int))))); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1519 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1527 * e_links_low = malloc(e_sent_len*sizeof(int)) * e_links_high = malloc(e_sent_len*sizeof(int)) * f_links_low = malloc(f_sent_len*sizeof(int)) # <<<<<<<<<<<<<< @@ -57324,7 +57438,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_f_links_low = ((int *)malloc((__pyx_v_f_sent_len * (sizeof(int))))); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1520 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1528 * e_links_high = malloc(e_sent_len*sizeof(int)) * f_links_low = malloc(f_sent_len*sizeof(int)) * f_links_high = malloc(f_sent_len*sizeof(int)) # <<<<<<<<<<<<<< @@ -57333,7 +57447,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_f_links_high = ((int *)malloc((__pyx_v_f_sent_len * (sizeof(int))))); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1521 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1529 * f_links_low = malloc(f_sent_len*sizeof(int)) * f_links_high = malloc(f_sent_len*sizeof(int)) * f_gap_low = malloc((num_chunks+1)*sizeof(int)) # <<<<<<<<<<<<<< @@ -57342,7 +57456,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_f_gap_low = ((int *)malloc(((__pyx_v_num_chunks + 1) * (sizeof(int))))); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1522 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1530 * f_links_high = malloc(f_sent_len*sizeof(int)) * f_gap_low = malloc((num_chunks+1)*sizeof(int)) * f_gap_high = malloc((num_chunks+1)*sizeof(int)) # <<<<<<<<<<<<<< @@ -57351,7 +57465,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_f_gap_high = ((int *)malloc(((__pyx_v_num_chunks + 1) * (sizeof(int))))); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1523 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1531 * f_gap_low = malloc((num_chunks+1)*sizeof(int)) * f_gap_high = malloc((num_chunks+1)*sizeof(int)) * e_gap_low = malloc((num_chunks+1)*sizeof(int)) # <<<<<<<<<<<<<< @@ -57360,7 +57474,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_e_gap_low = ((int *)malloc(((__pyx_v_num_chunks + 1) * (sizeof(int))))); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1524 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1532 * f_gap_high = malloc((num_chunks+1)*sizeof(int)) * e_gap_low = malloc((num_chunks+1)*sizeof(int)) * e_gap_high = malloc((num_chunks+1)*sizeof(int)) # <<<<<<<<<<<<<< @@ -57369,7 +57483,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_e_gap_high = ((int *)malloc(((__pyx_v_num_chunks + 1) * (sizeof(int))))); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1525 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1533 * e_gap_low = malloc((num_chunks+1)*sizeof(int)) * e_gap_high = malloc((num_chunks+1)*sizeof(int)) * memset(f_gap_low, 0, (num_chunks+1)*sizeof(int)) # <<<<<<<<<<<<<< @@ -57378,7 +57492,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ memset(__pyx_v_f_gap_low, 0, ((__pyx_v_num_chunks + 1) * (sizeof(int)))); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1526 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1534 * e_gap_high = malloc((num_chunks+1)*sizeof(int)) * memset(f_gap_low, 0, (num_chunks+1)*sizeof(int)) * memset(f_gap_high, 0, (num_chunks+1)*sizeof(int)) # <<<<<<<<<<<<<< @@ -57387,7 +57501,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ memset(__pyx_v_f_gap_high, 0, ((__pyx_v_num_chunks + 1) * (sizeof(int)))); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1527 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1535 * memset(f_gap_low, 0, (num_chunks+1)*sizeof(int)) * memset(f_gap_high, 0, (num_chunks+1)*sizeof(int)) * memset(e_gap_low, 0, (num_chunks+1)*sizeof(int)) # <<<<<<<<<<<<<< @@ -57396,7 +57510,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ memset(__pyx_v_e_gap_low, 0, ((__pyx_v_num_chunks + 1) * (sizeof(int)))); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1528 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1536 * memset(f_gap_high, 0, (num_chunks+1)*sizeof(int)) * memset(e_gap_low, 0, (num_chunks+1)*sizeof(int)) * memset(e_gap_high, 0, (num_chunks+1)*sizeof(int)) # <<<<<<<<<<<<<< @@ -57405,7 +57519,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ memset(__pyx_v_e_gap_high, 0, ((__pyx_v_num_chunks + 1) * (sizeof(int)))); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1530 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1538 * memset(e_gap_high, 0, (num_chunks+1)*sizeof(int)) * * reason_for_failure = "" # <<<<<<<<<<<<<< @@ -57415,7 +57529,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_INCREF(__pyx_kp_s__32); __pyx_v_reason_for_failure = __pyx_kp_s__32; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1532 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1540 * reason_for_failure = "" * * for i from 0 <= i < e_sent_len: # <<<<<<<<<<<<<< @@ -57425,7 +57539,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_2 = __pyx_v_e_sent_len; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1533 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1541 * * for i from 0 <= i < e_sent_len: * e_links_low[i] = -1 # <<<<<<<<<<<<<< @@ -57434,7 +57548,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ (__pyx_v_e_links_low[__pyx_v_i]) = -1; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1534 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1542 * for i from 0 <= i < e_sent_len: * e_links_low[i] = -1 * e_links_high[i] = -1 # <<<<<<<<<<<<<< @@ -57444,7 +57558,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct (__pyx_v_e_links_high[__pyx_v_i]) = -1; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1535 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1543 * e_links_low[i] = -1 * e_links_high[i] = -1 * for i from 0 <= i < f_sent_len: # <<<<<<<<<<<<<< @@ -57454,7 +57568,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_2 = __pyx_v_f_sent_len; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1536 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1544 * e_links_high[i] = -1 * for i from 0 <= i < f_sent_len: * f_links_low[i] = -1 # <<<<<<<<<<<<<< @@ -57463,7 +57577,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ (__pyx_v_f_links_low[__pyx_v_i]) = -1; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1537 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1545 * for i from 0 <= i < f_sent_len: * f_links_low[i] = -1 * f_links_high[i] = -1 # <<<<<<<<<<<<<< @@ -57473,7 +57587,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct (__pyx_v_f_links_high[__pyx_v_i]) = -1; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1543 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1551 * # links that we care about (but then how to look up * # when we want to check something on the e side?) * i = 0 # <<<<<<<<<<<<<< @@ -57482,7 +57596,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_i = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1544 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1552 * # when we want to check something on the e side?) * i = 0 * while i < num_links*2: # <<<<<<<<<<<<<< @@ -57493,7 +57607,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_8 = ((__pyx_v_i < (__pyx_v_num_links * 2)) != 0); if (!__pyx_t_8) break; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1545 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1553 * i = 0 * while i < num_links*2: * f_i = sent_links[i] # <<<<<<<<<<<<<< @@ -57502,7 +57616,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_f_i = (__pyx_v_sent_links[__pyx_v_i]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1546 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1554 * while i < num_links*2: * f_i = sent_links[i] * e_i = sent_links[i+1] # <<<<<<<<<<<<<< @@ -57511,7 +57625,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_e_i = (__pyx_v_sent_links[(__pyx_v_i + 1)]); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1547 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1555 * f_i = sent_links[i] * e_i = sent_links[i+1] * if f_links_low[f_i] == -1 or f_links_low[f_i] > e_i: # <<<<<<<<<<<<<< @@ -57527,7 +57641,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } if (__pyx_t_10) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1548 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1556 * e_i = sent_links[i+1] * if f_links_low[f_i] == -1 or f_links_low[f_i] > e_i: * f_links_low[f_i] = e_i # <<<<<<<<<<<<<< @@ -57539,7 +57653,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } __pyx_L14:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1549 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1557 * if f_links_low[f_i] == -1 or f_links_low[f_i] > e_i: * f_links_low[f_i] = e_i * if f_links_high[f_i] == -1 or f_links_high[f_i] < e_i + 1: # <<<<<<<<<<<<<< @@ -57555,7 +57669,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } if (__pyx_t_9) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1550 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1558 * f_links_low[f_i] = e_i * if f_links_high[f_i] == -1 or f_links_high[f_i] < e_i + 1: * f_links_high[f_i] = e_i + 1 # <<<<<<<<<<<<<< @@ -57567,7 +57681,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } __pyx_L15:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1551 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1559 * if f_links_high[f_i] == -1 or f_links_high[f_i] < e_i + 1: * f_links_high[f_i] = e_i + 1 * if e_links_low[e_i] == -1 or e_links_low[e_i] > f_i: # <<<<<<<<<<<<<< @@ -57583,7 +57697,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } if (__pyx_t_8) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1552 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1560 * f_links_high[f_i] = e_i + 1 * if e_links_low[e_i] == -1 or e_links_low[e_i] > f_i: * e_links_low[e_i] = f_i # <<<<<<<<<<<<<< @@ -57595,7 +57709,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } __pyx_L16:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1553 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1561 * if e_links_low[e_i] == -1 or e_links_low[e_i] > f_i: * e_links_low[e_i] = f_i * if e_links_high[e_i] == -1 or e_links_high[e_i] < f_i + 1: # <<<<<<<<<<<<<< @@ -57611,7 +57725,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } if (__pyx_t_10) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1554 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1562 * e_links_low[e_i] = f_i * if e_links_high[e_i] == -1 or e_links_high[e_i] < f_i + 1: * e_links_high[e_i] = f_i + 1 # <<<<<<<<<<<<<< @@ -57623,7 +57737,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } __pyx_L17:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1555 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1563 * if e_links_high[e_i] == -1 or e_links_high[e_i] < f_i + 1: * e_links_high[e_i] = f_i + 1 * i = i + 2 # <<<<<<<<<<<<<< @@ -57633,19 +57747,19 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_v_i = (__pyx_v_i + 2); } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1557 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1565 * i = i + 2 * * als = [] # <<<<<<<<<<<<<< * for x in range(matching.start,matching.end): * al = (matching.arr[x]-f_sent_start,f_links_low[matching.arr[x]-f_sent_start]) */ - __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1557; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1565; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_v_als = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1558 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1566 * * als = [] * for x in range(matching.start,matching.end): # <<<<<<<<<<<<<< @@ -57656,18 +57770,18 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct for (__pyx_t_4 = __pyx_v_matching->start; __pyx_t_4 < __pyx_t_2; __pyx_t_4+=1) { __pyx_v_x = __pyx_t_4; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1559 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1567 * als = [] * for x in range(matching.start,matching.end): * al = (matching.arr[x]-f_sent_start,f_links_low[matching.arr[x]-f_sent_start]) # <<<<<<<<<<<<<< * als.append(al) * # check all source-side alignment constraints */ - __pyx_t_3 = __Pyx_PyInt_From_int(((__pyx_v_matching->arr[__pyx_v_x]) - __pyx_v_f_sent_start)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyInt_From_int(((__pyx_v_matching->arr[__pyx_v_x]) - __pyx_v_f_sent_start)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1567; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_f_links_low[((__pyx_v_matching->arr[__pyx_v_x]) - __pyx_v_f_sent_start)])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_f_links_low[((__pyx_v_matching->arr[__pyx_v_x]) - __pyx_v_f_sent_start)])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1567; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1559; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1567; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); @@ -57678,17 +57792,17 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_XDECREF_SET(__pyx_v_al, ((PyObject*)__pyx_t_11)); __pyx_t_11 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1560 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1568 * for x in range(matching.start,matching.end): * al = (matching.arr[x]-f_sent_start,f_links_low[matching.arr[x]-f_sent_start]) * als.append(al) # <<<<<<<<<<<<<< * # check all source-side alignment constraints * met_constraints = 1 */ - __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_als, __pyx_v_al); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1560; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_als, __pyx_v_al); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1568; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1562 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1570 * als.append(al) * # check all source-side alignment constraints * met_constraints = 1 # <<<<<<<<<<<<<< @@ -57697,7 +57811,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_met_constraints = 1; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1563 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1571 * # check all source-side alignment constraints * met_constraints = 1 * if self.require_aligned_terminal: # <<<<<<<<<<<<<< @@ -57707,7 +57821,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_10 = (__pyx_v_self->require_aligned_terminal != 0); if (__pyx_t_10) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1564 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1572 * met_constraints = 1 * if self.require_aligned_terminal: * num_aligned_chunks = 0 # <<<<<<<<<<<<<< @@ -57716,7 +57830,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_num_aligned_chunks = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1565 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1573 * if self.require_aligned_terminal: * num_aligned_chunks = 0 * for i from 0 <= i < num_chunks: # <<<<<<<<<<<<<< @@ -57726,7 +57840,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_2 = __pyx_v_num_chunks; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1566 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1574 * num_aligned_chunks = 0 * for i from 0 <= i < num_chunks: * for j from 0 <= j < chunklen[i]: # <<<<<<<<<<<<<< @@ -57736,7 +57850,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_4 = (__pyx_v_chunklen[__pyx_v_i]); for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_4; __pyx_v_j++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1567 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1575 * for i from 0 <= i < num_chunks: * for j from 0 <= j < chunklen[i]: * if f_links_low[matching.arr[matching.start+i]+j-f_sent_start] > -1: # <<<<<<<<<<<<<< @@ -57746,7 +57860,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_10 = (((__pyx_v_f_links_low[(((__pyx_v_matching->arr[(__pyx_v_matching->start + __pyx_v_i)]) + __pyx_v_j) - __pyx_v_f_sent_start)]) > -1) != 0); if (__pyx_t_10) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1568 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1576 * for j from 0 <= j < chunklen[i]: * if f_links_low[matching.arr[matching.start+i]+j-f_sent_start] > -1: * num_aligned_chunks = num_aligned_chunks + 1 # <<<<<<<<<<<<<< @@ -57755,7 +57869,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_num_aligned_chunks = (__pyx_v_num_aligned_chunks + 1); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1569 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1577 * if f_links_low[matching.arr[matching.start+i]+j-f_sent_start] > -1: * num_aligned_chunks = num_aligned_chunks + 1 * break # <<<<<<<<<<<<<< @@ -57768,7 +57882,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_L24_break:; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1570 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1578 * num_aligned_chunks = num_aligned_chunks + 1 * break * if num_aligned_chunks == 0: # <<<<<<<<<<<<<< @@ -57778,7 +57892,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_10 = ((__pyx_v_num_aligned_chunks == 0) != 0); if (__pyx_t_10) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1571 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1579 * break * if num_aligned_chunks == 0: * reason_for_failure = "No aligned terminals" # <<<<<<<<<<<<<< @@ -57788,7 +57902,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_INCREF(__pyx_kp_s_No_aligned_terminals); __Pyx_DECREF_SET(__pyx_v_reason_for_failure, __pyx_kp_s_No_aligned_terminals); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1572 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1580 * if num_aligned_chunks == 0: * reason_for_failure = "No aligned terminals" * met_constraints = 0 # <<<<<<<<<<<<<< @@ -57800,7 +57914,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } __pyx_L26:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1573 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1581 * reason_for_failure = "No aligned terminals" * met_constraints = 0 * if self.require_aligned_chunks and num_aligned_chunks < num_chunks: # <<<<<<<<<<<<<< @@ -57815,7 +57929,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } if (__pyx_t_8) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1574 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1582 * met_constraints = 0 * if self.require_aligned_chunks and num_aligned_chunks < num_chunks: * reason_for_failure = "Unaligned chunk" # <<<<<<<<<<<<<< @@ -57825,7 +57939,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_INCREF(__pyx_kp_s_Unaligned_chunk); __Pyx_DECREF_SET(__pyx_v_reason_for_failure, __pyx_kp_s_Unaligned_chunk); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1575 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1583 * if self.require_aligned_chunks and num_aligned_chunks < num_chunks: * reason_for_failure = "Unaligned chunk" * met_constraints = 0 # <<<<<<<<<<<<<< @@ -57840,7 +57954,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } __pyx_L20:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1577 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1585 * met_constraints = 0 * * if met_constraints and self.tight_phrases: # <<<<<<<<<<<<<< @@ -57855,7 +57969,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } if (__pyx_t_10) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1579 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1587 * if met_constraints and self.tight_phrases: * # outside edge constraints are checked later * for i from 0 <= i < num_chunks-1: # <<<<<<<<<<<<<< @@ -57865,7 +57979,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_12 = (__pyx_v_num_chunks - 1); for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_12; __pyx_v_i++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1580 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1588 * # outside edge constraints are checked later * for i from 0 <= i < num_chunks-1: * if f_links_low[matching.arr[matching.start+i]+chunklen[i]-f_sent_start] == -1: # <<<<<<<<<<<<<< @@ -57875,7 +57989,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_10 = (((__pyx_v_f_links_low[(((__pyx_v_matching->arr[(__pyx_v_matching->start + __pyx_v_i)]) + (__pyx_v_chunklen[__pyx_v_i])) - __pyx_v_f_sent_start)]) == -1) != 0); if (__pyx_t_10) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1581 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1589 * for i from 0 <= i < num_chunks-1: * if f_links_low[matching.arr[matching.start+i]+chunklen[i]-f_sent_start] == -1: * reason_for_failure = "Gaps are not tight phrases" # <<<<<<<<<<<<<< @@ -57885,7 +57999,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_INCREF(__pyx_kp_s_Gaps_are_not_tight_phrases); __Pyx_DECREF_SET(__pyx_v_reason_for_failure, __pyx_kp_s_Gaps_are_not_tight_phrases); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1582 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1590 * if f_links_low[matching.arr[matching.start+i]+chunklen[i]-f_sent_start] == -1: * reason_for_failure = "Gaps are not tight phrases" * met_constraints = 0 # <<<<<<<<<<<<<< @@ -57894,7 +58008,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_met_constraints = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1583 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1591 * reason_for_failure = "Gaps are not tight phrases" * met_constraints = 0 * break # <<<<<<<<<<<<<< @@ -57904,7 +58018,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct goto __pyx_L30_break; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1584 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1592 * met_constraints = 0 * break * if f_links_low[matching.arr[matching.start+i+1]-1-f_sent_start] == -1: # <<<<<<<<<<<<<< @@ -57914,7 +58028,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_10 = (((__pyx_v_f_links_low[(((__pyx_v_matching->arr[((__pyx_v_matching->start + __pyx_v_i) + 1)]) - 1) - __pyx_v_f_sent_start)]) == -1) != 0); if (__pyx_t_10) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1585 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1593 * break * if f_links_low[matching.arr[matching.start+i+1]-1-f_sent_start] == -1: * reason_for_failure = "Gaps are not tight phrases" # <<<<<<<<<<<<<< @@ -57924,7 +58038,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_INCREF(__pyx_kp_s_Gaps_are_not_tight_phrases); __Pyx_DECREF_SET(__pyx_v_reason_for_failure, __pyx_kp_s_Gaps_are_not_tight_phrases); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1586 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1594 * if f_links_low[matching.arr[matching.start+i+1]-1-f_sent_start] == -1: * reason_for_failure = "Gaps are not tight phrases" * met_constraints = 0 # <<<<<<<<<<<<<< @@ -57933,7 +58047,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_met_constraints = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1587 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1595 * reason_for_failure = "Gaps are not tight phrases" * met_constraints = 0 * break # <<<<<<<<<<<<<< @@ -57948,7 +58062,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } __pyx_L28:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1589 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1597 * break * * f_low = matching.arr[matching.start] - f_sent_start # <<<<<<<<<<<<<< @@ -57957,7 +58071,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_f_low = ((__pyx_v_matching->arr[__pyx_v_matching->start]) - __pyx_v_f_sent_start); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1590 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1598 * * f_low = matching.arr[matching.start] - f_sent_start * f_high = matching.arr[matching.start + matching.size - 1] + chunklen[num_chunks-1] - f_sent_start # <<<<<<<<<<<<<< @@ -57966,7 +58080,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_f_high = (((__pyx_v_matching->arr[((__pyx_v_matching->start + __pyx_v_matching->size) - 1)]) + (__pyx_v_chunklen[(__pyx_v_num_chunks - 1)])) - __pyx_v_f_sent_start); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1591 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1599 * f_low = matching.arr[matching.start] - f_sent_start * f_high = matching.arr[matching.start + matching.size - 1] + chunklen[num_chunks-1] - f_sent_start * if met_constraints: # <<<<<<<<<<<<<< @@ -57976,17 +58090,17 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_10 = (__pyx_v_met_constraints != 0); if (__pyx_t_10) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1593 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1601 * if met_constraints: * * if self.find_fixpoint(f_low, f_high, f_links_low, f_links_high, e_links_low, e_links_high, # <<<<<<<<<<<<<< * -1, -1, &e_low, &e_high, &f_back_low, &f_back_high, f_sent_len, e_sent_len, * self.train_max_initial_size, self.train_max_initial_size, */ - __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_v_f_high); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1593; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_v_f_high); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1601; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1597 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1605 * self.train_max_initial_size, self.train_max_initial_size, * self.train_min_gap_size, 0, * self.max_nonterminals - num_chunks + 1, 1, 1, 0, 0): # <<<<<<<<<<<<<< @@ -57997,7 +58111,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (__pyx_t_10) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1598 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1606 * self.train_min_gap_size, 0, * self.max_nonterminals - num_chunks + 1, 1, 1, 0, 0): * gap_error = 0 # <<<<<<<<<<<<<< @@ -58006,7 +58120,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_gap_error = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1599 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1607 * self.max_nonterminals - num_chunks + 1, 1, 1, 0, 0): * gap_error = 0 * num_gaps = 0 # <<<<<<<<<<<<<< @@ -58015,7 +58129,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_num_gaps = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1601 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1609 * num_gaps = 0 * * if f_back_low < f_low: # <<<<<<<<<<<<<< @@ -58025,7 +58139,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_10 = ((__pyx_v_f_back_low < __pyx_v_f_low) != 0); if (__pyx_t_10) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1602 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1610 * * if f_back_low < f_low: * f_gap_low[0] = f_back_low # <<<<<<<<<<<<<< @@ -58034,7 +58148,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ (__pyx_v_f_gap_low[0]) = __pyx_v_f_back_low; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1603 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1611 * if f_back_low < f_low: * f_gap_low[0] = f_back_low * f_gap_high[0] = f_low # <<<<<<<<<<<<<< @@ -58043,7 +58157,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ (__pyx_v_f_gap_high[0]) = __pyx_v_f_low; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1604 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1612 * f_gap_low[0] = f_back_low * f_gap_high[0] = f_low * num_gaps = 1 # <<<<<<<<<<<<<< @@ -58052,7 +58166,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_num_gaps = 1; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1605 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1613 * f_gap_high[0] = f_low * num_gaps = 1 * gap_start = 0 # <<<<<<<<<<<<<< @@ -58061,7 +58175,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_gap_start = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1606 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1614 * num_gaps = 1 * gap_start = 0 * phrase_len = phrase_len+1 # <<<<<<<<<<<<<< @@ -58070,7 +58184,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_phrase_len = (__pyx_v_phrase_len + 1); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1607 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1615 * gap_start = 0 * phrase_len = phrase_len+1 * if phrase_len > self.max_length: # <<<<<<<<<<<<<< @@ -58080,7 +58194,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_10 = ((__pyx_v_phrase_len > __pyx_v_self->max_length) != 0); if (__pyx_t_10) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1608 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1616 * phrase_len = phrase_len+1 * if phrase_len > self.max_length: * gap_error = 1 # <<<<<<<<<<<<<< @@ -58092,7 +58206,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } __pyx_L36:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1609 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1617 * if phrase_len > self.max_length: * gap_error = 1 * if self.tight_phrases: # <<<<<<<<<<<<<< @@ -58102,7 +58216,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_10 = (__pyx_v_self->tight_phrases != 0); if (__pyx_t_10) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1610 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1618 * gap_error = 1 * if self.tight_phrases: * if f_links_low[f_back_low] == -1 or f_links_low[f_low-1] == -1: # <<<<<<<<<<<<<< @@ -58118,7 +58232,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } if (__pyx_t_9) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1611 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1619 * if self.tight_phrases: * if f_links_low[f_back_low] == -1 or f_links_low[f_low-1] == -1: * gap_error = 1 # <<<<<<<<<<<<<< @@ -58127,7 +58241,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_gap_error = 1; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1612 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1620 * if f_links_low[f_back_low] == -1 or f_links_low[f_low-1] == -1: * gap_error = 1 * reason_for_failure = "Inside edges of preceding subphrase are not tight" # <<<<<<<<<<<<<< @@ -58146,7 +58260,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1614 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1622 * reason_for_failure = "Inside edges of preceding subphrase are not tight" * else: * gap_start = 1 # <<<<<<<<<<<<<< @@ -58155,7 +58269,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_gap_start = 1; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1615 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1623 * else: * gap_start = 1 * if self.tight_phrases and f_links_low[f_low] == -1: # <<<<<<<<<<<<<< @@ -58170,7 +58284,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } if (__pyx_t_10) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1618 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1626 * # this is not a hard error. we can't extract this phrase * # but we still might be able to extract a superphrase * met_constraints = 0 # <<<<<<<<<<<<<< @@ -58184,7 +58298,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } __pyx_L35:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1620 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1628 * met_constraints = 0 * * for i from 0 <= i < matching.size - 1: # <<<<<<<<<<<<<< @@ -58194,7 +58308,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_12 = (__pyx_v_matching->size - 1); for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_12; __pyx_v_i++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1621 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1629 * * for i from 0 <= i < matching.size - 1: * f_gap_low[1+i] = matching.arr[matching.start+i] + chunklen[i] - f_sent_start # <<<<<<<<<<<<<< @@ -58203,7 +58317,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ (__pyx_v_f_gap_low[(1 + __pyx_v_i)]) = (((__pyx_v_matching->arr[(__pyx_v_matching->start + __pyx_v_i)]) + (__pyx_v_chunklen[__pyx_v_i])) - __pyx_v_f_sent_start); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1622 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1630 * for i from 0 <= i < matching.size - 1: * f_gap_low[1+i] = matching.arr[matching.start+i] + chunklen[i] - f_sent_start * f_gap_high[1+i] = matching.arr[matching.start+i+1] - f_sent_start # <<<<<<<<<<<<<< @@ -58212,7 +58326,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ (__pyx_v_f_gap_high[(1 + __pyx_v_i)]) = ((__pyx_v_matching->arr[((__pyx_v_matching->start + __pyx_v_i) + 1)]) - __pyx_v_f_sent_start); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1623 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1631 * f_gap_low[1+i] = matching.arr[matching.start+i] + chunklen[i] - f_sent_start * f_gap_high[1+i] = matching.arr[matching.start+i+1] - f_sent_start * num_gaps = num_gaps + 1 # <<<<<<<<<<<<<< @@ -58222,7 +58336,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_v_num_gaps = (__pyx_v_num_gaps + 1); } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1625 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1633 * num_gaps = num_gaps + 1 * * if f_high < f_back_high: # <<<<<<<<<<<<<< @@ -58232,7 +58346,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_10 = ((__pyx_v_f_high < __pyx_v_f_back_high) != 0); if (__pyx_t_10) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1626 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1634 * * if f_high < f_back_high: * f_gap_low[gap_start+num_gaps] = f_high # <<<<<<<<<<<<<< @@ -58241,7 +58355,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ (__pyx_v_f_gap_low[(__pyx_v_gap_start + __pyx_v_num_gaps)]) = __pyx_v_f_high; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1627 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1635 * if f_high < f_back_high: * f_gap_low[gap_start+num_gaps] = f_high * f_gap_high[gap_start+num_gaps] = f_back_high # <<<<<<<<<<<<<< @@ -58250,7 +58364,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ (__pyx_v_f_gap_high[(__pyx_v_gap_start + __pyx_v_num_gaps)]) = __pyx_v_f_back_high; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1628 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1636 * f_gap_low[gap_start+num_gaps] = f_high * f_gap_high[gap_start+num_gaps] = f_back_high * num_gaps = num_gaps + 1 # <<<<<<<<<<<<<< @@ -58259,7 +58373,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_num_gaps = (__pyx_v_num_gaps + 1); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1629 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1637 * f_gap_high[gap_start+num_gaps] = f_back_high * num_gaps = num_gaps + 1 * phrase_len = phrase_len+1 # <<<<<<<<<<<<<< @@ -58268,7 +58382,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_phrase_len = (__pyx_v_phrase_len + 1); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1630 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1638 * num_gaps = num_gaps + 1 * phrase_len = phrase_len+1 * if phrase_len > self.max_length: # <<<<<<<<<<<<<< @@ -58278,7 +58392,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_10 = ((__pyx_v_phrase_len > __pyx_v_self->max_length) != 0); if (__pyx_t_10) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1631 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1639 * phrase_len = phrase_len+1 * if phrase_len > self.max_length: * gap_error = 1 # <<<<<<<<<<<<<< @@ -58290,7 +58404,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } __pyx_L43:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1632 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1640 * if phrase_len > self.max_length: * gap_error = 1 * if self.tight_phrases: # <<<<<<<<<<<<<< @@ -58300,7 +58414,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_10 = (__pyx_v_self->tight_phrases != 0); if (__pyx_t_10) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1633 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1641 * gap_error = 1 * if self.tight_phrases: * if f_links_low[f_back_high-1] == -1 or f_links_low[f_high] == -1: # <<<<<<<<<<<<<< @@ -58316,7 +58430,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } if (__pyx_t_8) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1634 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1642 * if self.tight_phrases: * if f_links_low[f_back_high-1] == -1 or f_links_low[f_high] == -1: * gap_error = 1 # <<<<<<<<<<<<<< @@ -58325,7 +58439,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_gap_error = 1; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1635 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1643 * if f_links_low[f_back_high-1] == -1 or f_links_low[f_high] == -1: * gap_error = 1 * reason_for_failure = "Inside edges of following subphrase are not tight" # <<<<<<<<<<<<<< @@ -58344,7 +58458,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1637 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1645 * reason_for_failure = "Inside edges of following subphrase are not tight" * else: * if self.tight_phrases and f_links_low[f_high-1] == -1: # <<<<<<<<<<<<<< @@ -58359,7 +58473,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } if (__pyx_t_10) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1638 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1646 * else: * if self.tight_phrases and f_links_low[f_high-1] == -1: * met_constraints = 0 # <<<<<<<<<<<<<< @@ -58373,7 +58487,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } __pyx_L42:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1640 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1648 * met_constraints = 0 * * if gap_error == 0: # <<<<<<<<<<<<<< @@ -58383,7 +58497,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_10 = ((__pyx_v_gap_error == 0) != 0); if (__pyx_t_10) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1641 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1649 * * if gap_error == 0: * e_word_count = e_high - e_low # <<<<<<<<<<<<<< @@ -58392,7 +58506,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_e_word_count = (__pyx_v_e_high - __pyx_v_e_low); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1642 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1650 * if gap_error == 0: * e_word_count = e_high - e_low * for i from 0 <= i < num_gaps: # check integrity of subphrases # <<<<<<<<<<<<<< @@ -58402,17 +58516,17 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_2 = __pyx_v_num_gaps; for (__pyx_v_i = 0; __pyx_v_i < __pyx_t_2; __pyx_v_i++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1643 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1651 * e_word_count = e_high - e_low * for i from 0 <= i < num_gaps: # check integrity of subphrases * if self.find_fixpoint(f_gap_low[gap_start+i], f_gap_high[gap_start+i], # <<<<<<<<<<<<<< * f_links_low, f_links_high, e_links_low, e_links_high, * -1, -1, e_gap_low+gap_start+i, e_gap_high+gap_start+i, */ - __pyx_t_11 = __Pyx_PyInt_From_int((__pyx_v_f_gap_high[(__pyx_v_gap_start + __pyx_v_i)])); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1643; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = __Pyx_PyInt_From_int((__pyx_v_f_gap_high[(__pyx_v_gap_start + __pyx_v_i)])); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1649 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1657 * f_sent_len, e_sent_len, * self.train_max_initial_size, self.train_max_initial_size, * 0, 0, 0, 0, 0, 0, 0) == 0: # <<<<<<<<<<<<<< @@ -58423,7 +58537,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (__pyx_t_10) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1650 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1658 * self.train_max_initial_size, self.train_max_initial_size, * 0, 0, 0, 0, 0, 0, 0) == 0: * gap_error = 1 # <<<<<<<<<<<<<< @@ -58432,18 +58546,18 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_gap_error = 1; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1651 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1659 * 0, 0, 0, 0, 0, 0, 0) == 0: * gap_error = 1 * reason_for_failure = "Subphrase [%d, %d] failed integrity check" % (f_gap_low[gap_start+i], f_gap_high[gap_start+i]) # <<<<<<<<<<<<<< * break * */ - __pyx_t_11 = __Pyx_PyInt_From_int((__pyx_v_f_gap_low[(__pyx_v_gap_start + __pyx_v_i)])); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = __Pyx_PyInt_From_int((__pyx_v_f_gap_low[(__pyx_v_gap_start + __pyx_v_i)])); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1659; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); - __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_f_gap_high[(__pyx_v_gap_start + __pyx_v_i)])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_f_gap_high[(__pyx_v_gap_start + __pyx_v_i)])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1659; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1659; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_11); @@ -58451,13 +58565,13 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_GIVEREF(__pyx_t_1); __pyx_t_11 = 0; __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Subphrase_d_d_failed_integrity_c, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1651; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Subphrase_d_d_failed_integrity_c, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1659; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_reason_for_failure, __pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1652 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1660 * gap_error = 1 * reason_for_failure = "Subphrase [%d, %d] failed integrity check" % (f_gap_low[gap_start+i], f_gap_high[gap_start+i]) * break # <<<<<<<<<<<<<< @@ -58472,7 +58586,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } __pyx_L47:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1654 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1662 * break * * if gap_error == 0: # <<<<<<<<<<<<<< @@ -58482,7 +58596,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_10 = ((__pyx_v_gap_error == 0) != 0); if (__pyx_t_10) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1655 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1663 * * if gap_error == 0: * i = 1 # <<<<<<<<<<<<<< @@ -58491,21 +58605,21 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_i = 1; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1656 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1664 * if gap_error == 0: * i = 1 * self.findexes.reset() # <<<<<<<<<<<<<< * if f_back_low < f_low: * fphr_arr._append(sym_setindex(self.category, i)) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->findexes), __pyx_n_s_reset); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1656; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->findexes), __pyx_n_s_reset); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1664; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1656; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1664; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1657 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1665 * i = 1 * self.findexes.reset() * if f_back_low < f_low: # <<<<<<<<<<<<<< @@ -58515,7 +58629,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_10 = ((__pyx_v_f_back_low < __pyx_v_f_low) != 0); if (__pyx_t_10) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1658 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1666 * self.findexes.reset() * if f_back_low < f_low: * fphr_arr._append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<< @@ -58524,7 +58638,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_append(__pyx_v_fphr_arr, __pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i)); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1659 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1667 * if f_back_low < f_low: * fphr_arr._append(sym_setindex(self.category, i)) * i = i+1 # <<<<<<<<<<<<<< @@ -58533,42 +58647,42 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_i = (__pyx_v_i + 1); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1660 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1668 * fphr_arr._append(sym_setindex(self.category, i)) * i = i+1 * self.findexes.append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<< * self.findexes.extend(self.findexes1) * for j from 0 <= j < phrase.n: */ - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1660; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1668; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_self->findexes), __pyx_t_3); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1660; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_self->findexes), __pyx_t_3); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1668; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L52; } __pyx_L52:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1661 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1669 * i = i+1 * self.findexes.append(sym_setindex(self.category, i)) * self.findexes.extend(self.findexes1) # <<<<<<<<<<<<<< * for j from 0 <= j < phrase.n: * if sym_isvar(phrase.syms[j]): */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->findexes), __pyx_n_s_extend); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1661; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->findexes), __pyx_n_s_extend); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1669; __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[8]; __pyx_lineno = 1661; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_self->findexes1)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->findexes1)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->findexes1)); - __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1661; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1669; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1662 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1670 * self.findexes.append(sym_setindex(self.category, i)) * self.findexes.extend(self.findexes1) * for j from 0 <= j < phrase.n: # <<<<<<<<<<<<<< @@ -58578,7 +58692,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_2 = __pyx_v_phrase->n; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_2; __pyx_v_j++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1663 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1671 * self.findexes.extend(self.findexes1) * for j from 0 <= j < phrase.n: * if sym_isvar(phrase.syms[j]): # <<<<<<<<<<<<<< @@ -58588,7 +58702,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_10 = (__pyx_f_4cdec_2sa_3_sa_sym_isvar((__pyx_v_phrase->syms[__pyx_v_j])) != 0); if (__pyx_t_10) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1664 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1672 * for j from 0 <= j < phrase.n: * if sym_isvar(phrase.syms[j]): * fphr_arr._append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<< @@ -58597,7 +58711,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_append(__pyx_v_fphr_arr, __pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i)); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1665 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1673 * if sym_isvar(phrase.syms[j]): * fphr_arr._append(sym_setindex(self.category, i)) * i = i + 1 # <<<<<<<<<<<<<< @@ -58609,7 +58723,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1667 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1675 * i = i + 1 * else: * fphr_arr._append(phrase.syms[j]) # <<<<<<<<<<<<<< @@ -58621,7 +58735,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_L55:; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1668 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1676 * else: * fphr_arr._append(phrase.syms[j]) * if f_back_high > f_high: # <<<<<<<<<<<<<< @@ -58631,7 +58745,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_10 = ((__pyx_v_f_back_high > __pyx_v_f_high) != 0); if (__pyx_t_10) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1669 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1677 * fphr_arr._append(phrase.syms[j]) * if f_back_high > f_high: * fphr_arr._append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<< @@ -58640,40 +58754,40 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_append(__pyx_v_fphr_arr, __pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i)); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1670 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1678 * if f_back_high > f_high: * fphr_arr._append(sym_setindex(self.category, i)) * self.findexes.append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<< * * fphr = Phrase(fphr_arr) */ - __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1670; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1678; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); - __pyx_t_7 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_self->findexes), __pyx_t_11); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1670; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_self->findexes), __pyx_t_11); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1678; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L56; } __pyx_L56:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1672 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1680 * self.findexes.append(sym_setindex(self.category, i)) * * fphr = Phrase(fphr_arr) # <<<<<<<<<<<<<< * if met_constraints: * phrase_list = self.extract_phrases(e_low, e_high, e_gap_low + gap_start, e_gap_high + gap_start, e_links_low, num_gaps, */ - __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1672; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_INCREF(((PyObject *)__pyx_v_fphr_arr)); PyTuple_SET_ITEM(__pyx_t_11, 0, ((PyObject *)__pyx_v_fphr_arr)); __Pyx_GIVEREF(((PyObject *)__pyx_v_fphr_arr)); - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_Phrase)), __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1672; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_Phrase)), __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1680; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_v_fphr = ((struct __pyx_obj_4cdec_2sa_3_sa_Phrase *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1673 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1681 * * fphr = Phrase(fphr_arr) * if met_constraints: # <<<<<<<<<<<<<< @@ -58683,37 +58797,37 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_10 = (__pyx_v_met_constraints != 0); if (__pyx_t_10) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1674 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1682 * fphr = Phrase(fphr_arr) * if met_constraints: * phrase_list = self.extract_phrases(e_low, e_high, e_gap_low + gap_start, e_gap_high + gap_start, e_links_low, num_gaps, # <<<<<<<<<<<<<< * f_back_low, f_back_high, f_gap_low + gap_start, f_gap_high + gap_start, f_links_low, * matching.sent_id, e_sent_len, e_sent_start) */ - __pyx_t_1 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->extract_phrases(__pyx_v_self, __pyx_v_e_low, __pyx_v_e_high, (__pyx_v_e_gap_low + __pyx_v_gap_start), (__pyx_v_e_gap_high + __pyx_v_gap_start), __pyx_v_e_links_low, __pyx_v_num_gaps, __pyx_v_f_back_low, __pyx_v_f_back_high, (__pyx_v_f_gap_low + __pyx_v_gap_start), (__pyx_v_f_gap_high + __pyx_v_gap_start), __pyx_v_f_links_low, __pyx_v_matching->sent_id, __pyx_v_e_sent_len, __pyx_v_e_sent_start); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1674; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->extract_phrases(__pyx_v_self, __pyx_v_e_low, __pyx_v_e_high, (__pyx_v_e_gap_low + __pyx_v_gap_start), (__pyx_v_e_gap_high + __pyx_v_gap_start), __pyx_v_e_links_low, __pyx_v_num_gaps, __pyx_v_f_back_low, __pyx_v_f_back_high, (__pyx_v_f_gap_low + __pyx_v_gap_start), (__pyx_v_f_gap_high + __pyx_v_gap_start), __pyx_v_f_links_low, __pyx_v_matching->sent_id, __pyx_v_e_sent_len, __pyx_v_e_sent_start); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1682; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_phrase_list = __pyx_t_1; __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1677 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1685 * f_back_low, f_back_high, f_gap_low + gap_start, f_gap_high + gap_start, f_links_low, * matching.sent_id, e_sent_len, e_sent_start) * if len(phrase_list) > 0: # <<<<<<<<<<<<<< * pair_count = 1.0 / len(phrase_list) * else: */ - __pyx_t_13 = PyObject_Length(__pyx_v_phrase_list); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1677; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_13 = PyObject_Length(__pyx_v_phrase_list); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1685; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = ((__pyx_t_13 > 0) != 0); if (__pyx_t_10) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1678 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1686 * matching.sent_id, e_sent_len, e_sent_start) * if len(phrase_list) > 0: * pair_count = 1.0 / len(phrase_list) # <<<<<<<<<<<<<< * else: * pair_count = 0 */ - __pyx_t_13 = PyObject_Length(__pyx_v_phrase_list); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1678; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_13 = PyObject_Length(__pyx_v_phrase_list); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(__pyx_t_13 == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); @@ -58722,14 +58836,14 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1678; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1686; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_pair_count = (1.0 / __pyx_t_13); goto __pyx_L58; } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1680 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1688 * pair_count = 1.0 / len(phrase_list) * else: * pair_count = 0 # <<<<<<<<<<<<<< @@ -58738,22 +58852,22 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_pair_count = 0.0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1681 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1689 * else: * pair_count = 0 * reason_for_failure = "Didn't extract anything from [%d, %d] -> [%d, %d]" % (f_back_low, f_back_high, e_low, e_high) # <<<<<<<<<<<<<< * for phrase2, eindexes in phrase_list: * als1 = self.create_alignments(sent_links,num_links,self.findexes,eindexes) */ - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_f_back_low); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_f_back_low); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1689; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_v_f_back_high); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_v_f_back_high); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1689; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_e_low); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_e_low); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1689; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_14 = __Pyx_PyInt_From_int(__pyx_v_e_high); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_14 = __Pyx_PyInt_From_int(__pyx_v_e_high); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1689; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); - __pyx_t_15 = PyTuple_New(4); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_15 = PyTuple_New(4); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1689; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -58767,7 +58881,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_11 = 0; __pyx_t_3 = 0; __pyx_t_14 = 0; - __pyx_t_14 = __Pyx_PyString_Format(__pyx_kp_s_Didn_t_extract_anything_from_d_d, __pyx_t_15); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_14 = __Pyx_PyString_Format(__pyx_kp_s_Didn_t_extract_anything_from_d_d, __pyx_t_15); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1689; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_DECREF_SET(__pyx_v_reason_for_failure, __pyx_t_14); @@ -58775,7 +58889,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } __pyx_L58:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1682 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1690 * pair_count = 0 * reason_for_failure = "Didn't extract anything from [%d, %d] -> [%d, %d]" % (f_back_low, f_back_high, e_low, e_high) * for phrase2, eindexes in phrase_list: # <<<<<<<<<<<<<< @@ -58786,7 +58900,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_14 = __pyx_v_phrase_list; __Pyx_INCREF(__pyx_t_14); __pyx_t_13 = 0; __pyx_t_16 = NULL; } else { - __pyx_t_13 = -1; __pyx_t_14 = PyObject_GetIter(__pyx_v_phrase_list); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1682; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_13 = -1; __pyx_t_14 = PyObject_GetIter(__pyx_v_phrase_list); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1690; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_16 = Py_TYPE(__pyx_t_14)->tp_iternext; } @@ -58794,16 +58908,16 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct if (!__pyx_t_16 && PyList_CheckExact(__pyx_t_14)) { if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_14)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_15 = PyList_GET_ITEM(__pyx_t_14, __pyx_t_13); __Pyx_INCREF(__pyx_t_15); __pyx_t_13++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1682; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_15 = PyList_GET_ITEM(__pyx_t_14, __pyx_t_13); __Pyx_INCREF(__pyx_t_15); __pyx_t_13++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1690; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_15 = PySequence_ITEM(__pyx_t_14, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1682; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_15 = PySequence_ITEM(__pyx_t_14, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1690; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_16 && PyTuple_CheckExact(__pyx_t_14)) { if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_14)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_15 = PyTuple_GET_ITEM(__pyx_t_14, __pyx_t_13); __Pyx_INCREF(__pyx_t_15); __pyx_t_13++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1682; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_15 = PyTuple_GET_ITEM(__pyx_t_14, __pyx_t_13); __Pyx_INCREF(__pyx_t_15); __pyx_t_13++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1690; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_15 = PySequence_ITEM(__pyx_t_14, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1682; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_15 = PySequence_ITEM(__pyx_t_14, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1690; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_15 = __pyx_t_16(__pyx_t_14); @@ -58811,7 +58925,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct 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[8]; __pyx_lineno = 1682; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1690; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -58827,7 +58941,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1682; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1690; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { @@ -58840,15 +58954,15 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_11); #else - __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1682; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1690; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_11 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1682; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1690; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); #endif __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; } else { Py_ssize_t index = -1; - __pyx_t_1 = PyObject_GetIter(__pyx_t_15); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1682; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_GetIter(__pyx_t_15); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1690; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __pyx_t_17 = Py_TYPE(__pyx_t_1)->tp_iternext; @@ -58856,7 +58970,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_11 = __pyx_t_17(__pyx_t_1); if (unlikely(!__pyx_t_11)) goto __pyx_L61_unpacking_failed; __Pyx_GOTREF(__pyx_t_11); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_17(__pyx_t_1), 2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1682; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_IternextUnpackEndCheck(__pyx_t_17(__pyx_t_1), 2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1690; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_17 = NULL; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L62_unpacking_done; @@ -58864,7 +58978,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_17 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1682; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1690; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L62_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_phrase2, __pyx_t_3); @@ -58872,7 +58986,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_XDECREF_SET(__pyx_v_eindexes, __pyx_t_11); __pyx_t_11 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1683 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1691 * reason_for_failure = "Didn't extract anything from [%d, %d] -> [%d, %d]" % (f_back_low, f_back_high, e_low, e_high) * for phrase2, eindexes in phrase_list: * als1 = self.create_alignments(sent_links,num_links,self.findexes,eindexes) # <<<<<<<<<<<<<< @@ -58881,31 +58995,31 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_t_15 = ((PyObject *)__pyx_v_self->findexes); __Pyx_INCREF(__pyx_t_15); - if (!(likely(((__pyx_v_eindexes) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_eindexes, __pyx_ptype_4cdec_2sa_3_sa_IntList))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1683; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_11 = ((PyObject *)((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->create_alignments(__pyx_v_self, __pyx_v_sent_links, __pyx_v_num_links, ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_15), ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_v_eindexes))); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1683; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(((__pyx_v_eindexes) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_eindexes, __pyx_ptype_4cdec_2sa_3_sa_IntList))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = ((PyObject *)((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->create_alignments(__pyx_v_self, __pyx_v_sent_links, __pyx_v_num_links, ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_15), ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_v_eindexes))); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1691; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_XDECREF_SET(__pyx_v_als1, ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_11)); __pyx_t_11 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1684 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1692 * for phrase2, eindexes in phrase_list: * als1 = self.create_alignments(sent_links,num_links,self.findexes,eindexes) * extracts.append((fphr, phrase2, pair_count, tuple(als1))) # <<<<<<<<<<<<<< * if (num_gaps < self.max_nonterminals and * phrase_len < self.max_length and */ - __pyx_t_11 = PyFloat_FromDouble(__pyx_v_pair_count); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = PyFloat_FromDouble(__pyx_v_pair_count); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1692; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); - __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1692; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_INCREF(((PyObject *)__pyx_v_als1)); PyTuple_SET_ITEM(__pyx_t_15, 0, ((PyObject *)__pyx_v_als1)); __Pyx_GIVEREF(((PyObject *)__pyx_v_als1)); - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_15, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_15, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1692; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; - __pyx_t_15 = PyTuple_New(4); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_15 = PyTuple_New(4); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1692; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_INCREF(((PyObject *)__pyx_v_fphr)); PyTuple_SET_ITEM(__pyx_t_15, 0, ((PyObject *)__pyx_v_fphr)); @@ -58919,7 +59033,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_GIVEREF(__pyx_t_3); __pyx_t_11 = 0; __pyx_t_3 = 0; - __pyx_t_7 = __Pyx_PyObject_Append(__pyx_v_extracts, __pyx_t_15); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1684; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyObject_Append(__pyx_v_extracts, __pyx_t_15); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1692; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; } __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; @@ -58927,7 +59041,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } __pyx_L57:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1685 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1693 * als1 = self.create_alignments(sent_links,num_links,self.findexes,eindexes) * extracts.append((fphr, phrase2, pair_count, tuple(als1))) * if (num_gaps < self.max_nonterminals and # <<<<<<<<<<<<<< @@ -58937,7 +59051,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_10 = ((__pyx_v_num_gaps < __pyx_v_self->max_nonterminals) != 0); if (__pyx_t_10) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1686 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1694 * extracts.append((fphr, phrase2, pair_count, tuple(als1))) * if (num_gaps < self.max_nonterminals and * phrase_len < self.max_length and # <<<<<<<<<<<<<< @@ -58947,7 +59061,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_8 = ((__pyx_v_phrase_len < __pyx_v_self->max_length) != 0); if (__pyx_t_8) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1687 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1695 * if (num_gaps < self.max_nonterminals and * phrase_len < self.max_length and * f_back_high - f_back_low + self.train_min_gap_size <= self.train_max_initial_size): # <<<<<<<<<<<<<< @@ -58965,7 +59079,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } if (__pyx_t_8) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1688 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1696 * phrase_len < self.max_length and * f_back_high - f_back_low + self.train_min_gap_size <= self.train_max_initial_size): * if (f_back_low == f_low and # <<<<<<<<<<<<<< @@ -58975,7 +59089,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_8 = ((__pyx_v_f_back_low == __pyx_v_f_low) != 0); if (__pyx_t_8) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1689 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1697 * f_back_high - f_back_low + self.train_min_gap_size <= self.train_max_initial_size): * if (f_back_low == f_low and * f_low >= self.train_min_gap_size and # <<<<<<<<<<<<<< @@ -58985,7 +59099,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_10 = ((__pyx_v_f_low >= __pyx_v_self->train_min_gap_size) != 0); if (__pyx_t_10) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1690 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1698 * if (f_back_low == f_low and * f_low >= self.train_min_gap_size and * ((not self.tight_phrases) or (f_links_low[f_low-1] != -1 and f_links_low[f_back_high-1] != -1))): # <<<<<<<<<<<<<< @@ -59015,7 +59129,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } if (__pyx_t_10) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1691 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1699 * f_low >= self.train_min_gap_size and * ((not self.tight_phrases) or (f_links_low[f_low-1] != -1 and f_links_low[f_back_high-1] != -1))): * f_x_low = f_low-self.train_min_gap_size # <<<<<<<<<<<<<< @@ -59024,7 +59138,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_f_x_low = (__pyx_v_f_low - __pyx_v_self->train_min_gap_size); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1692 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1700 * ((not self.tight_phrases) or (f_links_low[f_low-1] != -1 and f_links_low[f_back_high-1] != -1))): * f_x_low = f_low-self.train_min_gap_size * met_constraints = 1 # <<<<<<<<<<<<<< @@ -59033,7 +59147,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_met_constraints = 1; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1693 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1701 * f_x_low = f_low-self.train_min_gap_size * met_constraints = 1 * if self.tight_phrases: # <<<<<<<<<<<<<< @@ -59043,7 +59157,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_10 = (__pyx_v_self->tight_phrases != 0); if (__pyx_t_10) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1694 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1702 * met_constraints = 1 * if self.tight_phrases: * while f_x_low >= 0 and f_links_low[f_x_low] == -1: # <<<<<<<<<<<<<< @@ -59060,7 +59174,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } if (!__pyx_t_18) break; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1695 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1703 * if self.tight_phrases: * while f_x_low >= 0 and f_links_low[f_x_low] == -1: * f_x_low = f_x_low - 1 # <<<<<<<<<<<<<< @@ -59073,7 +59187,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } __pyx_L65:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1696 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1704 * while f_x_low >= 0 and f_links_low[f_x_low] == -1: * f_x_low = f_x_low - 1 * if f_x_low < 0 or f_back_high - f_x_low > self.train_max_initial_size: # <<<<<<<<<<<<<< @@ -59089,7 +59203,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } if (__pyx_t_8) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1697 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1705 * f_x_low = f_x_low - 1 * if f_x_low < 0 or f_back_high - f_x_low > self.train_max_initial_size: * met_constraints = 0 # <<<<<<<<<<<<<< @@ -59101,7 +59215,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } __pyx_L68:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1699 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1707 * met_constraints = 0 * * if (met_constraints and # <<<<<<<<<<<<<< @@ -59110,17 +59224,17 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ if ((__pyx_v_met_constraints != 0)) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1700 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1708 * * if (met_constraints and * (self.find_fixpoint(f_x_low, f_back_high, # <<<<<<<<<<<<<< * f_links_low, f_links_high, e_links_low, e_links_high, * e_low, e_high, &e_x_low, &e_x_high, &f_x_low, &f_x_high, */ - __pyx_t_14 = __Pyx_PyInt_From_int(__pyx_v_f_back_high); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1700; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_14 = __Pyx_PyInt_From_int(__pyx_v_f_back_high); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1708; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1705 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1713 * f_sent_len, e_sent_len, * self.train_max_initial_size, self.train_max_initial_size, * 1, 1, 1, 1, 0, 1, 0) == 1) and # <<<<<<<<<<<<<< @@ -59131,7 +59245,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (__pyx_t_8) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1706 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1714 * self.train_max_initial_size, self.train_max_initial_size, * 1, 1, 1, 1, 0, 1, 0) == 1) and * ((not self.tight_phrases) or f_links_low[f_x_low] != -1) and # <<<<<<<<<<<<<< @@ -59147,17 +59261,17 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } if (__pyx_t_9) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1707 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1715 * 1, 1, 1, 1, 0, 1, 0) == 1) and * ((not self.tight_phrases) or f_links_low[f_x_low] != -1) and * self.find_fixpoint(f_x_low, f_low, # check integrity of new subphrase # <<<<<<<<<<<<<< * f_links_low, f_links_high, e_links_low, e_links_high, * -1, -1, e_gap_low, e_gap_high, f_gap_low, f_gap_high, */ - __pyx_t_14 = __Pyx_PyInt_From_int(__pyx_v_f_low); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1707; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_14 = __Pyx_PyInt_From_int(__pyx_v_f_low); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1715; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1711 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1719 * -1, -1, e_gap_low, e_gap_high, f_gap_low, f_gap_high, * f_sent_len, e_sent_len, * self.train_max_initial_size, self.train_max_initial_size, # <<<<<<<<<<<<<< @@ -59179,7 +59293,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } if (__pyx_t_8) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1713 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1721 * self.train_max_initial_size, self.train_max_initial_size, * 0, 0, 0, 0, 0, 0, 0)): * fphr_arr._clear() # <<<<<<<<<<<<<< @@ -59188,7 +59302,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_clear(__pyx_v_fphr_arr); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1714 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1722 * 0, 0, 0, 0, 0, 0, 0)): * fphr_arr._clear() * i = 1 # <<<<<<<<<<<<<< @@ -59197,33 +59311,33 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_i = 1; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1715 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1723 * fphr_arr._clear() * i = 1 * self.findexes.reset() # <<<<<<<<<<<<<< * self.findexes.append(sym_setindex(self.category, i)) * fphr_arr._append(sym_setindex(self.category, i)) */ - __pyx_t_14 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->findexes), __pyx_n_s_reset); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1715; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->findexes), __pyx_n_s_reset); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1723; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); - __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1715; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1723; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1716 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1724 * i = 1 * self.findexes.reset() * self.findexes.append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<< * fphr_arr._append(sym_setindex(self.category, i)) * i = i+1 */ - __pyx_t_15 = __Pyx_PyInt_From_int(__pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i)); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1716; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_15 = __Pyx_PyInt_From_int(__pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i)); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1724; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); - __pyx_t_7 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_self->findexes), __pyx_t_15); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1716; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_self->findexes), __pyx_t_15); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1724; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1717 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1725 * self.findexes.reset() * self.findexes.append(sym_setindex(self.category, i)) * fphr_arr._append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<< @@ -59232,7 +59346,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_append(__pyx_v_fphr_arr, __pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i)); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1718 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1726 * self.findexes.append(sym_setindex(self.category, i)) * fphr_arr._append(sym_setindex(self.category, i)) * i = i+1 # <<<<<<<<<<<<<< @@ -59241,27 +59355,27 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_i = (__pyx_v_i + 1); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1719 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1727 * fphr_arr._append(sym_setindex(self.category, i)) * i = i+1 * self.findexes.extend(self.findexes1) # <<<<<<<<<<<<<< * for j from 0 <= j < phrase.n: * if sym_isvar(phrase.syms[j]): */ - __pyx_t_15 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->findexes), __pyx_n_s_extend); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1719; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_15 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->findexes), __pyx_n_s_extend); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1727; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); - __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1719; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1727; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_INCREF(((PyObject *)__pyx_v_self->findexes1)); PyTuple_SET_ITEM(__pyx_t_14, 0, ((PyObject *)__pyx_v_self->findexes1)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->findexes1)); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_14, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1719; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_14, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1727; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1720 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1728 * i = i+1 * self.findexes.extend(self.findexes1) * for j from 0 <= j < phrase.n: # <<<<<<<<<<<<<< @@ -59271,7 +59385,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_2 = __pyx_v_phrase->n; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_2; __pyx_v_j++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1721 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1729 * self.findexes.extend(self.findexes1) * for j from 0 <= j < phrase.n: * if sym_isvar(phrase.syms[j]): # <<<<<<<<<<<<<< @@ -59281,7 +59395,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_8 = (__pyx_f_4cdec_2sa_3_sa_sym_isvar((__pyx_v_phrase->syms[__pyx_v_j])) != 0); if (__pyx_t_8) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1722 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1730 * for j from 0 <= j < phrase.n: * if sym_isvar(phrase.syms[j]): * fphr_arr._append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<< @@ -59290,7 +59404,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_append(__pyx_v_fphr_arr, __pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i)); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1723 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1731 * if sym_isvar(phrase.syms[j]): * fphr_arr._append(sym_setindex(self.category, i)) * i = i + 1 # <<<<<<<<<<<<<< @@ -59302,7 +59416,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1725 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1733 * i = i + 1 * else: * fphr_arr._append(phrase.syms[j]) # <<<<<<<<<<<<<< @@ -59314,7 +59428,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_L72:; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1726 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1734 * else: * fphr_arr._append(phrase.syms[j]) * if f_back_high > f_high: # <<<<<<<<<<<<<< @@ -59324,7 +59438,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_8 = ((__pyx_v_f_back_high > __pyx_v_f_high) != 0); if (__pyx_t_8) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1727 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1735 * fphr_arr._append(phrase.syms[j]) * if f_back_high > f_high: * fphr_arr._append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<< @@ -59333,70 +59447,70 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_append(__pyx_v_fphr_arr, __pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i)); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1728 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1736 * if f_back_high > f_high: * fphr_arr._append(sym_setindex(self.category, i)) * self.findexes.append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<< * fphr = Phrase(fphr_arr) * phrase_list = self.extract_phrases(e_x_low, e_x_high, e_gap_low, e_gap_high, e_links_low, num_gaps+1, */ - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1728; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1736; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_self->findexes), __pyx_t_3); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1728; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_self->findexes), __pyx_t_3); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1736; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L73; } __pyx_L73:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1729 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1737 * fphr_arr._append(sym_setindex(self.category, i)) * self.findexes.append(sym_setindex(self.category, i)) * fphr = Phrase(fphr_arr) # <<<<<<<<<<<<<< * phrase_list = self.extract_phrases(e_x_low, e_x_high, e_gap_low, e_gap_high, e_links_low, num_gaps+1, * f_x_low, f_x_high, f_gap_low, f_gap_high, f_links_low, matching.sent_id, */ - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1729; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_fphr_arr)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_fphr_arr)); __Pyx_GIVEREF(((PyObject *)__pyx_v_fphr_arr)); - __pyx_t_14 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_Phrase)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1729; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_14 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_Phrase)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_fphr, ((struct __pyx_obj_4cdec_2sa_3_sa_Phrase *)__pyx_t_14)); __pyx_t_14 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1730 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1738 * self.findexes.append(sym_setindex(self.category, i)) * fphr = Phrase(fphr_arr) * phrase_list = self.extract_phrases(e_x_low, e_x_high, e_gap_low, e_gap_high, e_links_low, num_gaps+1, # <<<<<<<<<<<<<< * f_x_low, f_x_high, f_gap_low, f_gap_high, f_links_low, matching.sent_id, * e_sent_len, e_sent_start) */ - __pyx_t_14 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->extract_phrases(__pyx_v_self, __pyx_v_e_x_low, __pyx_v_e_x_high, __pyx_v_e_gap_low, __pyx_v_e_gap_high, __pyx_v_e_links_low, (__pyx_v_num_gaps + 1), __pyx_v_f_x_low, __pyx_v_f_x_high, __pyx_v_f_gap_low, __pyx_v_f_gap_high, __pyx_v_f_links_low, __pyx_v_matching->sent_id, __pyx_v_e_sent_len, __pyx_v_e_sent_start); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1730; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_14 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->extract_phrases(__pyx_v_self, __pyx_v_e_x_low, __pyx_v_e_x_high, __pyx_v_e_gap_low, __pyx_v_e_gap_high, __pyx_v_e_links_low, (__pyx_v_num_gaps + 1), __pyx_v_f_x_low, __pyx_v_f_x_high, __pyx_v_f_gap_low, __pyx_v_f_gap_high, __pyx_v_f_links_low, __pyx_v_matching->sent_id, __pyx_v_e_sent_len, __pyx_v_e_sent_start); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1738; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_XDECREF_SET(__pyx_v_phrase_list, __pyx_t_14); __pyx_t_14 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1733 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1741 * f_x_low, f_x_high, f_gap_low, f_gap_high, f_links_low, matching.sent_id, * e_sent_len, e_sent_start) * if len(phrase_list) > 0: # <<<<<<<<<<<<<< * pair_count = 1.0 / len(phrase_list) * else: */ - __pyx_t_13 = PyObject_Length(__pyx_v_phrase_list); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1733; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_13 = PyObject_Length(__pyx_v_phrase_list); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1741; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = ((__pyx_t_13 > 0) != 0); if (__pyx_t_8) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1734 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1742 * e_sent_len, e_sent_start) * if len(phrase_list) > 0: * pair_count = 1.0 / len(phrase_list) # <<<<<<<<<<<<<< * else: * pair_count = 0 */ - __pyx_t_13 = PyObject_Length(__pyx_v_phrase_list); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1734; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_13 = PyObject_Length(__pyx_v_phrase_list); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1742; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(__pyx_t_13 == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); @@ -59405,14 +59519,14 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1734; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1742; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_pair_count = (1.0 / __pyx_t_13); goto __pyx_L74; } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1736 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1744 * pair_count = 1.0 / len(phrase_list) * else: * pair_count = 0 # <<<<<<<<<<<<<< @@ -59423,7 +59537,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } __pyx_L74:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1737 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1745 * else: * pair_count = 0 * for phrase2, eindexes in phrase_list: # <<<<<<<<<<<<<< @@ -59434,7 +59548,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_14 = __pyx_v_phrase_list; __Pyx_INCREF(__pyx_t_14); __pyx_t_13 = 0; __pyx_t_16 = NULL; } else { - __pyx_t_13 = -1; __pyx_t_14 = PyObject_GetIter(__pyx_v_phrase_list); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_13 = -1; __pyx_t_14 = PyObject_GetIter(__pyx_v_phrase_list); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_16 = Py_TYPE(__pyx_t_14)->tp_iternext; } @@ -59442,16 +59556,16 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct if (!__pyx_t_16 && PyList_CheckExact(__pyx_t_14)) { if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_14)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_14, __pyx_t_13); __Pyx_INCREF(__pyx_t_3); __pyx_t_13++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_14, __pyx_t_13); __Pyx_INCREF(__pyx_t_3); __pyx_t_13++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_14, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PySequence_ITEM(__pyx_t_14, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_16 && PyTuple_CheckExact(__pyx_t_14)) { if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_14)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_14, __pyx_t_13); __Pyx_INCREF(__pyx_t_3); __pyx_t_13++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_14, __pyx_t_13); __Pyx_INCREF(__pyx_t_3); __pyx_t_13++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_14, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PySequence_ITEM(__pyx_t_14, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_3 = __pyx_t_16(__pyx_t_14); @@ -59459,7 +59573,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct 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[8]; __pyx_lineno = 1737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -59475,7 +59589,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { @@ -59488,15 +59602,15 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_INCREF(__pyx_t_15); __Pyx_INCREF(__pyx_t_11); #else - __pyx_t_15 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_15 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); - __pyx_t_11 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); #endif __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { Py_ssize_t index = -1; - __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_17 = Py_TYPE(__pyx_t_1)->tp_iternext; @@ -59504,7 +59618,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_GOTREF(__pyx_t_15); index = 1; __pyx_t_11 = __pyx_t_17(__pyx_t_1); if (unlikely(!__pyx_t_11)) goto __pyx_L77_unpacking_failed; __Pyx_GOTREF(__pyx_t_11); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_17(__pyx_t_1), 2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_IternextUnpackEndCheck(__pyx_t_17(__pyx_t_1), 2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_17 = NULL; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L78_unpacking_done; @@ -59512,7 +59626,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_17 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1737; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1745; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L78_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_phrase2, __pyx_t_15); @@ -59520,7 +59634,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_XDECREF_SET(__pyx_v_eindexes, __pyx_t_11); __pyx_t_11 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1738 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1746 * pair_count = 0 * for phrase2, eindexes in phrase_list: * als2 = self.create_alignments(sent_links,num_links,self.findexes,eindexes) # <<<<<<<<<<<<<< @@ -59529,31 +59643,31 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_t_3 = ((PyObject *)__pyx_v_self->findexes); __Pyx_INCREF(__pyx_t_3); - if (!(likely(((__pyx_v_eindexes) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_eindexes, __pyx_ptype_4cdec_2sa_3_sa_IntList))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1738; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_11 = ((PyObject *)((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->create_alignments(__pyx_v_self, __pyx_v_sent_links, __pyx_v_num_links, ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_3), ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_v_eindexes))); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1738; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(((__pyx_v_eindexes) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_eindexes, __pyx_ptype_4cdec_2sa_3_sa_IntList))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1746; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = ((PyObject *)((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->create_alignments(__pyx_v_self, __pyx_v_sent_links, __pyx_v_num_links, ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_3), ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_v_eindexes))); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1746; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF_SET(__pyx_v_als2, ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_11)); __pyx_t_11 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1739 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1747 * for phrase2, eindexes in phrase_list: * als2 = self.create_alignments(sent_links,num_links,self.findexes,eindexes) * extracts.append((fphr, phrase2, pair_count, tuple(als2))) # <<<<<<<<<<<<<< * * if (f_back_high == f_high and */ - __pyx_t_11 = PyFloat_FromDouble(__pyx_v_pair_count); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1739; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = PyFloat_FromDouble(__pyx_v_pair_count); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1747; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1739; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1747; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_als2)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_als2)); __Pyx_GIVEREF(((PyObject *)__pyx_v_als2)); - __pyx_t_15 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_3, NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1739; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_15 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_3, NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1747; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1739; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1747; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_fphr)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_fphr)); @@ -59567,7 +59681,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_GIVEREF(__pyx_t_15); __pyx_t_11 = 0; __pyx_t_15 = 0; - __pyx_t_7 = __Pyx_PyObject_Append(__pyx_v_extracts, __pyx_t_3); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1739; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyObject_Append(__pyx_v_extracts, __pyx_t_3); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1747; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; @@ -59578,7 +59692,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } __pyx_L64:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1741 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1749 * extracts.append((fphr, phrase2, pair_count, tuple(als2))) * * if (f_back_high == f_high and # <<<<<<<<<<<<<< @@ -59588,7 +59702,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_8 = ((__pyx_v_f_back_high == __pyx_v_f_high) != 0); if (__pyx_t_8) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1742 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1750 * * if (f_back_high == f_high and * f_sent_len - f_high >= self.train_min_gap_size and # <<<<<<<<<<<<<< @@ -59598,7 +59712,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_9 = (((__pyx_v_f_sent_len - __pyx_v_f_high) >= __pyx_v_self->train_min_gap_size) != 0); if (__pyx_t_9) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1743 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1751 * if (f_back_high == f_high and * f_sent_len - f_high >= self.train_min_gap_size and * ((not self.tight_phrases) or (f_links_low[f_high] != -1 and f_links_low[f_back_low] != -1))): # <<<<<<<<<<<<<< @@ -59628,7 +59742,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } if (__pyx_t_9) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1744 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1752 * f_sent_len - f_high >= self.train_min_gap_size and * ((not self.tight_phrases) or (f_links_low[f_high] != -1 and f_links_low[f_back_low] != -1))): * f_x_high = f_high+self.train_min_gap_size # <<<<<<<<<<<<<< @@ -59637,7 +59751,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_f_x_high = (__pyx_v_f_high + __pyx_v_self->train_min_gap_size); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1745 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1753 * ((not self.tight_phrases) or (f_links_low[f_high] != -1 and f_links_low[f_back_low] != -1))): * f_x_high = f_high+self.train_min_gap_size * met_constraints = 1 # <<<<<<<<<<<<<< @@ -59646,7 +59760,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_met_constraints = 1; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1746 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1754 * f_x_high = f_high+self.train_min_gap_size * met_constraints = 1 * if self.tight_phrases: # <<<<<<<<<<<<<< @@ -59656,7 +59770,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_9 = (__pyx_v_self->tight_phrases != 0); if (__pyx_t_9) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1747 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1755 * met_constraints = 1 * if self.tight_phrases: * while f_x_high <= f_sent_len and f_links_low[f_x_high-1] == -1: # <<<<<<<<<<<<<< @@ -59673,7 +59787,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } if (!__pyx_t_18) break; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1748 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1756 * if self.tight_phrases: * while f_x_high <= f_sent_len and f_links_low[f_x_high-1] == -1: * f_x_high = f_x_high + 1 # <<<<<<<<<<<<<< @@ -59686,7 +59800,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } __pyx_L80:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1749 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1757 * while f_x_high <= f_sent_len and f_links_low[f_x_high-1] == -1: * f_x_high = f_x_high + 1 * if f_x_high > f_sent_len or f_x_high - f_back_low > self.train_max_initial_size: # <<<<<<<<<<<<<< @@ -59702,7 +59816,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } if (__pyx_t_8) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1750 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1758 * f_x_high = f_x_high + 1 * if f_x_high > f_sent_len or f_x_high - f_back_low > self.train_max_initial_size: * met_constraints = 0 # <<<<<<<<<<<<<< @@ -59714,7 +59828,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } __pyx_L83:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1752 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1760 * met_constraints = 0 * * if (met_constraints and # <<<<<<<<<<<<<< @@ -59723,17 +59837,17 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ if ((__pyx_v_met_constraints != 0)) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1753 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1761 * * if (met_constraints and * self.find_fixpoint(f_back_low, f_x_high, # <<<<<<<<<<<<<< * f_links_low, f_links_high, e_links_low, e_links_high, * e_low, e_high, &e_x_low, &e_x_high, &f_x_low, &f_x_high, */ - __pyx_t_14 = __Pyx_PyInt_From_int(__pyx_v_f_x_high); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1753; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_14 = __Pyx_PyInt_From_int(__pyx_v_f_x_high); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1761; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1757 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1765 * e_low, e_high, &e_x_low, &e_x_high, &f_x_low, &f_x_high, * f_sent_len, e_sent_len, * self.train_max_initial_size, self.train_max_initial_size, # <<<<<<<<<<<<<< @@ -59743,7 +59857,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct if ((((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->find_fixpoint(__pyx_v_self, __pyx_v_f_back_low, __pyx_t_14, __pyx_v_f_links_low, __pyx_v_f_links_high, __pyx_v_e_links_low, __pyx_v_e_links_high, __pyx_v_e_low, __pyx_v_e_high, (&__pyx_v_e_x_low), (&__pyx_v_e_x_high), (&__pyx_v_f_x_low), (&__pyx_v_f_x_high), __pyx_v_f_sent_len, __pyx_v_e_sent_len, __pyx_v_self->train_max_initial_size, __pyx_v_self->train_max_initial_size, 1, 1, 1, 0, 1, 1, 0) != 0)) { __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1759 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1767 * self.train_max_initial_size, self.train_max_initial_size, * 1, 1, 1, 0, 1, 1, 0) and * ((not self.tight_phrases) or f_links_low[f_x_high-1] != -1) and # <<<<<<<<<<<<<< @@ -59759,17 +59873,17 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } if (__pyx_t_9) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1760 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1768 * 1, 1, 1, 0, 1, 1, 0) and * ((not self.tight_phrases) or f_links_low[f_x_high-1] != -1) and * self.find_fixpoint(f_high, f_x_high, # <<<<<<<<<<<<<< * f_links_low, f_links_high, e_links_low, e_links_high, * -1, -1, e_gap_low+gap_start+num_gaps, e_gap_high+gap_start+num_gaps, */ - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_f_x_high); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1760; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_f_x_high); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1768; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1765 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1773 * f_gap_low+gap_start+num_gaps, f_gap_high+gap_start+num_gaps, * f_sent_len, e_sent_len, * self.train_max_initial_size, self.train_max_initial_size, # <<<<<<<<<<<<<< @@ -59792,7 +59906,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } if (__pyx_t_8) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1767 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1775 * self.train_max_initial_size, self.train_max_initial_size, * 0, 0, 0, 0, 0, 0, 0)): * fphr_arr._clear() # <<<<<<<<<<<<<< @@ -59801,7 +59915,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_clear(__pyx_v_fphr_arr); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1768 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1776 * 0, 0, 0, 0, 0, 0, 0)): * fphr_arr._clear() * i = 1 # <<<<<<<<<<<<<< @@ -59810,21 +59924,21 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_i = 1; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1769 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1777 * fphr_arr._clear() * i = 1 * self.findexes.reset() # <<<<<<<<<<<<<< * if f_back_low < f_low: * fphr_arr._append(sym_setindex(self.category, i)) */ - __pyx_t_14 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->findexes), __pyx_n_s_reset); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1769; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->findexes), __pyx_n_s_reset); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1777; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1769; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1777; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1770 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1778 * i = 1 * self.findexes.reset() * if f_back_low < f_low: # <<<<<<<<<<<<<< @@ -59834,7 +59948,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_8 = ((__pyx_v_f_back_low < __pyx_v_f_low) != 0); if (__pyx_t_8) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1771 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1779 * self.findexes.reset() * if f_back_low < f_low: * fphr_arr._append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<< @@ -59843,7 +59957,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_append(__pyx_v_fphr_arr, __pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i)); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1772 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1780 * if f_back_low < f_low: * fphr_arr._append(sym_setindex(self.category, i)) * i = i+1 # <<<<<<<<<<<<<< @@ -59852,42 +59966,42 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_i = (__pyx_v_i + 1); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1773 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1781 * fphr_arr._append(sym_setindex(self.category, i)) * i = i+1 * self.findexes.append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<< * self.findexes.extend(self.findexes1) * for j from 0 <= j < phrase.n: */ - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_self->findexes), __pyx_t_3); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1773; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_self->findexes), __pyx_t_3); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1781; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L85; } __pyx_L85:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1774 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1782 * i = i+1 * self.findexes.append(sym_setindex(self.category, i)) * self.findexes.extend(self.findexes1) # <<<<<<<<<<<<<< * for j from 0 <= j < phrase.n: * if sym_isvar(phrase.syms[j]): */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->findexes), __pyx_n_s_extend); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->findexes), __pyx_n_s_extend); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1782; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1782; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_INCREF(((PyObject *)__pyx_v_self->findexes1)); PyTuple_SET_ITEM(__pyx_t_14, 0, ((PyObject *)__pyx_v_self->findexes1)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->findexes1)); - __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_14, NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1774; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_14, NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1782; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1775 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1783 * self.findexes.append(sym_setindex(self.category, i)) * self.findexes.extend(self.findexes1) * for j from 0 <= j < phrase.n: # <<<<<<<<<<<<<< @@ -59897,7 +60011,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_2 = __pyx_v_phrase->n; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_2; __pyx_v_j++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1776 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1784 * self.findexes.extend(self.findexes1) * for j from 0 <= j < phrase.n: * if sym_isvar(phrase.syms[j]): # <<<<<<<<<<<<<< @@ -59907,7 +60021,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_8 = (__pyx_f_4cdec_2sa_3_sa_sym_isvar((__pyx_v_phrase->syms[__pyx_v_j])) != 0); if (__pyx_t_8) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1777 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1785 * for j from 0 <= j < phrase.n: * if sym_isvar(phrase.syms[j]): * fphr_arr._append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<< @@ -59916,7 +60030,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_append(__pyx_v_fphr_arr, __pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i)); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1778 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1786 * if sym_isvar(phrase.syms[j]): * fphr_arr._append(sym_setindex(self.category, i)) * i = i + 1 # <<<<<<<<<<<<<< @@ -59928,7 +60042,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1780 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1788 * i = i + 1 * else: * fphr_arr._append(phrase.syms[j]) # <<<<<<<<<<<<<< @@ -59940,7 +60054,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_L88:; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1781 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1789 * else: * fphr_arr._append(phrase.syms[j]) * fphr_arr._append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<< @@ -59949,67 +60063,67 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_append(__pyx_v_fphr_arr, __pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i)); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1782 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1790 * fphr_arr._append(phrase.syms[j]) * fphr_arr._append(sym_setindex(self.category, i)) * self.findexes.append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<< * fphr = Phrase(fphr_arr) * phrase_list = self.extract_phrases(e_x_low, e_x_high, e_gap_low+gap_start, e_gap_high+gap_start, e_links_low, num_gaps+1, */ - __pyx_t_15 = __Pyx_PyInt_From_int(__pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i)); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1782; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_15 = __Pyx_PyInt_From_int(__pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i)); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1790; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); - __pyx_t_7 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_self->findexes), __pyx_t_15); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1782; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_self->findexes), __pyx_t_15); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1790; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1783 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1791 * fphr_arr._append(sym_setindex(self.category, i)) * self.findexes.append(sym_setindex(self.category, i)) * fphr = Phrase(fphr_arr) # <<<<<<<<<<<<<< * phrase_list = self.extract_phrases(e_x_low, e_x_high, e_gap_low+gap_start, e_gap_high+gap_start, e_links_low, num_gaps+1, * f_x_low, f_x_high, f_gap_low+gap_start, f_gap_high+gap_start, f_links_low, */ - __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1783; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1791; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_INCREF(((PyObject *)__pyx_v_fphr_arr)); PyTuple_SET_ITEM(__pyx_t_15, 0, ((PyObject *)__pyx_v_fphr_arr)); __Pyx_GIVEREF(((PyObject *)__pyx_v_fphr_arr)); - __pyx_t_14 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_Phrase)), __pyx_t_15, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1783; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_14 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_Phrase)), __pyx_t_15, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1791; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_DECREF_SET(__pyx_v_fphr, ((struct __pyx_obj_4cdec_2sa_3_sa_Phrase *)__pyx_t_14)); __pyx_t_14 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1784 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1792 * self.findexes.append(sym_setindex(self.category, i)) * fphr = Phrase(fphr_arr) * phrase_list = self.extract_phrases(e_x_low, e_x_high, e_gap_low+gap_start, e_gap_high+gap_start, e_links_low, num_gaps+1, # <<<<<<<<<<<<<< * f_x_low, f_x_high, f_gap_low+gap_start, f_gap_high+gap_start, f_links_low, * matching.sent_id, e_sent_len, e_sent_start) */ - __pyx_t_14 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->extract_phrases(__pyx_v_self, __pyx_v_e_x_low, __pyx_v_e_x_high, (__pyx_v_e_gap_low + __pyx_v_gap_start), (__pyx_v_e_gap_high + __pyx_v_gap_start), __pyx_v_e_links_low, (__pyx_v_num_gaps + 1), __pyx_v_f_x_low, __pyx_v_f_x_high, (__pyx_v_f_gap_low + __pyx_v_gap_start), (__pyx_v_f_gap_high + __pyx_v_gap_start), __pyx_v_f_links_low, __pyx_v_matching->sent_id, __pyx_v_e_sent_len, __pyx_v_e_sent_start); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1784; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_14 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->extract_phrases(__pyx_v_self, __pyx_v_e_x_low, __pyx_v_e_x_high, (__pyx_v_e_gap_low + __pyx_v_gap_start), (__pyx_v_e_gap_high + __pyx_v_gap_start), __pyx_v_e_links_low, (__pyx_v_num_gaps + 1), __pyx_v_f_x_low, __pyx_v_f_x_high, (__pyx_v_f_gap_low + __pyx_v_gap_start), (__pyx_v_f_gap_high + __pyx_v_gap_start), __pyx_v_f_links_low, __pyx_v_matching->sent_id, __pyx_v_e_sent_len, __pyx_v_e_sent_start); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1792; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_XDECREF_SET(__pyx_v_phrase_list, __pyx_t_14); __pyx_t_14 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1787 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1795 * f_x_low, f_x_high, f_gap_low+gap_start, f_gap_high+gap_start, f_links_low, * matching.sent_id, e_sent_len, e_sent_start) * if len(phrase_list) > 0: # <<<<<<<<<<<<<< * pair_count = 1.0 / len(phrase_list) * else: */ - __pyx_t_13 = PyObject_Length(__pyx_v_phrase_list); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1787; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_13 = PyObject_Length(__pyx_v_phrase_list); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1795; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = ((__pyx_t_13 > 0) != 0); if (__pyx_t_8) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1788 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1796 * matching.sent_id, e_sent_len, e_sent_start) * if len(phrase_list) > 0: * pair_count = 1.0 / len(phrase_list) # <<<<<<<<<<<<<< * else: * pair_count = 0 */ - __pyx_t_13 = PyObject_Length(__pyx_v_phrase_list); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1788; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_13 = PyObject_Length(__pyx_v_phrase_list); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(__pyx_t_13 == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); @@ -60018,14 +60132,14 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1788; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1796; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_pair_count = (1.0 / __pyx_t_13); goto __pyx_L89; } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1790 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1798 * pair_count = 1.0 / len(phrase_list) * else: * pair_count = 0 # <<<<<<<<<<<<<< @@ -60036,7 +60150,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } __pyx_L89:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1791 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1799 * else: * pair_count = 0 * for phrase2, eindexes in phrase_list: # <<<<<<<<<<<<<< @@ -60047,7 +60161,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_14 = __pyx_v_phrase_list; __Pyx_INCREF(__pyx_t_14); __pyx_t_13 = 0; __pyx_t_16 = NULL; } else { - __pyx_t_13 = -1; __pyx_t_14 = PyObject_GetIter(__pyx_v_phrase_list); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1791; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_13 = -1; __pyx_t_14 = PyObject_GetIter(__pyx_v_phrase_list); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_16 = Py_TYPE(__pyx_t_14)->tp_iternext; } @@ -60055,16 +60169,16 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct if (!__pyx_t_16 && PyList_CheckExact(__pyx_t_14)) { if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_14)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_15 = PyList_GET_ITEM(__pyx_t_14, __pyx_t_13); __Pyx_INCREF(__pyx_t_15); __pyx_t_13++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1791; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_15 = PyList_GET_ITEM(__pyx_t_14, __pyx_t_13); __Pyx_INCREF(__pyx_t_15); __pyx_t_13++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_15 = PySequence_ITEM(__pyx_t_14, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1791; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_15 = PySequence_ITEM(__pyx_t_14, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_16 && PyTuple_CheckExact(__pyx_t_14)) { if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_14)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_15 = PyTuple_GET_ITEM(__pyx_t_14, __pyx_t_13); __Pyx_INCREF(__pyx_t_15); __pyx_t_13++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1791; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_15 = PyTuple_GET_ITEM(__pyx_t_14, __pyx_t_13); __Pyx_INCREF(__pyx_t_15); __pyx_t_13++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_15 = PySequence_ITEM(__pyx_t_14, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1791; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_15 = PySequence_ITEM(__pyx_t_14, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_15 = __pyx_t_16(__pyx_t_14); @@ -60072,7 +60186,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct 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[8]; __pyx_lineno = 1791; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -60088,7 +60202,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1791; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { @@ -60101,15 +60215,15 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_11); #else - __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1791; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_11 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1791; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); #endif __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; } else { Py_ssize_t index = -1; - __pyx_t_1 = PyObject_GetIter(__pyx_t_15); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1791; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_GetIter(__pyx_t_15); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __pyx_t_17 = Py_TYPE(__pyx_t_1)->tp_iternext; @@ -60117,7 +60231,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_11 = __pyx_t_17(__pyx_t_1); if (unlikely(!__pyx_t_11)) goto __pyx_L92_unpacking_failed; __Pyx_GOTREF(__pyx_t_11); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_17(__pyx_t_1), 2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1791; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_IternextUnpackEndCheck(__pyx_t_17(__pyx_t_1), 2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_17 = NULL; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L93_unpacking_done; @@ -60125,7 +60239,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_17 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1791; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1799; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L93_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_phrase2, __pyx_t_3); @@ -60133,7 +60247,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_XDECREF_SET(__pyx_v_eindexes, __pyx_t_11); __pyx_t_11 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1792 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1800 * pair_count = 0 * for phrase2, eindexes in phrase_list: * als3 = self.create_alignments(sent_links,num_links,self.findexes,eindexes) # <<<<<<<<<<<<<< @@ -60142,31 +60256,31 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_t_15 = ((PyObject *)__pyx_v_self->findexes); __Pyx_INCREF(__pyx_t_15); - if (!(likely(((__pyx_v_eindexes) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_eindexes, __pyx_ptype_4cdec_2sa_3_sa_IntList))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1792; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_11 = ((PyObject *)((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->create_alignments(__pyx_v_self, __pyx_v_sent_links, __pyx_v_num_links, ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_15), ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_v_eindexes))); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1792; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(((__pyx_v_eindexes) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_eindexes, __pyx_ptype_4cdec_2sa_3_sa_IntList))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = ((PyObject *)((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->create_alignments(__pyx_v_self, __pyx_v_sent_links, __pyx_v_num_links, ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_15), ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_v_eindexes))); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1800; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_XDECREF_SET(__pyx_v_als3, ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_11)); __pyx_t_11 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1793 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1801 * for phrase2, eindexes in phrase_list: * als3 = self.create_alignments(sent_links,num_links,self.findexes,eindexes) * extracts.append((fphr, phrase2, pair_count, tuple(als3))) # <<<<<<<<<<<<<< * if (num_gaps < self.max_nonterminals - 1 and * phrase_len+1 < self.max_length and */ - __pyx_t_11 = PyFloat_FromDouble(__pyx_v_pair_count); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1793; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = PyFloat_FromDouble(__pyx_v_pair_count); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1801; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); - __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1793; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1801; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_INCREF(((PyObject *)__pyx_v_als3)); PyTuple_SET_ITEM(__pyx_t_15, 0, ((PyObject *)__pyx_v_als3)); __Pyx_GIVEREF(((PyObject *)__pyx_v_als3)); - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_15, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1793; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_15, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1801; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; - __pyx_t_15 = PyTuple_New(4); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1793; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_15 = PyTuple_New(4); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1801; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_INCREF(((PyObject *)__pyx_v_fphr)); PyTuple_SET_ITEM(__pyx_t_15, 0, ((PyObject *)__pyx_v_fphr)); @@ -60180,7 +60294,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_GIVEREF(__pyx_t_3); __pyx_t_11 = 0; __pyx_t_3 = 0; - __pyx_t_7 = __Pyx_PyObject_Append(__pyx_v_extracts, __pyx_t_15); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1793; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyObject_Append(__pyx_v_extracts, __pyx_t_15); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1801; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; } __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; @@ -60191,7 +60305,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } __pyx_L79:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1794 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1802 * als3 = self.create_alignments(sent_links,num_links,self.findexes,eindexes) * extracts.append((fphr, phrase2, pair_count, tuple(als3))) * if (num_gaps < self.max_nonterminals - 1 and # <<<<<<<<<<<<<< @@ -60201,7 +60315,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_8 = ((__pyx_v_num_gaps < (__pyx_v_self->max_nonterminals - 1)) != 0); if (__pyx_t_8) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1795 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1803 * extracts.append((fphr, phrase2, pair_count, tuple(als3))) * if (num_gaps < self.max_nonterminals - 1 and * phrase_len+1 < self.max_length and # <<<<<<<<<<<<<< @@ -60211,7 +60325,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_9 = (((__pyx_v_phrase_len + 1) < __pyx_v_self->max_length) != 0); if (__pyx_t_9) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1796 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1804 * if (num_gaps < self.max_nonterminals - 1 and * phrase_len+1 < self.max_length and * f_back_high == f_high and # <<<<<<<<<<<<<< @@ -60221,7 +60335,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_18 = ((__pyx_v_f_back_high == __pyx_v_f_high) != 0); if (__pyx_t_18) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1797 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1805 * phrase_len+1 < self.max_length and * f_back_high == f_high and * f_back_low == f_low and # <<<<<<<<<<<<<< @@ -60231,7 +60345,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_10 = ((__pyx_v_f_back_low == __pyx_v_f_low) != 0); if (__pyx_t_10) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1798 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1806 * f_back_high == f_high and * f_back_low == f_low and * f_back_high - f_back_low + (2*self.train_min_gap_size) <= self.train_max_initial_size and # <<<<<<<<<<<<<< @@ -60241,7 +60355,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_19 = ((((__pyx_v_f_back_high - __pyx_v_f_back_low) + (2 * __pyx_v_self->train_min_gap_size)) <= __pyx_v_self->train_max_initial_size) != 0); if (__pyx_t_19) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1799 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1807 * f_back_low == f_low and * f_back_high - f_back_low + (2*self.train_min_gap_size) <= self.train_max_initial_size and * f_low >= self.train_min_gap_size and # <<<<<<<<<<<<<< @@ -60251,7 +60365,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_20 = ((__pyx_v_f_low >= __pyx_v_self->train_min_gap_size) != 0); if (__pyx_t_20) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1800 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1808 * f_back_high - f_back_low + (2*self.train_min_gap_size) <= self.train_max_initial_size and * f_low >= self.train_min_gap_size and * f_high <= f_sent_len - self.train_min_gap_size and # <<<<<<<<<<<<<< @@ -60261,7 +60375,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_21 = ((__pyx_v_f_high <= (__pyx_v_f_sent_len - __pyx_v_self->train_min_gap_size)) != 0); if (__pyx_t_21) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1801 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1809 * f_low >= self.train_min_gap_size and * f_high <= f_sent_len - self.train_min_gap_size and * ((not self.tight_phrases) or (f_links_low[f_low-1] != -1 and f_links_low[f_high] != -1))): # <<<<<<<<<<<<<< @@ -60311,7 +60425,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } if (__pyx_t_9) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1803 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1811 * ((not self.tight_phrases) or (f_links_low[f_low-1] != -1 and f_links_low[f_high] != -1))): * * met_constraints = 1 # <<<<<<<<<<<<<< @@ -60320,7 +60434,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_met_constraints = 1; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1804 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1812 * * met_constraints = 1 * f_x_low = f_low-self.train_min_gap_size # <<<<<<<<<<<<<< @@ -60329,7 +60443,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_f_x_low = (__pyx_v_f_low - __pyx_v_self->train_min_gap_size); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1805 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1813 * met_constraints = 1 * f_x_low = f_low-self.train_min_gap_size * if self.tight_phrases: # <<<<<<<<<<<<<< @@ -60339,7 +60453,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_9 = (__pyx_v_self->tight_phrases != 0); if (__pyx_t_9) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1806 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1814 * f_x_low = f_low-self.train_min_gap_size * if self.tight_phrases: * while f_x_low >= 0 and f_links_low[f_x_low] == -1: # <<<<<<<<<<<<<< @@ -60356,7 +60470,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } if (!__pyx_t_18) break; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1807 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1815 * if self.tight_phrases: * while f_x_low >= 0 and f_links_low[f_x_low] == -1: * f_x_low = f_x_low - 1 # <<<<<<<<<<<<<< @@ -60369,7 +60483,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } __pyx_L95:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1808 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1816 * while f_x_low >= 0 and f_links_low[f_x_low] == -1: * f_x_low = f_x_low - 1 * if f_x_low < 0: # <<<<<<<<<<<<<< @@ -60379,7 +60493,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_18 = ((__pyx_v_f_x_low < 0) != 0); if (__pyx_t_18) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1809 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1817 * f_x_low = f_x_low - 1 * if f_x_low < 0: * met_constraints = 0 # <<<<<<<<<<<<<< @@ -60391,7 +60505,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } __pyx_L98:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1811 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1819 * met_constraints = 0 * * f_x_high = f_high+self.train_min_gap_size # <<<<<<<<<<<<<< @@ -60400,7 +60514,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_f_x_high = (__pyx_v_f_high + __pyx_v_self->train_min_gap_size); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1812 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1820 * * f_x_high = f_high+self.train_min_gap_size * if self.tight_phrases: # <<<<<<<<<<<<<< @@ -60410,7 +60524,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_18 = (__pyx_v_self->tight_phrases != 0); if (__pyx_t_18) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1813 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1821 * f_x_high = f_high+self.train_min_gap_size * if self.tight_phrases: * while f_x_high <= f_sent_len and f_links_low[f_x_high-1] == -1: # <<<<<<<<<<<<<< @@ -60427,7 +60541,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } if (!__pyx_t_8) break; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1814 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1822 * if self.tight_phrases: * while f_x_high <= f_sent_len and f_links_low[f_x_high-1] == -1: * f_x_high = f_x_high + 1 # <<<<<<<<<<<<<< @@ -60440,7 +60554,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } __pyx_L99:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1815 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1823 * while f_x_high <= f_sent_len and f_links_low[f_x_high-1] == -1: * f_x_high = f_x_high + 1 * if f_x_high > f_sent_len or f_x_high - f_x_low > self.train_max_initial_size: # <<<<<<<<<<<<<< @@ -60456,7 +60570,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } if (__pyx_t_9) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1816 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1824 * f_x_high = f_x_high + 1 * if f_x_high > f_sent_len or f_x_high - f_x_low > self.train_max_initial_size: * met_constraints = 0 # <<<<<<<<<<<<<< @@ -60468,7 +60582,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } __pyx_L102:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1818 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1826 * met_constraints = 0 * * if (met_constraints and # <<<<<<<<<<<<<< @@ -60477,17 +60591,17 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ if ((__pyx_v_met_constraints != 0)) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1819 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1827 * * if (met_constraints and * (self.find_fixpoint(f_x_low, f_x_high, # <<<<<<<<<<<<<< * f_links_low, f_links_high, e_links_low, e_links_high, * e_low, e_high, &e_x_low, &e_x_high, &f_x_low, &f_x_high, */ - __pyx_t_14 = __Pyx_PyInt_From_int(__pyx_v_f_x_high); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1819; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_14 = __Pyx_PyInt_From_int(__pyx_v_f_x_high); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1827; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1824 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1832 * f_sent_len, e_sent_len, * self.train_max_initial_size, self.train_max_initial_size, * 1, 1, 2, 1, 1, 1, 1) == 1) and # <<<<<<<<<<<<<< @@ -60498,7 +60612,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (__pyx_t_9) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1825 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1833 * self.train_max_initial_size, self.train_max_initial_size, * 1, 1, 2, 1, 1, 1, 1) == 1) and * ((not self.tight_phrases) or (f_links_low[f_x_low] != -1 and f_links_low[f_x_high-1] != -1)) and # <<<<<<<<<<<<<< @@ -60520,17 +60634,17 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } if (__pyx_t_18) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1826 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1834 * 1, 1, 2, 1, 1, 1, 1) == 1) and * ((not self.tight_phrases) or (f_links_low[f_x_low] != -1 and f_links_low[f_x_high-1] != -1)) and * self.find_fixpoint(f_x_low, f_low, # <<<<<<<<<<<<<< * f_links_low, f_links_high, e_links_low, e_links_high, * -1, -1, e_gap_low, e_gap_high, f_gap_low, f_gap_high, */ - __pyx_t_14 = __Pyx_PyInt_From_int(__pyx_v_f_low); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1826; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_14 = __Pyx_PyInt_From_int(__pyx_v_f_low); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1834; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1830 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1838 * -1, -1, e_gap_low, e_gap_high, f_gap_low, f_gap_high, * f_sent_len, e_sent_len, * self.train_max_initial_size, self.train_max_initial_size, # <<<<<<<<<<<<<< @@ -60541,17 +60655,17 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (__pyx_t_8) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1832 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1840 * self.train_max_initial_size, self.train_max_initial_size, * 0, 0, 0, 0, 0, 0, 0) and * self.find_fixpoint(f_high, f_x_high, # <<<<<<<<<<<<<< * f_links_low, f_links_high, e_links_low, e_links_high, * -1, -1, e_gap_low+1+num_gaps, e_gap_high+1+num_gaps, */ - __pyx_t_14 = __Pyx_PyInt_From_int(__pyx_v_f_x_high); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1832; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_14 = __Pyx_PyInt_From_int(__pyx_v_f_x_high); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1840; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1837 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1845 * f_gap_low+1+num_gaps, f_gap_high+1+num_gaps, * f_sent_len, e_sent_len, * self.train_max_initial_size, self.train_max_initial_size, # <<<<<<<<<<<<<< @@ -60578,7 +60692,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } if (__pyx_t_9) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1839 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1847 * self.train_max_initial_size, self.train_max_initial_size, * 0, 0, 0, 0, 0, 0, 0)): * fphr_arr._clear() # <<<<<<<<<<<<<< @@ -60587,7 +60701,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_clear(__pyx_v_fphr_arr); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1840 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1848 * 0, 0, 0, 0, 0, 0, 0)): * fphr_arr._clear() * i = 1 # <<<<<<<<<<<<<< @@ -60596,33 +60710,33 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_i = 1; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1841 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1849 * fphr_arr._clear() * i = 1 * self.findexes.reset() # <<<<<<<<<<<<<< * self.findexes.append(sym_setindex(self.category, i)) * fphr_arr._append(sym_setindex(self.category, i)) */ - __pyx_t_14 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->findexes), __pyx_n_s_reset); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->findexes), __pyx_n_s_reset); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1849; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); - __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1841; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1849; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1842 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1850 * i = 1 * self.findexes.reset() * self.findexes.append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<< * fphr_arr._append(sym_setindex(self.category, i)) * i = i+1 */ - __pyx_t_15 = __Pyx_PyInt_From_int(__pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i)); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_15 = __Pyx_PyInt_From_int(__pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i)); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); - __pyx_t_7 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_self->findexes), __pyx_t_15); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1842; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_self->findexes), __pyx_t_15); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1850; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1843 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1851 * self.findexes.reset() * self.findexes.append(sym_setindex(self.category, i)) * fphr_arr._append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<< @@ -60631,7 +60745,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_append(__pyx_v_fphr_arr, __pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i)); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1844 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1852 * self.findexes.append(sym_setindex(self.category, i)) * fphr_arr._append(sym_setindex(self.category, i)) * i = i+1 # <<<<<<<<<<<<<< @@ -60640,27 +60754,27 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_v_i = (__pyx_v_i + 1); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1845 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1853 * fphr_arr._append(sym_setindex(self.category, i)) * i = i+1 * self.findexes.extend(self.findexes1) # <<<<<<<<<<<<<< * for j from 0 <= j < phrase.n: * if sym_isvar(phrase.syms[j]): */ - __pyx_t_15 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->findexes), __pyx_n_s_extend); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_15 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->findexes), __pyx_n_s_extend); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); - __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_INCREF(((PyObject *)__pyx_v_self->findexes1)); PyTuple_SET_ITEM(__pyx_t_14, 0, ((PyObject *)__pyx_v_self->findexes1)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->findexes1)); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_14, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1845; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_14, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1846 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1854 * i = i+1 * self.findexes.extend(self.findexes1) * for j from 0 <= j < phrase.n: # <<<<<<<<<<<<<< @@ -60670,7 +60784,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_2 = __pyx_v_phrase->n; for (__pyx_v_j = 0; __pyx_v_j < __pyx_t_2; __pyx_v_j++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1847 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1855 * self.findexes.extend(self.findexes1) * for j from 0 <= j < phrase.n: * if sym_isvar(phrase.syms[j]): # <<<<<<<<<<<<<< @@ -60680,7 +60794,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_9 = (__pyx_f_4cdec_2sa_3_sa_sym_isvar((__pyx_v_phrase->syms[__pyx_v_j])) != 0); if (__pyx_t_9) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1848 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1856 * for j from 0 <= j < phrase.n: * if sym_isvar(phrase.syms[j]): * fphr_arr._append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<< @@ -60689,7 +60803,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_append(__pyx_v_fphr_arr, __pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i)); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1849 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1857 * if sym_isvar(phrase.syms[j]): * fphr_arr._append(sym_setindex(self.category, i)) * i = i + 1 # <<<<<<<<<<<<<< @@ -60701,7 +60815,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1851 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1859 * i = i + 1 * else: * fphr_arr._append(phrase.syms[j]) # <<<<<<<<<<<<<< @@ -60713,7 +60827,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_L106:; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1852 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1860 * else: * fphr_arr._append(phrase.syms[j]) * fphr_arr._append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<< @@ -60722,67 +60836,67 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *)__pyx_v_fphr_arr->__pyx_vtab)->_append(__pyx_v_fphr_arr, __pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i)); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1853 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1861 * fphr_arr._append(phrase.syms[j]) * fphr_arr._append(sym_setindex(self.category, i)) * self.findexes.append(sym_setindex(self.category, i)) # <<<<<<<<<<<<<< * fphr = Phrase(fphr_arr) * phrase_list = self.extract_phrases(e_x_low, e_x_high, e_gap_low, e_gap_high, e_links_low, num_gaps+2, */ - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_v_self->category, __pyx_v_i)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1861; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_self->findexes), __pyx_t_3); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1853; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_self->findexes), __pyx_t_3); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1861; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1854 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1862 * fphr_arr._append(sym_setindex(self.category, i)) * self.findexes.append(sym_setindex(self.category, i)) * fphr = Phrase(fphr_arr) # <<<<<<<<<<<<<< * phrase_list = self.extract_phrases(e_x_low, e_x_high, e_gap_low, e_gap_high, e_links_low, num_gaps+2, * f_x_low, f_x_high, f_gap_low, f_gap_high, f_links_low, */ - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1854; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1862; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_fphr_arr)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_fphr_arr)); __Pyx_GIVEREF(((PyObject *)__pyx_v_fphr_arr)); - __pyx_t_14 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_Phrase)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1854; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_14 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_Phrase)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1862; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_fphr, ((struct __pyx_obj_4cdec_2sa_3_sa_Phrase *)__pyx_t_14)); __pyx_t_14 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1855 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1863 * self.findexes.append(sym_setindex(self.category, i)) * fphr = Phrase(fphr_arr) * phrase_list = self.extract_phrases(e_x_low, e_x_high, e_gap_low, e_gap_high, e_links_low, num_gaps+2, # <<<<<<<<<<<<<< * f_x_low, f_x_high, f_gap_low, f_gap_high, f_links_low, * matching.sent_id, e_sent_len, e_sent_start) */ - __pyx_t_14 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->extract_phrases(__pyx_v_self, __pyx_v_e_x_low, __pyx_v_e_x_high, __pyx_v_e_gap_low, __pyx_v_e_gap_high, __pyx_v_e_links_low, (__pyx_v_num_gaps + 2), __pyx_v_f_x_low, __pyx_v_f_x_high, __pyx_v_f_gap_low, __pyx_v_f_gap_high, __pyx_v_f_links_low, __pyx_v_matching->sent_id, __pyx_v_e_sent_len, __pyx_v_e_sent_start); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1855; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_14 = ((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->extract_phrases(__pyx_v_self, __pyx_v_e_x_low, __pyx_v_e_x_high, __pyx_v_e_gap_low, __pyx_v_e_gap_high, __pyx_v_e_links_low, (__pyx_v_num_gaps + 2), __pyx_v_f_x_low, __pyx_v_f_x_high, __pyx_v_f_gap_low, __pyx_v_f_gap_high, __pyx_v_f_links_low, __pyx_v_matching->sent_id, __pyx_v_e_sent_len, __pyx_v_e_sent_start); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1863; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_XDECREF_SET(__pyx_v_phrase_list, __pyx_t_14); __pyx_t_14 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1858 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1866 * f_x_low, f_x_high, f_gap_low, f_gap_high, f_links_low, * matching.sent_id, e_sent_len, e_sent_start) * if len(phrase_list) > 0: # <<<<<<<<<<<<<< * pair_count = 1.0 / len(phrase_list) * else: */ - __pyx_t_13 = PyObject_Length(__pyx_v_phrase_list); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1858; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_13 = PyObject_Length(__pyx_v_phrase_list); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1866; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_9 = ((__pyx_t_13 > 0) != 0); if (__pyx_t_9) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1859 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1867 * matching.sent_id, e_sent_len, e_sent_start) * if len(phrase_list) > 0: * pair_count = 1.0 / len(phrase_list) # <<<<<<<<<<<<<< * else: * pair_count = 0 */ - __pyx_t_13 = PyObject_Length(__pyx_v_phrase_list); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1859; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_13 = PyObject_Length(__pyx_v_phrase_list); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1867; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(__pyx_t_13 == 0)) { #ifdef WITH_THREAD PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); @@ -60791,14 +60905,14 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct #ifdef WITH_THREAD PyGILState_Release(__pyx_gilstate_save); #endif - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1859; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1867; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_v_pair_count = (1.0 / __pyx_t_13); goto __pyx_L107; } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1861 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1869 * pair_count = 1.0 / len(phrase_list) * else: * pair_count = 0 # <<<<<<<<<<<<<< @@ -60809,7 +60923,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } __pyx_L107:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1862 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1870 * else: * pair_count = 0 * for phrase2, eindexes in phrase_list: # <<<<<<<<<<<<<< @@ -60820,7 +60934,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_t_14 = __pyx_v_phrase_list; __Pyx_INCREF(__pyx_t_14); __pyx_t_13 = 0; __pyx_t_16 = NULL; } else { - __pyx_t_13 = -1; __pyx_t_14 = PyObject_GetIter(__pyx_v_phrase_list); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1862; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_13 = -1; __pyx_t_14 = PyObject_GetIter(__pyx_v_phrase_list); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1870; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __pyx_t_16 = Py_TYPE(__pyx_t_14)->tp_iternext; } @@ -60828,16 +60942,16 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct if (!__pyx_t_16 && PyList_CheckExact(__pyx_t_14)) { if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_14)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_14, __pyx_t_13); __Pyx_INCREF(__pyx_t_3); __pyx_t_13++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1862; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_14, __pyx_t_13); __Pyx_INCREF(__pyx_t_3); __pyx_t_13++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1870; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_14, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1862; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PySequence_ITEM(__pyx_t_14, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1870; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_16 && PyTuple_CheckExact(__pyx_t_14)) { if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_14)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_14, __pyx_t_13); __Pyx_INCREF(__pyx_t_3); __pyx_t_13++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1862; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_14, __pyx_t_13); __Pyx_INCREF(__pyx_t_3); __pyx_t_13++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1870; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_14, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1862; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PySequence_ITEM(__pyx_t_14, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1870; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_3 = __pyx_t_16(__pyx_t_14); @@ -60845,7 +60959,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct 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[8]; __pyx_lineno = 1862; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1870; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -60861,7 +60975,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1862; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1870; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { @@ -60874,15 +60988,15 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_INCREF(__pyx_t_15); __Pyx_INCREF(__pyx_t_11); #else - __pyx_t_15 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1862; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_15 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1870; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); - __pyx_t_11 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1862; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1870; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); #endif __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { Py_ssize_t index = -1; - __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1862; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1870; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_17 = Py_TYPE(__pyx_t_1)->tp_iternext; @@ -60890,7 +61004,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_GOTREF(__pyx_t_15); index = 1; __pyx_t_11 = __pyx_t_17(__pyx_t_1); if (unlikely(!__pyx_t_11)) goto __pyx_L110_unpacking_failed; __Pyx_GOTREF(__pyx_t_11); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_17(__pyx_t_1), 2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1862; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_IternextUnpackEndCheck(__pyx_t_17(__pyx_t_1), 2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1870; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_17 = NULL; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L111_unpacking_done; @@ -60898,7 +61012,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_17 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1862; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1870; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L111_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_phrase2, __pyx_t_15); @@ -60906,7 +61020,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_XDECREF_SET(__pyx_v_eindexes, __pyx_t_11); __pyx_t_11 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1863 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1871 * pair_count = 0 * for phrase2, eindexes in phrase_list: * als4 = self.create_alignments(sent_links,num_links,self.findexes,eindexes) # <<<<<<<<<<<<<< @@ -60915,31 +61029,31 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ __pyx_t_3 = ((PyObject *)__pyx_v_self->findexes); __Pyx_INCREF(__pyx_t_3); - if (!(likely(((__pyx_v_eindexes) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_eindexes, __pyx_ptype_4cdec_2sa_3_sa_IntList))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1863; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_11 = ((PyObject *)((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->create_alignments(__pyx_v_self, __pyx_v_sent_links, __pyx_v_num_links, ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_3), ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_v_eindexes))); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1863; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(((__pyx_v_eindexes) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_eindexes, __pyx_ptype_4cdec_2sa_3_sa_IntList))))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1871; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = ((PyObject *)((struct __pyx_vtabstruct_4cdec_2sa_3_sa_HieroCachingRuleFactory *)__pyx_v_self->__pyx_vtab)->create_alignments(__pyx_v_self, __pyx_v_sent_links, __pyx_v_num_links, ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_3), ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_v_eindexes))); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1871; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF_SET(__pyx_v_als4, ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_11)); __pyx_t_11 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1864 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1872 * for phrase2, eindexes in phrase_list: * als4 = self.create_alignments(sent_links,num_links,self.findexes,eindexes) * extracts.append((fphr, phrase2, pair_count, tuple(als4))) # <<<<<<<<<<<<<< * else: * reason_for_failure = "Unable to extract basic phrase" */ - __pyx_t_11 = PyFloat_FromDouble(__pyx_v_pair_count); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1864; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = PyFloat_FromDouble(__pyx_v_pair_count); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1872; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1864; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1872; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_als4)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_als4)); __Pyx_GIVEREF(((PyObject *)__pyx_v_als4)); - __pyx_t_15 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_3, NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1864; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_15 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_3, NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1872; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1864; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1872; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_fphr)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_fphr)); @@ -60953,7 +61067,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __Pyx_GIVEREF(__pyx_t_15); __pyx_t_11 = 0; __pyx_t_15 = 0; - __pyx_t_7 = __Pyx_PyObject_Append(__pyx_v_extracts, __pyx_t_3); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1864; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyObject_Append(__pyx_v_extracts, __pyx_t_3); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1872; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; @@ -60973,7 +61087,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1866 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1874 * extracts.append((fphr, phrase2, pair_count, tuple(als4))) * else: * reason_for_failure = "Unable to extract basic phrase" # <<<<<<<<<<<<<< @@ -60988,7 +61102,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct } __pyx_L33:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1868 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1876 * reason_for_failure = "Unable to extract basic phrase" * * free(sent_links) # <<<<<<<<<<<<<< @@ -60997,7 +61111,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ free(__pyx_v_sent_links); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1869 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1877 * * free(sent_links) * free(f_links_low) # <<<<<<<<<<<<<< @@ -61006,7 +61120,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ free(__pyx_v_f_links_low); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1870 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1878 * free(sent_links) * free(f_links_low) * free(f_links_high) # <<<<<<<<<<<<<< @@ -61015,7 +61129,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ free(__pyx_v_f_links_high); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1871 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1879 * free(f_links_low) * free(f_links_high) * free(e_links_low) # <<<<<<<<<<<<<< @@ -61024,7 +61138,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ free(__pyx_v_e_links_low); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1872 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1880 * free(f_links_high) * free(e_links_low) * free(e_links_high) # <<<<<<<<<<<<<< @@ -61033,7 +61147,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ free(__pyx_v_e_links_high); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1873 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1881 * free(e_links_low) * free(e_links_high) * free(f_gap_low) # <<<<<<<<<<<<<< @@ -61042,7 +61156,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ free(__pyx_v_f_gap_low); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1874 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1882 * free(e_links_high) * free(f_gap_low) * free(f_gap_high) # <<<<<<<<<<<<<< @@ -61051,7 +61165,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ free(__pyx_v_f_gap_high); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1875 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1883 * free(f_gap_low) * free(f_gap_high) * free(e_gap_low) # <<<<<<<<<<<<<< @@ -61060,7 +61174,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ free(__pyx_v_e_gap_low); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1876 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1884 * free(f_gap_high) * free(e_gap_low) * free(e_gap_high) # <<<<<<<<<<<<<< @@ -61069,7 +61183,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct */ free(__pyx_v_e_gap_high); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1878 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1886 * free(e_gap_high) * * return extracts # <<<<<<<<<<<<<< @@ -61081,7 +61195,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct __pyx_r = __pyx_v_extracts; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1481 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1489 * return ret * * cdef extract(self, Phrase phrase, Matching* matching, int* chunklen, int num_chunks): # <<<<<<<<<<<<<< @@ -61118,7 +61232,7 @@ static PyObject *__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract(struct return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1886 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1894 * # Aggregate stats from a training instance * # (Extract rules, update counts) * def add_instance(self, f_words, e_words, alignment, ctx_name=None): # <<<<<<<<<<<<<< @@ -61162,12 +61276,12 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_26add_instanc case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_e_words)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("add_instance", 0, 3, 4, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1886; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("add_instance", 0, 3, 4, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1894; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_alignment)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("add_instance", 0, 3, 4, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1886; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("add_instance", 0, 3, 4, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1894; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (kw_args > 0) { @@ -61176,7 +61290,7 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_26add_instanc } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_instance") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1886; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_instance") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1894; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -61195,7 +61309,7 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_26add_instanc } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("add_instance", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1886; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("add_instance", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1894; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.add_instance", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -61208,7 +61322,7 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_26add_instanc return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1920 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1928 * # f_ i and j are current, e_ i and j are previous * # We care _considering_ f_j, so it is not yet in counts * def extract(f_i, f_j, e_i, e_j, min_bound, wc, links, nt, nt_open): # <<<<<<<<<<<<<< @@ -61262,46 +61376,46 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_f_j)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("extract", 1, 9, 9, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1920; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("extract", 1, 9, 9, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1928; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_e_i)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("extract", 1, 9, 9, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1920; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("extract", 1, 9, 9, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1928; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_e_j)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("extract", 1, 9, 9, 3); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1920; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("extract", 1, 9, 9, 3); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1928; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_min_bound)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("extract", 1, 9, 9, 4); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1920; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("extract", 1, 9, 9, 4); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1928; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 5: if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_wc)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("extract", 1, 9, 9, 5); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1920; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("extract", 1, 9, 9, 5); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1928; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 6: if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_links)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("extract", 1, 9, 9, 6); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1920; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("extract", 1, 9, 9, 6); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1928; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 7: if (likely((values[7] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nt)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("extract", 1, 9, 9, 7); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1920; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("extract", 1, 9, 9, 7); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1928; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 8: if (likely((values[8] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nt_open)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("extract", 1, 9, 9, 8); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1920; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("extract", 1, 9, 9, 8); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1928; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "extract") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1920; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "extract") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1928; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 9) { goto __pyx_L5_argtuple_error; @@ -61328,7 +61442,7 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("extract", 1, 9, 9, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1920; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("extract", 1, 9, 9, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1928; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.add_instance.extract", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -61378,33 +61492,33 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __pyx_outer_scope = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_21_add_instance *) __Pyx_CyFunction_GetClosure(__pyx_self); __pyx_cur_scope = __pyx_outer_scope; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1922 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1930 * def extract(f_i, f_j, e_i, e_j, min_bound, wc, links, nt, nt_open): * # Phrase extraction limits * if f_j > (f_len - 1) or (f_j - f_i) + 1 > self.max_initial_size: # <<<<<<<<<<<<<< * return * # Unaligned word */ - if (unlikely(!__pyx_cur_scope->__pyx_v_f_len)) { __Pyx_RaiseClosureNameError("f_len"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1922; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_1 = PyNumber_Subtract(__pyx_cur_scope->__pyx_v_f_len, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1922; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_cur_scope->__pyx_v_f_len)) { __Pyx_RaiseClosureNameError("f_len"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + __pyx_t_1 = PyNumber_Subtract(__pyx_cur_scope->__pyx_v_f_len, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyObject_RichCompare(__pyx_v_f_j, __pyx_t_1, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1922; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_RichCompare(__pyx_v_f_j, __pyx_t_1, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1922; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!__pyx_t_3) { - __pyx_t_2 = PyNumber_Subtract(__pyx_v_f_j, __pyx_v_f_i); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1922; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyNumber_Subtract(__pyx_v_f_j, __pyx_v_f_i); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1922; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1922; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_self->max_initial_size); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1922; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_self->max_initial_size); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1922; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1922; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __pyx_t_5; } else { @@ -61412,7 +61526,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc } if (__pyx_t_6) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1923 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1931 * # Phrase extraction limits * if f_j > (f_len - 1) or (f_j - f_i) + 1 > self.max_initial_size: * return # <<<<<<<<<<<<<< @@ -61424,41 +61538,41 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1925 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1933 * return * # Unaligned word * if not al[f_j]: # <<<<<<<<<<<<<< * # Adjacent to non-terminal: extend (non-terminal now open) * if nt and nt[-1][2] == f_j - 1: */ - if (unlikely(!__pyx_cur_scope->__pyx_v_al)) { __Pyx_RaiseClosureNameError("al"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1925; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_4 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_al, __pyx_v_f_j); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + if (unlikely(!__pyx_cur_scope->__pyx_v_al)) { __Pyx_RaiseClosureNameError("al"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1933; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + __pyx_t_4 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_al, __pyx_v_f_j); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1933; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1925; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1933; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = ((!__pyx_t_6) != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1927 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1935 * if not al[f_j]: * # Adjacent to non-terminal: extend (non-terminal now open) * if nt and nt[-1][2] == f_j - 1: # <<<<<<<<<<<<<< * nt[-1][2] += 1 * extract(f_i, f_j + 1, e_i, e_j, min_bound, wc, links, nt, True) */ - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_nt); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1927; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_nt); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1935; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_3) { - __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_nt, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1927; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_nt, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_4, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1927; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_4, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyNumber_Subtract(__pyx_v_f_j, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1927; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyNumber_Subtract(__pyx_v_f_j, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1935; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1927; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1935; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1927; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1935; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = __pyx_t_6; } else { @@ -61466,78 +61580,78 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc } if (__pyx_t_5) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1928 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1936 * # Adjacent to non-terminal: extend (non-terminal now open) * if nt and nt[-1][2] == f_j - 1: * nt[-1][2] += 1 # <<<<<<<<<<<<<< * extract(f_i, f_j + 1, e_i, e_j, min_bound, wc, links, nt, True) * nt[-1][2] -= 1 */ - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_nt, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1928; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_nt, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1936; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = 2; - __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_1, __pyx_t_7, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1928; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_1, __pyx_t_7, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1936; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_t_4, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1928; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_t_4, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1936; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(__Pyx_SetItemInt(__pyx_t_1, __pyx_t_7, __pyx_t_2, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1928; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(__Pyx_SetItemInt(__pyx_t_1, __pyx_t_7, __pyx_t_2, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1936; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1929 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1937 * if nt and nt[-1][2] == f_j - 1: * nt[-1][2] += 1 * extract(f_i, f_j + 1, e_i, e_j, min_bound, wc, links, nt, True) # <<<<<<<<<<<<<< * nt[-1][2] -= 1 * # Unless non-terminal already open, always extend with word */ - __pyx_t_1 = PyNumber_Add(__pyx_v_f_j, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1929; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyNumber_Add(__pyx_v_f_j, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (unlikely(!__pyx_cur_scope->__pyx_v_extract)) { __Pyx_RaiseClosureNameError("extract"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1929; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_2 = __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instance_extract(__pyx_cur_scope->__pyx_v_extract, __pyx_v_f_i, __pyx_t_1, __pyx_v_e_i, __pyx_v_e_j, __pyx_v_min_bound, __pyx_v_wc, __pyx_v_links, __pyx_v_nt, Py_True); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1929; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_cur_scope->__pyx_v_extract)) { __Pyx_RaiseClosureNameError("extract"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + __pyx_t_2 = __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instance_extract(__pyx_cur_scope->__pyx_v_extract, __pyx_v_f_i, __pyx_t_1, __pyx_v_e_i, __pyx_v_e_j, __pyx_v_min_bound, __pyx_v_wc, __pyx_v_links, __pyx_v_nt, Py_True); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1930 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1938 * nt[-1][2] += 1 * extract(f_i, f_j + 1, e_i, e_j, min_bound, wc, links, nt, True) * nt[-1][2] -= 1 # <<<<<<<<<<<<<< * # Unless non-terminal already open, always extend with word * # Make sure adding a word doesn't exceed length */ - __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_nt, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_nt, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1938; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = 2; - __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, __pyx_t_7, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1930; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, __pyx_t_7, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1938; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = PyNumber_InPlaceSubtract(__pyx_t_1, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyNumber_InPlaceSubtract(__pyx_t_1, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1938; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(__Pyx_SetItemInt(__pyx_t_2, __pyx_t_7, __pyx_t_4, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1930; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(__Pyx_SetItemInt(__pyx_t_2, __pyx_t_7, __pyx_t_4, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1938; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L5; } __pyx_L5:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1933 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1941 * # Unless non-terminal already open, always extend with word * # Make sure adding a word doesn't exceed length * if not nt_open and wc < self.max_length: # <<<<<<<<<<<<<< * extract(f_i, f_j + 1, e_i, e_j, min_bound, wc + 1, links, nt, False) * return */ - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_nt_open); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1933; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_nt_open); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1941; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = (!__pyx_t_5); if (__pyx_t_3) { - if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1933; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_self->max_length); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1933; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1941; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_self->max_length); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1941; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_wc, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1933; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyObject_RichCompare(__pyx_v_wc, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1941; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1933; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1941; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __pyx_t_5; } else { @@ -61545,19 +61659,19 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc } if (__pyx_t_6) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1934 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1942 * # Make sure adding a word doesn't exceed length * if not nt_open and wc < self.max_length: * extract(f_i, f_j + 1, e_i, e_j, min_bound, wc + 1, links, nt, False) # <<<<<<<<<<<<<< * return * # Aligned word */ - __pyx_t_4 = PyNumber_Add(__pyx_v_f_j, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1934; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyNumber_Add(__pyx_v_f_j, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1942; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = PyNumber_Add(__pyx_v_wc, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1934; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyNumber_Add(__pyx_v_wc, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1942; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - if (unlikely(!__pyx_cur_scope->__pyx_v_extract)) { __Pyx_RaiseClosureNameError("extract"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1934; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_1 = __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instance_extract(__pyx_cur_scope->__pyx_v_extract, __pyx_v_f_i, __pyx_t_4, __pyx_v_e_i, __pyx_v_e_j, __pyx_v_min_bound, __pyx_t_2, __pyx_v_links, __pyx_v_nt, Py_False); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1934; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_cur_scope->__pyx_v_extract)) { __Pyx_RaiseClosureNameError("extract"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1942; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + __pyx_t_1 = __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instance_extract(__pyx_cur_scope->__pyx_v_extract, __pyx_v_f_i, __pyx_t_4, __pyx_v_e_i, __pyx_v_e_j, __pyx_v_min_bound, __pyx_t_2, __pyx_v_links, __pyx_v_nt, Py_False); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1942; __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; @@ -61566,7 +61680,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc } __pyx_L6:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1935 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1943 * if not nt_open and wc < self.max_length: * extract(f_i, f_j + 1, e_i, e_j, min_bound, wc + 1, links, nt, False) * return # <<<<<<<<<<<<<< @@ -61578,47 +61692,47 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1937 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1945 * return * # Aligned word * link_i = fe_span[f_j][0] # <<<<<<<<<<<<<< * link_j = fe_span[f_j][1] * new_e_i = min(link_i, e_i) */ - if (unlikely(!__pyx_cur_scope->__pyx_v_fe_span)) { __Pyx_RaiseClosureNameError("fe_span"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + if (unlikely(!__pyx_cur_scope->__pyx_v_fe_span)) { __Pyx_RaiseClosureNameError("fe_span"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1945; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (unlikely(__pyx_cur_scope->__pyx_v_fe_span == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1945; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_1 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_fe_span, __pyx_v_f_j); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_fe_span, __pyx_v_f_j); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1945; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_link_i = __pyx_t_2; __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1938 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1946 * # Aligned word * link_i = fe_span[f_j][0] * link_j = fe_span[f_j][1] # <<<<<<<<<<<<<< * new_e_i = min(link_i, e_i) * new_e_j = max(link_j, e_j) */ - if (unlikely(!__pyx_cur_scope->__pyx_v_fe_span)) { __Pyx_RaiseClosureNameError("fe_span"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1938; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + if (unlikely(!__pyx_cur_scope->__pyx_v_fe_span)) { __Pyx_RaiseClosureNameError("fe_span"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (unlikely(__pyx_cur_scope->__pyx_v_fe_span == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1938; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_2 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_fe_span, __pyx_v_f_j); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1938; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_2 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_fe_span, __pyx_v_f_j); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1946; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1938; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1946; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_link_j = __pyx_t_1; __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1939 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1947 * link_i = fe_span[f_j][0] * link_j = fe_span[f_j][1] * new_e_i = min(link_i, e_i) # <<<<<<<<<<<<<< @@ -61629,8 +61743,8 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __pyx_t_1 = __pyx_v_e_i; __Pyx_INCREF(__pyx_v_link_i); __pyx_t_2 = __pyx_v_link_i; - __pyx_t_8 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1939; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1939; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1947; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1947; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_6) { __Pyx_INCREF(__pyx_t_1); @@ -61647,7 +61761,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __pyx_v_new_e_i = __pyx_t_1; __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1940 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1948 * link_j = fe_span[f_j][1] * new_e_i = min(link_i, e_i) * new_e_j = max(link_j, e_j) # <<<<<<<<<<<<<< @@ -61658,8 +61772,8 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __pyx_t_1 = __pyx_v_e_j; __Pyx_INCREF(__pyx_v_link_j); __pyx_t_4 = __pyx_v_link_j; - __pyx_t_8 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1940; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1940; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1948; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1948; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_6) { __Pyx_INCREF(__pyx_t_1); @@ -61676,7 +61790,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __pyx_v_new_e_j = __pyx_t_1; __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1943 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1951 * # Check reverse links of newly covered words to see if they violate left * # bound (return) or extend minimum right bound for chunk * new_min_bound = min_bound # <<<<<<<<<<<<<< @@ -61686,57 +61800,57 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __Pyx_INCREF(__pyx_v_min_bound); __pyx_v_new_min_bound = __pyx_v_min_bound; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1945 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1953 * new_min_bound = min_bound * # First aligned word creates span * if e_j == -1: # <<<<<<<<<<<<<< * for i from new_e_i <= i <= new_e_j: * if ef_span[i][0] < f_i: */ - __pyx_t_1 = PyObject_RichCompare(__pyx_v_e_j, __pyx_int_neg_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1945; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1945; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_RichCompare(__pyx_v_e_j, __pyx_int_neg_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1953; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1953; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_6) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1946 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1954 * # First aligned word creates span * if e_j == -1: * for i from new_e_i <= i <= new_e_j: # <<<<<<<<<<<<<< * if ef_span[i][0] < f_i: * return */ - __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_new_e_i); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_new_e_j); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_new_e_i); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_new_e_j); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_t_11 = __pyx_t_9; __pyx_t_11 <= __pyx_t_10; __pyx_t_11++) { - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_11); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_11); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1947 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1955 * if e_j == -1: * for i from new_e_i <= i <= new_e_j: * if ef_span[i][0] < f_i: # <<<<<<<<<<<<<< * return * new_min_bound = max(new_min_bound, ef_span[i][1]) */ - if (unlikely(!__pyx_cur_scope->__pyx_v_ef_span)) { __Pyx_RaiseClosureNameError("ef_span"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1947; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + if (unlikely(!__pyx_cur_scope->__pyx_v_ef_span)) { __Pyx_RaiseClosureNameError("ef_span"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1955; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (unlikely(__pyx_cur_scope->__pyx_v_ef_span == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1947; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1955; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_1 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_ef_span, __pyx_v_i); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1947; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_ef_span, __pyx_v_i); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1947; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_v_f_i, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1947; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_v_f_i, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1955; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1947; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1955; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_6) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1948 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1956 * for i from new_e_i <= i <= new_e_j: * if ef_span[i][0] < f_i: * return # <<<<<<<<<<<<<< @@ -61748,27 +61862,27 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1949 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1957 * if ef_span[i][0] < f_i: * return * new_min_bound = max(new_min_bound, ef_span[i][1]) # <<<<<<<<<<<<<< * # Other aligned words extend span * else: */ - if (unlikely(!__pyx_cur_scope->__pyx_v_ef_span)) { __Pyx_RaiseClosureNameError("ef_span"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1949; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + if (unlikely(!__pyx_cur_scope->__pyx_v_ef_span)) { __Pyx_RaiseClosureNameError("ef_span"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1957; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (unlikely(__pyx_cur_scope->__pyx_v_ef_span == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1949; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1957; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_1 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_ef_span, __pyx_v_i); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1949; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_ef_span, __pyx_v_i); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1949; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_INCREF(__pyx_v_new_min_bound); __pyx_t_1 = __pyx_v_new_min_bound; - __pyx_t_8 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_GT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1949; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1949; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_GT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1957; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1957; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_6) { __Pyx_INCREF(__pyx_t_2); @@ -61784,17 +61898,17 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_new_min_bound, __pyx_t_2); __pyx_t_2 = 0; - __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_v_i); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_v_i); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1946 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1954 * # First aligned word creates span * if e_j == -1: * for i from new_e_i <= i <= new_e_j: # <<<<<<<<<<<<<< * if ef_span[i][0] < f_i: * return */ - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_11); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_11); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1954; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2); __pyx_t_2 = 0; @@ -61802,45 +61916,45 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1952 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1960 * # Other aligned words extend span * else: * for i from new_e_i <= i < e_i: # <<<<<<<<<<<<<< * if ef_span[i][0] < f_i: * return */ - __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_v_new_e_i); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_e_i); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_v_new_e_i); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1960; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_e_i); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1960; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_t_9 = __pyx_t_11; __pyx_t_9 < __pyx_t_10; __pyx_t_9++) { - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_9); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_9); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1960; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1953 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1961 * else: * for i from new_e_i <= i < e_i: * if ef_span[i][0] < f_i: # <<<<<<<<<<<<<< * return * new_min_bound = max(new_min_bound, ef_span[i][1]) */ - if (unlikely(!__pyx_cur_scope->__pyx_v_ef_span)) { __Pyx_RaiseClosureNameError("ef_span"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1953; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + if (unlikely(!__pyx_cur_scope->__pyx_v_ef_span)) { __Pyx_RaiseClosureNameError("ef_span"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1961; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (unlikely(__pyx_cur_scope->__pyx_v_ef_span == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1953; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1961; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_2 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_ef_span, __pyx_v_i); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1953; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_2 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_ef_span, __pyx_v_i); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1953; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1961; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyObject_RichCompare(__pyx_t_4, __pyx_v_f_i, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1953; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_RichCompare(__pyx_t_4, __pyx_v_f_i, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1961; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1953; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1961; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_6) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1954 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1962 * for i from new_e_i <= i < e_i: * if ef_span[i][0] < f_i: * return # <<<<<<<<<<<<<< @@ -61852,27 +61966,27 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1955 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1963 * if ef_span[i][0] < f_i: * return * new_min_bound = max(new_min_bound, ef_span[i][1]) # <<<<<<<<<<<<<< * for i from e_j < i <= new_e_j: * if ef_span[i][0] < f_i: */ - if (unlikely(!__pyx_cur_scope->__pyx_v_ef_span)) { __Pyx_RaiseClosureNameError("ef_span"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1955; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + if (unlikely(!__pyx_cur_scope->__pyx_v_ef_span)) { __Pyx_RaiseClosureNameError("ef_span"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1963; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (unlikely(__pyx_cur_scope->__pyx_v_ef_span == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1955; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1963; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_2 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_ef_span, __pyx_v_i); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_2 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_ef_span, __pyx_v_i); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1963; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1955; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1963; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v_new_min_bound); __pyx_t_2 = __pyx_v_new_min_bound; - __pyx_t_8 = PyObject_RichCompare(__pyx_t_4, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1955; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1955; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = PyObject_RichCompare(__pyx_t_4, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1963; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1963; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_6) { __Pyx_INCREF(__pyx_t_4); @@ -61888,60 +62002,60 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_new_min_bound, __pyx_t_4); __pyx_t_4 = 0; - __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_i); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_i); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1960; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1952 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1960 * # Other aligned words extend span * else: * for i from new_e_i <= i < e_i: # <<<<<<<<<<<<<< * if ef_span[i][0] < f_i: * return */ - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_t_9); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_t_9); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1960; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1956 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1964 * return * new_min_bound = max(new_min_bound, ef_span[i][1]) * for i from e_j < i <= new_e_j: # <<<<<<<<<<<<<< * if ef_span[i][0] < f_i: * return */ - __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_e_j); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1956; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_new_e_j); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1956; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_e_j); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1964; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_new_e_j); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1964; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_t_11 = __pyx_t_9+1; __pyx_t_11 <= __pyx_t_10; __pyx_t_11++) { - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_t_11); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1956; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_t_11); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1964; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1957 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1965 * new_min_bound = max(new_min_bound, ef_span[i][1]) * for i from e_j < i <= new_e_j: * if ef_span[i][0] < f_i: # <<<<<<<<<<<<<< * return * new_min_bound = max(new_min_bound, ef_span[i][1]) */ - if (unlikely(!__pyx_cur_scope->__pyx_v_ef_span)) { __Pyx_RaiseClosureNameError("ef_span"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1957; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + if (unlikely(!__pyx_cur_scope->__pyx_v_ef_span)) { __Pyx_RaiseClosureNameError("ef_span"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1965; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (unlikely(__pyx_cur_scope->__pyx_v_ef_span == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1957; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1965; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_4 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_ef_span, __pyx_v_i); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_4 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_ef_span, __pyx_v_i); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1965; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1957; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1965; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_v_f_i, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1957; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_v_f_i, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1965; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1957; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1965; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1958 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1966 * for i from e_j < i <= new_e_j: * if ef_span[i][0] < f_i: * return # <<<<<<<<<<<<<< @@ -61953,27 +62067,27 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1959 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1967 * if ef_span[i][0] < f_i: * return * new_min_bound = max(new_min_bound, ef_span[i][1]) # <<<<<<<<<<<<<< * # Extract, extend with word (unless non-terminal open) * if not nt_open: */ - if (unlikely(!__pyx_cur_scope->__pyx_v_ef_span)) { __Pyx_RaiseClosureNameError("ef_span"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1959; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + if (unlikely(!__pyx_cur_scope->__pyx_v_ef_span)) { __Pyx_RaiseClosureNameError("ef_span"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1967; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (unlikely(__pyx_cur_scope->__pyx_v_ef_span == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1959; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1967; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_4 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_ef_span, __pyx_v_i); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_4 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_ef_span, __pyx_v_i); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1967; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_4, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_4, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1967; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_INCREF(__pyx_v_new_min_bound); __pyx_t_4 = __pyx_v_new_min_bound; - __pyx_t_8 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1959; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1959; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1967; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1967; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_6) { __Pyx_INCREF(__pyx_t_1); @@ -61989,35 +62103,35 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_new_min_bound, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_v_i); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1956; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_v_i); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1964; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1956 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1964 * return * new_min_bound = max(new_min_bound, ef_span[i][1]) * for i from e_j < i <= new_e_j: # <<<<<<<<<<<<<< * if ef_span[i][0] < f_i: * return */ - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_11); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1956; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_11); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1964; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1); __pyx_t_1 = 0; } __pyx_L7:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1961 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1969 * new_min_bound = max(new_min_bound, ef_span[i][1]) * # Extract, extend with word (unless non-terminal open) * if not nt_open: # <<<<<<<<<<<<<< * nt_collision = False * for link in al[f_j]: */ - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_nt_open); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1961; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_nt_open); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1969; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = ((!__pyx_t_6) != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1962 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1970 * # Extract, extend with word (unless non-terminal open) * if not nt_open: * nt_collision = False # <<<<<<<<<<<<<< @@ -62026,21 +62140,21 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc */ __pyx_v_nt_collision = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1963 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1971 * if not nt_open: * nt_collision = False * for link in al[f_j]: # <<<<<<<<<<<<<< * if e_nt_cover[link]: * nt_collision = True */ - if (unlikely(!__pyx_cur_scope->__pyx_v_al)) { __Pyx_RaiseClosureNameError("al"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1963; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_1 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_al, __pyx_v_f_j); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1963; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + if (unlikely(!__pyx_cur_scope->__pyx_v_al)) { __Pyx_RaiseClosureNameError("al"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + __pyx_t_1 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_al, __pyx_v_f_j); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1971; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); if (PyList_CheckExact(__pyx_t_1) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_7 = 0; __pyx_t_12 = NULL; } else { - __pyx_t_7 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1963; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_12 = Py_TYPE(__pyx_t_2)->tp_iternext; } @@ -62049,16 +62163,16 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc if (!__pyx_t_12 && PyList_CheckExact(__pyx_t_2)) { if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1963; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1963; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_12 && PyTuple_CheckExact(__pyx_t_2)) { if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1963; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1963; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_1 = __pyx_t_12(__pyx_t_2); @@ -62066,7 +62180,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc 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[8]; __pyx_lineno = 1963; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -62075,25 +62189,25 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __Pyx_XDECREF_SET(__pyx_v_link, __pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1964 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1972 * nt_collision = False * for link in al[f_j]: * if e_nt_cover[link]: # <<<<<<<<<<<<<< * nt_collision = True * # Non-terminal collisions block word extraction and extension, but */ - if (unlikely(!__pyx_cur_scope->__pyx_v_e_nt_cover)) { __Pyx_RaiseClosureNameError("e_nt_cover"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1964; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + if (unlikely(!__pyx_cur_scope->__pyx_v_e_nt_cover)) { __Pyx_RaiseClosureNameError("e_nt_cover"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1972; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (unlikely(__pyx_cur_scope->__pyx_v_e_nt_cover == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1964; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1972; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_1 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_e_nt_cover, __pyx_v_link); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1964; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_e_nt_cover, __pyx_v_link); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1964; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1972; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1965 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1973 * for link in al[f_j]: * if e_nt_cover[link]: * nt_collision = True # <<<<<<<<<<<<<< @@ -62107,7 +62221,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1968 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1976 * # Non-terminal collisions block word extraction and extension, but * # may be okay for continuing non-terminals * if not nt_collision and wc < self.max_length: # <<<<<<<<<<<<<< @@ -62116,12 +62230,12 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc */ __pyx_t_3 = (!(__pyx_v_nt_collision != 0)); if (__pyx_t_3) { - if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_self->max_length); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1976; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_self->max_length); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1976; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyObject_RichCompare(__pyx_v_wc, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_RichCompare(__pyx_v_wc, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1976; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1968; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1976; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = __pyx_t_6; } else { @@ -62129,33 +62243,33 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc } if (__pyx_t_5) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1969 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1977 * # may be okay for continuing non-terminals * if not nt_collision and wc < self.max_length: * plus_links = [] # <<<<<<<<<<<<<< * for link in al[f_j]: * plus_links.append((f_j, link)) */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1969; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1977; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_plus_links = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1970 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1978 * if not nt_collision and wc < self.max_length: * plus_links = [] * for link in al[f_j]: # <<<<<<<<<<<<<< * plus_links.append((f_j, link)) * cover[link] += 1 */ - if (unlikely(!__pyx_cur_scope->__pyx_v_al)) { __Pyx_RaiseClosureNameError("al"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1970; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_1 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_al, __pyx_v_f_j); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1970; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + if (unlikely(!__pyx_cur_scope->__pyx_v_al)) { __Pyx_RaiseClosureNameError("al"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1978; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + __pyx_t_1 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_al, __pyx_v_f_j); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1978; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); if (PyList_CheckExact(__pyx_t_1) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_7 = 0; __pyx_t_12 = NULL; } else { - __pyx_t_7 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1970; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1978; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_12 = Py_TYPE(__pyx_t_2)->tp_iternext; } @@ -62164,16 +62278,16 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc if (!__pyx_t_12 && PyList_CheckExact(__pyx_t_2)) { if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1970; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1978; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1970; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1978; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_12 && PyTuple_CheckExact(__pyx_t_2)) { if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1970; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1978; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1970; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1978; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_1 = __pyx_t_12(__pyx_t_2); @@ -62181,7 +62295,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc 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[8]; __pyx_lineno = 1970; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1978; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -62190,14 +62304,14 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __Pyx_XDECREF_SET(__pyx_v_link, __pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1971 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1979 * plus_links = [] * for link in al[f_j]: * plus_links.append((f_j, link)) # <<<<<<<<<<<<<< * cover[link] += 1 * links.append(plus_links) */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1979; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_f_j); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_f_j); @@ -62205,20 +62319,20 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __Pyx_INCREF(__pyx_v_link); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_link); __Pyx_GIVEREF(__pyx_v_link); - __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_plus_links, __pyx_t_1); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_plus_links, __pyx_t_1); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1979; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1972 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1980 * for link in al[f_j]: * plus_links.append((f_j, link)) * cover[link] += 1 # <<<<<<<<<<<<<< * links.append(plus_links) * if links and f_j >= new_min_bound: */ - if (unlikely(!__pyx_cur_scope->__pyx_v_cover)) { __Pyx_RaiseClosureNameError("cover"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1972; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + if (unlikely(!__pyx_cur_scope->__pyx_v_cover)) { __Pyx_RaiseClosureNameError("cover"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1980; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (unlikely(__pyx_cur_scope->__pyx_v_cover == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1972; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1980; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_INCREF(__pyx_cur_scope->__pyx_v_cover); __pyx_t_14 = __pyx_cur_scope->__pyx_v_cover; @@ -62226,44 +62340,44 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __pyx_t_1 = __pyx_v_link; if (unlikely(__pyx_t_14 == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1972; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1980; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_4 = PyObject_GetItem(__pyx_t_14, __pyx_t_1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_4 = PyObject_GetItem(__pyx_t_14, __pyx_t_1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1980; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); - __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_t_4, __pyx_int_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1972; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_t_4, __pyx_int_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1980; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(__pyx_t_14 == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1972; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1980; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - if (unlikely(PyObject_SetItem(__pyx_t_14, __pyx_t_1, __pyx_t_8) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1972; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(PyObject_SetItem(__pyx_t_14, __pyx_t_1, __pyx_t_8) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1980; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1973 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1981 * plus_links.append((f_j, link)) * cover[link] += 1 * links.append(plus_links) # <<<<<<<<<<<<<< * if links and f_j >= new_min_bound: * rules.add(self.form_rule(f_i, new_e_i, f_words[f_i:f_j + 1], e_words[new_e_i:new_e_j + 1], nt, links)) */ - __pyx_t_13 = __Pyx_PyObject_Append(__pyx_v_links, __pyx_v_plus_links); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1973; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_13 = __Pyx_PyObject_Append(__pyx_v_links, __pyx_v_plus_links); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1981; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1974 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1982 * cover[link] += 1 * links.append(plus_links) * if links and f_j >= new_min_bound: # <<<<<<<<<<<<<< * rules.add(self.form_rule(f_i, new_e_i, f_words[f_i:f_j + 1], e_words[new_e_i:new_e_j + 1], nt, links)) * extract(f_i, f_j + 1, new_e_i, new_e_j, new_min_bound, wc + 1, links, nt, False) */ - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_links); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1974; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_links); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1982; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_5) { - __pyx_t_2 = PyObject_RichCompare(__pyx_v_f_j, __pyx_v_new_min_bound, Py_GE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1974; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1974; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_RichCompare(__pyx_v_f_j, __pyx_v_new_min_bound, Py_GE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1982; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1982; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_6 = __pyx_t_3; } else { @@ -62271,34 +62385,34 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc } if (__pyx_t_6) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1975 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1983 * links.append(plus_links) * if links and f_j >= new_min_bound: * rules.add(self.form_rule(f_i, new_e_i, f_words[f_i:f_j + 1], e_words[new_e_i:new_e_j + 1], nt, links)) # <<<<<<<<<<<<<< * extract(f_i, f_j + 1, new_e_i, new_e_j, new_min_bound, wc + 1, links, nt, False) * links.pop() */ - if (unlikely(!__pyx_cur_scope->__pyx_v_rules)) { __Pyx_RaiseClosureNameError("rules"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1975; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + if (unlikely(!__pyx_cur_scope->__pyx_v_rules)) { __Pyx_RaiseClosureNameError("rules"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1983; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (unlikely(__pyx_cur_scope->__pyx_v_rules == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "add"); - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1975; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1983; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1975; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_form_rule); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1975; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1983; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_form_rule); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1983; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - if (unlikely(!__pyx_cur_scope->__pyx_v_f_words)) { __Pyx_RaiseClosureNameError("f_words"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1975; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_1 = PyNumber_Add(__pyx_v_f_j, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1975; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_cur_scope->__pyx_v_f_words)) { __Pyx_RaiseClosureNameError("f_words"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1983; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + __pyx_t_1 = PyNumber_Add(__pyx_v_f_j, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1983; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = __Pyx_PyObject_GetSlice(__pyx_cur_scope->__pyx_v_f_words, 0, 0, &__pyx_v_f_i, &__pyx_t_1, NULL, 0, 0, 1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1975; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_PyObject_GetSlice(__pyx_cur_scope->__pyx_v_f_words, 0, 0, &__pyx_v_f_i, &__pyx_t_1, NULL, 0, 0, 1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1983; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_cur_scope->__pyx_v_e_words)) { __Pyx_RaiseClosureNameError("e_words"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1975; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_1 = PyNumber_Add(__pyx_v_new_e_j, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1975; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_cur_scope->__pyx_v_e_words)) { __Pyx_RaiseClosureNameError("e_words"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1983; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + __pyx_t_1 = PyNumber_Add(__pyx_v_new_e_j, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1983; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_cur_scope->__pyx_v_e_words, 0, 0, &__pyx_v_new_e_i, &__pyx_t_1, NULL, 0, 0, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1975; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_cur_scope->__pyx_v_e_words, 0, 0, &__pyx_v_new_e_i, &__pyx_t_1, NULL, 0, 0, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1983; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyTuple_New(6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1975; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyTuple_New(6); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1983; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_f_i); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_f_i); @@ -62318,60 +62432,60 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __Pyx_GIVEREF(__pyx_v_links); __pyx_t_8 = 0; __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1975; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1983; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_13 = PySet_Add(__pyx_cur_scope->__pyx_v_rules, __pyx_t_4); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1975; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_13 = PySet_Add(__pyx_cur_scope->__pyx_v_rules, __pyx_t_4); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1983; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L24; } __pyx_L24:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1976 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1984 * if links and f_j >= new_min_bound: * rules.add(self.form_rule(f_i, new_e_i, f_words[f_i:f_j + 1], e_words[new_e_i:new_e_j + 1], nt, links)) * extract(f_i, f_j + 1, new_e_i, new_e_j, new_min_bound, wc + 1, links, nt, False) # <<<<<<<<<<<<<< * links.pop() * for link in al[f_j]: */ - __pyx_t_4 = PyNumber_Add(__pyx_v_f_j, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1976; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyNumber_Add(__pyx_v_f_j, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1984; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = PyNumber_Add(__pyx_v_wc, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1976; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyNumber_Add(__pyx_v_wc, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1984; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (unlikely(!__pyx_cur_scope->__pyx_v_extract)) { __Pyx_RaiseClosureNameError("extract"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1976; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_2 = __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instance_extract(__pyx_cur_scope->__pyx_v_extract, __pyx_v_f_i, __pyx_t_4, __pyx_v_new_e_i, __pyx_v_new_e_j, __pyx_v_new_min_bound, __pyx_t_1, __pyx_v_links, __pyx_v_nt, Py_False); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1976; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_cur_scope->__pyx_v_extract)) { __Pyx_RaiseClosureNameError("extract"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1984; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + __pyx_t_2 = __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instance_extract(__pyx_cur_scope->__pyx_v_extract, __pyx_v_f_i, __pyx_t_4, __pyx_v_new_e_i, __pyx_v_new_e_j, __pyx_v_new_min_bound, __pyx_t_1, __pyx_v_links, __pyx_v_nt, Py_False); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1984; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __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; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1977 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1985 * rules.add(self.form_rule(f_i, new_e_i, f_words[f_i:f_j + 1], e_words[new_e_i:new_e_j + 1], nt, links)) * extract(f_i, f_j + 1, new_e_i, new_e_j, new_min_bound, wc + 1, links, nt, False) * links.pop() # <<<<<<<<<<<<<< * for link in al[f_j]: * cover[link] -= 1 */ - __pyx_t_2 = __Pyx_PyObject_Pop(__pyx_v_links); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1977; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Pop(__pyx_v_links); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1985; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1978 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1986 * extract(f_i, f_j + 1, new_e_i, new_e_j, new_min_bound, wc + 1, links, nt, False) * links.pop() * for link in al[f_j]: # <<<<<<<<<<<<<< * cover[link] -= 1 * # Try to add a word to current non-terminal (if any), extract, extend */ - if (unlikely(!__pyx_cur_scope->__pyx_v_al)) { __Pyx_RaiseClosureNameError("al"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1978; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_2 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_al, __pyx_v_f_j); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1978; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + if (unlikely(!__pyx_cur_scope->__pyx_v_al)) { __Pyx_RaiseClosureNameError("al"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1986; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + __pyx_t_2 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_al, __pyx_v_f_j); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1986; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) { __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_7 = 0; __pyx_t_12 = NULL; } else { - __pyx_t_7 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1978; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1986; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_12 = Py_TYPE(__pyx_t_1)->tp_iternext; } @@ -62380,16 +62494,16 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc if (!__pyx_t_12 && PyList_CheckExact(__pyx_t_1)) { if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1978; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1986; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1978; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1986; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_12 && PyTuple_CheckExact(__pyx_t_1)) { if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1978; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1986; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1978; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1986; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_2 = __pyx_t_12(__pyx_t_1); @@ -62397,7 +62511,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc 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[8]; __pyx_lineno = 1978; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1986; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -62406,17 +62520,17 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __Pyx_XDECREF_SET(__pyx_v_link, __pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1979 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1987 * links.pop() * for link in al[f_j]: * cover[link] -= 1 # <<<<<<<<<<<<<< * # Try to add a word to current non-terminal (if any), extract, extend * if nt and nt[-1][2] == f_j - 1: */ - if (unlikely(!__pyx_cur_scope->__pyx_v_cover)) { __Pyx_RaiseClosureNameError("cover"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1979; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + if (unlikely(!__pyx_cur_scope->__pyx_v_cover)) { __Pyx_RaiseClosureNameError("cover"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1987; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (unlikely(__pyx_cur_scope->__pyx_v_cover == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1979; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1987; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_INCREF(__pyx_cur_scope->__pyx_v_cover); __pyx_t_14 = __pyx_cur_scope->__pyx_v_cover; @@ -62424,18 +62538,18 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __pyx_t_2 = __pyx_v_link; if (unlikely(__pyx_t_14 == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1979; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1987; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_4 = PyObject_GetItem(__pyx_t_14, __pyx_t_2); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1979; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_4 = PyObject_GetItem(__pyx_t_14, __pyx_t_2); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1987; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); - __pyx_t_8 = PyNumber_InPlaceSubtract(__pyx_t_4, __pyx_int_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1979; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = PyNumber_InPlaceSubtract(__pyx_t_4, __pyx_int_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1987; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(__pyx_t_14 == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1979; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1987; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - if (unlikely(PyObject_SetItem(__pyx_t_14, __pyx_t_2, __pyx_t_8) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1979; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(PyObject_SetItem(__pyx_t_14, __pyx_t_2, __pyx_t_8) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1987; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; @@ -62448,26 +62562,26 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc } __pyx_L17:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1981 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1989 * cover[link] -= 1 * # Try to add a word to current non-terminal (if any), extract, extend * if nt and nt[-1][2] == f_j - 1: # <<<<<<<<<<<<<< * # Add to non-terminal, checking for collisions * old_last_nt = nt[-1][:] */ - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_nt); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1981; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_nt); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1989; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_6) { - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_nt, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_nt, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1989; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1981; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1989; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyNumber_Subtract(__pyx_v_f_j, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1981; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyNumber_Subtract(__pyx_v_f_j, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1989; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1981; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1989; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1981; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1989; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_3 = __pyx_t_5; } else { @@ -62475,70 +62589,70 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc } if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1983 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1991 * if nt and nt[-1][2] == f_j - 1: * # Add to non-terminal, checking for collisions * old_last_nt = nt[-1][:] # <<<<<<<<<<<<<< * nt[-1][2] = f_j * if link_i < nt[-1][3]: */ - __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_nt, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1983; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_nt, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1991; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_8); - __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_8, 0, 0, NULL, NULL, &__pyx_slice__67, 0, 0, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1983; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_t_8, 0, 0, NULL, NULL, &__pyx_slice__67, 0, 0, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1991; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_old_last_nt = __pyx_t_1; __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1984 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1992 * # Add to non-terminal, checking for collisions * old_last_nt = nt[-1][:] * nt[-1][2] = f_j # <<<<<<<<<<<<<< * if link_i < nt[-1][3]: * if not span_check(cover, link_i, nt[-1][3] - 1): */ - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_nt, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1984; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_nt, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); - if (unlikely(__Pyx_SetItemInt(__pyx_t_1, 2, __pyx_v_f_j, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1984; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(__Pyx_SetItemInt(__pyx_t_1, 2, __pyx_v_f_j, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1985 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1993 * old_last_nt = nt[-1][:] * nt[-1][2] = f_j * if link_i < nt[-1][3]: # <<<<<<<<<<<<<< * if not span_check(cover, link_i, nt[-1][3] - 1): * nt[-1] = old_last_nt */ - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_nt, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_nt, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_1, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_1, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_RichCompare(__pyx_v_link_i, __pyx_t_8, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1985; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_RichCompare(__pyx_v_link_i, __pyx_t_8, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1993; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1985; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1993; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1986 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1994 * nt[-1][2] = f_j * if link_i < nt[-1][3]: * if not span_check(cover, link_i, nt[-1][3] - 1): # <<<<<<<<<<<<<< * nt[-1] = old_last_nt * return */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_span_check); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1986; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_span_check); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1994; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (unlikely(!__pyx_cur_scope->__pyx_v_cover)) { __Pyx_RaiseClosureNameError("cover"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1986; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_nt, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1986; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + if (unlikely(!__pyx_cur_scope->__pyx_v_cover)) { __Pyx_RaiseClosureNameError("cover"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1994; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_nt, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1994; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_8); - __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_8, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1986; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_8, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1994; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = PyNumber_Subtract(__pyx_t_2, __pyx_int_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1986; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = PyNumber_Subtract(__pyx_t_2, __pyx_int_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1994; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1986; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1994; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_cover); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_cur_scope->__pyx_v_cover); @@ -62549,25 +62663,25 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1986; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1994; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1986; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1994; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_6 = ((!__pyx_t_3) != 0); if (__pyx_t_6) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1987 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1995 * if link_i < nt[-1][3]: * if not span_check(cover, link_i, nt[-1][3] - 1): * nt[-1] = old_last_nt # <<<<<<<<<<<<<< * return * span_inc(cover, link_i, nt[-1][3] - 1) */ - if (unlikely(__Pyx_SetItemInt(__pyx_v_nt, -1, __pyx_v_old_last_nt, long, 1, __Pyx_PyInt_From_long, 0, 1, 1) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1987; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(__Pyx_SetItemInt(__pyx_v_nt, -1, __pyx_v_old_last_nt, long, 1, __Pyx_PyInt_From_long, 0, 1, 1) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1995; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1988 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1996 * if not span_check(cover, link_i, nt[-1][3] - 1): * nt[-1] = old_last_nt * return # <<<<<<<<<<<<<< @@ -62579,25 +62693,25 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1989 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1997 * nt[-1] = old_last_nt * return * span_inc(cover, link_i, nt[-1][3] - 1) # <<<<<<<<<<<<<< * span_inc(e_nt_cover, link_i, nt[-1][3] - 1) * nt[-1][3] = link_i */ - __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_span_inc); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1989; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_span_inc); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1997; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); - if (unlikely(!__pyx_cur_scope->__pyx_v_cover)) { __Pyx_RaiseClosureNameError("cover"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1989; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_nt, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1989; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + if (unlikely(!__pyx_cur_scope->__pyx_v_cover)) { __Pyx_RaiseClosureNameError("cover"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1997; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_nt, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1997; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1989; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1997; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyNumber_Subtract(__pyx_t_1, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1989; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyNumber_Subtract(__pyx_t_1, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1997; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1989; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1997; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_cover); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_cur_scope->__pyx_v_cover); @@ -62608,31 +62722,31 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1989; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1997; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1990 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1998 * return * span_inc(cover, link_i, nt[-1][3] - 1) * span_inc(e_nt_cover, link_i, nt[-1][3] - 1) # <<<<<<<<<<<<<< * nt[-1][3] = link_i * if link_j > nt[-1][4]: */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_span_inc); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1990; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_span_inc); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1998; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - if (unlikely(!__pyx_cur_scope->__pyx_v_e_nt_cover)) { __Pyx_RaiseClosureNameError("e_nt_cover"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1990; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_nt, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + if (unlikely(!__pyx_cur_scope->__pyx_v_e_nt_cover)) { __Pyx_RaiseClosureNameError("e_nt_cover"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1998; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_nt, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1998; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_1, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1990; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_1, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1998; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyNumber_Subtract(__pyx_t_8, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1990; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyNumber_Subtract(__pyx_t_8, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1998; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1990; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1998; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_e_nt_cover); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_cur_scope->__pyx_v_e_nt_cover); @@ -62643,64 +62757,64 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1990; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1998; __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_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1991 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1999 * span_inc(cover, link_i, nt[-1][3] - 1) * span_inc(e_nt_cover, link_i, nt[-1][3] - 1) * nt[-1][3] = link_i # <<<<<<<<<<<<<< * if link_j > nt[-1][4]: * if not span_check(cover, nt[-1][4] + 1, link_j): */ - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_nt, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1991; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_nt, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1999; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); - if (unlikely(__Pyx_SetItemInt(__pyx_t_1, 3, __pyx_v_link_i, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1991; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(__Pyx_SetItemInt(__pyx_t_1, 3, __pyx_v_link_i, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1999; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L28; } __pyx_L28:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1992 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2000 * span_inc(e_nt_cover, link_i, nt[-1][3] - 1) * nt[-1][3] = link_i * if link_j > nt[-1][4]: # <<<<<<<<<<<<<< * if not span_check(cover, nt[-1][4] + 1, link_j): * nt[-1] = old_last_nt */ - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_nt, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_nt, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2000; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_1, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1992; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_1, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2000; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_RichCompare(__pyx_v_link_j, __pyx_t_8, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_RichCompare(__pyx_v_link_j, __pyx_t_8, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1992; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_6) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1993 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2001 * nt[-1][3] = link_i * if link_j > nt[-1][4]: * if not span_check(cover, nt[-1][4] + 1, link_j): # <<<<<<<<<<<<<< * nt[-1] = old_last_nt * return */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_span_check); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1993; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_span_check); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2001; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (unlikely(!__pyx_cur_scope->__pyx_v_cover)) { __Pyx_RaiseClosureNameError("cover"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1993; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_nt, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + if (unlikely(!__pyx_cur_scope->__pyx_v_cover)) { __Pyx_RaiseClosureNameError("cover"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2001; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_nt, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2001; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_8); - __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_8, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_8, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2001; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = PyNumber_Add(__pyx_t_2, __pyx_int_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1993; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = PyNumber_Add(__pyx_t_2, __pyx_int_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2001; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1993; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2001; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_cover); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_cur_scope->__pyx_v_cover); @@ -62711,25 +62825,25 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_link_j); __Pyx_GIVEREF(__pyx_v_link_j); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1993; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2001; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1993; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2001; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_3 = ((!__pyx_t_6) != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1994 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2002 * if link_j > nt[-1][4]: * if not span_check(cover, nt[-1][4] + 1, link_j): * nt[-1] = old_last_nt # <<<<<<<<<<<<<< * return * span_inc(cover, nt[-1][4] + 1, link_j) */ - if (unlikely(__Pyx_SetItemInt(__pyx_v_nt, -1, __pyx_v_old_last_nt, long, 1, __Pyx_PyInt_From_long, 0, 1, 1) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1994; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(__Pyx_SetItemInt(__pyx_v_nt, -1, __pyx_v_old_last_nt, long, 1, __Pyx_PyInt_From_long, 0, 1, 1) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2002; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1995 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2003 * if not span_check(cover, nt[-1][4] + 1, link_j): * nt[-1] = old_last_nt * return # <<<<<<<<<<<<<< @@ -62741,25 +62855,25 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1996 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2004 * nt[-1] = old_last_nt * return * span_inc(cover, nt[-1][4] + 1, link_j) # <<<<<<<<<<<<<< * span_inc(e_nt_cover, nt[-1][4] + 1, link_j) * nt[-1][4] = link_j */ - __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_span_inc); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1996; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_span_inc); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2004; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); - if (unlikely(!__pyx_cur_scope->__pyx_v_cover)) { __Pyx_RaiseClosureNameError("cover"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1996; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_nt, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1996; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + if (unlikely(!__pyx_cur_scope->__pyx_v_cover)) { __Pyx_RaiseClosureNameError("cover"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2004; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_nt, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2004; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1996; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2004; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1996; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2004; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1996; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2004; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_cover); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_cur_scope->__pyx_v_cover); @@ -62770,31 +62884,31 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_link_j); __Pyx_GIVEREF(__pyx_v_link_j); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1996; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2004; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1997 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2005 * return * span_inc(cover, nt[-1][4] + 1, link_j) * span_inc(e_nt_cover, nt[-1][4] + 1, link_j) # <<<<<<<<<<<<<< * nt[-1][4] = link_j * if links and f_j >= new_min_bound: */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_span_inc); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1997; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_span_inc); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2005; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - if (unlikely(!__pyx_cur_scope->__pyx_v_e_nt_cover)) { __Pyx_RaiseClosureNameError("e_nt_cover"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1997; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_nt, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1997; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + if (unlikely(!__pyx_cur_scope->__pyx_v_e_nt_cover)) { __Pyx_RaiseClosureNameError("e_nt_cover"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2005; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_nt, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_1, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1997; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_1, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyNumber_Add(__pyx_t_8, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1997; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyNumber_Add(__pyx_t_8, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2005; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1997; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2005; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_e_nt_cover); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_cur_scope->__pyx_v_e_nt_cover); @@ -62805,38 +62919,38 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_v_link_j); __Pyx_GIVEREF(__pyx_v_link_j); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1997; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2005; __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_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1998 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2006 * span_inc(cover, nt[-1][4] + 1, link_j) * span_inc(e_nt_cover, nt[-1][4] + 1, link_j) * nt[-1][4] = link_j # <<<<<<<<<<<<<< * if links and f_j >= new_min_bound: * rules.add(self.form_rule(f_i, new_e_i, f_words[f_i:f_j + 1], e_words[new_e_i:new_e_j + 1], nt, links)) */ - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_nt, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1998; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_nt, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2006; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); - if (unlikely(__Pyx_SetItemInt(__pyx_t_1, 4, __pyx_v_link_j, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1998; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(__Pyx_SetItemInt(__pyx_t_1, 4, __pyx_v_link_j, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2006; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L30; } __pyx_L30:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1999 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2007 * span_inc(e_nt_cover, nt[-1][4] + 1, link_j) * nt[-1][4] = link_j * if links and f_j >= new_min_bound: # <<<<<<<<<<<<<< * rules.add(self.form_rule(f_i, new_e_i, f_words[f_i:f_j + 1], e_words[new_e_i:new_e_j + 1], nt, links)) * extract(f_i, f_j + 1, new_e_i, new_e_j, new_min_bound, wc, links, nt, False) */ - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_links); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1999; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_links); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2007; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_3) { - __pyx_t_1 = PyObject_RichCompare(__pyx_v_f_j, __pyx_v_new_min_bound, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1999; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1999; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_RichCompare(__pyx_v_f_j, __pyx_v_new_min_bound, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2007; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2007; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = __pyx_t_6; } else { @@ -62844,34 +62958,34 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc } if (__pyx_t_5) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2000 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2008 * nt[-1][4] = link_j * if links and f_j >= new_min_bound: * rules.add(self.form_rule(f_i, new_e_i, f_words[f_i:f_j + 1], e_words[new_e_i:new_e_j + 1], nt, links)) # <<<<<<<<<<<<<< * extract(f_i, f_j + 1, new_e_i, new_e_j, new_min_bound, wc, links, nt, False) * nt[-1] = old_last_nt */ - if (unlikely(!__pyx_cur_scope->__pyx_v_rules)) { __Pyx_RaiseClosureNameError("rules"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + if (unlikely(!__pyx_cur_scope->__pyx_v_rules)) { __Pyx_RaiseClosureNameError("rules"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (unlikely(__pyx_cur_scope->__pyx_v_rules == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "add"); - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_form_rule); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_form_rule); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (unlikely(!__pyx_cur_scope->__pyx_v_f_words)) { __Pyx_RaiseClosureNameError("f_words"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_8 = PyNumber_Add(__pyx_v_f_j, __pyx_int_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_cur_scope->__pyx_v_f_words)) { __Pyx_RaiseClosureNameError("f_words"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + __pyx_t_8 = PyNumber_Add(__pyx_v_f_j, __pyx_int_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); - __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_cur_scope->__pyx_v_f_words, 0, 0, &__pyx_v_f_i, &__pyx_t_8, NULL, 0, 0, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_cur_scope->__pyx_v_f_words, 0, 0, &__pyx_v_f_i, &__pyx_t_8, NULL, 0, 0, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_cur_scope->__pyx_v_e_words)) { __Pyx_RaiseClosureNameError("e_words"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_8 = PyNumber_Add(__pyx_v_new_e_j, __pyx_int_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_cur_scope->__pyx_v_e_words)) { __Pyx_RaiseClosureNameError("e_words"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + __pyx_t_8 = PyNumber_Add(__pyx_v_new_e_j, __pyx_int_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); - __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_cur_scope->__pyx_v_e_words, 0, 0, &__pyx_v_new_e_i, &__pyx_t_8, NULL, 0, 0, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_cur_scope->__pyx_v_e_words, 0, 0, &__pyx_v_new_e_i, &__pyx_t_8, NULL, 0, 0, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = PyTuple_New(6); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = PyTuple_New(6); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_f_i); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_f_i); @@ -62891,77 +63005,77 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __Pyx_GIVEREF(__pyx_v_links); __pyx_t_2 = 0; __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_13 = PySet_Add(__pyx_cur_scope->__pyx_v_rules, __pyx_t_4); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2000; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_13 = PySet_Add(__pyx_cur_scope->__pyx_v_rules, __pyx_t_4); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L32; } __pyx_L32:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2001 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2009 * if links and f_j >= new_min_bound: * rules.add(self.form_rule(f_i, new_e_i, f_words[f_i:f_j + 1], e_words[new_e_i:new_e_j + 1], nt, links)) * extract(f_i, f_j + 1, new_e_i, new_e_j, new_min_bound, wc, links, nt, False) # <<<<<<<<<<<<<< * nt[-1] = old_last_nt * if link_i < nt[-1][3]: */ - __pyx_t_4 = PyNumber_Add(__pyx_v_f_j, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2001; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyNumber_Add(__pyx_v_f_j, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2009; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - if (unlikely(!__pyx_cur_scope->__pyx_v_extract)) { __Pyx_RaiseClosureNameError("extract"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2001; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_8 = __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instance_extract(__pyx_cur_scope->__pyx_v_extract, __pyx_v_f_i, __pyx_t_4, __pyx_v_new_e_i, __pyx_v_new_e_j, __pyx_v_new_min_bound, __pyx_v_wc, __pyx_v_links, __pyx_v_nt, Py_False); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2001; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_cur_scope->__pyx_v_extract)) { __Pyx_RaiseClosureNameError("extract"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2009; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + __pyx_t_8 = __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instance_extract(__pyx_cur_scope->__pyx_v_extract, __pyx_v_f_i, __pyx_t_4, __pyx_v_new_e_i, __pyx_v_new_e_j, __pyx_v_new_min_bound, __pyx_v_wc, __pyx_v_links, __pyx_v_nt, Py_False); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2009; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2002 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2010 * rules.add(self.form_rule(f_i, new_e_i, f_words[f_i:f_j + 1], e_words[new_e_i:new_e_j + 1], nt, links)) * extract(f_i, f_j + 1, new_e_i, new_e_j, new_min_bound, wc, links, nt, False) * nt[-1] = old_last_nt # <<<<<<<<<<<<<< * if link_i < nt[-1][3]: * span_dec(cover, link_i, nt[-1][3] - 1) */ - if (unlikely(__Pyx_SetItemInt(__pyx_v_nt, -1, __pyx_v_old_last_nt, long, 1, __Pyx_PyInt_From_long, 0, 1, 1) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2002; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(__Pyx_SetItemInt(__pyx_v_nt, -1, __pyx_v_old_last_nt, long, 1, __Pyx_PyInt_From_long, 0, 1, 1) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2010; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2003 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2011 * extract(f_i, f_j + 1, new_e_i, new_e_j, new_min_bound, wc, links, nt, False) * nt[-1] = old_last_nt * if link_i < nt[-1][3]: # <<<<<<<<<<<<<< * span_dec(cover, link_i, nt[-1][3] - 1) * span_dec(e_nt_cover, link_i, nt[-1][3] - 1) */ - __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_nt, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_nt, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_8); - __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_8, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2003; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_8, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = PyObject_RichCompare(__pyx_v_link_i, __pyx_t_4, Py_LT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2003; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = PyObject_RichCompare(__pyx_v_link_i, __pyx_t_4, Py_LT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2011; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2003; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2011; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_5) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2004 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2012 * nt[-1] = old_last_nt * if link_i < nt[-1][3]: * span_dec(cover, link_i, nt[-1][3] - 1) # <<<<<<<<<<<<<< * span_dec(e_nt_cover, link_i, nt[-1][3] - 1) * if link_j > nt[-1][4]: */ - __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_span_dec); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2004; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_span_dec); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2012; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); - if (unlikely(!__pyx_cur_scope->__pyx_v_cover)) { __Pyx_RaiseClosureNameError("cover"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2004; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_nt, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2004; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + if (unlikely(!__pyx_cur_scope->__pyx_v_cover)) { __Pyx_RaiseClosureNameError("cover"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2012; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_nt, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2012; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_4, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2004; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_4, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2012; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyNumber_Subtract(__pyx_t_1, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2004; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyNumber_Subtract(__pyx_t_1, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2012; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2004; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2012; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_cover); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_cur_scope->__pyx_v_cover); @@ -62972,31 +63086,31 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2004; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2012; __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_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2005 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2013 * if link_i < nt[-1][3]: * span_dec(cover, link_i, nt[-1][3] - 1) * span_dec(e_nt_cover, link_i, nt[-1][3] - 1) # <<<<<<<<<<<<<< * if link_j > nt[-1][4]: * span_dec(cover, nt[-1][4] + 1, link_j) */ - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_span_dec); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2005; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_span_dec); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2013; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - if (unlikely(!__pyx_cur_scope->__pyx_v_e_nt_cover)) { __Pyx_RaiseClosureNameError("e_nt_cover"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2005; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_nt, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + if (unlikely(!__pyx_cur_scope->__pyx_v_e_nt_cover)) { __Pyx_RaiseClosureNameError("e_nt_cover"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2013; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_nt, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_1, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2005; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_1, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2013; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyNumber_Subtract(__pyx_t_8, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2005; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyNumber_Subtract(__pyx_t_8, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2013; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2005; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2013; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_e_nt_cover); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_cur_scope->__pyx_v_e_nt_cover); @@ -63007,7 +63121,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2005; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2013; __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_8); __pyx_t_8 = 0; @@ -63016,43 +63130,43 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc } __pyx_L33:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2006 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2014 * span_dec(cover, link_i, nt[-1][3] - 1) * span_dec(e_nt_cover, link_i, nt[-1][3] - 1) * if link_j > nt[-1][4]: # <<<<<<<<<<<<<< * span_dec(cover, nt[-1][4] + 1, link_j) * span_dec(e_nt_cover, nt[-1][4] + 1, link_j) */ - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_nt, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2006; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_nt, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2014; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_1, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2006; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_1, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2014; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_RichCompare(__pyx_v_link_j, __pyx_t_8, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2006; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_RichCompare(__pyx_v_link_j, __pyx_t_8, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2014; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2006; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2014; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2007 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2015 * span_dec(e_nt_cover, link_i, nt[-1][3] - 1) * if link_j > nt[-1][4]: * span_dec(cover, nt[-1][4] + 1, link_j) # <<<<<<<<<<<<<< * span_dec(e_nt_cover, nt[-1][4] + 1, link_j) * # Try to start a new non-terminal, extract, extend */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_span_dec); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2007; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_span_dec); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (unlikely(!__pyx_cur_scope->__pyx_v_cover)) { __Pyx_RaiseClosureNameError("cover"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2007; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_nt, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + if (unlikely(!__pyx_cur_scope->__pyx_v_cover)) { __Pyx_RaiseClosureNameError("cover"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_nt, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_8 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2015; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_8); - __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_8, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_8, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2015; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = PyNumber_Add(__pyx_t_4, __pyx_int_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2007; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = PyNumber_Add(__pyx_t_4, __pyx_int_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2007; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_cover); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_cur_scope->__pyx_v_cover); @@ -63063,31 +63177,31 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_link_j); __Pyx_GIVEREF(__pyx_v_link_j); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2007; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2008 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2016 * if link_j > nt[-1][4]: * span_dec(cover, nt[-1][4] + 1, link_j) * span_dec(e_nt_cover, nt[-1][4] + 1, link_j) # <<<<<<<<<<<<<< * # Try to start a new non-terminal, extract, extend * if (not nt or f_j - nt[-1][2] > 1) and wc < self.max_length and len(nt) < self.max_nonterminals: */ - __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_span_dec); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_span_dec); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2016; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); - if (unlikely(!__pyx_cur_scope->__pyx_v_e_nt_cover)) { __Pyx_RaiseClosureNameError("e_nt_cover"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_nt, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + if (unlikely(!__pyx_cur_scope->__pyx_v_e_nt_cover)) { __Pyx_RaiseClosureNameError("e_nt_cover"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2016; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_nt, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2016; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_4, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2008; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_4, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2016; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyNumber_Add(__pyx_t_1, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyNumber_Add(__pyx_t_1, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2016; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2016; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_e_nt_cover); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_cur_scope->__pyx_v_e_nt_cover); @@ -63098,7 +63212,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_link_j); __Pyx_GIVEREF(__pyx_v_link_j); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2008; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2016; __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_1); __pyx_t_1 = 0; @@ -63110,43 +63224,43 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc } __pyx_L27:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2010 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2018 * span_dec(e_nt_cover, nt[-1][4] + 1, link_j) * # Try to start a new non-terminal, extract, extend * if (not nt or f_j - nt[-1][2] > 1) and wc < self.max_length and len(nt) < self.max_nonterminals: # <<<<<<<<<<<<<< * # Check for collisions * if not span_check(cover, link_i, link_j): */ - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_nt); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2010; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_nt); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = (!__pyx_t_5); if (!__pyx_t_3) { - __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_nt, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2010; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_nt, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2018; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_4, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2010; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_4, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2018; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyNumber_Subtract(__pyx_v_f_j, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2010; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyNumber_Subtract(__pyx_v_f_j, __pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_int_1, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2010; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_int_1, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2010; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = __pyx_t_5; } else { __pyx_t_6 = __pyx_t_3; } if (__pyx_t_6) { - if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2010; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_self->max_length); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2010; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_self->max_length); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_wc, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2010; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyObject_RichCompare(__pyx_v_wc, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2010; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_3) { - __pyx_t_7 = PyObject_Length(__pyx_v_nt); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2010; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2010; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + __pyx_t_7 = PyObject_Length(__pyx_v_nt); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_5 = (__pyx_t_7 < __pyx_cur_scope->__pyx_v_self->max_nonterminals); __pyx_t_15 = __pyx_t_5; } else { @@ -63158,17 +63272,17 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc } if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2012 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2020 * if (not nt or f_j - nt[-1][2] > 1) and wc < self.max_length and len(nt) < self.max_nonterminals: * # Check for collisions * if not span_check(cover, link_i, link_j): # <<<<<<<<<<<<<< * return * span_inc(cover, link_i, link_j) */ - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_span_check); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2012; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_span_check); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2020; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - if (unlikely(!__pyx_cur_scope->__pyx_v_cover)) { __Pyx_RaiseClosureNameError("cover"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2012; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2012; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_cur_scope->__pyx_v_cover)) { __Pyx_RaiseClosureNameError("cover"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2020; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2020; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_cover); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_cur_scope->__pyx_v_cover); @@ -63179,16 +63293,16 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __Pyx_INCREF(__pyx_v_link_j); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_link_j); __Pyx_GIVEREF(__pyx_v_link_j); - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2012; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2020; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2012; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2020; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_6 = ((!__pyx_t_3) != 0); if (__pyx_t_6) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2013 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2021 * # Check for collisions * if not span_check(cover, link_i, link_j): * return # <<<<<<<<<<<<<< @@ -63200,17 +63314,17 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2014 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2022 * if not span_check(cover, link_i, link_j): * return * span_inc(cover, link_i, link_j) # <<<<<<<<<<<<<< * span_inc(e_nt_cover, link_i, link_j) * nt.append([(nt[-1][0] + 1) if nt else 1, f_j, f_j, link_i, link_j]) */ - __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_span_inc); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2014; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_span_inc); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2022; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); - if (unlikely(!__pyx_cur_scope->__pyx_v_cover)) { __Pyx_RaiseClosureNameError("cover"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2014; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2014; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_cur_scope->__pyx_v_cover)) { __Pyx_RaiseClosureNameError("cover"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2022; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2022; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_cover); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_cur_scope->__pyx_v_cover); @@ -63221,23 +63335,23 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __Pyx_INCREF(__pyx_v_link_j); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_link_j); __Pyx_GIVEREF(__pyx_v_link_j); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2014; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2022; __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_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2015 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2023 * return * span_inc(cover, link_i, link_j) * span_inc(e_nt_cover, link_i, link_j) # <<<<<<<<<<<<<< * nt.append([(nt[-1][0] + 1) if nt else 1, f_j, f_j, link_i, link_j]) * # Require at least one word in phrase */ - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_span_inc); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_span_inc); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2023; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - if (unlikely(!__pyx_cur_scope->__pyx_v_e_nt_cover)) { __Pyx_RaiseClosureNameError("e_nt_cover"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_cur_scope->__pyx_v_e_nt_cover)) { __Pyx_RaiseClosureNameError("e_nt_cover"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2023; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2023; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_e_nt_cover); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_cur_scope->__pyx_v_e_nt_cover); @@ -63248,27 +63362,27 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __Pyx_INCREF(__pyx_v_link_j); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_link_j); __Pyx_GIVEREF(__pyx_v_link_j); - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2015; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2023; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2016 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2024 * span_inc(cover, link_i, link_j) * span_inc(e_nt_cover, link_i, link_j) * nt.append([(nt[-1][0] + 1) if nt else 1, f_j, f_j, link_i, link_j]) # <<<<<<<<<<<<<< * # Require at least one word in phrase * if links and f_j >= new_min_bound: */ - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_nt); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2016; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_nt); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2024; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_6) { - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_nt, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2016; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_nt, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2024; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2016; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2024; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyNumber_Add(__pyx_t_4, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2016; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyNumber_Add(__pyx_t_4, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2024; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_8 = __pyx_t_1; @@ -63277,7 +63391,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __Pyx_INCREF(__pyx_int_1); __pyx_t_8 = __pyx_int_1; } - __pyx_t_1 = PyList_New(5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2016; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_New(5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2024; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); @@ -63294,20 +63408,20 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc PyList_SET_ITEM(__pyx_t_1, 4, __pyx_v_link_j); __Pyx_GIVEREF(__pyx_v_link_j); __pyx_t_8 = 0; - __pyx_t_13 = __Pyx_PyObject_Append(__pyx_v_nt, __pyx_t_1); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2016; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_13 = __Pyx_PyObject_Append(__pyx_v_nt, __pyx_t_1); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2024; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2018 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2026 * nt.append([(nt[-1][0] + 1) if nt else 1, f_j, f_j, link_i, link_j]) * # Require at least one word in phrase * if links and f_j >= new_min_bound: # <<<<<<<<<<<<<< * rules.add(self.form_rule(f_i, new_e_i, f_words[f_i:f_j + 1], e_words[new_e_i:new_e_j + 1], nt, links)) * extract(f_i, f_j + 1, new_e_i, new_e_j, new_min_bound, wc + 1, links, nt, False) */ - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_links); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_links); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2026; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_6) { - __pyx_t_1 = PyObject_RichCompare(__pyx_v_f_j, __pyx_v_new_min_bound, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2018; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_RichCompare(__pyx_v_f_j, __pyx_v_new_min_bound, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2026; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2026; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_15 = __pyx_t_3; } else { @@ -63315,34 +63429,34 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc } if (__pyx_t_15) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2019 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2027 * # Require at least one word in phrase * if links and f_j >= new_min_bound: * rules.add(self.form_rule(f_i, new_e_i, f_words[f_i:f_j + 1], e_words[new_e_i:new_e_j + 1], nt, links)) # <<<<<<<<<<<<<< * extract(f_i, f_j + 1, new_e_i, new_e_j, new_min_bound, wc + 1, links, nt, False) * nt.pop() */ - if (unlikely(!__pyx_cur_scope->__pyx_v_rules)) { __Pyx_RaiseClosureNameError("rules"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2019; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + if (unlikely(!__pyx_cur_scope->__pyx_v_rules)) { __Pyx_RaiseClosureNameError("rules"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2027; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (unlikely(__pyx_cur_scope->__pyx_v_rules == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "add"); - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2019; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2027; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2019; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_form_rule); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2019; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2027; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_form_rule); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2027; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (unlikely(!__pyx_cur_scope->__pyx_v_f_words)) { __Pyx_RaiseClosureNameError("f_words"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2019; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_8 = PyNumber_Add(__pyx_v_f_j, __pyx_int_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2019; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_cur_scope->__pyx_v_f_words)) { __Pyx_RaiseClosureNameError("f_words"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2027; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + __pyx_t_8 = PyNumber_Add(__pyx_v_f_j, __pyx_int_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2027; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); - __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_cur_scope->__pyx_v_f_words, 0, 0, &__pyx_v_f_i, &__pyx_t_8, NULL, 0, 0, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2019; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_cur_scope->__pyx_v_f_words, 0, 0, &__pyx_v_f_i, &__pyx_t_8, NULL, 0, 0, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2027; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_cur_scope->__pyx_v_e_words)) { __Pyx_RaiseClosureNameError("e_words"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2019; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_8 = PyNumber_Add(__pyx_v_new_e_j, __pyx_int_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2019; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_cur_scope->__pyx_v_e_words)) { __Pyx_RaiseClosureNameError("e_words"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2027; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + __pyx_t_8 = PyNumber_Add(__pyx_v_new_e_j, __pyx_int_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2027; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); - __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_cur_scope->__pyx_v_e_words, 0, 0, &__pyx_v_new_e_i, &__pyx_t_8, NULL, 0, 0, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2019; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_cur_scope->__pyx_v_e_words, 0, 0, &__pyx_v_new_e_i, &__pyx_t_8, NULL, 0, 0, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2027; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = PyTuple_New(6); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2019; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = PyTuple_New(6); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2027; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_f_i); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_f_i); @@ -63362,56 +63476,56 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __Pyx_GIVEREF(__pyx_v_links); __pyx_t_4 = 0; __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2019; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2027; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_13 = PySet_Add(__pyx_cur_scope->__pyx_v_rules, __pyx_t_2); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2019; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_13 = PySet_Add(__pyx_cur_scope->__pyx_v_rules, __pyx_t_2); if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2027; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L37; } __pyx_L37:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2020 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2028 * if links and f_j >= new_min_bound: * rules.add(self.form_rule(f_i, new_e_i, f_words[f_i:f_j + 1], e_words[new_e_i:new_e_j + 1], nt, links)) * extract(f_i, f_j + 1, new_e_i, new_e_j, new_min_bound, wc + 1, links, nt, False) # <<<<<<<<<<<<<< * nt.pop() * span_dec(cover, link_i, link_j) */ - __pyx_t_2 = PyNumber_Add(__pyx_v_f_j, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2020; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyNumber_Add(__pyx_v_f_j, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2028; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_8 = PyNumber_Add(__pyx_v_wc, __pyx_int_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2020; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = PyNumber_Add(__pyx_v_wc, __pyx_int_1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2028; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); - if (unlikely(!__pyx_cur_scope->__pyx_v_extract)) { __Pyx_RaiseClosureNameError("extract"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2020; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_1 = __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instance_extract(__pyx_cur_scope->__pyx_v_extract, __pyx_v_f_i, __pyx_t_2, __pyx_v_new_e_i, __pyx_v_new_e_j, __pyx_v_new_min_bound, __pyx_t_8, __pyx_v_links, __pyx_v_nt, Py_False); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2020; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_cur_scope->__pyx_v_extract)) { __Pyx_RaiseClosureNameError("extract"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2028; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + __pyx_t_1 = __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instance_extract(__pyx_cur_scope->__pyx_v_extract, __pyx_v_f_i, __pyx_t_2, __pyx_v_new_e_i, __pyx_v_new_e_j, __pyx_v_new_min_bound, __pyx_t_8, __pyx_v_links, __pyx_v_nt, Py_False); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2028; __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_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2021 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2029 * rules.add(self.form_rule(f_i, new_e_i, f_words[f_i:f_j + 1], e_words[new_e_i:new_e_j + 1], nt, links)) * extract(f_i, f_j + 1, new_e_i, new_e_j, new_min_bound, wc + 1, links, nt, False) * nt.pop() # <<<<<<<<<<<<<< * span_dec(cover, link_i, link_j) * span_dec(e_nt_cover, link_i, link_j) */ - __pyx_t_1 = __Pyx_PyObject_Pop(__pyx_v_nt); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2021; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Pop(__pyx_v_nt); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2029; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2022 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2030 * extract(f_i, f_j + 1, new_e_i, new_e_j, new_min_bound, wc + 1, links, nt, False) * nt.pop() * span_dec(cover, link_i, link_j) # <<<<<<<<<<<<<< * span_dec(e_nt_cover, link_i, link_j) * */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_span_dec); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2022; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_span_dec); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (unlikely(!__pyx_cur_scope->__pyx_v_cover)) { __Pyx_RaiseClosureNameError("cover"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2022; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2022; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_cur_scope->__pyx_v_cover)) { __Pyx_RaiseClosureNameError("cover"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_cover); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_cur_scope->__pyx_v_cover); @@ -63422,23 +63536,23 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __Pyx_INCREF(__pyx_v_link_j); PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_v_link_j); __Pyx_GIVEREF(__pyx_v_link_j); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2022; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2023 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2031 * nt.pop() * span_dec(cover, link_i, link_j) * span_dec(e_nt_cover, link_i, link_j) # <<<<<<<<<<<<<< * * # Try to extract phrases from every f index */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_span_dec); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2023; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_span_dec); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2031; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - if (unlikely(!__pyx_cur_scope->__pyx_v_e_nt_cover)) { __Pyx_RaiseClosureNameError("e_nt_cover"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2023; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2023; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_cur_scope->__pyx_v_e_nt_cover)) { __Pyx_RaiseClosureNameError("e_nt_cover"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2031; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2031; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_e_nt_cover); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_cur_scope->__pyx_v_e_nt_cover); @@ -63449,7 +63563,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc __Pyx_INCREF(__pyx_v_link_j); PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_v_link_j); __Pyx_GIVEREF(__pyx_v_link_j); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2023; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2031; __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_8); __pyx_t_8 = 0; @@ -63458,7 +63572,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc } __pyx_L35:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1920 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1928 * # f_ i and j are current, e_ i and j are previous * # We care _considering_ f_j, so it is not yet in counts * def extract(f_i, f_j, e_i, e_j, min_bound, wc, links, nt, nt_open): # <<<<<<<<<<<<<< @@ -63492,7 +63606,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instanc return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1886 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1894 * # Aggregate stats from a training instance * # (Extract rules, update counts) * def add_instance(self, f_words, e_words, alignment, ctx_name=None): # <<<<<<<<<<<<<< @@ -63550,7 +63664,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc __Pyx_INCREF(__pyx_cur_scope->__pyx_v_e_words); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_e_words); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1888 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1896 * def add_instance(self, f_words, e_words, alignment, ctx_name=None): * * self.online = True # <<<<<<<<<<<<<< @@ -63559,20 +63673,20 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc */ __pyx_cur_scope->__pyx_v_self->online = 1; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1895 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1903 * # span more than once. * # (f, e, al, lex_f_i, lex_f_j) * rules = set() # <<<<<<<<<<<<<< * * f_len = len(f_words) */ - __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1895; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1903; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_v_rules = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1897 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1905 * rules = set() * * f_len = len(f_words) # <<<<<<<<<<<<<< @@ -63581,15 +63695,15 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc */ __pyx_t_1 = __pyx_cur_scope->__pyx_v_f_words; __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1897; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1905; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1897; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1905; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_v_f_len = __pyx_t_1; __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1898 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1906 * * f_len = len(f_words) * e_len = len(e_words) # <<<<<<<<<<<<<< @@ -63598,35 +63712,35 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc */ __pyx_t_1 = __pyx_cur_scope->__pyx_v_e_words; __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1898; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1898; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_e_len = __pyx_t_1; __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1901 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1909 * * # Pre-compute alignment info * al = [[] for i in range(f_len)] # <<<<<<<<<<<<<< * fe_span = [[e_len + 1, -1] for i in range(f_len)] * ef_span = [[f_len + 1, -1] for i in range(e_len)] */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1901; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1909; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1901; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1909; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_f_len); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_cur_scope->__pyx_v_f_len); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_f_len); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1901; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1909; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyList_CheckExact(__pyx_t_4) || PyTuple_CheckExact(__pyx_t_4)) { __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_2 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1901; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1909; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; } @@ -63635,16 +63749,16 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_3)) { if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1901; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1909; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1901; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1909; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_3)) { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1901; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1909; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1901; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1909; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_4 = __pyx_t_5(__pyx_t_3); @@ -63652,7 +63766,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc 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[8]; __pyx_lineno = 1901; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1909; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -63660,9 +63774,9 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc } __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1901; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1909; __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[8]; __pyx_lineno = 1901; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1909; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -63670,28 +63784,28 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc __pyx_cur_scope->__pyx_v_al = __pyx_t_1; __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1902 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1910 * # Pre-compute alignment info * al = [[] for i in range(f_len)] * fe_span = [[e_len + 1, -1] for i in range(f_len)] # <<<<<<<<<<<<<< * ef_span = [[f_len + 1, -1] for i in range(e_len)] * for f, e in alignment: */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1910; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1910; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_f_len); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_cur_scope->__pyx_v_f_len); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_f_len); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1910; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyList_CheckExact(__pyx_t_4) || PyTuple_CheckExact(__pyx_t_4)) { __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_2 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1910; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; } @@ -63700,16 +63814,16 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_3)) { if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1910; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1910; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_3)) { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1910; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1910; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_4 = __pyx_t_5(__pyx_t_3); @@ -63717,7 +63831,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc 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[8]; __pyx_lineno = 1902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1910; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -63725,9 +63839,9 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc } __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyNumber_Add(__pyx_v_e_len, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyNumber_Add(__pyx_v_e_len, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1910; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = PyList_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyList_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1910; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); @@ -63735,7 +63849,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc PyList_SET_ITEM(__pyx_t_6, 1, __pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); __pyx_t_4 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1910; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -63743,28 +63857,28 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc __pyx_cur_scope->__pyx_v_fe_span = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1903 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1911 * al = [[] for i in range(f_len)] * fe_span = [[e_len + 1, -1] for i in range(f_len)] * ef_span = [[f_len + 1, -1] for i in range(e_len)] # <<<<<<<<<<<<<< * for f, e in alignment: * al[f].append(e) */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1903; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1911; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1903; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1911; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_e_len); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_e_len); __Pyx_GIVEREF(__pyx_v_e_len); - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1903; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1911; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyList_CheckExact(__pyx_t_6) || PyTuple_CheckExact(__pyx_t_6)) { __pyx_t_3 = __pyx_t_6; __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_2 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1903; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1911; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; } @@ -63773,16 +63887,16 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_3)) { if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_6); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1903; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_6); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1911; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1903; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1911; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_3)) { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_6); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1903; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_6); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1911; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1903; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1911; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_6 = __pyx_t_5(__pyx_t_3); @@ -63790,7 +63904,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc 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[8]; __pyx_lineno = 1903; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1911; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -63798,9 +63912,9 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc } __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyNumber_Add(__pyx_cur_scope->__pyx_v_f_len, __pyx_int_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1903; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyNumber_Add(__pyx_cur_scope->__pyx_v_f_len, __pyx_int_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1911; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = PyList_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1903; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyList_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1911; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); @@ -63808,7 +63922,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc PyList_SET_ITEM(__pyx_t_4, 1, __pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); __pyx_t_6 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1903; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1911; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -63816,7 +63930,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc __pyx_cur_scope->__pyx_v_ef_span = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1904 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1912 * fe_span = [[e_len + 1, -1] for i in range(f_len)] * ef_span = [[f_len + 1, -1] for i in range(e_len)] * for f, e in alignment: # <<<<<<<<<<<<<< @@ -63827,7 +63941,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc __pyx_t_1 = __pyx_v_alignment; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_alignment); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1904; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_alignment); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1912; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; } @@ -63835,16 +63949,16 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_1)) { if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1904; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1912; __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[8]; __pyx_lineno = 1904; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1912; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_1)) { 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[8]; __pyx_lineno = 1904; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __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[8]; __pyx_lineno = 1912; __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[8]; __pyx_lineno = 1904; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1912; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_3 = __pyx_t_5(__pyx_t_1); @@ -63852,7 +63966,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc 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[8]; __pyx_lineno = 1904; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1912; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -63868,7 +63982,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1904; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1912; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { @@ -63881,15 +63995,15 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_6); #else - __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1904; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1912; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1904; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1912; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { Py_ssize_t index = -1; - __pyx_t_7 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1904; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1912; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext; @@ -63897,7 +64011,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc __Pyx_GOTREF(__pyx_t_4); index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L11_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1904; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1912; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L12_unpacking_done; @@ -63905,7 +64019,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1904; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1912; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L12_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_f, __pyx_t_4); @@ -63913,19 +64027,19 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc __Pyx_XDECREF_SET(__pyx_v_e, __pyx_t_6); __pyx_t_6 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1905 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1913 * ef_span = [[f_len + 1, -1] for i in range(e_len)] * for f, e in alignment: * al[f].append(e) # <<<<<<<<<<<<<< * fe_span[f][0] = min(fe_span[f][0], e) * fe_span[f][1] = max(fe_span[f][1], e) */ - __pyx_t_3 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_al, __pyx_v_f); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1905; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_3 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_al, __pyx_v_f); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1913; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); - __pyx_t_9 = __Pyx_PyObject_Append(__pyx_t_3, __pyx_v_e); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1905; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = __Pyx_PyObject_Append(__pyx_t_3, __pyx_v_e); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1913; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1906 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1914 * for f, e in alignment: * al[f].append(e) * fe_span[f][0] = min(fe_span[f][0], e) # <<<<<<<<<<<<<< @@ -63934,13 +64048,13 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc */ __Pyx_INCREF(__pyx_v_e); __pyx_t_3 = __pyx_v_e; - __pyx_t_6 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_fe_span, __pyx_v_f); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_6 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_fe_span, __pyx_v_f); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_6, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_6, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_7 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_LT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_LT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1914; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1914; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_10) { __Pyx_INCREF(__pyx_t_3); @@ -63954,13 +64068,13 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc __pyx_t_3 = __pyx_t_6; __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_fe_span, __pyx_v_f); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_6 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_fe_span, __pyx_v_f); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1914; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_6); - if (unlikely(__Pyx_SetItemInt(__pyx_t_6, 0, __pyx_t_3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(__Pyx_SetItemInt(__pyx_t_6, 0, __pyx_t_3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1914; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1907 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1915 * al[f].append(e) * fe_span[f][0] = min(fe_span[f][0], e) * fe_span[f][1] = max(fe_span[f][1], e) # <<<<<<<<<<<<<< @@ -63969,13 +64083,13 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc */ __Pyx_INCREF(__pyx_v_e); __pyx_t_3 = __pyx_v_e; - __pyx_t_6 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_fe_span, __pyx_v_f); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_6 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_fe_span, __pyx_v_f); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_6, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_6, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_7 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1907; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1907; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1915; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1915; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_10) { __Pyx_INCREF(__pyx_t_3); @@ -63989,13 +64103,13 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc __pyx_t_3 = __pyx_t_6; __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_fe_span, __pyx_v_f); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1907; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_6 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_fe_span, __pyx_v_f); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1915; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_6); - if (unlikely(__Pyx_SetItemInt(__pyx_t_6, 1, __pyx_t_3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1907; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(__Pyx_SetItemInt(__pyx_t_6, 1, __pyx_t_3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1915; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1908 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1916 * fe_span[f][0] = min(fe_span[f][0], e) * fe_span[f][1] = max(fe_span[f][1], e) * ef_span[e][0] = min(ef_span[e][0], f) # <<<<<<<<<<<<<< @@ -64004,13 +64118,13 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc */ __Pyx_INCREF(__pyx_v_f); __pyx_t_3 = __pyx_v_f; - __pyx_t_6 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_ef_span, __pyx_v_e); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_6 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_ef_span, __pyx_v_e); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1916; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_6, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_6, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1916; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_7 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_LT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1908; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1908; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_LT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1916; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1916; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_10) { __Pyx_INCREF(__pyx_t_3); @@ -64024,13 +64138,13 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc __pyx_t_3 = __pyx_t_6; __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_ef_span, __pyx_v_e); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1908; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_6 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_ef_span, __pyx_v_e); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1916; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_6); - if (unlikely(__Pyx_SetItemInt(__pyx_t_6, 0, __pyx_t_3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1908; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(__Pyx_SetItemInt(__pyx_t_6, 0, __pyx_t_3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1916; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1909 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1917 * fe_span[f][1] = max(fe_span[f][1], e) * ef_span[e][0] = min(ef_span[e][0], f) * ef_span[e][1] = max(ef_span[e][1], f) # <<<<<<<<<<<<<< @@ -64039,13 +64153,13 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc */ __Pyx_INCREF(__pyx_v_f); __pyx_t_3 = __pyx_v_f; - __pyx_t_6 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_ef_span, __pyx_v_e); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1909; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_6 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_ef_span, __pyx_v_e); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_6, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1909; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_6, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_7 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1909; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1909; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1917; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1917; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_10) { __Pyx_INCREF(__pyx_t_3); @@ -64059,27 +64173,27 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc __pyx_t_3 = __pyx_t_6; __Pyx_INCREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_ef_span, __pyx_v_e); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1909; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_6 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_ef_span, __pyx_v_e); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_6); - if (unlikely(__Pyx_SetItemInt(__pyx_t_6, 1, __pyx_t_3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1909; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(__Pyx_SetItemInt(__pyx_t_6, 1, __pyx_t_3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1917; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1912 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1920 * * # Target side word coverage * cover = [0] * e_len # <<<<<<<<<<<<<< * # Non-terminal coverage * f_nt_cover = [0] * f_len */ - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1912; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1920; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_int_0); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); - { PyObject* __pyx_temp = PyNumber_InPlaceMultiply(__pyx_t_1, __pyx_v_e_len); if (unlikely(!__pyx_temp)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1912; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + { PyObject* __pyx_temp = PyNumber_InPlaceMultiply(__pyx_t_1, __pyx_v_e_len); if (unlikely(!__pyx_temp)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1920; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_temp); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = __pyx_temp; @@ -64088,19 +64202,19 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc __pyx_cur_scope->__pyx_v_cover = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1914 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1922 * cover = [0] * e_len * # Non-terminal coverage * f_nt_cover = [0] * f_len # <<<<<<<<<<<<<< * e_nt_cover = [0] * e_len * */ - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1914; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1922; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_int_0); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); - { PyObject* __pyx_temp = PyNumber_InPlaceMultiply(__pyx_t_1, __pyx_cur_scope->__pyx_v_f_len); if (unlikely(!__pyx_temp)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1914; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + { PyObject* __pyx_temp = PyNumber_InPlaceMultiply(__pyx_t_1, __pyx_cur_scope->__pyx_v_f_len); if (unlikely(!__pyx_temp)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1922; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_temp); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = __pyx_temp; @@ -64108,19 +64222,19 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc __pyx_v_f_nt_cover = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1915 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1923 * # Non-terminal coverage * f_nt_cover = [0] * f_len * e_nt_cover = [0] * e_len # <<<<<<<<<<<<<< * * # Extract all possible hierarchical phrases starting at a source index */ - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1915; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1923; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_int_0); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); - { PyObject* __pyx_temp = PyNumber_InPlaceMultiply(__pyx_t_1, __pyx_v_e_len); if (unlikely(!__pyx_temp)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1915; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + { PyObject* __pyx_temp = PyNumber_InPlaceMultiply(__pyx_t_1, __pyx_v_e_len); if (unlikely(!__pyx_temp)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1923; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_temp); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = __pyx_temp; @@ -64129,44 +64243,44 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc __pyx_cur_scope->__pyx_v_e_nt_cover = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1920 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1928 * # f_ i and j are current, e_ i and j are previous * # We care _considering_ f_j, so it is not yet in counts * def extract(f_i, f_j, e_i, e_j, min_bound, wc, links, nt, nt_open): # <<<<<<<<<<<<<< * # Phrase extraction limits * if f_j > (f_len - 1) or (f_j - f_i) + 1 > self.max_initial_size: */ - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instance_1extract, 0, __pyx_n_s_add_instance_locals_extract, ((PyObject*)__pyx_cur_scope), __pyx_n_s_cdec_sa__sa, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__69)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1920; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instance_1extract, 0, __pyx_n_s_add_instance_locals_extract, ((PyObject*)__pyx_cur_scope), __pyx_n_s_cdec_sa__sa, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__69)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1928; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_v_extract = __pyx_t_1; __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2026 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2034 * * # Try to extract phrases from every f index * for f_i from 0 <= f_i < f_len: # <<<<<<<<<<<<<< * # Skip if phrases won't be tight on left side * if not al[f_i]: */ - __pyx_t_11 = __Pyx_PyInt_As_long(__pyx_cur_scope->__pyx_v_f_len); if (unlikely((__pyx_t_11 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2026; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = __Pyx_PyInt_As_long(__pyx_cur_scope->__pyx_v_f_len); if (unlikely((__pyx_t_11 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2034; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_v_f_i = 0; __pyx_v_f_i < __pyx_t_11; __pyx_v_f_i++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2028 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2036 * for f_i from 0 <= f_i < f_len: * # Skip if phrases won't be tight on left side * if not al[f_i]: # <<<<<<<<<<<<<< * continue * extract(f_i, f_i, f_len + 1, -1, f_i, 0, [], [], False) */ - __pyx_t_1 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_al, __pyx_v_f_i, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2028; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_al, __pyx_v_f_i, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2036; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2028; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2036; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_12 = ((!__pyx_t_10) != 0); if (__pyx_t_12) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2029 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2037 * # Skip if phrases won't be tight on left side * if not al[f_i]: * continue # <<<<<<<<<<<<<< @@ -64176,26 +64290,26 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc goto __pyx_L13_continue; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2030 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2038 * if not al[f_i]: * continue * extract(f_i, f_i, f_len + 1, -1, f_i, 0, [], [], False) # <<<<<<<<<<<<<< * * stats = self.online_stats[ctx_name] */ - __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v_f_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v_f_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2038; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v_f_i); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v_f_i); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2038; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = PyNumber_Add(__pyx_cur_scope->__pyx_v_f_len, __pyx_int_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyNumber_Add(__pyx_cur_scope->__pyx_v_f_len, __pyx_int_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2038; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = __Pyx_PyInt_From_long(__pyx_v_f_i); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyInt_From_long(__pyx_v_f_i); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2038; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2038; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); - __pyx_t_13 = PyList_New(0); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_13 = PyList_New(0); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2038; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); - __pyx_t_14 = __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instance_extract(__pyx_cur_scope->__pyx_v_extract, __pyx_t_1, __pyx_t_3, __pyx_t_6, __pyx_int_neg_1, __pyx_t_4, __pyx_int_0, __pyx_t_7, __pyx_t_13, Py_False); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2030; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_14 = __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_12add_instance_extract(__pyx_cur_scope->__pyx_v_extract, __pyx_t_1, __pyx_t_3, __pyx_t_6, __pyx_int_neg_1, __pyx_t_4, __pyx_int_0, __pyx_t_7, __pyx_t_13, Py_False); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2038; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -64207,33 +64321,33 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc __pyx_L13_continue:; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2032 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2040 * extract(f_i, f_i, f_len + 1, -1, f_i, 0, [], [], False) * * stats = self.online_stats[ctx_name] # <<<<<<<<<<<<<< * * # Update possible phrases (samples) */ - __pyx_t_14 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_self->online_stats, __pyx_v_ctx_name); if (unlikely(__pyx_t_14 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2032; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_14 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_self->online_stats, __pyx_v_ctx_name); if (unlikely(__pyx_t_14 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_14); __pyx_v_stats = __pyx_t_14; __pyx_t_14 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2037 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2045 * # This could be more efficiently integrated with extraction * # at the cost of readability * for f, lex_i, lex_j in self.get_f_phrases(f_words): # <<<<<<<<<<<<<< * stats.samples_f[f] += 1 * */ - __pyx_t_14 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_get_f_phrases); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2037; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_get_f_phrases); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2045; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); - __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2037; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2045; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_f_words); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_cur_scope->__pyx_v_f_words); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_f_words); - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_13, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2037; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_13, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2045; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; @@ -64241,7 +64355,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc __pyx_t_13 = __pyx_t_7; __Pyx_INCREF(__pyx_t_13); __pyx_t_2 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_2 = -1; __pyx_t_13 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2037; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = -1; __pyx_t_13 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2045; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_5 = Py_TYPE(__pyx_t_13)->tp_iternext; } @@ -64250,16 +64364,16 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_13)) { if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_13)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_7 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_2); __Pyx_INCREF(__pyx_t_7); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2037; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_2); __Pyx_INCREF(__pyx_t_7); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2045; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_7 = PySequence_ITEM(__pyx_t_13, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2037; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = PySequence_ITEM(__pyx_t_13, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2045; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_13)) { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_13)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_13, __pyx_t_2); __Pyx_INCREF(__pyx_t_7); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2037; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_13, __pyx_t_2); __Pyx_INCREF(__pyx_t_7); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2045; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_7 = PySequence_ITEM(__pyx_t_13, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2037; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = PySequence_ITEM(__pyx_t_13, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2045; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_7 = __pyx_t_5(__pyx_t_13); @@ -64267,7 +64381,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc 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[8]; __pyx_lineno = 2037; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2045; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -64283,7 +64397,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2037; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2045; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { @@ -64299,17 +64413,17 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_6); #else - __pyx_t_14 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2037; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_14 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2045; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); - __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2037; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2045; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2037; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2045; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else { Py_ssize_t index = -1; - __pyx_t_3 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2037; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2045; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = Py_TYPE(__pyx_t_3)->tp_iternext; @@ -64319,7 +64433,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc __Pyx_GOTREF(__pyx_t_4); index = 2; __pyx_t_6 = __pyx_t_8(__pyx_t_3); if (unlikely(!__pyx_t_6)) goto __pyx_L18_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_3), 3) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2037; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_3), 3) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2045; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L19_unpacking_done; @@ -64327,7 +64441,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2037; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2045; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L19_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_f, __pyx_t_14); @@ -64337,37 +64451,37 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc __Pyx_XDECREF_SET(__pyx_v_lex_j, __pyx_t_6); __pyx_t_6 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2038 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2046 * # at the cost of readability * for f, lex_i, lex_j in self.get_f_phrases(f_words): * stats.samples_f[f] += 1 # <<<<<<<<<<<<<< * * # Update phrase counts */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_stats, __pyx_n_s_samples_f); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2038; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_stats, __pyx_n_s_samples_f); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_v_f); __pyx_t_6 = __pyx_v_f; - __pyx_t_4 = PyObject_GetItem(__pyx_t_7, __pyx_t_6); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2038; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_4 = PyObject_GetItem(__pyx_t_7, __pyx_t_6); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2046; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); - __pyx_t_14 = PyNumber_InPlaceAdd(__pyx_t_4, __pyx_int_1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2038; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_14 = PyNumber_InPlaceAdd(__pyx_t_4, __pyx_int_1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(PyObject_SetItem(__pyx_t_7, __pyx_t_6, __pyx_t_14) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2038; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(PyObject_SetItem(__pyx_t_7, __pyx_t_6, __pyx_t_14) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2041 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2049 * * # Update phrase counts * for rule in rules: # <<<<<<<<<<<<<< * (f_ph, e_ph, al) = rule[:3] * stats.phrases_f[f_ph] += 1 */ - __pyx_t_13 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_rules); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2041; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_13 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_rules); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2049; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); __pyx_t_5 = Py_TYPE(__pyx_t_13)->tp_iternext; for (;;) { @@ -64377,7 +64491,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc 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[8]; __pyx_lineno = 2041; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2049; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -64386,14 +64500,14 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc __Pyx_XDECREF_SET(__pyx_v_rule, __pyx_t_7); __pyx_t_7 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2042 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2050 * # Update phrase counts * for rule in rules: * (f_ph, e_ph, al) = rule[:3] # <<<<<<<<<<<<<< * stats.phrases_f[f_ph] += 1 * stats.phrases_e[e_ph] += 1 */ - __pyx_t_7 = __Pyx_PyObject_GetSlice(__pyx_v_rule, 0, 3, NULL, NULL, &__pyx_slice__70, 0, 1, 1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2042; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyObject_GetSlice(__pyx_v_rule, 0, 3, NULL, NULL, &__pyx_slice__70, 0, 1, 1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2050; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); if ((likely(PyTuple_CheckExact(__pyx_t_7))) || (PyList_CheckExact(__pyx_t_7))) { PyObject* sequence = __pyx_t_7; @@ -64405,7 +64519,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2042; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2050; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { @@ -64421,17 +64535,17 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc __Pyx_INCREF(__pyx_t_14); __Pyx_INCREF(__pyx_t_4); #else - __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2042; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2050; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - __pyx_t_14 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2042; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_14 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2050; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); - __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2042; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2050; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else { Py_ssize_t index = -1; - __pyx_t_3 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2042; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2050; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = Py_TYPE(__pyx_t_3)->tp_iternext; @@ -64441,7 +64555,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc __Pyx_GOTREF(__pyx_t_14); index = 2; __pyx_t_4 = __pyx_t_8(__pyx_t_3); if (unlikely(!__pyx_t_4)) goto __pyx_L22_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_3), 3) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2042; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_3), 3) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2050; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L23_unpacking_done; @@ -64449,7 +64563,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2042; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2050; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L23_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_f_ph, __pyx_t_6); @@ -64461,105 +64575,105 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2043 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2051 * for rule in rules: * (f_ph, e_ph, al) = rule[:3] * stats.phrases_f[f_ph] += 1 # <<<<<<<<<<<<<< * stats.phrases_e[e_ph] += 1 * stats.phrases_fe[f_ph][e_ph] += 1 */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_stats, __pyx_n_s_phrases_f); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2043; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_stats, __pyx_n_s_phrases_f); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2051; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_v_f_ph); __pyx_t_4 = __pyx_v_f_ph; - __pyx_t_14 = PyObject_GetItem(__pyx_t_7, __pyx_t_4); if (unlikely(__pyx_t_14 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2043; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_14 = PyObject_GetItem(__pyx_t_7, __pyx_t_4); if (unlikely(__pyx_t_14 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2051; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_14); - __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_t_14, __pyx_int_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2043; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_t_14, __pyx_int_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2051; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - if (unlikely(PyObject_SetItem(__pyx_t_7, __pyx_t_4, __pyx_t_6) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2043; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(PyObject_SetItem(__pyx_t_7, __pyx_t_4, __pyx_t_6) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2051; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2044 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2052 * (f_ph, e_ph, al) = rule[:3] * stats.phrases_f[f_ph] += 1 * stats.phrases_e[e_ph] += 1 # <<<<<<<<<<<<<< * stats.phrases_fe[f_ph][e_ph] += 1 * if not stats.phrases_al[f_ph][e_ph]: */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_stats, __pyx_n_s_phrases_e); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2044; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_stats, __pyx_n_s_phrases_e); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2052; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_v_e_ph); __pyx_t_4 = __pyx_v_e_ph; - __pyx_t_6 = PyObject_GetItem(__pyx_t_7, __pyx_t_4); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2044; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_6 = PyObject_GetItem(__pyx_t_7, __pyx_t_4); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_6); - __pyx_t_14 = PyNumber_InPlaceAdd(__pyx_t_6, __pyx_int_1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2044; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_14 = PyNumber_InPlaceAdd(__pyx_t_6, __pyx_int_1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2052; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(PyObject_SetItem(__pyx_t_7, __pyx_t_4, __pyx_t_14) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2044; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(PyObject_SetItem(__pyx_t_7, __pyx_t_4, __pyx_t_14) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2052; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2045 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2053 * stats.phrases_f[f_ph] += 1 * stats.phrases_e[e_ph] += 1 * stats.phrases_fe[f_ph][e_ph] += 1 # <<<<<<<<<<<<<< * if not stats.phrases_al[f_ph][e_ph]: * stats.phrases_al[f_ph][e_ph] = al */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_stats, __pyx_n_s_phrases_fe); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2045; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_stats, __pyx_n_s_phrases_fe); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2053; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); - __pyx_t_4 = PyObject_GetItem(__pyx_t_7, __pyx_v_f_ph); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2045; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_4 = PyObject_GetItem(__pyx_t_7, __pyx_v_f_ph); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2053; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_INCREF(__pyx_v_e_ph); __pyx_t_7 = __pyx_v_e_ph; - __pyx_t_14 = PyObject_GetItem(__pyx_t_4, __pyx_t_7); if (unlikely(__pyx_t_14 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2045; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_14 = PyObject_GetItem(__pyx_t_4, __pyx_t_7); if (unlikely(__pyx_t_14 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2053; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_14); - __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_t_14, __pyx_int_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2045; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_t_14, __pyx_int_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2053; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - if (unlikely(PyObject_SetItem(__pyx_t_4, __pyx_t_7, __pyx_t_6) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2045; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(PyObject_SetItem(__pyx_t_4, __pyx_t_7, __pyx_t_6) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2053; __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; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2046 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2054 * stats.phrases_e[e_ph] += 1 * stats.phrases_fe[f_ph][e_ph] += 1 * if not stats.phrases_al[f_ph][e_ph]: # <<<<<<<<<<<<<< * stats.phrases_al[f_ph][e_ph] = al * */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_stats, __pyx_n_s_phrases_al); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_stats, __pyx_n_s_phrases_al); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2054; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = PyObject_GetItem(__pyx_t_4, __pyx_v_f_ph); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2046; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_7 = PyObject_GetItem(__pyx_t_4, __pyx_v_f_ph); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyObject_GetItem(__pyx_t_7, __pyx_v_e_ph); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2046; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_4 = PyObject_GetItem(__pyx_t_7, __pyx_v_e_ph); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2054; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_12 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2054; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_10 = ((!__pyx_t_12) != 0); if (__pyx_t_10) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2047 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2055 * stats.phrases_fe[f_ph][e_ph] += 1 * if not stats.phrases_al[f_ph][e_ph]: * stats.phrases_al[f_ph][e_ph] = al # <<<<<<<<<<<<<< * - * # Update bilexical dictionary (if exists) + * # Update bilexical dictionary */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_stats, __pyx_n_s_phrases_al); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2047; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_stats, __pyx_n_s_phrases_al); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2055; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = PyObject_GetItem(__pyx_t_4, __pyx_v_f_ph); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2047; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_7 = PyObject_GetItem(__pyx_t_4, __pyx_v_f_ph); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2055; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(PyObject_SetItem(__pyx_t_7, __pyx_v_e_ph, __pyx_cur_scope->__pyx_v_al) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2047; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(PyObject_SetItem(__pyx_t_7, __pyx_v_e_ph, __pyx_cur_scope->__pyx_v_al) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2055; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L24; } @@ -64567,65 +64681,36 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2050 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2058 * - * # Update bilexical dictionary (if exists) - * if self.bilex: # <<<<<<<<<<<<<< - * self.bilex.update(f_words, e_words, alignment) - * else: - */ - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_self->bilex); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2050; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__pyx_t_10) { - - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2051 - * # Update bilexical dictionary (if exists) - * if self.bilex: - * self.bilex.update(f_words, e_words, alignment) # <<<<<<<<<<<<<< - * else: - * logger.warning('No online bilexical dictionary specified, not updating lexical weights') - */ - __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->bilex, __pyx_n_s_update); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2051; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_13); - __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2051; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_7); - __Pyx_INCREF(__pyx_cur_scope->__pyx_v_f_words); - PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_cur_scope->__pyx_v_f_words); - __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_f_words); - __Pyx_INCREF(__pyx_cur_scope->__pyx_v_e_words); - PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_cur_scope->__pyx_v_e_words); - __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_e_words); - __Pyx_INCREF(__pyx_v_alignment); - PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_v_alignment); - __Pyx_GIVEREF(__pyx_v_alignment); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2051; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - goto __pyx_L25; - } - /*else*/ { - - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2053 - * self.bilex.update(f_words, e_words, alignment) - * else: - * logger.warning('No online bilexical dictionary specified, not updating lexical weights') # <<<<<<<<<<<<<< + * # Update bilexical dictionary + * stats.bilex.update(f_words, e_words, alignment) # <<<<<<<<<<<<<< * * # Create a rule from source, target, non-terminals, and alignments */ - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_logger); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2053; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_warning); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2053; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__71, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2053; __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_4); __pyx_t_4 = 0; - } - __pyx_L25:; + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_stats, __pyx_n_s_bilex); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2058; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2058; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_13 = PyTuple_New(3); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2058; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_13); + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_f_words); + PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_cur_scope->__pyx_v_f_words); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_f_words); + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_e_words); + PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_cur_scope->__pyx_v_e_words); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_e_words); + __Pyx_INCREF(__pyx_v_alignment); + PyTuple_SET_ITEM(__pyx_t_13, 2, __pyx_v_alignment); + __Pyx_GIVEREF(__pyx_v_alignment); + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_13, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2058; __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_13); __pyx_t_13 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1886 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1894 * # Aggregate stats from a training instance * # (Extract rules, update counts) * def add_instance(self, f_words, e_words, alignment, ctx_name=None): # <<<<<<<<<<<<<< @@ -64664,7 +64749,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_25add_instanc return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2056 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2061 * * # Create a rule from source, target, non-terminals, and alignments * def form_rule(self, f_i, e_i, f_span, e_span, nt, al): # <<<<<<<<<<<<<< @@ -64711,31 +64796,31 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_28form_rule(P case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_e_i)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("form_rule", 1, 6, 6, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2056; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("form_rule", 1, 6, 6, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2061; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_f_span)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("form_rule", 1, 6, 6, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2056; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("form_rule", 1, 6, 6, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2061; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_e_span)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("form_rule", 1, 6, 6, 3); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2056; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("form_rule", 1, 6, 6, 3); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2061; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nt)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("form_rule", 1, 6, 6, 4); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2056; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("form_rule", 1, 6, 6, 4); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2061; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 5: if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_al)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("form_rule", 1, 6, 6, 5); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2056; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("form_rule", 1, 6, 6, 5); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2061; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "form_rule") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2056; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "form_rule") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2061; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 6) { goto __pyx_L5_argtuple_error; @@ -64756,7 +64841,7 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_28form_rule(P } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("form_rule", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2056; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("form_rule", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2061; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.form_rule", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -64769,7 +64854,7 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_28form_rule(P return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2059 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2064 * * # Substitute in non-terminals * nt_inv = sorted(nt, cmp=lambda x, y: cmp(x[3], y[3])) # <<<<<<<<<<<<<< @@ -64809,11 +64894,11 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_9form_rule_la case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("lambda6", 1, 2, 2, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2059; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("lambda6", 1, 2, 2, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2064; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "lambda6") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2059; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "lambda6") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2064; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -64826,7 +64911,7 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_9form_rule_la } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("lambda6", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2059; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("lambda6", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2064; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.form_rule.lambda6", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -64850,11 +64935,11 @@ static PyObject *__pyx_lambda_funcdef_lambda6(CYTHON_UNUSED PyObject *__pyx_self int __pyx_clineno = 0; __Pyx_RefNannySetupContext("lambda6", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_x, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_x, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2064; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_y, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2059; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_y, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2064; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2059; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2064; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -64862,7 +64947,7 @@ static PyObject *__pyx_lambda_funcdef_lambda6(CYTHON_UNUSED PyObject *__pyx_self __Pyx_GIVEREF(__pyx_t_2); __pyx_t_1 = 0; __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_cmp, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2059; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_cmp, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2064; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; @@ -64882,7 +64967,7 @@ static PyObject *__pyx_lambda_funcdef_lambda6(CYTHON_UNUSED PyObject *__pyx_self return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2083 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2088 * # Adjusting alignment links takes some doing * links = [list(link) for sub in al for link in sub] * links_inv = sorted(links, cmp=lambda x, y: cmp(x[1], y[1])) # <<<<<<<<<<<<<< @@ -64922,11 +65007,11 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_9form_rule_1l case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("lambda7", 1, 2, 2, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2083; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("lambda7", 1, 2, 2, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2088; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "lambda7") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2083; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "lambda7") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2088; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -64939,7 +65024,7 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_9form_rule_1l } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("lambda7", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2083; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("lambda7", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2088; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.form_rule.lambda7", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -64963,11 +65048,11 @@ static PyObject *__pyx_lambda_funcdef_lambda7(CYTHON_UNUSED PyObject *__pyx_self int __pyx_clineno = 0; __Pyx_RefNannySetupContext("lambda7", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_x, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_x, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2088; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_y, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_y, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2088; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2083; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -64975,7 +65060,7 @@ static PyObject *__pyx_lambda_funcdef_lambda7(CYTHON_UNUSED PyObject *__pyx_self __Pyx_GIVEREF(__pyx_t_2); __pyx_t_1 = 0; __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_cmp, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2083; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_cmp, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; @@ -64996,7 +65081,7 @@ static PyObject *__pyx_lambda_funcdef_lambda7(CYTHON_UNUSED PyObject *__pyx_self } static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_9form_rule_4generator15(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2117 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2122 * f = Phrase(f_sym) * e = Phrase(e_sym) * a = tuple(self.alignment.link(i, j) for i, j in links) # <<<<<<<<<<<<<< @@ -65022,7 +65107,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_9form_rule_2g __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); { - __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_9form_rule_4generator15, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_9form_rule_4generator15, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -65067,19 +65152,19 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_9form_rule_4g return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_links)) { __Pyx_RaiseClosureNameError("links"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_links)) { __Pyx_RaiseClosureNameError("links"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_links == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_links; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; for (;;) { if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2122; __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[8]; __pyx_lineno = 2117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) { PyObject* sequence = __pyx_t_3; @@ -65091,7 +65176,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_9form_rule_4g if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { @@ -65104,15 +65189,15 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_9form_rule_4g __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); #else - __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); #endif __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { Py_ssize_t index = -1; - __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext; @@ -65120,7 +65205,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_9form_rule_4g __Pyx_GOTREF(__pyx_t_4); index = 1; __pyx_t_5 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = NULL; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L7_unpacking_done; @@ -65128,7 +65213,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_9form_rule_4g __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L7_unpacking_done:; } __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_i); @@ -65139,10 +65224,10 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_9form_rule_4g __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_j, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_cur_scope->__pyx_v_i); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_cur_scope->__pyx_v_j); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_3 = __Pyx_PyInt_From_int(((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Alignment *)__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->alignment->__pyx_vtab)->link(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->alignment, __pyx_t_8, __pyx_t_9)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_cur_scope->__pyx_v_i); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_cur_scope->__pyx_v_j); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyInt_From_int(((struct __pyx_vtabstruct_4cdec_2sa_3_sa_Alignment *)__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->alignment->__pyx_vtab)->link(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->alignment, __pyx_t_8, __pyx_t_9)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; @@ -65159,7 +65244,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_9form_rule_4g __pyx_cur_scope->__pyx_t_0 = 0; __Pyx_XGOTREF(__pyx_t_1); __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -65181,7 +65266,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_9form_rule_4g return NULL; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2056 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2061 * * # Create a rule from source, target, non-terminals, and alignments * def form_rule(self, f_i, e_i, f_span, e_span, nt, al): # <<<<<<<<<<<<<< @@ -65238,52 +65323,52 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2059 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2064 * * # Substitute in non-terminals * nt_inv = sorted(nt, cmp=lambda x, y: cmp(x[3], y[3])) # <<<<<<<<<<<<<< * f_sym = list(f_span[:]) * off = f_i */ - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2059; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2064; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_nt); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_nt); __Pyx_GIVEREF(__pyx_v_nt); - __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2059; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2064; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cdec_2sa_3_sa_23HieroCachingRuleFactory_9form_rule_lambda6, 0, __pyx_n_s_form_rule_locals_lambda, NULL, __pyx_n_s_cdec_sa__sa, PyModule_GetDict(__pyx_m), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2059; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cdec_2sa_3_sa_23HieroCachingRuleFactory_9form_rule_lambda6, 0, __pyx_n_s_form_rule_locals_lambda, NULL, __pyx_n_s_cdec_sa__sa, PyModule_GetDict(__pyx_m), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2064; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_cmp, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2059; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_cmp, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2064; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_sorted, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2059; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_sorted, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2064; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_nt_inv = __pyx_t_3; __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2060 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2065 * # Substitute in non-terminals * nt_inv = sorted(nt, cmp=lambda x, y: cmp(x[3], y[3])) * f_sym = list(f_span[:]) # <<<<<<<<<<<<<< * off = f_i * for next_nt in nt: */ - __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_f_span, 0, 0, NULL, NULL, &__pyx_slice__72, 0, 0, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2060; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_f_span, 0, 0, NULL, NULL, &__pyx_slice__71, 0, 0, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2065; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2060; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2065; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2060; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2065; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_f_sym = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2061 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2066 * nt_inv = sorted(nt, cmp=lambda x, y: cmp(x[3], y[3])) * f_sym = list(f_span[:]) * off = f_i # <<<<<<<<<<<<<< @@ -65293,7 +65378,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __Pyx_INCREF(__pyx_v_f_i); __pyx_v_off = __pyx_v_f_i; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2062 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2067 * f_sym = list(f_span[:]) * off = f_i * for next_nt in nt: # <<<<<<<<<<<<<< @@ -65304,7 +65389,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __pyx_t_3 = __pyx_v_nt; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_nt); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2062; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_nt); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2067; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; } @@ -65312,16 +65397,16 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_3)) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2062; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2067; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2062; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2067; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_3)) { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2062; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2067; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2062; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2067; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_2 = __pyx_t_5(__pyx_t_3); @@ -65329,7 +65414,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s 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[8]; __pyx_lineno = 2062; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2067; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -65338,28 +65423,28 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __Pyx_XDECREF_SET(__pyx_v_next_nt, __pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2063 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2068 * off = f_i * for next_nt in nt: * nt_len = (next_nt[2] - next_nt[1]) + 1 # <<<<<<<<<<<<<< * i = 0 * while i < nt_len: */ - __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_next_nt, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2063; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_next_nt, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2068; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_next_nt, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2063; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_next_nt, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2068; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PyNumber_Subtract(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2063; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyNumber_Subtract(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2068; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyNumber_Add(__pyx_t_6, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2063; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyNumber_Add(__pyx_t_6, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2068; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF_SET(__pyx_v_nt_len, __pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2064 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2069 * for next_nt in nt: * nt_len = (next_nt[2] - next_nt[1]) + 1 * i = 0 # <<<<<<<<<<<<<< @@ -65369,7 +65454,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __Pyx_INCREF(__pyx_int_0); __Pyx_XDECREF_SET(__pyx_v_i, __pyx_int_0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2065 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2070 * nt_len = (next_nt[2] - next_nt[1]) + 1 * i = 0 * while i < nt_len: # <<<<<<<<<<<<<< @@ -65377,75 +65462,75 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s * i += 1 */ while (1) { - __pyx_t_1 = PyObject_RichCompare(__pyx_v_i, __pyx_v_nt_len, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2065; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2065; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_RichCompare(__pyx_v_i, __pyx_v_nt_len, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2070; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2070; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!__pyx_t_7) break; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2066 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2071 * i = 0 * while i < nt_len: * f_sym.pop(next_nt[1] - off) # <<<<<<<<<<<<<< * i += 1 * f_sym.insert(next_nt[1] - off, sym_setindex(self.category, next_nt[0])) */ - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_next_nt, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2066; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_next_nt, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PyNumber_Subtract(__pyx_t_1, __pyx_v_off); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2066; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyNumber_Subtract(__pyx_t_1, __pyx_v_off); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2066; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_t_6); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyList_PopIndex(__pyx_v_f_sym, __pyx_t_8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2066; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyList_PopIndex(__pyx_v_f_sym, __pyx_t_8); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2071; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2067 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2072 * while i < nt_len: * f_sym.pop(next_nt[1] - off) * i += 1 # <<<<<<<<<<<<<< * f_sym.insert(next_nt[1] - off, sym_setindex(self.category, next_nt[0])) * off += (nt_len - 1) */ - __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_v_i, __pyx_int_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2067; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_v_i, __pyx_int_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2072; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF_SET(__pyx_v_i, __pyx_t_6); __pyx_t_6 = 0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2068 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2073 * f_sym.pop(next_nt[1] - off) * i += 1 * f_sym.insert(next_nt[1] - off, sym_setindex(self.category, next_nt[0])) # <<<<<<<<<<<<<< * off += (nt_len - 1) * e_sym = list(e_span[:]) */ - __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_next_nt, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2068; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_next_nt, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2073; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = PyNumber_Subtract(__pyx_t_6, __pyx_v_off); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2068; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyNumber_Subtract(__pyx_t_6, __pyx_v_off); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2073; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2068; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2073; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_next_nt, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2068; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_next_nt, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2073; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2068; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2073; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_cur_scope->__pyx_v_self->category, __pyx_t_9)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2068; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_cur_scope->__pyx_v_self->category, __pyx_t_9)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2073; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_10 = PyList_Insert(__pyx_v_f_sym, __pyx_t_8, __pyx_t_1); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2068; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = PyList_Insert(__pyx_v_f_sym, __pyx_t_8, __pyx_t_1); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2073; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2069 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2074 * i += 1 * f_sym.insert(next_nt[1] - off, sym_setindex(self.category, next_nt[0])) * off += (nt_len - 1) # <<<<<<<<<<<<<< * e_sym = list(e_span[:]) * off = e_i */ - __pyx_t_1 = PyNumber_Subtract(__pyx_v_nt_len, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2069; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyNumber_Subtract(__pyx_v_nt_len, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2074; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_v_off, __pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2069; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_v_off, __pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2074; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_off, __pyx_t_6); @@ -65453,27 +65538,27 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2070 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2075 * f_sym.insert(next_nt[1] - off, sym_setindex(self.category, next_nt[0])) * off += (nt_len - 1) * e_sym = list(e_span[:]) # <<<<<<<<<<<<<< * off = e_i * for next_nt in nt_inv: */ - __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_e_span, 0, 0, NULL, NULL, &__pyx_slice__73, 0, 0, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2070; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_e_span, 0, 0, NULL, NULL, &__pyx_slice__72, 0, 0, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2075; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2070; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2075; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2070; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2075; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_e_sym = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2071 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2076 * off += (nt_len - 1) * e_sym = list(e_span[:]) * off = e_i # <<<<<<<<<<<<<< @@ -65483,7 +65568,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __Pyx_INCREF(__pyx_v_e_i); __Pyx_DECREF_SET(__pyx_v_off, __pyx_v_e_i); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2072 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2077 * e_sym = list(e_span[:]) * off = e_i * for next_nt in nt_inv: # <<<<<<<<<<<<<< @@ -65494,7 +65579,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __pyx_t_3 = __pyx_v_nt_inv; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_nt_inv); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2072; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_nt_inv); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2077; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; } @@ -65502,16 +65587,16 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_3)) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2072; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2077; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2072; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2077; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_3)) { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2072; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2077; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2072; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2077; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_6 = __pyx_t_5(__pyx_t_3); @@ -65519,7 +65604,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s 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[8]; __pyx_lineno = 2072; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2077; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -65528,28 +65613,28 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __Pyx_XDECREF_SET(__pyx_v_next_nt, __pyx_t_6); __pyx_t_6 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2073 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2078 * off = e_i * for next_nt in nt_inv: * nt_len = (next_nt[4] - next_nt[3]) + 1 # <<<<<<<<<<<<<< * i = 0 * while i < nt_len: */ - __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_next_nt, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2073; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_next_nt, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2078; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_next_nt, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2073; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_next_nt, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2078; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyNumber_Subtract(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2073; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyNumber_Subtract(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2078; __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_1); __pyx_t_1 = 0; - __pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2073; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2078; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF_SET(__pyx_v_nt_len, __pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2074 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2079 * for next_nt in nt_inv: * nt_len = (next_nt[4] - next_nt[3]) + 1 * i = 0 # <<<<<<<<<<<<<< @@ -65559,7 +65644,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __Pyx_INCREF(__pyx_int_0); __Pyx_XDECREF_SET(__pyx_v_i, __pyx_int_0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2075 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2080 * nt_len = (next_nt[4] - next_nt[3]) + 1 * i = 0 * while i < nt_len: # <<<<<<<<<<<<<< @@ -65567,75 +65652,75 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s * i += 1 */ while (1) { - __pyx_t_1 = PyObject_RichCompare(__pyx_v_i, __pyx_v_nt_len, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2075; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2075; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_RichCompare(__pyx_v_i, __pyx_v_nt_len, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2080; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2080; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!__pyx_t_7) break; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2076 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2081 * i = 0 * while i < nt_len: * e_sym.pop(next_nt[3] - off) # <<<<<<<<<<<<<< * i += 1 * e_sym.insert(next_nt[3] - off, sym_setindex(self.category, next_nt[0])) */ - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_next_nt, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2076; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_next_nt, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyNumber_Subtract(__pyx_t_1, __pyx_v_off); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2076; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyNumber_Subtract(__pyx_t_1, __pyx_v_off); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2081; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2076; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2081; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyList_PopIndex(__pyx_v_e_sym, __pyx_t_8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2076; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyList_PopIndex(__pyx_v_e_sym, __pyx_t_8); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2081; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2077 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2082 * while i < nt_len: * e_sym.pop(next_nt[3] - off) * i += 1 # <<<<<<<<<<<<<< * e_sym.insert(next_nt[3] - off, sym_setindex(self.category, next_nt[0])) * off += (nt_len - 1) */ - __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_i, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2077; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_i, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2082; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_i, __pyx_t_2); __pyx_t_2 = 0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2078 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2083 * e_sym.pop(next_nt[3] - off) * i += 1 * e_sym.insert(next_nt[3] - off, sym_setindex(self.category, next_nt[0])) # <<<<<<<<<<<<<< * off += (nt_len - 1) * */ - __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_next_nt, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2078; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_next_nt, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyNumber_Subtract(__pyx_t_2, __pyx_v_off); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2078; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyNumber_Subtract(__pyx_t_2, __pyx_v_off); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2083; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2078; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2083; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_next_nt, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2078; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_next_nt, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2083; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2078; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2083; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_cur_scope->__pyx_v_self->category, __pyx_t_9)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2078; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_cur_scope->__pyx_v_self->category, __pyx_t_9)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2083; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_10 = PyList_Insert(__pyx_v_e_sym, __pyx_t_8, __pyx_t_1); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2078; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = PyList_Insert(__pyx_v_e_sym, __pyx_t_8, __pyx_t_1); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2083; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2079 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2084 * i += 1 * e_sym.insert(next_nt[3] - off, sym_setindex(self.category, next_nt[0])) * off += (nt_len - 1) # <<<<<<<<<<<<<< * * # Adjusting alignment links takes some doing */ - __pyx_t_1 = PyNumber_Subtract(__pyx_v_nt_len, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2079; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyNumber_Subtract(__pyx_v_nt_len, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2084; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_off, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2079; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_off, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2084; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_off, __pyx_t_2); @@ -65643,20 +65728,20 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2082 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2087 * * # Adjusting alignment links takes some doing * links = [list(link) for sub in al for link in sub] # <<<<<<<<<<<<<< * links_inv = sorted(links, cmp=lambda x, y: cmp(x[1], y[1])) * links_len = len(links) */ - __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2082; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2087; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (PyList_CheckExact(__pyx_v_al) || PyTuple_CheckExact(__pyx_v_al)) { __pyx_t_2 = __pyx_v_al; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; __pyx_t_5 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_al); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2082; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_al); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2087; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; } @@ -65664,16 +65749,16 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_2)) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2082; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2087; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2082; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2087; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_2)) { if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2082; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2087; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2082; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2087; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_1 = __pyx_t_5(__pyx_t_2); @@ -65681,7 +65766,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s 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[8]; __pyx_lineno = 2082; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2087; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -65693,7 +65778,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __pyx_t_1 = __pyx_v_sub; __Pyx_INCREF(__pyx_t_1); __pyx_t_8 = 0; __pyx_t_11 = NULL; } else { - __pyx_t_8 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_sub); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2082; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_sub); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2087; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_11 = Py_TYPE(__pyx_t_1)->tp_iternext; } @@ -65701,16 +65786,16 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s if (!__pyx_t_11 && PyList_CheckExact(__pyx_t_1)) { if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2082; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2087; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2082; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2087; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_11 && PyTuple_CheckExact(__pyx_t_1)) { if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2082; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2087; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2082; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2087; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_6 = __pyx_t_11(__pyx_t_1); @@ -65718,7 +65803,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s 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[8]; __pyx_lineno = 2082; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2087; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -65726,15 +65811,15 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s } __Pyx_XDECREF_SET(__pyx_v_link, __pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2082; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2087; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_link); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_link); __Pyx_GIVEREF(__pyx_v_link); - __pyx_t_12 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), __pyx_t_6, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2082; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_12 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), __pyx_t_6, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2087; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_12))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2082; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_12))) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2087; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -65744,32 +65829,32 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __pyx_cur_scope->__pyx_v_links = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2083 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2088 * # Adjusting alignment links takes some doing * links = [list(link) for sub in al for link in sub] * links_inv = sorted(links, cmp=lambda x, y: cmp(x[1], y[1])) # <<<<<<<<<<<<<< * links_len = len(links) * nt_len = len(nt) */ - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2083; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_links); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_cur_scope->__pyx_v_links); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_links); - __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2083; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cdec_2sa_3_sa_23HieroCachingRuleFactory_9form_rule_1lambda7, 0, __pyx_n_s_form_rule_locals_lambda, NULL, __pyx_n_s_cdec_sa__sa, PyModule_GetDict(__pyx_m), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2083; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cdec_2sa_3_sa_23HieroCachingRuleFactory_9form_rule_1lambda7, 0, __pyx_n_s_form_rule_locals_lambda, NULL, __pyx_n_s_cdec_sa__sa, PyModule_GetDict(__pyx_m), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_cmp, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2083; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_cmp, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_sorted, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2083; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_sorted, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2088; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_links_inv = __pyx_t_1; __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2084 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2089 * links = [list(link) for sub in al for link in sub] * links_inv = sorted(links, cmp=lambda x, y: cmp(x[1], y[1])) * links_len = len(links) # <<<<<<<<<<<<<< @@ -65780,26 +65865,26 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __Pyx_INCREF(__pyx_t_1); if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2084; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_4 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2084; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_links_len = __pyx_t_4; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2085 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2090 * links_inv = sorted(links, cmp=lambda x, y: cmp(x[1], y[1])) * links_len = len(links) * nt_len = len(nt) # <<<<<<<<<<<<<< * nt_i = 0 * off = f_i */ - __pyx_t_4 = PyObject_Length(__pyx_v_nt); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2085; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2085; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyObject_Length(__pyx_v_nt); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2090; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2090; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_nt_len, __pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2086 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2091 * links_len = len(links) * nt_len = len(nt) * nt_i = 0 # <<<<<<<<<<<<<< @@ -65809,7 +65894,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __Pyx_INCREF(__pyx_int_0); __pyx_v_nt_i = __pyx_int_0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2087 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2092 * nt_len = len(nt) * nt_i = 0 * off = f_i # <<<<<<<<<<<<<< @@ -65819,7 +65904,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __Pyx_INCREF(__pyx_v_f_i); __Pyx_DECREF_SET(__pyx_v_off, __pyx_v_f_i); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2088 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2093 * nt_i = 0 * off = f_i * i = 0 # <<<<<<<<<<<<<< @@ -65829,7 +65914,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __Pyx_INCREF(__pyx_int_0); __Pyx_XDECREF_SET(__pyx_v_i, __pyx_int_0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2089 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2094 * off = f_i * i = 0 * while i < links_len: # <<<<<<<<<<<<<< @@ -65837,15 +65922,15 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s * off += (nt[nt_i][2] - nt[nt_i][1]) */ while (1) { - __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_links_len); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_links_len); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2094; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyObject_RichCompare(__pyx_v_i, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_RichCompare(__pyx_v_i, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2094; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2089; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2094; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!__pyx_t_7) break; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2090 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2095 * i = 0 * while i < links_len: * while nt_i < nt_len and links[i][0] > nt[nt_i][1]: # <<<<<<<<<<<<<< @@ -65853,24 +65938,24 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s * nt_i += 1 */ while (1) { - __pyx_t_2 = PyObject_RichCompare(__pyx_v_nt_i, __pyx_v_nt_len, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2090; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2090; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_RichCompare(__pyx_v_nt_i, __pyx_v_nt_len, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2095; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2095; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_7) { - __pyx_t_2 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_links, __pyx_v_i); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_2 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_links, __pyx_v_i); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2095; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2095; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyObject_GetItem(__pyx_v_nt, __pyx_v_nt_i); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_2 = PyObject_GetItem(__pyx_v_nt, __pyx_v_nt_i); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2095; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2090; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2095; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2090; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2095; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2090; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2095; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_14 = __pyx_t_13; } else { @@ -65878,79 +65963,79 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s } if (!__pyx_t_14) break; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2091 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2096 * while i < links_len: * while nt_i < nt_len and links[i][0] > nt[nt_i][1]: * off += (nt[nt_i][2] - nt[nt_i][1]) # <<<<<<<<<<<<<< * nt_i += 1 * links[i][0] -= off */ - __pyx_t_2 = PyObject_GetItem(__pyx_v_nt, __pyx_v_nt_i); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2091; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_2 = PyObject_GetItem(__pyx_v_nt, __pyx_v_nt_i); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2096; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2091; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2096; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyObject_GetItem(__pyx_v_nt, __pyx_v_nt_i); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2091; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_2 = PyObject_GetItem(__pyx_v_nt, __pyx_v_nt_i); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2096; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2091; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2096; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyNumber_Subtract(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2091; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyNumber_Subtract(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2096; __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_1); __pyx_t_1 = 0; - __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_off, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2091; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_off, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2096; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_off, __pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2092 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2097 * while nt_i < nt_len and links[i][0] > nt[nt_i][1]: * off += (nt[nt_i][2] - nt[nt_i][1]) * nt_i += 1 # <<<<<<<<<<<<<< * links[i][0] -= off * i += 1 */ - __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_nt_i, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2092; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_nt_i, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2097; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_nt_i, __pyx_t_1); __pyx_t_1 = 0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2093 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2098 * off += (nt[nt_i][2] - nt[nt_i][1]) * nt_i += 1 * links[i][0] -= off # <<<<<<<<<<<<<< * i += 1 * nt_i = 0 */ - __pyx_t_1 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_links, __pyx_v_i); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2093; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_links, __pyx_v_i); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = 0; - __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, __pyx_t_4, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2093; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, __pyx_t_4, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyNumber_InPlaceSubtract(__pyx_t_2, __pyx_v_off); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2093; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyNumber_InPlaceSubtract(__pyx_t_2, __pyx_v_off); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2098; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(__Pyx_SetItemInt(__pyx_t_1, __pyx_t_4, __pyx_t_3, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2093; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(__Pyx_SetItemInt(__pyx_t_1, __pyx_t_4, __pyx_t_3, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2098; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2094 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2099 * nt_i += 1 * links[i][0] -= off * i += 1 # <<<<<<<<<<<<<< * nt_i = 0 * off = e_i */ - __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_i, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2094; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_i, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2099; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_i, __pyx_t_1); __pyx_t_1 = 0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2095 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2100 * links[i][0] -= off * i += 1 * nt_i = 0 # <<<<<<<<<<<<<< @@ -65960,7 +66045,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __Pyx_INCREF(__pyx_int_0); __Pyx_DECREF_SET(__pyx_v_nt_i, __pyx_int_0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2096 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2101 * i += 1 * nt_i = 0 * off = e_i # <<<<<<<<<<<<<< @@ -65970,7 +66055,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __Pyx_INCREF(__pyx_v_e_i); __Pyx_DECREF_SET(__pyx_v_off, __pyx_v_e_i); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2097 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2102 * nt_i = 0 * off = e_i * i = 0 # <<<<<<<<<<<<<< @@ -65980,7 +66065,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __Pyx_INCREF(__pyx_int_0); __Pyx_DECREF_SET(__pyx_v_i, __pyx_int_0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2098 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2103 * off = e_i * i = 0 * while i < links_len: # <<<<<<<<<<<<<< @@ -65988,15 +66073,15 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s * off += (nt_inv[nt_i][4] - nt_inv[nt_i][3]) */ while (1) { - __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_links_len); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2098; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_links_len); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PyObject_RichCompare(__pyx_v_i, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2098; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_RichCompare(__pyx_v_i, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2098; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!__pyx_t_14) break; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2099 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2104 * i = 0 * while i < links_len: * while nt_i < nt_len and links_inv[i][1] > nt_inv[nt_i][3]: # <<<<<<<<<<<<<< @@ -66004,24 +66089,24 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s * nt_i += 1 */ while (1) { - __pyx_t_3 = PyObject_RichCompare(__pyx_v_nt_i, __pyx_v_nt_len, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2099; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2099; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_RichCompare(__pyx_v_nt_i, __pyx_v_nt_len, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_14 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_14) { - __pyx_t_3 = PyObject_GetItem(__pyx_v_links_inv, __pyx_v_i); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2099; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_3 = PyObject_GetItem(__pyx_v_links_inv, __pyx_v_i); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2099; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyObject_GetItem(__pyx_v_nt_inv, __pyx_v_nt_i); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2099; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_3 = PyObject_GetItem(__pyx_v_nt_inv, __pyx_v_nt_i); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_3, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2099; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_3, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2099; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2099; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_13 = __pyx_t_7; } else { @@ -66029,79 +66114,79 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s } if (!__pyx_t_13) break; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2100 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2105 * while i < links_len: * while nt_i < nt_len and links_inv[i][1] > nt_inv[nt_i][3]: * off += (nt_inv[nt_i][4] - nt_inv[nt_i][3]) # <<<<<<<<<<<<<< * nt_i += 1 * links_inv[i][1] -= off */ - __pyx_t_3 = PyObject_GetItem(__pyx_v_nt_inv, __pyx_v_nt_i); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_3 = PyObject_GetItem(__pyx_v_nt_inv, __pyx_v_nt_i); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_3, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_3, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyObject_GetItem(__pyx_v_nt_inv, __pyx_v_nt_i); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_3 = PyObject_GetItem(__pyx_v_nt_inv, __pyx_v_nt_i); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyNumber_Subtract(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyNumber_Subtract(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_off, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_off, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_off, __pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2101 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2106 * while nt_i < nt_len and links_inv[i][1] > nt_inv[nt_i][3]: * off += (nt_inv[nt_i][4] - nt_inv[nt_i][3]) * nt_i += 1 # <<<<<<<<<<<<<< * links_inv[i][1] -= off * i += 1 */ - __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_nt_i, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_nt_i, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_nt_i, __pyx_t_1); __pyx_t_1 = 0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2102 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2107 * off += (nt_inv[nt_i][4] - nt_inv[nt_i][3]) * nt_i += 1 * links_inv[i][1] -= off # <<<<<<<<<<<<<< * i += 1 * */ - __pyx_t_1 = PyObject_GetItem(__pyx_v_links_inv, __pyx_v_i); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = PyObject_GetItem(__pyx_v_links_inv, __pyx_v_i); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = 1; - __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, __pyx_t_4, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, __pyx_t_4, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = PyNumber_InPlaceSubtract(__pyx_t_3, __pyx_v_off); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyNumber_InPlaceSubtract(__pyx_t_3, __pyx_v_off); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(__Pyx_SetItemInt(__pyx_t_1, __pyx_t_4, __pyx_t_2, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2102; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(__Pyx_SetItemInt(__pyx_t_1, __pyx_t_4, __pyx_t_2, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2103 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2108 * nt_i += 1 * links_inv[i][1] -= off * i += 1 # <<<<<<<<<<<<<< * * # Find lexical span */ - __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_i, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_i, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_i, __pyx_t_1); __pyx_t_1 = 0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2106 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2111 * * # Find lexical span * lex_f_i = f_i # <<<<<<<<<<<<<< @@ -66111,75 +66196,75 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __Pyx_INCREF(__pyx_v_f_i); __pyx_v_lex_f_i = __pyx_v_f_i; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2107 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2112 * # Find lexical span * lex_f_i = f_i * lex_f_j = f_i + (len(f_span) - 1) # <<<<<<<<<<<<<< * if nt: * if nt[0][1] == lex_f_i: */ - __pyx_t_4 = PyObject_Length(__pyx_v_f_span); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_1 = PyInt_FromSsize_t((__pyx_t_4 - 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyObject_Length(__pyx_v_f_span); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyInt_FromSsize_t((__pyx_t_4 - 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyNumber_Add(__pyx_v_f_i, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyNumber_Add(__pyx_v_f_i, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_lex_f_j = __pyx_t_2; __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2108 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2113 * lex_f_i = f_i * lex_f_j = f_i + (len(f_span) - 1) * if nt: # <<<<<<<<<<<<<< * if nt[0][1] == lex_f_i: * lex_f_i += (nt[0][2] - nt[0][1]) + 1 */ - __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_v_nt); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_v_nt); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_13) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2109 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2114 * lex_f_j = f_i + (len(f_span) - 1) * if nt: * if nt[0][1] == lex_f_i: # <<<<<<<<<<<<<< * lex_f_i += (nt[0][2] - nt[0][1]) + 1 * if nt[-1][2] == lex_f_j: */ - __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_nt, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_nt, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_v_lex_f_i, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_v_lex_f_i, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_13) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2110 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2115 * if nt: * if nt[0][1] == lex_f_i: * lex_f_i += (nt[0][2] - nt[0][1]) + 1 # <<<<<<<<<<<<<< * if nt[-1][2] == lex_f_j: * lex_f_j -= (nt[-1][2] - nt[-1][1]) + 1 */ - __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_nt, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_nt, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_nt, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_nt, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyNumber_Subtract(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyNumber_Subtract(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_int_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_int_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_lex_f_i, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_lex_f_i, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_lex_f_i, __pyx_t_2); @@ -66188,49 +66273,49 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s } __pyx_L24:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2111 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2116 * if nt[0][1] == lex_f_i: * lex_f_i += (nt[0][2] - nt[0][1]) + 1 * if nt[-1][2] == lex_f_j: # <<<<<<<<<<<<<< * lex_f_j -= (nt[-1][2] - nt[-1][1]) + 1 * */ - __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_nt, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_nt, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_v_lex_f_j, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_v_lex_f_j, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2111; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_13 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_13) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2112 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2117 * lex_f_i += (nt[0][2] - nt[0][1]) + 1 * if nt[-1][2] == lex_f_j: * lex_f_j -= (nt[-1][2] - nt[-1][1]) + 1 # <<<<<<<<<<<<<< * * # Create rule (f_phrase, e_phrase, links, f_link_min, f_link_max) */ - __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_nt, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_nt, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_nt, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_nt, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyNumber_Subtract(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyNumber_Subtract(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2117; __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_1); __pyx_t_1 = 0; - __pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyNumber_InPlaceSubtract(__pyx_v_lex_f_j, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyNumber_InPlaceSubtract(__pyx_v_lex_f_j, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_lex_f_j, __pyx_t_2); @@ -66242,63 +66327,63 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s } __pyx_L23:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2115 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2120 * * # Create rule (f_phrase, e_phrase, links, f_link_min, f_link_max) * f = Phrase(f_sym) # <<<<<<<<<<<<<< * e = Phrase(e_sym) * a = tuple(self.alignment.link(i, j) for i, j in links) */ - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_f_sym); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_f_sym); __Pyx_GIVEREF(__pyx_v_f_sym); - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_Phrase)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_Phrase)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_f = ((struct __pyx_obj_4cdec_2sa_3_sa_Phrase *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2116 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2121 * # Create rule (f_phrase, e_phrase, links, f_link_min, f_link_max) * f = Phrase(f_sym) * e = Phrase(e_sym) # <<<<<<<<<<<<<< * a = tuple(self.alignment.link(i, j) for i, j in links) * return (f, e, a, lex_f_i, lex_f_j) */ - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_e_sym); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_e_sym); __Pyx_GIVEREF(__pyx_v_e_sym); - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_Phrase)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_Phrase)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_e = ((struct __pyx_obj_4cdec_2sa_3_sa_Phrase *)__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2117 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2122 * f = Phrase(f_sym) * e = Phrase(e_sym) * a = tuple(self.alignment.link(i, j) for i, j in links) # <<<<<<<<<<<<<< * return (f, e, a, lex_f_i, lex_f_j) * */ - __pyx_t_2 = __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_9form_rule_2genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_9form_rule_2genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_a = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2118 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2123 * e = Phrase(e_sym) * a = tuple(self.alignment.link(i, j) for i, j in links) * return (f, e, a, lex_f_i, lex_f_j) # <<<<<<<<<<<<<< @@ -66306,7 +66391,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s * # Rule string from rule */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = PyTuple_New(5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyTuple_New(5); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_f)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_f)); @@ -66327,7 +66412,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s __pyx_t_2 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2056 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2061 * * # Create a rule from source, target, non-terminals, and alignments * def form_rule(self, f_i, e_i, f_span, e_span, nt, al): # <<<<<<<<<<<<<< @@ -66367,7 +66452,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_27form_rule(s return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2121 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2126 * * # Rule string from rule * def fmt_rule(self, f, e, a): # <<<<<<<<<<<<<< @@ -66408,16 +66493,16 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_30fmt_rule(Py case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_e)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("fmt_rule", 1, 3, 3, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2121; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("fmt_rule", 1, 3, 3, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2126; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("fmt_rule", 1, 3, 3, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2121; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("fmt_rule", 1, 3, 3, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2126; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fmt_rule") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2121; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fmt_rule") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2126; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -66432,7 +66517,7 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_30fmt_rule(Py } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("fmt_rule", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2121; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("fmt_rule", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2126; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.fmt_rule", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -66446,7 +66531,7 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_30fmt_rule(Py } static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8fmt_rule_2generator16(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2122 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2127 * # Rule string from rule * def fmt_rule(self, f, e, a): * a_str = ' '.join('{0}-{1}'.format(*self.alignment.unlink(packed)) for packed in a) # <<<<<<<<<<<<<< @@ -66472,7 +66557,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8fmt_rule_gen __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); { - __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8fmt_rule_2generator16, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8fmt_rule_2generator16, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -66515,13 +66600,13 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8fmt_rule_2ge return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_a)) { __Pyx_RaiseClosureNameError("a"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_a)) { __Pyx_RaiseClosureNameError("a"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_a) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_a)) { __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_a; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = NULL; } else { - __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_a); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_a); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; } @@ -66529,16 +66614,16 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8fmt_rule_2ge if (!__pyx_t_3 && PyList_CheckExact(__pyx_t_1)) { if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else if (!__pyx_t_3 && PyTuple_CheckExact(__pyx_t_1)) { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { __pyx_t_4 = __pyx_t_3(__pyx_t_1); @@ -66546,7 +66631,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8fmt_rule_2ge 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[8]; __pyx_lineno = 2122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + else {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } @@ -66556,24 +66641,24 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8fmt_rule_2ge __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_packed, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_1, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_1, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->alignment), __pyx_n_s_unlink); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self->alignment), __pyx_n_s_unlink); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_packed); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_cur_scope->__pyx_v_packed); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_packed); - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PySequence_Tuple(__pyx_t_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PySequence_Tuple(__pyx_t_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2127; __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_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -66594,7 +66679,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8fmt_rule_2ge __Pyx_XGOTREF(__pyx_t_1); __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; __pyx_t_3 = __pyx_cur_scope->__pyx_t_2; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -66616,7 +66701,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8fmt_rule_2ge return NULL; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2121 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2126 * * # Rule string from rule * def fmt_rule(self, f, e, a): # <<<<<<<<<<<<<< @@ -66649,22 +66734,22 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_29fmt_rule(st __Pyx_INCREF(__pyx_cur_scope->__pyx_v_a); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_a); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2122 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2127 * # Rule string from rule * def fmt_rule(self, f, e, a): * a_str = ' '.join('{0}-{1}'.format(*self.alignment.unlink(packed)) for packed in a) # <<<<<<<<<<<<<< * return '[X] ||| {0} ||| {1} ||| {2}'.format(f, e, a_str) * */ - __pyx_t_1 = __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8fmt_rule_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_8fmt_rule_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyString_Join(__pyx_kp_s__46, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyString_Join(__pyx_kp_s__46, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_a_str = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2123 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2128 * def fmt_rule(self, f, e, a): * a_str = ' '.join('{0}-{1}'.format(*self.alignment.unlink(packed)) for packed in a) * return '[X] ||| {0} ||| {1} ||| {2}'.format(f, e, a_str) # <<<<<<<<<<<<<< @@ -66672,9 +66757,9 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_29fmt_rule(st * # Lookup online stats for phrase pair (f, e). Return None if no match. */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_X_0_1_2, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_X_0_1_2, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_f); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_f); @@ -66685,7 +66770,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_29fmt_rule(st __Pyx_INCREF(__pyx_v_a_str); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_a_str); __Pyx_GIVEREF(__pyx_v_a_str); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -66693,7 +66778,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_29fmt_rule(st __pyx_t_3 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2121 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2126 * * # Rule string from rule * def fmt_rule(self, f, e, a): # <<<<<<<<<<<<<< @@ -66716,7 +66801,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_29fmt_rule(st return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2127 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2132 * # Lookup online stats for phrase pair (f, e). Return None if no match. * # IMPORTANT: use get() to avoid adding items to defaultdict * def online_ctx_lookup(self, f, e, ctx_name=None): # <<<<<<<<<<<<<< @@ -66758,7 +66843,7 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_32online_ctx_ case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_e)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("online_ctx_lookup", 0, 2, 3, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2127; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("online_ctx_lookup", 0, 2, 3, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2132; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { @@ -66767,7 +66852,7 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_32online_ctx_ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "online_ctx_lookup") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2127; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "online_ctx_lookup") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2132; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -66784,7 +66869,7 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_32online_ctx_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("online_ctx_lookup", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2127; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("online_ctx_lookup", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2132; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.online_ctx_lookup", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -66815,7 +66900,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_31online_ctx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("online_ctx_lookup", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2128 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2133 * # IMPORTANT: use get() to avoid adding items to defaultdict * def online_ctx_lookup(self, f, e, ctx_name=None): * if self.online: # <<<<<<<<<<<<<< @@ -66825,31 +66910,31 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_31online_ctx_ __pyx_t_1 = (__pyx_v_self->online != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2129 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2134 * def online_ctx_lookup(self, f, e, ctx_name=None): * if self.online: * stats = self.online_stats[ctx_name] # <<<<<<<<<<<<<< * fcount = stats.phrases_f.get(f, 0) * fsample_count = stats.samples_f.get(f, 0) */ - __pyx_t_2 = PyObject_GetItem(__pyx_v_self->online_stats, __pyx_v_ctx_name); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_2 = PyObject_GetItem(__pyx_v_self->online_stats, __pyx_v_ctx_name); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_2); __pyx_v_stats = __pyx_t_2; __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2130 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2135 * if self.online: * stats = self.online_stats[ctx_name] * fcount = stats.phrases_f.get(f, 0) # <<<<<<<<<<<<<< * fsample_count = stats.samples_f.get(f, 0) * d = stats.phrases_fe.get(f, None) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_stats, __pyx_n_s_phrases_f); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_stats, __pyx_n_s_phrases_f); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_f); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_f); @@ -66857,26 +66942,26 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_31online_ctx_ __Pyx_INCREF(__pyx_int_0); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_fcount = __pyx_t_4; __pyx_t_4 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2131 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2136 * stats = self.online_stats[ctx_name] * fcount = stats.phrases_f.get(f, 0) * fsample_count = stats.samples_f.get(f, 0) # <<<<<<<<<<<<<< * d = stats.phrases_fe.get(f, None) * paircount = d.get(e, 0) if d else 0 */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_stats, __pyx_n_s_samples_f); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_stats, __pyx_n_s_samples_f); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_f); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_f); @@ -66884,26 +66969,26 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_31online_ctx_ __Pyx_INCREF(__pyx_int_0); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2136; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_fsample_count = __pyx_t_3; __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2132 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2137 * fcount = stats.phrases_f.get(f, 0) * fsample_count = stats.samples_f.get(f, 0) * d = stats.phrases_fe.get(f, None) # <<<<<<<<<<<<<< * paircount = d.get(e, 0) if d else 0 - * return OnlineFeatureContext(fcount, fsample_count, paircount) + * return OnlineFeatureContext(fcount, fsample_count, paircount, stats.bilex) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_stats, __pyx_n_s_phrases_fe); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_stats, __pyx_n_s_phrases_fe); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_f); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_f); @@ -66911,25 +66996,25 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_31online_ctx_ __Pyx_INCREF(Py_None); PyTuple_SET_ITEM(__pyx_t_3, 1, Py_None); __Pyx_GIVEREF(Py_None); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_d = __pyx_t_2; __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2133 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2138 * fsample_count = stats.samples_f.get(f, 0) * d = stats.phrases_fe.get(f, None) * paircount = d.get(e, 0) if d else 0 # <<<<<<<<<<<<<< - * return OnlineFeatureContext(fcount, fsample_count, paircount) + * return OnlineFeatureContext(fcount, fsample_count, paircount, stats.bilex) * return None */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_d); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_d); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_1) { - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_d, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_d, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_e); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_e); @@ -66937,7 +67022,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_31online_ctx_ __Pyx_INCREF(__pyx_int_0); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -66950,39 +67035,44 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_31online_ctx_ __pyx_v_paircount = __pyx_t_2; __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2134 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2139 * d = stats.phrases_fe.get(f, None) * paircount = d.get(e, 0) if d else 0 - * return OnlineFeatureContext(fcount, fsample_count, paircount) # <<<<<<<<<<<<<< + * return OnlineFeatureContext(fcount, fsample_count, paircount, stats.bilex) # <<<<<<<<<<<<<< * return None * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_OnlineFeatureContext); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_OnlineFeatureContext); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_stats, __pyx_n_s_bilex); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_fcount); - PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_fcount); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_fcount); __Pyx_GIVEREF(__pyx_v_fcount); __Pyx_INCREF(__pyx_v_fsample_count); - PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_fsample_count); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_fsample_count); __Pyx_GIVEREF(__pyx_v_fsample_count); __Pyx_INCREF(__pyx_v_paircount); - PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_paircount); + PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_paircount); __Pyx_GIVEREF(__pyx_v_paircount); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2139; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_r = __pyx_t_4; - __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2135 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2140 * paircount = d.get(e, 0) if d else 0 - * return OnlineFeatureContext(fcount, fsample_count, paircount) + * return OnlineFeatureContext(fcount, fsample_count, paircount, stats.bilex) * return None # <<<<<<<<<<<<<< * * # Find all phrases that we might try to extract @@ -66992,7 +67082,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_31online_ctx_ __pyx_r = Py_None; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2127 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2132 * # Lookup online stats for phrase pair (f, e). Return None if no match. * # IMPORTANT: use get() to avoid adding items to defaultdict * def online_ctx_lookup(self, f, e, ctx_name=None): # <<<<<<<<<<<<<< @@ -67019,7 +67109,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_31online_ctx_ return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2140 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2145 * # (Used for EGivenFCoherent) * # Return set of (fphrase, lex_i, lex_j) * def get_f_phrases(self, f_words): # <<<<<<<<<<<<<< @@ -67040,7 +67130,7 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_34get_f_phras return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2145 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2150 * phrases = set() # (fphrase, lex_i, lex_j) * * def extract(f_i, f_j, lex_i, lex_j, wc, ntc, syms): # <<<<<<<<<<<<<< @@ -67090,36 +67180,36 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_13get_f_phras case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_f_j)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("extract", 1, 7, 7, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2145; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("extract", 1, 7, 7, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2150; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_lex_i)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("extract", 1, 7, 7, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2145; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("extract", 1, 7, 7, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2150; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_lex_j)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("extract", 1, 7, 7, 3); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2145; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("extract", 1, 7, 7, 3); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2150; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_wc)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("extract", 1, 7, 7, 4); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2145; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("extract", 1, 7, 7, 4); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2150; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 5: if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ntc)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("extract", 1, 7, 7, 5); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2145; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("extract", 1, 7, 7, 5); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2150; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 6: if (likely((values[6] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_syms)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("extract", 1, 7, 7, 6); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2145; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("extract", 1, 7, 7, 6); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2150; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "extract") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2145; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "extract") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2150; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 7) { goto __pyx_L5_argtuple_error; @@ -67142,7 +67232,7 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_13get_f_phras } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("extract", 1, 7, 7, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2145; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("extract", 1, 7, 7, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2150; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.get_f_phrases.extract", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -67180,32 +67270,32 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_13get_f_phras __pyx_outer_scope = (struct __pyx_obj_4cdec_2sa_3_sa___pyx_scope_struct_26_get_f_phrases *) __Pyx_CyFunction_GetClosure(__pyx_self); __pyx_cur_scope = __pyx_outer_scope; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2147 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2152 * def extract(f_i, f_j, lex_i, lex_j, wc, ntc, syms): * # Phrase extraction limits * if f_j > (f_len - 1) or (f_j - f_i) + 1 > self.max_initial_size: # <<<<<<<<<<<<<< * return * # Extend with word */ - __pyx_t_1 = PyInt_FromSsize_t((__pyx_cur_scope->__pyx_v_f_len - 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyInt_FromSsize_t((__pyx_cur_scope->__pyx_v_f_len - 1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyObject_RichCompare(__pyx_v_f_j, __pyx_t_1, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_RichCompare(__pyx_v_f_j, __pyx_t_1, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!__pyx_t_3) { - __pyx_t_2 = PyNumber_Subtract(__pyx_v_f_j, __pyx_v_f_i); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyNumber_Subtract(__pyx_v_f_j, __pyx_v_f_i); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_self->max_initial_size); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_self->max_initial_size); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_6 = __pyx_t_5; } else { @@ -67213,7 +67303,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_13get_f_phras } if (__pyx_t_6) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2148 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2153 * # Phrase extraction limits * if f_j > (f_len - 1) or (f_j - f_i) + 1 > self.max_initial_size: * return # <<<<<<<<<<<<<< @@ -67225,57 +67315,57 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_13get_f_phras goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2150 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2155 * return * # Extend with word * if wc + ntc < self.max_length: # <<<<<<<<<<<<<< * syms.append(f_words[f_j]) * f = Phrase(syms) */ - __pyx_t_4 = PyNumber_Add(__pyx_v_wc, __pyx_v_ntc); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyNumber_Add(__pyx_v_wc, __pyx_v_ntc); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_self->max_length); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_self->max_length); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_RichCompare(__pyx_t_4, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_6) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2151 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2156 * # Extend with word * if wc + ntc < self.max_length: * syms.append(f_words[f_j]) # <<<<<<<<<<<<<< * f = Phrase(syms) * new_lex_i = min(lex_i, f_j) */ - if (unlikely(!__pyx_cur_scope->__pyx_v_f_words)) { __Pyx_RaiseClosureNameError("f_words"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_1 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_f_words, __pyx_v_f_j); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + if (unlikely(!__pyx_cur_scope->__pyx_v_f_words)) { __Pyx_RaiseClosureNameError("f_words"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + __pyx_t_1 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_f_words, __pyx_v_f_j); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = __Pyx_PyObject_Append(__pyx_v_syms, __pyx_t_1); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyObject_Append(__pyx_v_syms, __pyx_t_1); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2152 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2157 * if wc + ntc < self.max_length: * syms.append(f_words[f_j]) * f = Phrase(syms) # <<<<<<<<<<<<<< * new_lex_i = min(lex_i, f_j) * new_lex_j = max(lex_j, f_j) */ - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_syms); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_syms); __Pyx_GIVEREF(__pyx_v_syms); - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_Phrase)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_Phrase)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_f = ((struct __pyx_obj_4cdec_2sa_3_sa_Phrase *)__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2153 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2158 * syms.append(f_words[f_j]) * f = Phrase(syms) * new_lex_i = min(lex_i, f_j) # <<<<<<<<<<<<<< @@ -67286,8 +67376,8 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_13get_f_phras __pyx_t_2 = __pyx_v_f_j; __Pyx_INCREF(__pyx_v_lex_i); __pyx_t_1 = __pyx_v_lex_i; - __pyx_t_8 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_6) { __Pyx_INCREF(__pyx_t_2); @@ -67304,7 +67394,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_13get_f_phras __pyx_v_new_lex_i = __pyx_t_2; __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2154 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2159 * f = Phrase(syms) * new_lex_i = min(lex_i, f_j) * new_lex_j = max(lex_j, f_j) # <<<<<<<<<<<<<< @@ -67315,8 +67405,8 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_13get_f_phras __pyx_t_2 = __pyx_v_f_j; __Pyx_INCREF(__pyx_v_lex_j); __pyx_t_4 = __pyx_v_lex_j; - __pyx_t_8 = PyObject_RichCompare(__pyx_t_2, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2154; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2154; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = PyObject_RichCompare(__pyx_t_2, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_6) { __Pyx_INCREF(__pyx_t_2); @@ -67333,19 +67423,19 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_13get_f_phras __pyx_v_new_lex_j = __pyx_t_2; __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2155 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2160 * new_lex_i = min(lex_i, f_j) * new_lex_j = max(lex_j, f_j) * phrases.add((f, new_lex_i, new_lex_j)) # <<<<<<<<<<<<<< * extract(f_i, f_j + 1, new_lex_i, new_lex_j, wc + 1, ntc, syms) * syms.pop() */ - if (unlikely(!__pyx_cur_scope->__pyx_v_phrases)) { __Pyx_RaiseClosureNameError("phrases"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + if (unlikely(!__pyx_cur_scope->__pyx_v_phrases)) { __Pyx_RaiseClosureNameError("phrases"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (unlikely(__pyx_cur_scope->__pyx_v_phrases == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "add"); - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_f)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_f)); @@ -67356,53 +67446,53 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_13get_f_phras __Pyx_INCREF(__pyx_v_new_lex_j); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_new_lex_j); __Pyx_GIVEREF(__pyx_v_new_lex_j); - __pyx_t_7 = PySet_Add(__pyx_cur_scope->__pyx_v_phrases, __pyx_t_2); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = PySet_Add(__pyx_cur_scope->__pyx_v_phrases, __pyx_t_2); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2156 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2161 * new_lex_j = max(lex_j, f_j) * phrases.add((f, new_lex_i, new_lex_j)) * extract(f_i, f_j + 1, new_lex_i, new_lex_j, wc + 1, ntc, syms) # <<<<<<<<<<<<<< * syms.pop() * # Extend with existing non-terminal */ - __pyx_t_2 = PyNumber_Add(__pyx_v_f_j, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyNumber_Add(__pyx_v_f_j, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyNumber_Add(__pyx_v_wc, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyNumber_Add(__pyx_v_wc, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (unlikely(!__pyx_cur_scope->__pyx_v_extract)) { __Pyx_RaiseClosureNameError("extract"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_4 = __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_13get_f_phrases_extract(__pyx_cur_scope->__pyx_v_extract, __pyx_v_f_i, __pyx_t_2, __pyx_v_new_lex_i, __pyx_v_new_lex_j, __pyx_t_1, __pyx_v_ntc, __pyx_v_syms); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_cur_scope->__pyx_v_extract)) { __Pyx_RaiseClosureNameError("extract"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + __pyx_t_4 = __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_13get_f_phrases_extract(__pyx_cur_scope->__pyx_v_extract, __pyx_v_f_i, __pyx_t_2, __pyx_v_new_lex_i, __pyx_v_new_lex_j, __pyx_t_1, __pyx_v_ntc, __pyx_v_syms); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2157 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2162 * phrases.add((f, new_lex_i, new_lex_j)) * extract(f_i, f_j + 1, new_lex_i, new_lex_j, wc + 1, ntc, syms) * syms.pop() # <<<<<<<<<<<<<< * # Extend with existing non-terminal * if syms and sym_isvar(syms[-1]): */ - __pyx_t_4 = __Pyx_PyObject_Pop(__pyx_v_syms); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2157; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Pop(__pyx_v_syms); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2162; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L4; } __pyx_L4:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2159 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2164 * syms.pop() * # Extend with existing non-terminal * if syms and sym_isvar(syms[-1]): # <<<<<<<<<<<<<< * # Don't re-extract the same phrase * extract(f_i, f_j + 1, lex_i, lex_j, wc, ntc, syms) */ - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_syms); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_syms); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_6) { - __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_syms, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_syms, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); - __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2159; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = (__pyx_f_4cdec_2sa_3_sa_sym_isvar(__pyx_t_9) != 0); } else { @@ -67410,17 +67500,17 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_13get_f_phras } if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2161 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2166 * if syms and sym_isvar(syms[-1]): * # Don't re-extract the same phrase * extract(f_i, f_j + 1, lex_i, lex_j, wc, ntc, syms) # <<<<<<<<<<<<<< * # Extend with new non-terminal * if wc + ntc < self.max_length: */ - __pyx_t_4 = PyNumber_Add(__pyx_v_f_j, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyNumber_Add(__pyx_v_f_j, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - if (unlikely(!__pyx_cur_scope->__pyx_v_extract)) { __Pyx_RaiseClosureNameError("extract"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_1 = __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_13get_f_phrases_extract(__pyx_cur_scope->__pyx_v_extract, __pyx_v_f_i, __pyx_t_4, __pyx_v_lex_i, __pyx_v_lex_j, __pyx_v_wc, __pyx_v_ntc, __pyx_v_syms); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_cur_scope->__pyx_v_extract)) { __Pyx_RaiseClosureNameError("extract"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + __pyx_t_1 = __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_13get_f_phrases_extract(__pyx_cur_scope->__pyx_v_extract, __pyx_v_f_i, __pyx_t_4, __pyx_v_lex_i, __pyx_v_lex_j, __pyx_v_wc, __pyx_v_ntc, __pyx_v_syms); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2166; __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_1); __pyx_t_1 = 0; @@ -67428,46 +67518,46 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_13get_f_phras } __pyx_L5:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2163 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2168 * extract(f_i, f_j + 1, lex_i, lex_j, wc, ntc, syms) * # Extend with new non-terminal * if wc + ntc < self.max_length: # <<<<<<<<<<<<<< * if not syms or (ntc < self.max_nonterminals and not sym_isvar(syms[-1])): * syms.append(sym_setindex(self.category, ntc + 1)) */ - __pyx_t_1 = PyNumber_Add(__pyx_v_wc, __pyx_v_ntc); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyNumber_Add(__pyx_v_wc, __pyx_v_ntc); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_self->max_length); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_self->max_length); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2164 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2169 * # Extend with new non-terminal * if wc + ntc < self.max_length: * if not syms or (ntc < self.max_nonterminals and not sym_isvar(syms[-1])): # <<<<<<<<<<<<<< * syms.append(sym_setindex(self.category, ntc + 1)) * f = Phrase(syms) */ - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_syms); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_syms); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_6 = (!__pyx_t_3); if (!__pyx_t_6) { - if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_self->max_nonterminals); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_self->max_nonterminals); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_ntc, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyObject_RichCompare(__pyx_v_ntc, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_3) { - __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_syms, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_syms, -1, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); - __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = (!(__pyx_f_4cdec_2sa_3_sa_sym_isvar(__pyx_t_9) != 0)); __pyx_t_10 = __pyx_t_5; @@ -67480,66 +67570,66 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_13get_f_phras } if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2165 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2170 * if wc + ntc < self.max_length: * if not syms or (ntc < self.max_nonterminals and not sym_isvar(syms[-1])): * syms.append(sym_setindex(self.category, ntc + 1)) # <<<<<<<<<<<<<< * f = Phrase(syms) * if wc > 0: */ - if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_4 = PyNumber_Add(__pyx_v_ntc, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + __pyx_t_4 = PyNumber_Add(__pyx_v_ntc, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_cur_scope->__pyx_v_self->category, __pyx_t_9)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_f_4cdec_2sa_3_sa_sym_setindex(__pyx_cur_scope->__pyx_v_self->category, __pyx_t_9)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = __Pyx_PyObject_Append(__pyx_v_syms, __pyx_t_4); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyObject_Append(__pyx_v_syms, __pyx_t_4); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2166 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2171 * if not syms or (ntc < self.max_nonterminals and not sym_isvar(syms[-1])): * syms.append(sym_setindex(self.category, ntc + 1)) * f = Phrase(syms) # <<<<<<<<<<<<<< * if wc > 0: * phrases.add((f, lex_i, lex_j)) */ - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_syms); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_syms); __Pyx_GIVEREF(__pyx_v_syms); - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_Phrase)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_2sa_3_sa_Phrase)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF_SET(__pyx_v_f, ((struct __pyx_obj_4cdec_2sa_3_sa_Phrase *)__pyx_t_2)); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2167 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2172 * syms.append(sym_setindex(self.category, ntc + 1)) * f = Phrase(syms) * if wc > 0: # <<<<<<<<<<<<<< * phrases.add((f, lex_i, lex_j)) * extract(f_i, f_j + 1, lex_i, lex_j, wc, ntc + 1, syms) */ - __pyx_t_2 = PyObject_RichCompare(__pyx_v_wc, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_RichCompare(__pyx_v_wc, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2168 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2173 * f = Phrase(syms) * if wc > 0: * phrases.add((f, lex_i, lex_j)) # <<<<<<<<<<<<<< * extract(f_i, f_j + 1, lex_i, lex_j, wc, ntc + 1, syms) * syms.pop() */ - if (unlikely(!__pyx_cur_scope->__pyx_v_phrases)) { __Pyx_RaiseClosureNameError("phrases"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + if (unlikely(!__pyx_cur_scope->__pyx_v_phrases)) { __Pyx_RaiseClosureNameError("phrases"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (unlikely(__pyx_cur_scope->__pyx_v_phrases == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "add"); - {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_f)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_f)); @@ -67550,38 +67640,38 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_13get_f_phras __Pyx_INCREF(__pyx_v_lex_j); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_lex_j); __Pyx_GIVEREF(__pyx_v_lex_j); - __pyx_t_7 = PySet_Add(__pyx_cur_scope->__pyx_v_phrases, __pyx_t_2); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = PySet_Add(__pyx_cur_scope->__pyx_v_phrases, __pyx_t_2); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L8; } __pyx_L8:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2169 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2174 * if wc > 0: * phrases.add((f, lex_i, lex_j)) * extract(f_i, f_j + 1, lex_i, lex_j, wc, ntc + 1, syms) # <<<<<<<<<<<<<< * syms.pop() * */ - __pyx_t_2 = PyNumber_Add(__pyx_v_f_j, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyNumber_Add(__pyx_v_f_j, __pyx_int_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = PyNumber_Add(__pyx_v_ntc, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyNumber_Add(__pyx_v_ntc, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - if (unlikely(!__pyx_cur_scope->__pyx_v_extract)) { __Pyx_RaiseClosureNameError("extract"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_1 = __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_13get_f_phrases_extract(__pyx_cur_scope->__pyx_v_extract, __pyx_v_f_i, __pyx_t_2, __pyx_v_lex_i, __pyx_v_lex_j, __pyx_v_wc, __pyx_t_4, __pyx_v_syms); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_cur_scope->__pyx_v_extract)) { __Pyx_RaiseClosureNameError("extract"); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + __pyx_t_1 = __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_13get_f_phrases_extract(__pyx_cur_scope->__pyx_v_extract, __pyx_v_f_i, __pyx_t_2, __pyx_v_lex_i, __pyx_v_lex_j, __pyx_v_wc, __pyx_t_4, __pyx_v_syms); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2174; __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_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2170 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2175 * phrases.add((f, lex_i, lex_j)) * extract(f_i, f_j + 1, lex_i, lex_j, wc, ntc + 1, syms) * syms.pop() # <<<<<<<<<<<<<< * * # Try to extract phrases from every f index */ - __pyx_t_1 = __Pyx_PyObject_Pop(__pyx_v_syms); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Pop(__pyx_v_syms); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L7; @@ -67591,7 +67681,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_13get_f_phras } __pyx_L6:; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2145 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2150 * phrases = set() # (fphrase, lex_i, lex_j) * * def extract(f_i, f_j, lex_i, lex_j, wc, ntc, syms): # <<<<<<<<<<<<<< @@ -67618,7 +67708,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_13get_f_phras return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2140 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2145 * # (Used for EGivenFCoherent) * # Return set of (fphrase, lex_i, lex_j) * def get_f_phrases(self, f_words): # <<<<<<<<<<<<<< @@ -67654,7 +67744,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_33get_f_phras __Pyx_INCREF(__pyx_cur_scope->__pyx_v_f_words); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_f_words); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2142 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2147 * def get_f_phrases(self, f_words): * * f_len = len(f_words) # <<<<<<<<<<<<<< @@ -67663,37 +67753,37 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_33get_f_phras */ __pyx_t_1 = __pyx_cur_scope->__pyx_v_f_words; __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2142; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_cur_scope->__pyx_v_f_len = __pyx_t_2; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2143 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2148 * * f_len = len(f_words) * phrases = set() # (fphrase, lex_i, lex_j) # <<<<<<<<<<<<<< * * def extract(f_i, f_j, lex_i, lex_j, wc, ntc, syms): */ - __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2143; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_v_phrases = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2145 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2150 * phrases = set() # (fphrase, lex_i, lex_j) * * def extract(f_i, f_j, lex_i, lex_j, wc, ntc, syms): # <<<<<<<<<<<<<< * # Phrase extraction limits * if f_j > (f_len - 1) or (f_j - f_i) + 1 > self.max_initial_size: */ - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cdec_2sa_3_sa_23HieroCachingRuleFactory_13get_f_phrases_1extract, 0, __pyx_n_s_get_f_phrases_locals_extract, ((PyObject*)__pyx_cur_scope), __pyx_n_s_cdec_sa__sa, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__75)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cdec_2sa_3_sa_23HieroCachingRuleFactory_13get_f_phrases_1extract, 0, __pyx_n_s_get_f_phrases_locals_extract, ((PyObject*)__pyx_cur_scope), __pyx_n_s_cdec_sa__sa, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__74)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_v_extract = __pyx_t_1; __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2173 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2178 * * # Try to extract phrases from every f index * for f_i from 0 <= f_i < f_len: # <<<<<<<<<<<<<< @@ -67703,22 +67793,22 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_33get_f_phras __pyx_t_2 = __pyx_cur_scope->__pyx_v_f_len; for (__pyx_v_f_i = 0; __pyx_v_f_i < __pyx_t_2; __pyx_v_f_i++) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2174 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2179 * # Try to extract phrases from every f index * for f_i from 0 <= f_i < f_len: * extract(f_i, f_i, f_len, -1, 0, 0, []) # <<<<<<<<<<<<<< * * return phrases */ - __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v_f_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v_f_i); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v_f_i); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v_f_i); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyInt_FromSsize_t(__pyx_cur_scope->__pyx_v_f_len); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyInt_FromSsize_t(__pyx_cur_scope->__pyx_v_f_len); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_13get_f_phrases_extract(__pyx_cur_scope->__pyx_v_extract, __pyx_t_1, __pyx_t_3, __pyx_t_4, __pyx_int_neg_1, __pyx_int_0, __pyx_int_0, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_13get_f_phrases_extract(__pyx_cur_scope->__pyx_v_extract, __pyx_t_1, __pyx_t_3, __pyx_t_4, __pyx_int_neg_1, __pyx_int_0, __pyx_int_0, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -67727,7 +67817,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_33get_f_phras __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2176 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2181 * extract(f_i, f_i, f_len, -1, 0, 0, []) * * return phrases # <<<<<<<<<<<<<< @@ -67739,7 +67829,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_33get_f_phras __pyx_r = __pyx_cur_scope->__pyx_v_phrases; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2140 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2145 * # (Used for EGivenFCoherent) * # Return set of (fphrase, lex_i, lex_j) * def get_f_phrases(self, f_words): # <<<<<<<<<<<<<< @@ -67763,7 +67853,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_33get_f_phras return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2179 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2184 * * # Drop online stats for a context * def drop_ctx(self, ctx_name=None): # <<<<<<<<<<<<<< @@ -67802,7 +67892,7 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_36drop_ctx(Py } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "drop_ctx") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2179; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "drop_ctx") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2184; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -67815,7 +67905,7 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_23HieroCachingRuleFactory_36drop_ctx(Py } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("drop_ctx", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2179; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("drop_ctx", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2184; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("cdec.sa._sa.HieroCachingRuleFactory.drop_ctx", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -67839,16 +67929,16 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_35drop_ctx(st int __pyx_clineno = 0; __Pyx_RefNannySetupContext("drop_ctx", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2180 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2185 * # Drop online stats for a context * def drop_ctx(self, ctx_name=None): * self.online_stats.pop(ctx_name, None) # <<<<<<<<<<<<<< * * # Spans are _inclusive_ on both ends [i, j] */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->online_stats, __pyx_n_s_pop); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->online_stats, __pyx_n_s_pop); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2185; __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[8]; __pyx_lineno = 2180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_ctx_name); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_ctx_name); @@ -67856,13 +67946,13 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_35drop_ctx(st __Pyx_INCREF(Py_None); PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None); __Pyx_GIVEREF(Py_None); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2179 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2184 * * # Drop online stats for a context * def drop_ctx(self, ctx_name=None): # <<<<<<<<<<<<<< @@ -67885,7 +67975,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_23HieroCachingRuleFactory_35drop_ctx(st return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2183 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2188 * * # Spans are _inclusive_ on both ends [i, j] * def span_check(vec, i, j): # <<<<<<<<<<<<<< @@ -67927,16 +68017,16 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_17span_check(PyObject *__pyx_self, PyOb case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("span_check", 1, 3, 3, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2183; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("span_check", 1, 3, 3, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2188; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_j)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("span_check", 1, 3, 3, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2183; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("span_check", 1, 3, 3, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2188; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "span_check") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2183; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "span_check") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2188; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -67951,7 +68041,7 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_17span_check(PyObject *__pyx_self, PyOb } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("span_check", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2183; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("span_check", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2188; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("cdec.sa._sa.span_check", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -67975,7 +68065,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_16span_check(CYTHON_UNUSED PyObject *__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("span_check", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2184 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2189 * # Spans are _inclusive_ on both ends [i, j] * def span_check(vec, i, j): * k = i # <<<<<<<<<<<<<< @@ -67985,7 +68075,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_16span_check(CYTHON_UNUSED PyObject *__ __Pyx_INCREF(__pyx_v_i); __pyx_v_k = __pyx_v_i; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2185 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2190 * def span_check(vec, i, j): * k = i * while k <= j: # <<<<<<<<<<<<<< @@ -67993,25 +68083,25 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_16span_check(CYTHON_UNUSED PyObject *__ * return False */ while (1) { - __pyx_t_1 = PyObject_RichCompare(__pyx_v_k, __pyx_v_j, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_RichCompare(__pyx_v_k, __pyx_v_j, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2190; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!__pyx_t_2) break; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2186 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2191 * k = i * while k <= j: * if vec[k]: # <<<<<<<<<<<<<< * return False * k += 1 */ - __pyx_t_1 = PyObject_GetItem(__pyx_v_vec, __pyx_v_k); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2186; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = PyObject_GetItem(__pyx_v_vec, __pyx_v_k); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2187 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2192 * while k <= j: * if vec[k]: * return False # <<<<<<<<<<<<<< @@ -68024,20 +68114,20 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_16span_check(CYTHON_UNUSED PyObject *__ goto __pyx_L0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2188 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2193 * if vec[k]: * return False * k += 1 # <<<<<<<<<<<<<< * return True * */ - __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_k, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_k, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_k, __pyx_t_1); __pyx_t_1 = 0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2189 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2194 * return False * k += 1 * return True # <<<<<<<<<<<<<< @@ -68049,7 +68139,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_16span_check(CYTHON_UNUSED PyObject *__ __pyx_r = Py_True; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2183 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2188 * * # Spans are _inclusive_ on both ends [i, j] * def span_check(vec, i, j): # <<<<<<<<<<<<<< @@ -68069,7 +68159,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_16span_check(CYTHON_UNUSED PyObject *__ return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2191 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2196 * return True * * def span_inc(vec, i, j): # <<<<<<<<<<<<<< @@ -68111,16 +68201,16 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_19span_inc(PyObject *__pyx_self, PyObje case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("span_inc", 1, 3, 3, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2191; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("span_inc", 1, 3, 3, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2196; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_j)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("span_inc", 1, 3, 3, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2191; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("span_inc", 1, 3, 3, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2196; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "span_inc") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2191; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "span_inc") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2196; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -68135,7 +68225,7 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_19span_inc(PyObject *__pyx_self, PyObje } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("span_inc", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2191; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("span_inc", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2196; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("cdec.sa._sa.span_inc", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -68161,7 +68251,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_18span_inc(CYTHON_UNUSED PyObject *__py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("span_inc", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2192 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2197 * * def span_inc(vec, i, j): * k = i # <<<<<<<<<<<<<< @@ -68171,7 +68261,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_18span_inc(CYTHON_UNUSED PyObject *__py __Pyx_INCREF(__pyx_v_i); __pyx_v_k = __pyx_v_i; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2193 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2198 * def span_inc(vec, i, j): * k = i * while k <= j: # <<<<<<<<<<<<<< @@ -68179,12 +68269,12 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_18span_inc(CYTHON_UNUSED PyObject *__py * k += 1 */ while (1) { - __pyx_t_1 = PyObject_RichCompare(__pyx_v_k, __pyx_v_j, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_RichCompare(__pyx_v_k, __pyx_v_j, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!__pyx_t_2) break; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2194 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2199 * k = i * while k <= j: * vec[k] += 1 # <<<<<<<<<<<<<< @@ -68193,29 +68283,29 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_18span_inc(CYTHON_UNUSED PyObject *__py */ __Pyx_INCREF(__pyx_v_k); __pyx_t_1 = __pyx_v_k; - __pyx_t_3 = PyObject_GetItem(__pyx_v_vec, __pyx_t_1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_3 = PyObject_GetItem(__pyx_v_vec, __pyx_t_1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_t_3, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_t_3, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(PyObject_SetItem(__pyx_v_vec, __pyx_t_1, __pyx_t_4) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(PyObject_SetItem(__pyx_v_vec, __pyx_t_1, __pyx_t_4) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2195 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2200 * while k <= j: * vec[k] += 1 * k += 1 # <<<<<<<<<<<<<< * * def span_dec(vec, i, j): */ - __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_k, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_k, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_k, __pyx_t_1); __pyx_t_1 = 0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2191 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2196 * return True * * def span_inc(vec, i, j): # <<<<<<<<<<<<<< @@ -68239,7 +68329,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_18span_inc(CYTHON_UNUSED PyObject *__py return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2197 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2202 * k += 1 * * def span_dec(vec, i, j): # <<<<<<<<<<<<<< @@ -68281,16 +68371,16 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_21span_dec(PyObject *__pyx_self, PyObje case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("span_dec", 1, 3, 3, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2197; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("span_dec", 1, 3, 3, 1); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2202; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_j)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("span_dec", 1, 3, 3, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2197; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("span_dec", 1, 3, 3, 2); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2202; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "span_dec") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2197; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "span_dec") < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2202; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -68305,7 +68395,7 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_21span_dec(PyObject *__pyx_self, PyObje } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("span_dec", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2197; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("span_dec", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2202; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("cdec.sa._sa.span_dec", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -68331,7 +68421,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_20span_dec(CYTHON_UNUSED PyObject *__py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("span_dec", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2198 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2203 * * def span_dec(vec, i, j): * k = i # <<<<<<<<<<<<<< @@ -68341,7 +68431,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_20span_dec(CYTHON_UNUSED PyObject *__py __Pyx_INCREF(__pyx_v_i); __pyx_v_k = __pyx_v_i; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2199 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2204 * def span_dec(vec, i, j): * k = i * while k <= j: # <<<<<<<<<<<<<< @@ -68349,12 +68439,12 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_20span_dec(CYTHON_UNUSED PyObject *__py * k += 1 */ while (1) { - __pyx_t_1 = PyObject_RichCompare(__pyx_v_k, __pyx_v_j, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_RichCompare(__pyx_v_k, __pyx_v_j, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!__pyx_t_2) break; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2200 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2205 * k = i * while k <= j: * vec[k] -= 1 # <<<<<<<<<<<<<< @@ -68362,27 +68452,27 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_20span_dec(CYTHON_UNUSED PyObject *__py */ __Pyx_INCREF(__pyx_v_k); __pyx_t_1 = __pyx_v_k; - __pyx_t_3 = PyObject_GetItem(__pyx_v_vec, __pyx_t_1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2200; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_3 = PyObject_GetItem(__pyx_v_vec, __pyx_t_1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyNumber_InPlaceSubtract(__pyx_t_3, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyNumber_InPlaceSubtract(__pyx_t_3, __pyx_int_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(PyObject_SetItem(__pyx_v_vec, __pyx_t_1, __pyx_t_4) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(PyObject_SetItem(__pyx_v_vec, __pyx_t_1, __pyx_t_4) < 0)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2201 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2206 * while k <= j: * vec[k] -= 1 * k += 1 # <<<<<<<<<<<<<< */ - __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_k, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_k, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_k, __pyx_t_1); __pyx_t_1 = 0; } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2197 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2202 * k += 1 * * def span_dec(vec, i, j): # <<<<<<<<<<<<<< @@ -68406,7 +68496,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_20span_dec(CYTHON_UNUSED PyObject *__py return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/features.pxi":7 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/features.pxi":7 * * cdef class FeatureVector: * def __cinit__(self): # <<<<<<<<<<<<<< @@ -68441,7 +68531,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_13FeatureVector___cinit__(struct __pyx_obj_4c int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/features.pxi":8 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/features.pxi":8 * cdef class FeatureVector: * def __cinit__(self): * self.names = IntList(INITIAL_CAPACITY, INCREMENT) # <<<<<<<<<<<<<< @@ -68469,7 +68559,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_13FeatureVector___cinit__(struct __pyx_obj_4c __pyx_v_self->names = ((struct __pyx_obj_4cdec_2sa_3_sa_IntList *)__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/features.pxi":9 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/features.pxi":9 * def __cinit__(self): * self.names = IntList(INITIAL_CAPACITY, INCREMENT) * self.values = FloatList(INITIAL_CAPACITY, INCREMENT) # <<<<<<<<<<<<<< @@ -68497,7 +68587,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_13FeatureVector___cinit__(struct __pyx_obj_4c __pyx_v_self->values = ((struct __pyx_obj_4cdec_2sa_3_sa_FloatList *)__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/features.pxi":7 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/features.pxi":7 * * cdef class FeatureVector: * def __cinit__(self): # <<<<<<<<<<<<<< @@ -68519,7 +68609,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_13FeatureVector___cinit__(struct __pyx_obj_4c return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/features.pxi":11 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/features.pxi":11 * self.values = FloatList(INITIAL_CAPACITY, INCREMENT) * * def set(self, unsigned name, float value): # <<<<<<<<<<<<<< @@ -68598,7 +68688,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_13FeatureVector_2set(struct __pyx_obj_4 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/features.pxi":12 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/features.pxi":12 * * def set(self, unsigned name, float value): * self.names.append(name) # <<<<<<<<<<<<<< @@ -68610,7 +68700,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_13FeatureVector_2set(struct __pyx_obj_4 __pyx_t_2 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_self->names), __pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/features.pxi":13 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/features.pxi":13 * def set(self, unsigned name, float value): * self.names.append(name) * self.values.append(value) # <<<<<<<<<<<<<< @@ -68622,7 +68712,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_13FeatureVector_2set(struct __pyx_obj_4 __pyx_t_2 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_self->values), __pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/features.pxi":11 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/features.pxi":11 * self.values = FloatList(INITIAL_CAPACITY, INCREMENT) * * def set(self, unsigned name, float value): # <<<<<<<<<<<<<< @@ -68644,7 +68734,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_13FeatureVector_2set(struct __pyx_obj_4 } static PyObject *__pyx_gb_4cdec_2sa_3_sa_13FeatureVector_6generator5(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "/usr0/home/cdyer/cdec/python/cdec/sa/features.pxi":15 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/features.pxi":15 * self.values.append(value) * * def __iter__(self): # <<<<<<<<<<<<<< @@ -68727,7 +68817,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_13FeatureVector_6generator5(__pyx_Gener __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/cdyer/cdec/python/cdec/sa/features.pxi":17 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/features.pxi":17 * def __iter__(self): * cdef unsigned i * for i in range(self.names.len): # <<<<<<<<<<<<<< @@ -68738,7 +68828,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_13FeatureVector_6generator5(__pyx_Gener for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_cur_scope->__pyx_v_i = __pyx_t_2; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/features.pxi":18 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/features.pxi":18 * cdef unsigned i * for i in range(self.names.len): * yield (FD.word(self.names[i]), self.values[i]) # <<<<<<<<<<<<<< @@ -68776,7 +68866,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_13FeatureVector_6generator5(__pyx_Gener if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - /* "/usr0/home/cdyer/cdec/python/cdec/sa/features.pxi":15 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/features.pxi":15 * self.values.append(value) * * def __iter__(self): # <<<<<<<<<<<<<< @@ -68800,7 +68890,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_13FeatureVector_6generator5(__pyx_Gener return NULL; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/features.pxi":20 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/features.pxi":20 * yield (FD.word(self.names[i]), self.values[i]) * * def __str__(self): # <<<<<<<<<<<<<< @@ -68822,7 +68912,7 @@ static PyObject *__pyx_pw_4cdec_2sa_3_sa_13FeatureVector_8__str__(PyObject *__py } static PyObject *__pyx_gb_4cdec_2sa_3_sa_13FeatureVector_7__str___2generator17(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "/usr0/home/cdyer/cdec/python/cdec/sa/features.pxi":21 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/features.pxi":21 * * def __str__(self): * return ' '.join('%s=%s' % feat for feat in self) # <<<<<<<<<<<<<< @@ -68967,7 +69057,7 @@ static PyObject *__pyx_gb_4cdec_2sa_3_sa_13FeatureVector_7__str___2generator17(_ return NULL; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/features.pxi":20 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/features.pxi":20 * yield (FD.word(self.names[i]), self.values[i]) * * def __str__(self): # <<<<<<<<<<<<<< @@ -68995,7 +69085,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_13FeatureVector_7__str__(struct __pyx_o __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/features.pxi":21 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/features.pxi":21 * * def __str__(self): * return ' '.join('%s=%s' % feat for feat in self) # <<<<<<<<<<<<<< @@ -69012,7 +69102,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_13FeatureVector_7__str__(struct __pyx_o __pyx_t_2 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/features.pxi":20 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/features.pxi":20 * yield (FD.word(self.names[i]), self.values[i]) * * def __str__(self): # <<<<<<<<<<<<<< @@ -69033,7 +69123,7 @@ static PyObject *__pyx_pf_4cdec_2sa_3_sa_13FeatureVector_7__str__(struct __pyx_o return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/features.pxi":25 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/features.pxi":25 * cdef class Scorer: * cdef models * def __init__(self, *models): # <<<<<<<<<<<<<< @@ -69074,7 +69164,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Scorer___init__(struct __pyx_obj_4cdec_2sa_3 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/features.pxi":26 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/features.pxi":26 * cdef models * def __init__(self, *models): * names = [FD.index(model.__name__) for model in models] # <<<<<<<<<<<<<< @@ -69106,7 +69196,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Scorer___init__(struct __pyx_obj_4cdec_2sa_3 __pyx_v_names = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/features.pxi":27 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/features.pxi":27 * def __init__(self, *models): * names = [FD.index(model.__name__) for model in models] * self.models = zip(names, models) # <<<<<<<<<<<<<< @@ -69130,7 +69220,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Scorer___init__(struct __pyx_obj_4cdec_2sa_3 __pyx_v_self->models = __pyx_t_2; __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/features.pxi":25 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/features.pxi":25 * cdef class Scorer: * cdef models * def __init__(self, *models): # <<<<<<<<<<<<<< @@ -69154,7 +69244,7 @@ static int __pyx_pf_4cdec_2sa_3_sa_6Scorer___init__(struct __pyx_obj_4cdec_2sa_3 return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/sa/features.pxi":29 +/* "/usr0/home/mdenkows/cdec/python/cdec/sa/features.pxi":29 * self.models = zip(names, models) * * cdef FeatureVector score(self, ctx): # <<<<<<<<<<<<<< @@ -69181,7 +69271,7 @@ static struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector *__pyx_f_4cdec_2sa_3_sa_6Sc int __pyx_clineno = 0; __Pyx_RefNannySetupContext("score", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/features.pxi":30 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/features.pxi":30 * * cdef FeatureVector score(self, ctx): * cdef FeatureVector scores = FeatureVector() # <<<<<<<<<<<<<< @@ -69193,7 +69283,7 @@ static struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector *__pyx_f_4cdec_2sa_3_sa_6Sc __pyx_v_scores = ((struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/features.pxi":31 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/features.pxi":31 * cdef FeatureVector score(self, ctx): * cdef FeatureVector scores = FeatureVector() * for name, model in self.models: # <<<<<<<<<<<<<< @@ -69290,7 +69380,7 @@ static struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector *__pyx_f_4cdec_2sa_3_sa_6Sc __Pyx_XDECREF_SET(__pyx_v_model, __pyx_t_6); __pyx_t_6 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/features.pxi":32 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/features.pxi":32 * cdef FeatureVector scores = FeatureVector() * for name, model in self.models: * scores.set(name, model(ctx)) # <<<<<<<<<<<<<< @@ -69322,7 +69412,7 @@ static struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector *__pyx_f_4cdec_2sa_3_sa_6Sc } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/features.pxi":33 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/features.pxi":33 * for name, model in self.models: * scores.set(name, model(ctx)) * return scores # <<<<<<<<<<<<<< @@ -69332,7 +69422,7 @@ static struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector *__pyx_f_4cdec_2sa_3_sa_6Sc __pyx_r = __pyx_v_scores; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/features.pxi":29 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/features.pxi":29 * self.models = zip(names, models) * * cdef FeatureVector score(self, ctx): # <<<<<<<<<<<<<< @@ -71785,6 +71875,7 @@ static PyObject *__pyx_tp_new_4cdec_2sa_3_sa_OnlineStats(PyTypeObject *t, CYTHON p->phrases_e = Py_None; Py_INCREF(Py_None); p->phrases_fe = Py_None; Py_INCREF(Py_None); p->phrases_al = Py_None; Py_INCREF(Py_None); + p->bilex = Py_None; Py_INCREF(Py_None); if (unlikely(__pyx_pw_4cdec_2sa_3_sa_11OnlineStats_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) { Py_DECREF(o); o = 0; } @@ -71804,6 +71895,7 @@ static void __pyx_tp_dealloc_4cdec_2sa_3_sa_OnlineStats(PyObject *o) { Py_CLEAR(p->phrases_e); Py_CLEAR(p->phrases_fe); Py_CLEAR(p->phrases_al); + Py_CLEAR(p->bilex); (*Py_TYPE(o)->tp_free)(o); } @@ -71825,6 +71917,9 @@ static int __pyx_tp_traverse_4cdec_2sa_3_sa_OnlineStats(PyObject *o, visitproc v if (p->phrases_al) { e = (*v)(p->phrases_al, a); if (e) return e; } + if (p->bilex) { + e = (*v)(p->bilex, a); if (e) return e; + } return 0; } @@ -71846,6 +71941,9 @@ static int __pyx_tp_clear_4cdec_2sa_3_sa_OnlineStats(PyObject *o) { tmp = ((PyObject*)p->phrases_al); p->phrases_al = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); + tmp = ((PyObject*)p->bilex); + p->bilex = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); return 0; } @@ -71914,6 +72012,19 @@ static int __pyx_setprop_4cdec_2sa_3_sa_11OnlineStats_phrases_al(PyObject *o, Py } } +static PyObject *__pyx_getprop_4cdec_2sa_3_sa_11OnlineStats_bilex(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_5bilex_1__get__(o); +} + +static int __pyx_setprop_4cdec_2sa_3_sa_11OnlineStats_bilex(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_5bilex_3__set__(o, v); + } + else { + return __pyx_pw_4cdec_2sa_3_sa_11OnlineStats_5bilex_5__del__(o); + } +} + static PyMethodDef __pyx_methods_4cdec_2sa_3_sa_OnlineStats[] = { {0, 0, 0, 0} }; @@ -71924,6 +72035,7 @@ static struct PyGetSetDef __pyx_getsets_4cdec_2sa_3_sa_OnlineStats[] = { {(char *)"phrases_e", __pyx_getprop_4cdec_2sa_3_sa_11OnlineStats_phrases_e, __pyx_setprop_4cdec_2sa_3_sa_11OnlineStats_phrases_e, 0, 0}, {(char *)"phrases_fe", __pyx_getprop_4cdec_2sa_3_sa_11OnlineStats_phrases_fe, __pyx_setprop_4cdec_2sa_3_sa_11OnlineStats_phrases_fe, 0, 0}, {(char *)"phrases_al", __pyx_getprop_4cdec_2sa_3_sa_11OnlineStats_phrases_al, __pyx_setprop_4cdec_2sa_3_sa_11OnlineStats_phrases_al, 0, 0}, + {(char *)"bilex", __pyx_getprop_4cdec_2sa_3_sa_11OnlineStats_bilex, __pyx_setprop_4cdec_2sa_3_sa_11OnlineStats_bilex, 0, 0}, {0, 0, 0, 0, 0} }; @@ -77007,6 +77119,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_kp_s_0, __pyx_k_0, sizeof(__pyx_k_0), 0, 0, 1, 0}, {&__pyx_kp_s_0_1, __pyx_k_0_1, sizeof(__pyx_k_0_1), 0, 0, 1, 0}, {&__pyx_kp_s_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 0, 1, 0}, + {&__pyx_n_s_Bilex, __pyx_k_Bilex, sizeof(__pyx_k_Bilex), 0, 0, 1, 1}, {&__pyx_kp_s_Bucket_sort_took_f_seconds, __pyx_k_Bucket_sort_took_f_seconds, sizeof(__pyx_k_Bucket_sort_took_f_seconds), 0, 0, 1, 0}, {&__pyx_kp_s_Computing_collocations, __pyx_k_Computing_collocations, sizeof(__pyx_k_Computing_collocations), 0, 0, 1, 0}, {&__pyx_kp_s_Computing_inverted_indexes, __pyx_k_Computing_inverted_indexes, sizeof(__pyx_k_Computing_inverted_indexes), 0, 0, 1, 0}, @@ -77038,7 +77151,6 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_kp_s_Must_specify_an_alignment_object, __pyx_k_Must_specify_an_alignment_object, sizeof(__pyx_k_Must_specify_an_alignment_object), 0, 0, 1, 0}, {&__pyx_n_s_NULL, __pyx_k_NULL, sizeof(__pyx_k_NULL), 0, 0, 1, 1}, {&__pyx_kp_s_No_aligned_terminals, __pyx_k_No_aligned_terminals, sizeof(__pyx_k_No_aligned_terminals), 0, 0, 1, 0}, - {&__pyx_kp_s_No_online_bilexical_dictionary_s, __pyx_k_No_online_bilexical_dictionary_s, sizeof(__pyx_k_No_online_bilexical_dictionary_s), 0, 0, 1, 0}, {&__pyx_n_s_OnlineFeatureContext, __pyx_k_OnlineFeatureContext, sizeof(__pyx_k_OnlineFeatureContext), 0, 0, 1, 1}, {&__pyx_kp_s_Precomputation_done_with_max_ini, __pyx_k_Precomputation_done_with_max_ini, sizeof(__pyx_k_Precomputation_done_with_max_ini), 0, 0, 1, 0}, {&__pyx_kp_s_Precomputation_done_with_max_non, __pyx_k_Precomputation_done_with_max_non, sizeof(__pyx_k_Precomputation_done_with_max_non), 0, 0, 1, 0}, @@ -77344,14 +77456,13 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_use_collocations, __pyx_k_use_collocations, sizeof(__pyx_k_use_collocations), 0, 0, 1, 1}, {&__pyx_n_s_use_index, __pyx_k_use_index, sizeof(__pyx_k_use_index), 0, 0, 1, 1}, {&__pyx_n_s_use_sent_id, __pyx_k_use_sent_id, sizeof(__pyx_k_use_sent_id), 0, 0, 1, 1}, - {&__pyx_kp_s_usr0_home_cdyer_cdec_python_cde, __pyx_k_usr0_home_cdyer_cdec_python_cde, sizeof(__pyx_k_usr0_home_cdyer_cdec_python_cde), 0, 0, 1, 0}, - {&__pyx_kp_s_usr0_home_cdyer_cdec_python_cde_2, __pyx_k_usr0_home_cdyer_cdec_python_cde_2, sizeof(__pyx_k_usr0_home_cdyer_cdec_python_cde_2), 0, 0, 1, 0}, - {&__pyx_kp_s_usr0_home_cdyer_cdec_python_cde_3, __pyx_k_usr0_home_cdyer_cdec_python_cde_3, sizeof(__pyx_k_usr0_home_cdyer_cdec_python_cde_3), 0, 0, 1, 0}, + {&__pyx_kp_s_usr0_home_mdenkows_cdec_python, __pyx_k_usr0_home_mdenkows_cdec_python, sizeof(__pyx_k_usr0_home_mdenkows_cdec_python), 0, 0, 1, 0}, + {&__pyx_kp_s_usr0_home_mdenkows_cdec_python_2, __pyx_k_usr0_home_mdenkows_cdec_python_2, sizeof(__pyx_k_usr0_home_mdenkows_cdec_python_2), 0, 0, 1, 0}, + {&__pyx_kp_s_usr0_home_mdenkows_cdec_python_3, __pyx_k_usr0_home_mdenkows_cdec_python_3, sizeof(__pyx_k_usr0_home_mdenkows_cdec_python_3), 0, 0, 1, 0}, {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1}, {&__pyx_n_s_vec, __pyx_k_vec, sizeof(__pyx_k_vec), 0, 0, 1, 1}, {&__pyx_n_s_w, __pyx_k_w, sizeof(__pyx_k_w), 0, 0, 1, 1}, {&__pyx_n_s_warn, __pyx_k_warn, sizeof(__pyx_k_warn), 0, 0, 1, 1}, - {&__pyx_n_s_warning, __pyx_k_warning, sizeof(__pyx_k_warning), 0, 0, 1, 1}, {&__pyx_n_s_wc, __pyx_k_wc, sizeof(__pyx_k_wc), 0, 0, 1, 1}, {&__pyx_n_s_word, __pyx_k_word, sizeof(__pyx_k_word), 0, 0, 1, 1}, {&__pyx_n_s_word_alignments, __pyx_k_word_alignments, sizeof(__pyx_k_word_alignments), 0, 0, 1, 1}, @@ -77377,8 +77488,8 @@ static int __Pyx_InitCachedBuiltins(void) { __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_n_s_zip); if (!__pyx_builtin_zip) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 371; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_StopIteration = __Pyx_GetBuiltinName(__pyx_n_s_StopIteration); if (!__pyx_builtin_StopIteration) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_cmp = __Pyx_GetBuiltinName(__pyx_n_s_cmp); if (!__pyx_builtin_cmp) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_sorted = __Pyx_GetBuiltinName(__pyx_n_s_sorted); if (!__pyx_builtin_sorted) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 971; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_max = __Pyx_GetBuiltinName(__pyx_n_s_max); if (!__pyx_builtin_max) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1148; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_sorted = __Pyx_GetBuiltinName(__pyx_n_s_sorted); if (!__pyx_builtin_sorted) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 979; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_max = __Pyx_GetBuiltinName(__pyx_n_s_max); if (!__pyx_builtin_max) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} return 0; __pyx_L1_error:; return -1; @@ -77388,7 +77499,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":20 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":20 * self.word2id = {"END_OF_FILE":0, "END_OF_LINE":1} * self.id2word = ["END_OF_FILE", "END_OF_LINE"] * self.data = IntList(1000,1000) # <<<<<<<<<<<<<< @@ -77399,7 +77510,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__3); __Pyx_GIVEREF(__pyx_tuple__3); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":21 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":21 * self.id2word = ["END_OF_FILE", "END_OF_LINE"] * self.data = IntList(1000,1000) * self.sent_id = IntList(1000,1000) # <<<<<<<<<<<<<< @@ -77410,7 +77521,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__4); __Pyx_GIVEREF(__pyx_tuple__4); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":22 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":22 * self.data = IntList(1000,1000) * self.sent_id = IntList(1000,1000) * self.sent_index = IntList(1000,1000) # <<<<<<<<<<<<<< @@ -77421,7 +77532,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__5); __Pyx_GIVEREF(__pyx_tuple__5); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":66 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":66 * f.write("%s " % self.get_word(w_id)) * if w_id == 1: * f.write("\n") # <<<<<<<<<<<<<< @@ -77432,7 +77543,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__7); __Pyx_GIVEREF(__pyx_tuple__7); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":61 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":61 * * def write_text(self, char* filename): * with open(filename, "w") as f: # <<<<<<<<<<<<<< @@ -77443,7 +77554,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__8); __Pyx_GIVEREF(__pyx_tuple__8); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":69 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":69 * * def read_text(self, char* filename): * with gzip_or_text(filename) as fp: # <<<<<<<<<<<<<< @@ -77454,7 +77565,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__9); __Pyx_GIVEREF(__pyx_tuple__9); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":74 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":74 * def read_bitext(self, char* filename, int side): * with gzip_or_text(filename) as fp: * data = (line.split(' ||| ')[side] for line in fp) # <<<<<<<<<<<<<< @@ -77465,7 +77576,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__11); __Pyx_GIVEREF(__pyx_tuple__11); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":73 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":73 * * def read_bitext(self, char* filename, int side): * with gzip_or_text(filename) as fp: # <<<<<<<<<<<<<< @@ -77476,7 +77587,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__12); __Pyx_GIVEREF(__pyx_tuple__12); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":130 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":130 * num_words = len(self.id2word) - 2 * fwrite(&(num_words), sizeof(int), 1, f) * for word in self.id2word[2:]: # <<<<<<<<<<<<<< @@ -77487,7 +77598,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_slice__13); __Pyx_GIVEREF(__pyx_slice__13); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":144 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":144 * for i in self.data: * f.write("%d " %i) * f.write("\n") # <<<<<<<<<<<<<< @@ -77498,7 +77609,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__14); __Pyx_GIVEREF(__pyx_tuple__14); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":147 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":147 * for i in self.sent_index: * f.write("%d " %i) * f.write("\n") # <<<<<<<<<<<<<< @@ -77509,7 +77620,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__15); __Pyx_GIVEREF(__pyx_tuple__15); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":150 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":150 * for i in self.sent_id: * f.write("%d " %i) * f.write("\n") # <<<<<<<<<<<<<< @@ -77520,7 +77631,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__16); __Pyx_GIVEREF(__pyx_tuple__16); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":153 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":153 * for word in self.id2word: * f.write("%s %d " % (word, self.word2id[word])) * f.write("\n") # <<<<<<<<<<<<<< @@ -77531,7 +77642,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__17); __Pyx_GIVEREF(__pyx_tuple__17); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/data_array.pxi":156 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/data_array.pxi":156 * * def write_enhanced(self, char* filename): * with open(filename, "w") as f: # <<<<<<<<<<<<<< @@ -77541,7 +77652,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__18); __Pyx_GIVEREF(__pyx_tuple__18); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":48 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":48 * * def __cinit__(self, from_binary=None, from_text=None): * self.links = IntList(1000,1000) # <<<<<<<<<<<<<< @@ -77552,7 +77663,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__19); __Pyx_GIVEREF(__pyx_tuple__19); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":49 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":49 * def __cinit__(self, from_binary=None, from_text=None): * self.links = IntList(1000,1000) * self.sent_index = IntList(1000,1000) # <<<<<<<<<<<<<< @@ -77563,7 +77674,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__20); __Pyx_GIVEREF(__pyx_tuple__20); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":61 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":61 * pairs = line.split() * for pair in pairs: * (i, j) = map(int, pair.split('-')) # <<<<<<<<<<<<<< @@ -77574,7 +77685,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__22); __Pyx_GIVEREF(__pyx_tuple__22); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":56 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":56 * * def read_text(self, char* filename): * with gzip_or_text(filename) as f: # <<<<<<<<<<<<<< @@ -77585,7 +77696,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__23); __Pyx_GIVEREF(__pyx_tuple__23); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":77 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":77 * for i, link in enumerate(self.links): * while i >= self.sent_index[sent_num]: * f.write("\n") # <<<<<<<<<<<<<< @@ -77596,7 +77707,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__24); __Pyx_GIVEREF(__pyx_tuple__24); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":80 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":80 * sent_num = sent_num + 1 * f.write("%d-%d " % self.unlink(link)) * f.write("\n") # <<<<<<<<<<<<<< @@ -77607,7 +77718,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__25); __Pyx_GIVEREF(__pyx_tuple__25); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":73 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":73 * * def write_text(self, char* filename): * with open(filename, "w") as f: # <<<<<<<<<<<<<< @@ -77618,7 +77729,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__26); __Pyx_GIVEREF(__pyx_tuple__26); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":93 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":93 * for link in self.links: * f.write("%d " % link) * f.write("\n") # <<<<<<<<<<<<<< @@ -77629,7 +77740,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__27); __Pyx_GIVEREF(__pyx_tuple__27); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":96 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":96 * for i in self.sent_index: * f.write("%d " % i) * f.write("\n") # <<<<<<<<<<<<<< @@ -77640,7 +77751,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__28); __Pyx_GIVEREF(__pyx_tuple__28); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":90 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":90 * * def write_enhanced(self, char* filename): * with open(filename, "w") as f: # <<<<<<<<<<<<<< @@ -77651,7 +77762,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__29); __Pyx_GIVEREF(__pyx_tuple__29); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":305 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":305 * * # Re-read file, placing words into buckets * f.seek(0) # <<<<<<<<<<<<<< @@ -77662,7 +77773,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__30); __Pyx_GIVEREF(__pyx_tuple__30); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":281 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":281 * * fcount = IntList() * with gzip_or_text(filename) as f: # <<<<<<<<<<<<<< @@ -77673,7 +77784,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__31); __Pyx_GIVEREF(__pyx_tuple__31); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":347 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":347 * * if i > j: * raise Exception("Sort error in CLex") # <<<<<<<<<<<<<< @@ -77684,7 +77795,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__33); __Pyx_GIVEREF(__pyx_tuple__33); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":370 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":370 * for i in self.f_index: * f.write("%d " % i) * f.write("\n") # <<<<<<<<<<<<<< @@ -77695,7 +77806,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__35); __Pyx_GIVEREF(__pyx_tuple__35); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":373 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":373 * for i, s1, s2 in zip(self.e_index, self.col1, self.col2): * f.write("%d %f %f " % (i, s1, s2)) * f.write("\n") # <<<<<<<<<<<<<< @@ -77706,7 +77817,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__36); __Pyx_GIVEREF(__pyx_tuple__36); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":376 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":376 * for i, w in enumerate(self.id2fword): * f.write("%d %s " % (i, w)) * f.write("\n") # <<<<<<<<<<<<<< @@ -77717,7 +77828,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__37); __Pyx_GIVEREF(__pyx_tuple__37); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":379 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":379 * for i, w in enumerate(self.id2eword): * f.write("%d %s " % (i, w)) * f.write("\n") # <<<<<<<<<<<<<< @@ -77728,7 +77839,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__38); __Pyx_GIVEREF(__pyx_tuple__38); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":367 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":367 * * def write_enhanced(self, char* filename): * with open(filename, "w") as f: # <<<<<<<<<<<<<< @@ -77739,7 +77850,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__39); __Pyx_GIVEREF(__pyx_tuple__39); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/bilex.pxi":412 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/bilex.pxi":412 * cdef i, N, e_id, f_id * * with open(filename, "w") as f: # <<<<<<<<<<<<<< @@ -77750,7 +77861,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__40); __Pyx_GIVEREF(__pyx_tuple__40); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":13 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":13 * cdef IntList rank * * logger.info("Constructing LCP array") # <<<<<<<<<<<<<< @@ -77761,7 +77872,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__43); __Pyx_GIVEREF(__pyx_tuple__43); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/lcp.pxi":34 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/lcp.pxi":34 * if h > 0: * h = h-1 * logger.info("LCP array completed") # <<<<<<<<<<<<<< @@ -77772,7 +77883,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__44); __Pyx_GIVEREF(__pyx_tuple__44); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":297 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":297 * pattern_rank = {} * * logger.info("Precomputing frequent intersections") # <<<<<<<<<<<<<< @@ -77783,7 +77894,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__47); __Pyx_GIVEREF(__pyx_tuple__47); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":314 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":314 * queue = IntList(increment=1000) * * logger.info(" Computing inverted indexes...") # <<<<<<<<<<<<<< @@ -77794,7 +77905,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__48); __Pyx_GIVEREF(__pyx_tuple__48); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":329 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":329 * trie_node_data_append(node, i) * * logger.info(" Computing collocations...") # <<<<<<<<<<<<<< @@ -77805,7 +77916,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__49); __Pyx_GIVEREF(__pyx_tuple__49); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":386 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":386 * ptr1 = ptr1 + 1 * * self.precomputed_collocations = collocations.toMap(False) # <<<<<<<<<<<<<< @@ -77816,7 +77927,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__50); __Pyx_GIVEREF(__pyx_tuple__50); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":387 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":387 * * self.precomputed_collocations = collocations.toMap(False) * self.precomputed_index = frequent_patterns.toMap(True) # <<<<<<<<<<<<<< @@ -77827,7 +77938,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__51); __Pyx_GIVEREF(__pyx_tuple__51); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":393 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":393 * for pattern2 in J_set: * if len(pattern1) + len(pattern2) + 1 < self.max_length: * combined_pattern = pattern1 + (-1,) + pattern2 # <<<<<<<<<<<<<< @@ -77838,7 +77949,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__52); __Pyx_GIVEREF(__pyx_tuple__52); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":400 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":400 * x = x+1 * if len(pattern1) + len(pattern2) + 1 <= self.max_length: * combined_pattern = pattern1 + (-1,) + pattern2 # <<<<<<<<<<<<<< @@ -77849,7 +77960,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__53); __Pyx_GIVEREF(__pyx_tuple__53); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":407 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":407 * x = x+2 * if len(pattern1) + len(pattern2) + 1<= self.max_length: * combined_pattern = pattern1 + (-1,) + pattern2 # <<<<<<<<<<<<<< @@ -77860,7 +77971,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__54); __Pyx_GIVEREF(__pyx_tuple__54); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/precomputation.pxi":409 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/precomputation.pxi":409 * combined_pattern = pattern1 + (-1,) + pattern2 * IJ_set.add(combined_pattern) * combined_pattern = pattern2 + (-1,) + pattern1 # <<<<<<<<<<<<<< @@ -77871,7 +77982,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__55); __Pyx_GIVEREF(__pyx_tuple__55); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":94 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":94 * * '''Step 3: read off suffix array from inverse suffix array''' * logger.info(" Finalizing sort...") # <<<<<<<<<<<<<< @@ -77882,7 +77993,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__56); __Pyx_GIVEREF(__pyx_tuple__56); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":193 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":193 * for a_i in self.sa: * f.write("%d " % a_i) * f.write("\n") # <<<<<<<<<<<<<< @@ -77893,7 +78004,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__57); __Pyx_GIVEREF(__pyx_tuple__57); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":196 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":196 * for w_i in self.ha: * f.write("%d " % w_i) * f.write("\n") # <<<<<<<<<<<<<< @@ -77904,7 +78015,7 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__58); __Pyx_GIVEREF(__pyx_tuple__58); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/suffix_array.pxi":189 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/suffix_array.pxi":189 * * def write_enhanced(self, char* filename): * with open(filename, "w") as f: # <<<<<<<<<<<<<< @@ -77915,128 +78026,117 @@ static int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__59); __Pyx_GIVEREF(__pyx_tuple__59); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":133 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":140 * logger.info("Sampling strategy: uniform, max sample size = %d", sample_size) * else: * logger.info("Sampling strategy: no sampling") # <<<<<<<<<<<<<< * * def sample(self, PhraseLocation phrase_location): */ - __pyx_tuple__60 = PyTuple_Pack(1, __pyx_kp_s_Sampling_strategy_no_sampling); if (unlikely(!__pyx_tuple__60)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__60 = PyTuple_Pack(1, __pyx_kp_s_Sampling_strategy_no_sampling); if (unlikely(!__pyx_tuple__60)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__60); __Pyx_GIVEREF(__pyx_tuple__60); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":346 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":353 * respectively. This is because Chiang's model does not require * them to be the same, therefore we don't either.''' * self.rules = TrieTable(True) # cache # <<<<<<<<<<<<<< * self.rules.root = ExtendedTrieNode(phrase_location=PhraseLocation()) * if alignment is None: */ - __pyx_tuple__61 = PyTuple_Pack(1, Py_True); if (unlikely(!__pyx_tuple__61)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__61 = PyTuple_Pack(1, Py_True); if (unlikely(!__pyx_tuple__61)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__61); __Pyx_GIVEREF(__pyx_tuple__61); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":349 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":356 * self.rules.root = ExtendedTrieNode(phrase_location=PhraseLocation()) * if alignment is None: * raise Exception("Must specify an alignment object") # <<<<<<<<<<<<<< * self.alignment = alignment * */ - __pyx_tuple__62 = PyTuple_Pack(1, __pyx_kp_s_Must_specify_an_alignment_object); if (unlikely(!__pyx_tuple__62)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__62 = PyTuple_Pack(1, __pyx_kp_s_Must_specify_an_alignment_object); if (unlikely(!__pyx_tuple__62)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__62); __Pyx_GIVEREF(__pyx_tuple__62); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1064 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1072 * else: * #ERROR: We never get here * raise Exception("Keyword trie error") # <<<<<<<<<<<<<< * # checking whether lookup_required * if lookup_required: */ - __pyx_tuple__66 = PyTuple_Pack(1, __pyx_kp_s_Keyword_trie_error); if (unlikely(!__pyx_tuple__66)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1064; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__66 = PyTuple_Pack(1, __pyx_kp_s_Keyword_trie_error); if (unlikely(!__pyx_tuple__66)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1072; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__66); __Pyx_GIVEREF(__pyx_tuple__66); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1983 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1991 * if nt and nt[-1][2] == f_j - 1: * # Add to non-terminal, checking for collisions * old_last_nt = nt[-1][:] # <<<<<<<<<<<<<< * nt[-1][2] = f_j * if link_i < nt[-1][3]: */ - __pyx_slice__67 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__67)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1983; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_slice__67 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__67)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1991; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_slice__67); __Pyx_GIVEREF(__pyx_slice__67); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":1920 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":1928 * # f_ i and j are current, e_ i and j are previous * # We care _considering_ f_j, so it is not yet in counts * def extract(f_i, f_j, e_i, e_j, min_bound, wc, links, nt, nt_open): # <<<<<<<<<<<<<< * # Phrase extraction limits * if f_j > (f_len - 1) or (f_j - f_i) + 1 > self.max_initial_size: */ - __pyx_tuple__68 = PyTuple_Pack(19, __pyx_n_s_f_i, __pyx_n_s_f_j, __pyx_n_s_e_i, __pyx_n_s_e_j, __pyx_n_s_min_bound, __pyx_n_s_wc, __pyx_n_s_links, __pyx_n_s_nt, __pyx_n_s_nt_open, __pyx_n_s_link_i, __pyx_n_s_link_j, __pyx_n_s_new_e_i, __pyx_n_s_new_e_j, __pyx_n_s_new_min_bound, __pyx_n_s_i, __pyx_n_s_nt_collision, __pyx_n_s_link, __pyx_n_s_plus_links, __pyx_n_s_old_last_nt); if (unlikely(!__pyx_tuple__68)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1920; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__68 = PyTuple_Pack(19, __pyx_n_s_f_i, __pyx_n_s_f_j, __pyx_n_s_e_i, __pyx_n_s_e_j, __pyx_n_s_min_bound, __pyx_n_s_wc, __pyx_n_s_links, __pyx_n_s_nt, __pyx_n_s_nt_open, __pyx_n_s_link_i, __pyx_n_s_link_j, __pyx_n_s_new_e_i, __pyx_n_s_new_e_j, __pyx_n_s_new_min_bound, __pyx_n_s_i, __pyx_n_s_nt_collision, __pyx_n_s_link, __pyx_n_s_plus_links, __pyx_n_s_old_last_nt); if (unlikely(!__pyx_tuple__68)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1928; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_tuple__68); __Pyx_GIVEREF(__pyx_tuple__68); - __pyx_codeobj__69 = (PyObject*)__Pyx_PyCode_New(9, 0, 19, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__68, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr0_home_cdyer_cdec_python_cde, __pyx_n_s_extract, 1920, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__69)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1920; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_codeobj__69 = (PyObject*)__Pyx_PyCode_New(9, 0, 19, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__68, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr0_home_mdenkows_cdec_python, __pyx_n_s_extract, 1928, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__69)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1928; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2042 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2050 * # Update phrase counts * for rule in rules: * (f_ph, e_ph, al) = rule[:3] # <<<<<<<<<<<<<< * stats.phrases_f[f_ph] += 1 * stats.phrases_e[e_ph] += 1 */ - __pyx_slice__70 = PySlice_New(Py_None, __pyx_int_3, Py_None); if (unlikely(!__pyx_slice__70)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2042; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_slice__70 = PySlice_New(Py_None, __pyx_int_3, Py_None); if (unlikely(!__pyx_slice__70)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2050; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_slice__70); __Pyx_GIVEREF(__pyx_slice__70); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2053 - * self.bilex.update(f_words, e_words, alignment) - * else: - * logger.warning('No online bilexical dictionary specified, not updating lexical weights') # <<<<<<<<<<<<<< - * - * # Create a rule from source, target, non-terminals, and alignments - */ - __pyx_tuple__71 = PyTuple_Pack(1, __pyx_kp_s_No_online_bilexical_dictionary_s); if (unlikely(!__pyx_tuple__71)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2053; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_tuple__71); - __Pyx_GIVEREF(__pyx_tuple__71); - - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2060 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2065 * # Substitute in non-terminals * nt_inv = sorted(nt, cmp=lambda x, y: cmp(x[3], y[3])) * f_sym = list(f_span[:]) # <<<<<<<<<<<<<< * off = f_i * for next_nt in nt: */ - __pyx_slice__72 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__72)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2060; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_slice__72); - __Pyx_GIVEREF(__pyx_slice__72); + __pyx_slice__71 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__71)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2065; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_slice__71); + __Pyx_GIVEREF(__pyx_slice__71); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2070 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2075 * f_sym.insert(next_nt[1] - off, sym_setindex(self.category, next_nt[0])) * off += (nt_len - 1) * e_sym = list(e_span[:]) # <<<<<<<<<<<<<< * off = e_i * for next_nt in nt_inv: */ - __pyx_slice__73 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__73)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2070; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_slice__73); - __Pyx_GIVEREF(__pyx_slice__73); + __pyx_slice__72 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__72)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2075; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_slice__72); + __Pyx_GIVEREF(__pyx_slice__72); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2145 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2150 * phrases = set() # (fphrase, lex_i, lex_j) * * def extract(f_i, f_j, lex_i, lex_j, wc, ntc, syms): # <<<<<<<<<<<<<< * # Phrase extraction limits * if f_j > (f_len - 1) or (f_j - f_i) + 1 > self.max_initial_size: */ - __pyx_tuple__74 = PyTuple_Pack(10, __pyx_n_s_f_i, __pyx_n_s_f_j, __pyx_n_s_lex_i, __pyx_n_s_lex_j, __pyx_n_s_wc, __pyx_n_s_ntc, __pyx_n_s_syms, __pyx_n_s_f, __pyx_n_s_new_lex_i, __pyx_n_s_new_lex_j); if (unlikely(!__pyx_tuple__74)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_tuple__74); - __Pyx_GIVEREF(__pyx_tuple__74); - __pyx_codeobj__75 = (PyObject*)__Pyx_PyCode_New(7, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__74, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr0_home_cdyer_cdec_python_cde, __pyx_n_s_extract, 2145, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__75)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__73 = PyTuple_Pack(10, __pyx_n_s_f_i, __pyx_n_s_f_j, __pyx_n_s_lex_i, __pyx_n_s_lex_j, __pyx_n_s_wc, __pyx_n_s_ntc, __pyx_n_s_syms, __pyx_n_s_f, __pyx_n_s_new_lex_i, __pyx_n_s_new_lex_j); if (unlikely(!__pyx_tuple__73)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__73); + __Pyx_GIVEREF(__pyx_tuple__73); + __pyx_codeobj__74 = (PyObject*)__Pyx_PyCode_New(7, 0, 10, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__73, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr0_home_mdenkows_cdec_python, __pyx_n_s_extract, 2150, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__74)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2150; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "cdec/sa/_sa.pyx":5 * import gzip @@ -78045,7 +78145,7 @@ static int __Pyx_InitCachedConstants(void) { * return (resource.getrusage(resource.RUSAGE_SELF).ru_utime+ * resource.getrusage(resource.RUSAGE_SELF).ru_stime) */ - __pyx_codeobj__76 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr0_home_cdyer_cdec_python_cde_2, __pyx_n_s_monitor_cpu, 5, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__76)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_codeobj__75 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr0_home_mdenkows_cdec_python_2, __pyx_n_s_monitor_cpu, 5, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__75)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "cdec/sa/_sa.pyx":9 * resource.getrusage(resource.RUSAGE_SELF).ru_stime) @@ -78054,10 +78154,10 @@ static int __Pyx_InitCachedConstants(void) { * if filename.endswith('.gz'): * return gzip.GzipFile(filename) */ - __pyx_tuple__77 = PyTuple_Pack(2, __pyx_n_s_filename, __pyx_n_s_filename); if (unlikely(!__pyx_tuple__77)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_tuple__77); - __Pyx_GIVEREF(__pyx_tuple__77); - __pyx_codeobj__78 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__77, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr0_home_cdyer_cdec_python_cde_2, __pyx_n_s_gzip_or_text, 9, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__78)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__76 = PyTuple_Pack(2, __pyx_n_s_filename, __pyx_n_s_filename); if (unlikely(!__pyx_tuple__76)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__76); + __Pyx_GIVEREF(__pyx_tuple__76); + __pyx_codeobj__77 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__76, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr0_home_mdenkows_cdec_python_2, __pyx_n_s_gzip_or_text, 9, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__77)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "cdec/sa/_sa.pyx":15 * return open(filename) @@ -78066,116 +78166,116 @@ static int __Pyx_InitCachedConstants(void) { * * include "float_list.pxi" */ - __pyx_tuple__79 = PyTuple_Pack(1, __pyx_kp_s_cdec_sa); if (unlikely(!__pyx_tuple__79)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_tuple__79); - __Pyx_GIVEREF(__pyx_tuple__79); + __pyx_tuple__78 = PyTuple_Pack(1, __pyx_kp_s_cdec_sa); if (unlikely(!__pyx_tuple__78)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__78); + __Pyx_GIVEREF(__pyx_tuple__78); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":107 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":107 * return ALPHABET.fromstring(string, terminal) * * def isvar(sym): # <<<<<<<<<<<<<< * return sym_isvar(sym) * */ - __pyx_tuple__80 = PyTuple_Pack(1, __pyx_n_s_sym); if (unlikely(!__pyx_tuple__80)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_tuple__80); - __Pyx_GIVEREF(__pyx_tuple__80); - __pyx_codeobj__81 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__80, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr0_home_cdyer_cdec_python_cde_3, __pyx_n_s_isvar, 107, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__81)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__79 = PyTuple_Pack(1, __pyx_n_s_sym); if (unlikely(!__pyx_tuple__79)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__79); + __Pyx_GIVEREF(__pyx_tuple__79); + __pyx_codeobj__80 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__79, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr0_home_mdenkows_cdec_python_3, __pyx_n_s_isvar, 107, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__80)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":110 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":110 * return sym_isvar(sym) * * def make_lattice(words): # <<<<<<<<<<<<<< * word_ids = (sym_fromstring(word, True) for word in words) * return tuple(((word, None, 1), ) for word in word_ids) */ - __pyx_tuple__82 = PyTuple_Pack(5, __pyx_n_s_words, __pyx_n_s_word_ids, __pyx_n_s_genexpr, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__82)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_tuple__82); - __Pyx_GIVEREF(__pyx_tuple__82); - __pyx_codeobj__83 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__82, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr0_home_cdyer_cdec_python_cde_3, __pyx_n_s_make_lattice, 110, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__83)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__81 = PyTuple_Pack(5, __pyx_n_s_words, __pyx_n_s_word_ids, __pyx_n_s_genexpr, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__81)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__81); + __Pyx_GIVEREF(__pyx_tuple__81); + __pyx_codeobj__82 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__81, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr0_home_mdenkows_cdec_python_3, __pyx_n_s_make_lattice, 110, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__82)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":114 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":114 * return tuple(((word, None, 1), ) for word in word_ids) * * def decode_lattice(lattice): # <<<<<<<<<<<<<< * return tuple((sym_tostring(sym), weight, dist) for (sym, weight, dist) in arc * for arc in node for node in lattice) */ - __pyx_tuple__84 = PyTuple_Pack(3, __pyx_n_s_lattice, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__84)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_tuple__84); - __Pyx_GIVEREF(__pyx_tuple__84); - __pyx_codeobj__85 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__84, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr0_home_cdyer_cdec_python_cde_3, __pyx_n_s_decode_lattice, 114, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__85)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__83 = PyTuple_Pack(3, __pyx_n_s_lattice, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__83)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__83); + __Pyx_GIVEREF(__pyx_tuple__83); + __pyx_codeobj__84 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__83, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr0_home_mdenkows_cdec_python_3, __pyx_n_s_decode_lattice, 114, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__84)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":118 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":118 * for arc in node for node in lattice) * * def decode_sentence(lattice): # <<<<<<<<<<<<<< * return tuple(sym_tostring(sym) for ((sym, _, _),) in lattice) * */ - __pyx_tuple__86 = PyTuple_Pack(3, __pyx_n_s_lattice, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__86)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_tuple__86); - __Pyx_GIVEREF(__pyx_tuple__86); - __pyx_codeobj__87 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__86, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr0_home_cdyer_cdec_python_cde_3, __pyx_n_s_decode_sentence, 118, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__87)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__85 = PyTuple_Pack(3, __pyx_n_s_lattice, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__85)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__85); + __Pyx_GIVEREF(__pyx_tuple__85); + __pyx_codeobj__86 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__85, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr0_home_mdenkows_cdec_python_3, __pyx_n_s_decode_sentence, 118, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__86)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":121 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":121 * return tuple(sym_tostring(sym) for ((sym, _, _),) in lattice) * * def encode_words(words): # <<<<<<<<<<<<<< * return tuple(sym_fromstring(word, True) for word in words) * */ - __pyx_tuple__88 = PyTuple_Pack(3, __pyx_n_s_words, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__88)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_tuple__88); - __Pyx_GIVEREF(__pyx_tuple__88); - __pyx_codeobj__89 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__88, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr0_home_cdyer_cdec_python_cde_3, __pyx_n_s_encode_words, 121, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__89)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__87 = PyTuple_Pack(3, __pyx_n_s_words, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__87)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__87); + __Pyx_GIVEREF(__pyx_tuple__87); + __pyx_codeobj__88 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__87, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr0_home_mdenkows_cdec_python_3, __pyx_n_s_encode_words, 121, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__88)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":124 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":124 * return tuple(sym_fromstring(word, True) for word in words) * * def decode_words(syms): # <<<<<<<<<<<<<< * return tuple(sym_tostring(sym) for sym in syms) */ - __pyx_tuple__90 = PyTuple_Pack(3, __pyx_n_s_syms, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__90)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_tuple__90); - __Pyx_GIVEREF(__pyx_tuple__90); - __pyx_codeobj__91 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__90, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr0_home_cdyer_cdec_python_cde_3, __pyx_n_s_decode_words, 124, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__91)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__89 = PyTuple_Pack(3, __pyx_n_s_syms, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__89)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__89); + __Pyx_GIVEREF(__pyx_tuple__89); + __pyx_codeobj__90 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__89, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr0_home_mdenkows_cdec_python_3, __pyx_n_s_decode_words, 124, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__90)) {__pyx_filename = __pyx_f[10]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2183 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2188 * * # Spans are _inclusive_ on both ends [i, j] * def span_check(vec, i, j): # <<<<<<<<<<<<<< * k = i * while k <= j: */ - __pyx_tuple__92 = PyTuple_Pack(4, __pyx_n_s_vec, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k); if (unlikely(!__pyx_tuple__92)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_tuple__92); - __Pyx_GIVEREF(__pyx_tuple__92); - __pyx_codeobj__93 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__92, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr0_home_cdyer_cdec_python_cde, __pyx_n_s_span_check, 2183, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__93)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__91 = PyTuple_Pack(4, __pyx_n_s_vec, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k); if (unlikely(!__pyx_tuple__91)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__91); + __Pyx_GIVEREF(__pyx_tuple__91); + __pyx_codeobj__92 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__91, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr0_home_mdenkows_cdec_python, __pyx_n_s_span_check, 2188, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__92)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2191 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2196 * return True * * def span_inc(vec, i, j): # <<<<<<<<<<<<<< * k = i * while k <= j: */ - __pyx_tuple__94 = PyTuple_Pack(4, __pyx_n_s_vec, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k); if (unlikely(!__pyx_tuple__94)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_tuple__94); - __Pyx_GIVEREF(__pyx_tuple__94); - __pyx_codeobj__95 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__94, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr0_home_cdyer_cdec_python_cde, __pyx_n_s_span_inc, 2191, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__95)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__93 = PyTuple_Pack(4, __pyx_n_s_vec, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k); if (unlikely(!__pyx_tuple__93)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__93); + __Pyx_GIVEREF(__pyx_tuple__93); + __pyx_codeobj__94 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__93, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr0_home_mdenkows_cdec_python, __pyx_n_s_span_inc, 2196, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__94)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/cdyer/cdec/python/cdec/sa/rulefactory.pxi":2197 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/rulefactory.pxi":2202 * k += 1 * * def span_dec(vec, i, j): # <<<<<<<<<<<<<< * k = i * while k <= j: */ - __pyx_tuple__96 = PyTuple_Pack(4, __pyx_n_s_vec, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k); if (unlikely(!__pyx_tuple__96)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_tuple__96); - __Pyx_GIVEREF(__pyx_tuple__96); - __pyx_codeobj__97 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__96, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr0_home_cdyer_cdec_python_cde, __pyx_n_s_span_dec, 2197, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__97)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__95 = PyTuple_Pack(4, __pyx_n_s_vec, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k); if (unlikely(!__pyx_tuple__95)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2202; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__95); + __Pyx_GIVEREF(__pyx_tuple__95); + __pyx_codeobj__96 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__95, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr0_home_mdenkows_cdec_python, __pyx_n_s_span_dec, 2202, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__96)) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2202; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; @@ -78430,33 +78530,33 @@ PyMODINIT_FUNC PyInit__sa(void) if (__Pyx_SetVtable(__pyx_type_4cdec_2sa_3_sa_SuffixArray.tp_dict, __pyx_vtabptr_4cdec_2sa_3_sa_SuffixArray) < 0) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "SuffixArray", (PyObject *)&__pyx_type_4cdec_2sa_3_sa_SuffixArray) < 0) {__pyx_filename = __pyx_f[12]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_4cdec_2sa_3_sa_SuffixArray = &__pyx_type_4cdec_2sa_3_sa_SuffixArray; - if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa_OnlineStats) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa_OnlineStats) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_4cdec_2sa_3_sa_OnlineStats.tp_print = 0; - if (__Pyx_SetAttrString(__pyx_m, "OnlineStats", (PyObject *)&__pyx_type_4cdec_2sa_3_sa_OnlineStats) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "OnlineStats", (PyObject *)&__pyx_type_4cdec_2sa_3_sa_OnlineStats) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_4cdec_2sa_3_sa_OnlineStats = &__pyx_type_4cdec_2sa_3_sa_OnlineStats; - if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa_TrieNode) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa_TrieNode) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_4cdec_2sa_3_sa_TrieNode.tp_print = 0; - if (__Pyx_SetAttrString(__pyx_m, "TrieNode", (PyObject *)&__pyx_type_4cdec_2sa_3_sa_TrieNode) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "TrieNode", (PyObject *)&__pyx_type_4cdec_2sa_3_sa_TrieNode) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_4cdec_2sa_3_sa_TrieNode = &__pyx_type_4cdec_2sa_3_sa_TrieNode; __pyx_type_4cdec_2sa_3_sa_ExtendedTrieNode.tp_base = __pyx_ptype_4cdec_2sa_3_sa_TrieNode; - if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa_ExtendedTrieNode) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa_ExtendedTrieNode) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_4cdec_2sa_3_sa_ExtendedTrieNode.tp_print = 0; - if (__Pyx_SetAttrString(__pyx_m, "ExtendedTrieNode", (PyObject *)&__pyx_type_4cdec_2sa_3_sa_ExtendedTrieNode) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "ExtendedTrieNode", (PyObject *)&__pyx_type_4cdec_2sa_3_sa_ExtendedTrieNode) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_4cdec_2sa_3_sa_ExtendedTrieNode = &__pyx_type_4cdec_2sa_3_sa_ExtendedTrieNode; - if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa_TrieTable) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa_TrieTable) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_4cdec_2sa_3_sa_TrieTable.tp_print = 0; - if (__Pyx_SetAttrString(__pyx_m, "TrieTable", (PyObject *)&__pyx_type_4cdec_2sa_3_sa_TrieTable) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "TrieTable", (PyObject *)&__pyx_type_4cdec_2sa_3_sa_TrieTable) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_4cdec_2sa_3_sa_TrieTable = &__pyx_type_4cdec_2sa_3_sa_TrieTable; __pyx_vtabptr_4cdec_2sa_3_sa_PhraseLocation = &__pyx_vtable_4cdec_2sa_3_sa_PhraseLocation; __pyx_vtable_4cdec_2sa_3_sa_PhraseLocation.contains = (int (*)(struct __pyx_obj_4cdec_2sa_3_sa_PhraseLocation *, int))__pyx_f_4cdec_2sa_3_sa_14PhraseLocation_contains; - if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa_PhraseLocation) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa_PhraseLocation) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_4cdec_2sa_3_sa_PhraseLocation.tp_print = 0; - if (__Pyx_SetVtable(__pyx_type_4cdec_2sa_3_sa_PhraseLocation.tp_dict, __pyx_vtabptr_4cdec_2sa_3_sa_PhraseLocation) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "PhraseLocation", (PyObject *)&__pyx_type_4cdec_2sa_3_sa_PhraseLocation) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetVtable(__pyx_type_4cdec_2sa_3_sa_PhraseLocation.tp_dict, __pyx_vtabptr_4cdec_2sa_3_sa_PhraseLocation) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "PhraseLocation", (PyObject *)&__pyx_type_4cdec_2sa_3_sa_PhraseLocation) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_4cdec_2sa_3_sa_PhraseLocation = &__pyx_type_4cdec_2sa_3_sa_PhraseLocation; - if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa_Sampler) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa_Sampler) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_4cdec_2sa_3_sa_Sampler.tp_print = 0; - if (__Pyx_SetAttrString(__pyx_m, "Sampler", (PyObject *)&__pyx_type_4cdec_2sa_3_sa_Sampler) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "Sampler", (PyObject *)&__pyx_type_4cdec_2sa_3_sa_Sampler) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_4cdec_2sa_3_sa_Sampler = &__pyx_type_4cdec_2sa_3_sa_Sampler; __pyx_vtabptr_4cdec_2sa_3_sa_HieroCachingRuleFactory = &__pyx_vtable_4cdec_2sa_3_sa_HieroCachingRuleFactory; __pyx_vtable_4cdec_2sa_3_sa_HieroCachingRuleFactory.set_idmap = (PyObject *(*)(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *, struct __pyx_obj_4cdec_2sa_3_sa_DataArray *))__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_set_idmap; @@ -78474,10 +78574,10 @@ PyMODINIT_FUNC PyInit__sa(void) __pyx_vtable_4cdec_2sa_3_sa_HieroCachingRuleFactory.extract_phrases = (PyObject *(*)(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *, int, int, int *, int *, int *, int, int, int, int *, int *, int *, int, int, int))__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract_phrases; __pyx_vtable_4cdec_2sa_3_sa_HieroCachingRuleFactory.create_alignments = (struct __pyx_obj_4cdec_2sa_3_sa_IntList *(*)(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *, int *, int, struct __pyx_obj_4cdec_2sa_3_sa_IntList *, struct __pyx_obj_4cdec_2sa_3_sa_IntList *))__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_create_alignments; __pyx_vtable_4cdec_2sa_3_sa_HieroCachingRuleFactory.extract = (PyObject *(*)(struct __pyx_obj_4cdec_2sa_3_sa_HieroCachingRuleFactory *, struct __pyx_obj_4cdec_2sa_3_sa_Phrase *, struct __pyx_t_4cdec_2sa_3_sa_Matching *, int *, int))__pyx_f_4cdec_2sa_3_sa_23HieroCachingRuleFactory_extract; - if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa_HieroCachingRuleFactory) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa_HieroCachingRuleFactory) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_4cdec_2sa_3_sa_HieroCachingRuleFactory.tp_print = 0; - if (__Pyx_SetVtable(__pyx_type_4cdec_2sa_3_sa_HieroCachingRuleFactory.tp_dict, __pyx_vtabptr_4cdec_2sa_3_sa_HieroCachingRuleFactory) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "HieroCachingRuleFactory", (PyObject *)&__pyx_type_4cdec_2sa_3_sa_HieroCachingRuleFactory) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetVtable(__pyx_type_4cdec_2sa_3_sa_HieroCachingRuleFactory.tp_dict, __pyx_vtabptr_4cdec_2sa_3_sa_HieroCachingRuleFactory) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "HieroCachingRuleFactory", (PyObject *)&__pyx_type_4cdec_2sa_3_sa_HieroCachingRuleFactory) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_4cdec_2sa_3_sa_HieroCachingRuleFactory = &__pyx_type_4cdec_2sa_3_sa_HieroCachingRuleFactory; __pyx_vtabptr_4cdec_2sa_3_sa_Scorer = &__pyx_vtable_4cdec_2sa_3_sa_Scorer; __pyx_vtable_4cdec_2sa_3_sa_Scorer.score = (struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector *(*)(struct __pyx_obj_4cdec_2sa_3_sa_Scorer *, PyObject *))__pyx_f_4cdec_2sa_3_sa_6Scorer_score; @@ -78543,28 +78643,28 @@ PyMODINIT_FUNC PyInit__sa(void) if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_18_alignments) < 0) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_18_alignments.tp_print = 0; __pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_18_alignments = &__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_18_alignments; - if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_19_input) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 973; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_19_input) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 981; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_19_input.tp_print = 0; __pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_19_input = &__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_19_input; - if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_20_genexpr) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1188; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_20_genexpr) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_20_genexpr.tp_print = 0; __pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_20_genexpr = &__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_20_genexpr; - if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_21_add_instance) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1886; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_21_add_instance) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 1894; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_21_add_instance.tp_print = 0; __pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_21_add_instance = &__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_21_add_instance; - if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_22_form_rule) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2056; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_22_form_rule) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2061; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_22_form_rule.tp_print = 0; __pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_22_form_rule = &__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_22_form_rule; - if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_23_genexpr) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_23_genexpr) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_23_genexpr.tp_print = 0; __pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_23_genexpr = &__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_23_genexpr; - if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_24_fmt_rule) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_24_fmt_rule) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_24_fmt_rule.tp_print = 0; __pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_24_fmt_rule = &__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_24_fmt_rule; - if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_25_genexpr) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_25_genexpr) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_25_genexpr.tp_print = 0; __pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_25_genexpr = &__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_25_genexpr; - if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_26_get_f_phrases) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_26_get_f_phrases) < 0) {__pyx_filename = __pyx_f[8]; __pyx_lineno = 2145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_26_get_f_phrases.tp_print = 0; __pyx_ptype_4cdec_2sa_3_sa___pyx_scope_struct_26_get_f_phrases = &__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_26_get_f_phrases; if (PyType_Ready(&__pyx_type_4cdec_2sa_3_sa___pyx_scope_struct_27___iter__) < 0) {__pyx_filename = __pyx_f[13]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -78650,13 +78750,13 @@ PyMODINIT_FUNC PyInit__sa(void) __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_getLogger); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__79, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__78, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_logger, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/alignment.pxi":8 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/alignment.pxi":8 * # May need to revisit if things get really tight, though. * * cdef int ALIGNMENT_CODE = 1 << 16 # <<<<<<<<<<<<<< @@ -78665,7 +78765,7 @@ PyMODINIT_FUNC PyInit__sa(void) */ __pyx_v_4cdec_2sa_3_sa_ALIGNMENT_CODE = 65536; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":17 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":17 * from libc.string cimport memset * * cdef int MIN_BOTTOM_SIZE = 32 # <<<<<<<<<<<<<< @@ -78674,7 +78774,7 @@ PyMODINIT_FUNC PyInit__sa(void) */ __pyx_v_4cdec_2sa_3_sa_MIN_BOTTOM_SIZE = 32; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":18 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":18 * * cdef int MIN_BOTTOM_SIZE = 32 * cdef int MIN_BOTTOM_BITS = 5 # <<<<<<<<<<<<<< @@ -78683,7 +78783,7 @@ PyMODINIT_FUNC PyInit__sa(void) */ __pyx_v_4cdec_2sa_3_sa_MIN_BOTTOM_BITS = 5; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/veb.pxi":28 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/veb.pxi":28 * LOWER_MASK[i] = mask * * _init_lower_mask() # <<<<<<<<<<<<<< @@ -78692,7 +78792,7 @@ PyMODINIT_FUNC PyInit__sa(void) */ __pyx_f_4cdec_2sa_3_sa__init_lower_mask(); - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":4 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":4 * from libc.stdlib cimport malloc, realloc, strtol * * cdef int INDEX_SHIFT = 3 # <<<<<<<<<<<<<< @@ -78701,7 +78801,7 @@ PyMODINIT_FUNC PyInit__sa(void) */ __pyx_v_4cdec_2sa_3_sa_INDEX_SHIFT = 3; - /* "/usr0/home/cdyer/cdec/python/cdec/sa/sym.pxi":5 + /* "/usr0/home/mdenkows/cdec/python/cdec/sa/sym.pxi":5 * * cdef int INDEX_SHIFT = 3 * cdef int INDEX_MASK = (1< 0 else MAXSCORE return maxOffScore return MaxLexEgivenF @@ -57,7 +75,10 @@ def MaxLexFgivenE(ttable): ewords.append('NULL') maxOffScore = 0.0 for f in ctx.fphrase.words: - maxScore = max(ttable.get_score(f, e, 1) for e in ewords) + if ctx.online: + maxScore = max(get_lex_online(f, e, 1, (ttable, ctx.online.bilex)) for e in ewords) + else: + maxScore = max(ttable.get_score(f, e, 1) for e in ewords) maxOffScore += -math.log10(maxScore) if maxScore > 0 else MAXSCORE return maxOffScore return MaxLexFgivenE diff --git a/python/cdec/sa/rulefactory.pxi b/python/cdec/sa/rulefactory.pxi index 635cca10..4f09218d 100644 --- a/python/cdec/sa/rulefactory.pxi +++ b/python/cdec/sa/rulefactory.pxi @@ -11,6 +11,8 @@ from libc.math cimport fmod, ceil, floor, log from collections import defaultdict, Counter, namedtuple +from online import Bilex + FeatureContext = namedtuple('FeatureContext', ['fphrase', 'ephrase', @@ -31,6 +33,7 @@ OnlineFeatureContext = namedtuple('OnlineFeatureContext', ['fcount', 'fsample_count', 'paircount', + 'bilex', ]) cdef class OnlineStats: @@ -39,6 +42,7 @@ cdef class OnlineStats: cdef public phrases_e cdef public phrases_fe cdef public phrases_al + cdef public bilex def __cinit__(self): # Keep track of everything that can be sampled: @@ -50,6 +54,9 @@ cdef class OnlineStats: self.phrases_fe = defaultdict(lambda: defaultdict(int)) self.phrases_al = defaultdict(lambda: defaultdict(tuple)) + # Instance-specific bilex + self.bilex = Bilex() + cdef int PRECOMPUTE = 0 cdef int MERGE = 1 cdef int BAEZA_YATES = 2 @@ -404,7 +411,8 @@ cdef class HieroCachingRuleFactory: # Online stats - # None if not online + # None if not online + # Base bilex, also need one per instance self.bilex = bilex # True after data is added @@ -2046,11 +2054,8 @@ cdef class HieroCachingRuleFactory: if not stats.phrases_al[f_ph][e_ph]: stats.phrases_al[f_ph][e_ph] = al - # Update bilexical dictionary (if exists) - if self.bilex: - self.bilex.update(f_words, e_words, alignment) - else: - logger.warning('No online bilexical dictionary specified, not updating lexical weights') + # Update bilexical dictionary + stats.bilex.update(f_words, e_words, alignment) # Create a rule from source, target, non-terminals, and alignments def form_rule(self, f_i, e_i, f_span, e_span, nt, al): @@ -2131,7 +2136,7 @@ cdef class HieroCachingRuleFactory: fsample_count = stats.samples_f.get(f, 0) d = stats.phrases_fe.get(f, None) paircount = d.get(e, 0) if d else 0 - return OnlineFeatureContext(fcount, fsample_count, paircount) + return OnlineFeatureContext(fcount, fsample_count, paircount, stats.bilex) return None # Find all phrases that we might try to extract -- cgit v1.2.3 From 659ea32efb9ad0c1d8ad0d1dc4ead67be9859e6b Mon Sep 17 00:00:00 2001 From: mjdenkowski Date: Thu, 10 Apr 2014 16:58:46 -0400 Subject: Refactoring --- python/cdec/sa/_sa.cpp | 2 +- python/cdec/sa/features.py | 21 ++++----------------- python/cdec/sa/online.py | 14 ++++++++++++++ 3 files changed, 19 insertions(+), 18 deletions(-) (limited to 'python/cdec') diff --git a/python/cdec/sa/_sa.cpp b/python/cdec/sa/_sa.cpp index 652261fe..bbea8c9c 100644 --- a/python/cdec/sa/_sa.cpp +++ b/python/cdec/sa/_sa.cpp @@ -1,4 +1,4 @@ -/* Generated by Cython 0.20.1 on Thu Apr 10 16:38:02 2014 */ +/* Generated by Cython 0.20.1 on Thu Apr 10 16:55:21 2014 */ #define PY_SSIZE_T_CLEAN #ifndef CYTHON_USE_PYLONG_INTERNALS diff --git a/python/cdec/sa/features.py b/python/cdec/sa/features.py index e19a18c0..92e23889 100644 --- a/python/cdec/sa/features.py +++ b/python/cdec/sa/features.py @@ -3,6 +3,8 @@ import math from cdec.sa import isvar +from online import get_score_multilex + MAXSCORE = 99 def EgivenF(ctx): # p(e|f) = c(e, f)/c(f) @@ -40,21 +42,6 @@ def CoherenceProb(ctx): # c(f) / sample c(f) prob = (ctx.fcount + ctx.online.fcount) / (ctx.fsample_count + ctx.online.fsample_count) return -math.log10(prob) -# Not a feature, used for MaxLex -# bilex get_score for multiple instances -def get_lex_online(f, e, dir, bilex_list): - num = 0 - denom = 0 - for bilex in bilex_list: - if dir == 0: - denom += bilex.f.get(f, 0) - else: - denom += bilex.e.get(e, 0) - num += bilex.fe.get((f, e), 0) - if (not num) or (not denom): - return None - return num / denom - def MaxLexEgivenF(ttable): def MaxLexEgivenF(ctx): fwords = ctx.fphrase.words @@ -62,7 +49,7 @@ def MaxLexEgivenF(ttable): maxOffScore = 0.0 for e in ctx.ephrase.words: if ctx.online: - maxScore = max(get_lex_online(f, e, 0, (ttable, ctx.online.bilex)) for f in fwords) + maxScore = max(get_score_multilex(f, e, 0, (ttable, ctx.online.bilex)) for f in fwords) else: maxScore = max(ttable.get_score(f, e, 0) for f in fwords) maxOffScore += -math.log10(maxScore) if maxScore > 0 else MAXSCORE @@ -76,7 +63,7 @@ def MaxLexFgivenE(ttable): maxOffScore = 0.0 for f in ctx.fphrase.words: if ctx.online: - maxScore = max(get_lex_online(f, e, 1, (ttable, ctx.online.bilex)) for e in ewords) + maxScore = max(get_score_multilex(f, e, 1, (ttable, ctx.online.bilex)) for e in ewords) else: maxScore = max(ttable.get_score(f, e, 1) for e in ewords) maxOffScore += -math.log10(maxScore) if maxScore > 0 else MAXSCORE diff --git a/python/cdec/sa/online.py b/python/cdec/sa/online.py index d3f967e8..98c3459b 100644 --- a/python/cdec/sa/online.py +++ b/python/cdec/sa/online.py @@ -126,3 +126,17 @@ class Bilex: break (f, e, c) = line.split() self.fe[(f, e)] = float(c) + +# Bilex get_score for multiple instances +def get_score_multilex(f, e, dir, bilex_list): + num = 0 + denom = 0 + for bilex in bilex_list: + if dir == 0: + denom += bilex.f.get(f, 0) + else: + denom += bilex.e.get(e, 0) + num += bilex.fe.get((f, e), 0) + if (not num) or (not denom): + return None + return num / denom -- cgit v1.2.3 From f31a19b243885d4382e23ad1df84a7f00034b269 Mon Sep 17 00:00:00 2001 From: mjdenkowski Date: Fri, 18 Apr 2014 15:15:40 -0400 Subject: Stream mode for grammar extractor --- python/README.md | 20 +++++++++++++++++- python/cdec/sa/extract.py | 52 +++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 67 insertions(+), 5 deletions(-) (limited to 'python/cdec') diff --git a/python/README.md b/python/README.md index 953971d3..37c7b78e 100644 --- a/python/README.md +++ b/python/README.md @@ -23,7 +23,25 @@ Extract grammar rules from the compiled corpus: cat input.txt | python -m cdec.sa.extract -c extract.ini -g grammars/ -z This will create per-sentence grammar files in the `grammars` directory and output annotated input suitable for translation with cdec. - + +Extract rules in stream mode: + + python -m cdec.sa.extract -c extract.ini -t -z + +This will enable stdio interaction with the following types of lines: + +Extract grammar: + + context ||| sentence ||| grammar_file + +Learn (online mode, specify context name): + + context ||| sentence ||| reference ||| alignment + +Drop (online mode, specify context name): + + context ||| drop + ## Library usage A basic demo of pycdec's features is available in `examples/test.py`. diff --git a/python/cdec/sa/extract.py b/python/cdec/sa/extract.py index b6502c52..92d38af9 100644 --- a/python/cdec/sa/extract.py +++ b/python/cdec/sa/extract.py @@ -62,13 +62,44 @@ def extract(inp): grammar_file = os.path.abspath(grammar_file) return '{}{}'.format(grammar_file, i, sentence, suffix) +def stream_extract(): + global extractor, online, compress + while True: + line = sys.stdin.readline() + if not line: + break + fields = re.split('\s*\|\|\|\s*', line.strip()) + # context ||| cmd + if len(fields) == 2: + (context, cmd) = fields + if cmd.lower() == 'drop': + if online: + extractor.drop_ctx(context) + else: + sys.stderr.write('Error: online mode not set. Skipping line: {}\n'.format(line.strip())) + # context ||| sentence ||| grammar_file + elif len(fields) == 3: + (context, sentence, grammar_file) = fields + with (gzip.open if compress else open)(grammar_file, 'w') as output: + for rule in extractor.grammar(sentence, context): + output.write(str(rule)+'\n') + # context ||| sentence ||| reference ||| alignment + elif len(fields) == 4: + (context, sentence, reference, alignment) = fields + if online: + extractor.add_instance(sentence, reference, alignment, context) + else: + sys.stderr.write('Error: online mode not set. Skipping line: {}\n'.format(line.strip())) + else: + sys.stderr.write('Error: see README.md for stream mode usage. Skipping line: {}\n'.format(line.strip())) + def main(): global online logging.basicConfig(level=logging.INFO) parser = argparse.ArgumentParser(description='Extract grammars from a compiled corpus.') parser.add_argument('-c', '--config', required=True, help='extractor configuration') - parser.add_argument('-g', '--grammars', required=True, + parser.add_argument('-g', '--grammars', help='grammar output path') parser.add_argument('-j', '--jobs', type=int, default=1, help='number of parallel extractors') @@ -80,9 +111,15 @@ def main(): help='online grammar extraction') parser.add_argument('-z', '--compress', action='store_true', help='compress grammars with gzip') + parser.add_argument('-t', '--stream', action='store_true', + help='stream mode (see README.md)') args = parser.parse_args() - if not os.path.exists(args.grammars): + if not (args.grammars or args.stream): + sys.stderr.write('Error: either -g/--grammars or -t/--stream required\n') + sys.exit(1) + + if args.grammars and not os.path.exists(args.grammars): os.mkdir(args.grammars) for featdef in args.features: if not featdef.endswith('.py'): @@ -91,9 +128,13 @@ def main(): sys.exit(1) online = args.online + stream = args.stream start_time = monitor_cpu() if args.jobs > 1: + if stream: + sys.stderr.write('Error: stream mode incompatible with multiple jobs\n') + sys.exit(1) logging.info('Starting %d workers; chunk size: %d', args.jobs, args.chunksize) pool = mp.Pool(args.jobs, make_extractor, (args,)) try: @@ -103,8 +144,11 @@ def main(): pool.terminate() else: make_extractor(args) - for output in map(extract, enumerate(sys.stdin)): - print(output) + if stream: + stream_extract() + else: + for output in map(extract, enumerate(sys.stdin)): + print(output) stop_time = monitor_cpu() logging.info("Overall extraction step took %f seconds", stop_time - start_time) -- cgit v1.2.3 From 116e1ea2ece702cecf09c418df54c49711166204 Mon Sep 17 00:00:00 2001 From: mjdenkowski Date: Fri, 18 Apr 2014 15:23:17 -0400 Subject: stdout feedback --- python/cdec/sa/extract.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'python/cdec') diff --git a/python/cdec/sa/extract.py b/python/cdec/sa/extract.py index 92d38af9..b6c11f05 100644 --- a/python/cdec/sa/extract.py +++ b/python/cdec/sa/extract.py @@ -75,23 +75,27 @@ def stream_extract(): if cmd.lower() == 'drop': if online: extractor.drop_ctx(context) + sys.stdout.write('drop {}\n'.format(context)) else: - sys.stderr.write('Error: online mode not set. Skipping line: {}\n'.format(line.strip())) + sys.stdout.write('Error: online mode not set. Skipping line: {}\n'.format(line.strip())) # context ||| sentence ||| grammar_file elif len(fields) == 3: (context, sentence, grammar_file) = fields with (gzip.open if compress else open)(grammar_file, 'w') as output: for rule in extractor.grammar(sentence, context): output.write(str(rule)+'\n') + sys.stdout.write('{}\n'.format(grammar_file)) # context ||| sentence ||| reference ||| alignment elif len(fields) == 4: (context, sentence, reference, alignment) = fields if online: extractor.add_instance(sentence, reference, alignment, context) + sys.stdout.write('learn {}\n'.format(context)) else: - sys.stderr.write('Error: online mode not set. Skipping line: {}\n'.format(line.strip())) + sys.stdout.write('Error: online mode not set. Skipping line: {}\n'.format(line.strip())) else: - sys.stderr.write('Error: see README.md for stream mode usage. Skipping line: {}\n'.format(line.strip())) + sys.stdout.write('Error: see README.md for stream mode usage. Skipping line: {}\n'.format(line.strip())) + sys.stdout.flush() def main(): global online -- cgit v1.2.3 From cddd94b202388b1e54bf94244ee70e261374b0ff Mon Sep 17 00:00:00 2001 From: armatthews Date: Sat, 17 May 2014 14:52:56 -0400 Subject: Added methods for retrieving unique k-best lists from hypergraphs --- python/cdec/_cdec.cpp | 18586 +++++++++++++++++++++---------------------- python/cdec/hypergraph.pxi | 66 +- python/cdec/kbest.pxd | 8 +- 3 files changed, 9005 insertions(+), 9655 deletions(-) (limited to 'python/cdec') diff --git a/python/cdec/_cdec.cpp b/python/cdec/_cdec.cpp index 3ffa2dd5..03b22bb1 100644 --- a/python/cdec/_cdec.cpp +++ b/python/cdec/_cdec.cpp @@ -1,4 +1,4 @@ -/* Generated by Cython 0.20.1 on Mon Apr 7 01:23:34 2014 */ +/* Generated by Cython 0.19.1 on Sat May 17 14:41:25 2014 */ #define PY_SSIZE_T_CLEAN #ifndef CYTHON_USE_PYLONG_INTERNALS @@ -19,7 +19,6 @@ #elif PY_VERSION_HEX < 0x02040000 #error Cython requires Python 2.4+. #else -#define CYTHON_ABI "0_20_1" #include /* For offsetof */ #ifndef offsetof #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) @@ -54,9 +53,6 @@ #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 1 #endif -#if CYTHON_COMPILING_IN_PYPY -#define Py_OptimizeFlag 0 -#endif #if PY_VERSION_HEX < 0x02050000 typedef int Py_ssize_t; #define PY_SSIZE_T_MAX INT_MAX @@ -64,7 +60,7 @@ #define PY_FORMAT_SIZE_T "" #define CYTHON_FORMAT_SSIZE_T "" #define PyInt_FromSsize_t(z) PyInt_FromLong(z) - #define PyInt_AsSsize_t(o) __Pyx_PyInt_As_int(o) + #define PyInt_AsSsize_t(o) __Pyx_PyInt_AsInt(o) #define PyNumber_Index(o) ((PyNumber_Check(o) && !PyFloat_Check(o)) ? PyNumber_Int(o) : \ (PyErr_Format(PyExc_TypeError, \ "expected index value, got %.200s", Py_TYPE(o)->tp_name), \ @@ -116,15 +112,13 @@ #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 + PyCode_New(a, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) #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 -#if PY_VERSION_HEX < 0x02060000 +#if PY_MAJOR_VERSION < 3 && PY_MINOR_VERSION < 6 #define PyUnicode_FromString(s) PyUnicode_Decode(s, strlen(s), "UTF-8", "strict") #endif #if PY_MAJOR_VERSION >= 3 @@ -137,44 +131,19 @@ #if PY_VERSION_HEX < 0x02060000 #define Py_TPFLAGS_HAVE_VERSION_TAG 0 #endif -#if PY_VERSION_HEX < 0x02060000 && !defined(Py_TPFLAGS_IS_ABSTRACT) - #define Py_TPFLAGS_IS_ABSTRACT 0 -#endif -#if PY_VERSION_HEX < 0x030400a1 && !defined(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 -#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) + #define __Pyx_PyUnicode_READ(k, d, i) ((k=k), (Py_UCS4)(((Py_UNICODE*)d)[i])) #endif #if PY_MAJOR_VERSION >= 3 #define PyBaseString_Type PyUnicode_Type @@ -207,7 +176,7 @@ #else #define __Pyx_PyBaseString_Check(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj) || \ PyString_Check(obj) || PyUnicode_Check(obj)) - #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj)) + #define __Pyx_PyBaseString_CheckExact(obj) (Py_TYPE(obj) == &PyBaseString_Type) #endif #if PY_VERSION_HEX < 0x02060000 #define PySet_Check(obj) PyObject_TypeCheck(obj, &PySet_Type) @@ -232,12 +201,11 @@ #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_VERSION_HEX < 0x030200A4 +#if PY_VERSION_HEX < 0x03020000 typedef long Py_hash_t; #define __Pyx_PyInt_FromHash_t PyInt_FromLong #define __Pyx_PyInt_AsHash_t PyInt_AsLong @@ -296,7 +264,7 @@ #ifndef CYTHON_RESTRICT #if defined(__GNUC__) #define CYTHON_RESTRICT __restrict__ - #elif defined(_MSC_VER) && _MSC_VER >= 1400 + #elif defined(_MSC_VER) #define CYTHON_RESTRICT __restrict #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define CYTHON_RESTRICT restrict @@ -408,20 +376,8 @@ typedef struct {PyObject **p; char *s; const Py_ssize_t n; const char* encoding; #define __PYX_DEFAULT_STRING_ENCODING "" #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize -#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))) ) 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(char*); @@ -432,11 +388,9 @@ static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char*); #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_FromUString(s) __Pyx_PyObject_FromString((char*)s) #define __Pyx_PyBytes_FromUString(s) __Pyx_PyBytes_FromString((char*)s) -#define __Pyx_PyByteArray_FromUString(s) __Pyx_PyByteArray_FromString((char*)s) #define __Pyx_PyStr_FromUString(s) __Pyx_PyStr_FromString((char*)s) #define __Pyx_PyUnicode_FromUString(s) __Pyx_PyUnicode_FromString((char*)s) #if PY_MAJOR_VERSION < 3 @@ -458,6 +412,7 @@ 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); +static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*); #if CYTHON_COMPILING_IN_CPYTHON #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) #else @@ -466,7 +421,7 @@ static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); #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) { +static int __Pyx_init_sys_getdefaultencoding_params() { PyObject* sys = NULL; PyObject* default_encoding = NULL; PyObject* ascii_chars_u = NULL; @@ -491,7 +446,7 @@ static int __Pyx_init_sys_getdefaultencoding_params(void) { if (ascii_chars_b == NULL || strncmp(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.", + "This module compiled with c_string_encoding=ascii, but default encoding '%s' is not a superset of ascii.", default_encoding_c); goto bad; } @@ -515,7 +470,7 @@ bad: #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) { +static int __Pyx_init_sys_getdefaultencoding_params() { PyObject* sys = NULL; PyObject* default_encoding = NULL; char* default_encoding_c; @@ -570,61 +525,63 @@ static const char *__pyx_f[] = { "hypergraph.pxi", "lattice.pxi", "mteval.pxi", - "stringsource", "_sa.pxd", }; /*--- Type declarations ---*/ -struct __pyx_obj_4cdec_2sa_3_sa_FloatList; -struct __pyx_obj_4cdec_2sa_3_sa_IntList; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___iter__; struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector; -struct __pyx_obj_4cdec_2sa_3_sa_Phrase; -struct __pyx_obj_4cdec_2sa_3_sa_Rule; struct __pyx_obj_4cdec_5_cdec_DenseVector; +struct __pyx_obj_4cdec_5_cdec_SufficientStats; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23_lines; +struct __pyx_obj_4cdec_5_cdec_TRule; +struct __pyx_obj_4cdec_5_cdec_MRule; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_27___init__; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__; +struct __pyx_obj_4cdec_5_cdec_Metric; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_unique_kbest; +struct __pyx_obj_4cdec_2sa_3_sa_IntList; struct __pyx_obj_4cdec_5_cdec_SparseVector; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_26__make_config; struct __pyx_obj_4cdec_5_cdec_NT; +struct __pyx_obj_4cdec_5_cdec_Lattice; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15_sample_trees; +struct __pyx_obj_4cdec_5_cdec_HypergraphEdge; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase; +struct __pyx_obj_4cdec_2sa_3_sa_Rule; +struct __pyx_obj_4cdec_5_cdec_Scorer; +struct __pyx_obj_4cdec_5_cdec_HypergraphNode; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features; struct __pyx_obj_4cdec_5_cdec_NTRef; -struct __pyx_obj_4cdec_5_cdec_TRule; -struct __pyx_obj_4cdec_5_cdec_MRule; struct __pyx_obj_4cdec_5_cdec_Grammar; -struct __pyx_obj_4cdec_5_cdec_TextGrammar; struct __pyx_obj_4cdec_5_cdec_Hypergraph; -struct __pyx_obj_4cdec_5_cdec_HypergraphEdge; -struct __pyx_obj_4cdec_5_cdec_HypergraphNode; -struct __pyx_obj_4cdec_5_cdec_Lattice; -struct __pyx_obj_4cdec_5_cdec_Candidate; -struct __pyx_obj_4cdec_5_cdec_SufficientStats; struct __pyx_obj_4cdec_5_cdec_CandidateSet; +struct __pyx_obj_4cdec_2sa_3_sa_FloatList; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22_todot; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__; struct __pyx_obj_4cdec_5_cdec_SegmentEvaluator; -struct __pyx_obj_4cdec_5_cdec_Scorer; -struct __pyx_obj_4cdec_5_cdec_Metric; -struct __pyx_obj_4cdec_5_cdec_Decoder; -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__; -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__; -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20___get__; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13_unique_kbest_features; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_28_genexpr; struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr; -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__; -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__; -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr; -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__; struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest; -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees; -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features; -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample; -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees; -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__; -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__; -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__; -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__; +struct __pyx_obj_4cdec_2sa_3_sa_Phrase; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___get__; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19___get__; +struct __pyx_obj_4cdec_5_cdec_TextGrammar; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25___iter__; +struct __pyx_obj_4cdec_5_cdec_Decoder; +struct __pyx_obj_4cdec_5_cdec_Candidate; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14_sample; struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__; -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__; -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot; -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines; -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__; -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__; -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config; -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__; -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_unique_kbest_trees; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__; struct __pyx_opt_args_4cdec_5_cdec_as_str; /* "cdec/_cdec.pyx":6 @@ -639,37 +596,20 @@ struct __pyx_opt_args_4cdec_5_cdec_as_str { char *error_msg; }; -/* "cdec/sa/_sa.pxd":3 - * from libc.stdio cimport FILE - * - * cdef class FloatList: # <<<<<<<<<<<<<< - * cdef int size - * cdef int increment - */ -struct __pyx_obj_4cdec_2sa_3_sa_FloatList { - PyObject_HEAD - struct __pyx_vtabstruct_4cdec_2sa_3_sa_FloatList *__pyx_vtab; - int size; - int increment; - int len; - float *arr; -}; - - -/* "cdec/sa/_sa.pxd":12 - * cdef void read_handle(self, FILE* f) +/* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":44 + * return self.stats.size() * - * cdef class IntList: # <<<<<<<<<<<<<< - * cdef int size - * cdef int increment + * def __iter__(self): # <<<<<<<<<<<<<< + * for i in range(len(self)): + * yield self[i] */ -struct __pyx_obj_4cdec_2sa_3_sa_IntList { +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___iter__ { PyObject_HEAD - struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *__pyx_vtab; - int size; - int increment; - int len; - int *arr; + PyObject *__pyx_v_i; + struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_v_self; + Py_ssize_t __pyx_t_0; + PyObject *__pyx_t_1; + PyObject *(*__pyx_t_2)(PyObject *); }; @@ -687,42 +627,7 @@ struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector { }; -/* "cdec/sa/_sa.pxd":29 - * cdef FloatList values - * - * cdef class Phrase: # <<<<<<<<<<<<<< - * cdef int *syms - * cdef int n, *varpos, n_vars - */ -struct __pyx_obj_4cdec_2sa_3_sa_Phrase { - PyObject_HEAD - struct __pyx_vtabstruct_4cdec_2sa_3_sa_Phrase *__pyx_vtab; - int *syms; - int n; - int *varpos; - int n_vars; -}; - - -/* "cdec/sa/_sa.pxd":35 - * cdef public int chunklen(self, int k) - * - * cdef class Rule: # <<<<<<<<<<<<<< - * cdef int lhs - * cdef readonly Phrase f, e - */ -struct __pyx_obj_4cdec_2sa_3_sa_Rule { - PyObject_HEAD - int lhs; - struct __pyx_obj_4cdec_2sa_3_sa_Phrase *f; - struct __pyx_obj_4cdec_2sa_3_sa_Phrase *e; - struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector *scores; - int n_scores; - PyObject *word_alignments; -}; - - -/* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":3 +/* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":3 * from cython.operator cimport preincrement as pinc * * cdef class DenseVector: # <<<<<<<<<<<<<< @@ -736,47 +641,44 @@ struct __pyx_obj_4cdec_5_cdec_DenseVector { }; -/* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":48 - * return sparse - * - * cdef class SparseVector: # <<<<<<<<<<<<<< - * cdef FastSparseVector[weight_t]* vector - * - */ -struct __pyx_obj_4cdec_5_cdec_SparseVector { - PyObject_HEAD - FastSparseVector *vector; -}; - - -/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":8 - * return ' '.join(w.encode('utf8') if isinstance(w, unicode) else str(w) for w in phrase) +/* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":26 + * return fmap * - * cdef class NT: # <<<<<<<<<<<<<< - * cdef public bytes cat - * cdef public unsigned ref + * cdef class SufficientStats: # <<<<<<<<<<<<<< + * cdef mteval.SufficientStats* stats + * cdef mteval.EvaluationMetric* metric */ -struct __pyx_obj_4cdec_5_cdec_NT { +struct __pyx_obj_4cdec_5_cdec_SufficientStats { PyObject_HEAD - PyObject *cat; - unsigned int ref; + SufficientStats *stats; + EvaluationMetric *metric; }; -/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":21 - * return '[%s]' % self.cat - * - * cdef class NTRef: # <<<<<<<<<<<<<< - * cdef public unsigned ref - * def __init__(self, unsigned ref): +/* "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi":63 + * def todot(self): + * """lattice.todot() -> Representation of the lattice in GraphViz dot format.""" + * def lines(): # <<<<<<<<<<<<<< + * yield 'digraph lattice {' + * yield 'rankdir = LR;' */ -struct __pyx_obj_4cdec_5_cdec_NTRef { +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23_lines { PyObject_HEAD - unsigned int ref; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22_todot *__pyx_outer_scope; + PyObject *__pyx_v_delta; + PyObject *__pyx_v_i; + PyObject *__pyx_v_label; + PyObject *__pyx_v_weight; + Py_ssize_t __pyx_t_0; + PyObject *__pyx_t_1; + PyObject *(*__pyx_t_2)(PyObject *); + PyObject *__pyx_t_3; + Py_ssize_t __pyx_t_4; + PyObject *(*__pyx_t_5)(PyObject *); }; -/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":49 +/* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":49 * return TRule(lhs, f, e, scores, a) * * cdef class TRule: # <<<<<<<<<<<<<< @@ -789,7 +691,7 @@ struct __pyx_obj_4cdec_5_cdec_TRule { }; -/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":183 +/* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":183 * _phrase(self.f), _phrase(self.e), scores) * * cdef class MRule(TRule): # <<<<<<<<<<<<<< @@ -801,78 +703,135 @@ struct __pyx_obj_4cdec_5_cdec_MRule { }; -/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":199 - * super(MRule, self).__init__(lhs, rhs, e, scores, None) - * - * cdef class Grammar: # <<<<<<<<<<<<<< - * cdef shared_ptr[grammar.Grammar]* grammar +/* "cdec/_cdec.pyx":47 + * cdef DenseVector weights * + * def __init__(self, config_str=None, **config): # <<<<<<<<<<<<<< + * """Decoder('formalism = scfg') -> initialize from configuration string + * Decoder(formalism='scfg') -> initialize from named parameters */ -struct __pyx_obj_4cdec_5_cdec_Grammar { +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_27___init__ { PyObject_HEAD - boost::shared_ptr *grammar; + PyObject *__pyx_v_config; }; -/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":223 - * self.grammar.get().SetGrammarName(name) +/* "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi":56 + * return unicode(str(self), 'utf8') * - * cdef class TextGrammar(Grammar): # <<<<<<<<<<<<<< - * def __init__(self, rules): - * """TextGrammar(rules) -> SCFG Grammar containing the rules.""" + * def __iter__(self): # <<<<<<<<<<<<<< + * cdef unsigned i + * for i in range(len(self)): */ -struct __pyx_obj_4cdec_5_cdec_TextGrammar { - struct __pyx_obj_4cdec_5_cdec_Grammar __pyx_base; +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__ { + PyObject_HEAD + unsigned int __pyx_v_i; + struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self; + Py_ssize_t __pyx_t_0; + unsigned int __pyx_t_1; }; -/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":4 - * cimport kbest +/* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":176 + * out.fields[i] = ss[i] * - * cdef class Hypergraph: # <<<<<<<<<<<<<< - * cdef hypergraph.Hypergraph* hg - * cdef MT19937* rng + * cdef class Metric: # <<<<<<<<<<<<<< + * cdef Scorer scorer + * def __cinit__(self): */ -struct __pyx_obj_4cdec_5_cdec_Hypergraph { +struct __pyx_obj_4cdec_5_cdec_Metric { PyObject_HEAD - struct __pyx_vtabstruct_4cdec_5_cdec_Hypergraph *__pyx_vtab; - Hypergraph *hg; - MT19937 *rng; + struct __pyx_obj_4cdec_5_cdec_Scorer *scorer; }; -/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":196 - * return vector +/* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":97 + * del derivations * - * cdef class HypergraphEdge: # <<<<<<<<<<<<<< - * cdef hypergraph.Hypergraph* hg - * cdef hypergraph.HypergraphEdge* edge + * def unique_kbest(self, size): # <<<<<<<<<<<<<< + * """hg.kbest(size) -> List of unique k-best hypotheses in the hypergraph.""" + * cdef kbest.KBestDerivations[vector[WordID], kbest.ESentenceTraversal, kbest.FilterUnique]* derivations = new kbest.KBestDerivations[vector[WordID], kbest.ESentenceTraversal, kbest.FilterUnique](self.hg[0], size) */ -struct __pyx_obj_4cdec_5_cdec_HypergraphEdge { +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_unique_kbest { PyObject_HEAD - struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphEdge *__pyx_vtab; - Hypergraph *hg; - Hypergraph::Edge *edge; - struct __pyx_obj_4cdec_5_cdec_TRule *trule; + KBest::KBestDerivations,ESentenceTraversal,KBest::FilterUnique>::Derivation *__pyx_v_derivation; + KBest::KBestDerivations,ESentenceTraversal,KBest::FilterUnique> *__pyx_v_derivations; + unsigned int __pyx_v_k; + struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self; + PyObject *__pyx_v_size; + unsigned int __pyx_t_0; + long __pyx_t_1; }; -/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":246 - * raise NotImplemented('comparison not implemented for HypergraphEdge') +/* "cdec/sa/_sa.pxd":12 + * cdef void read_handle(self, FILE* f) * - * cdef class HypergraphNode: # <<<<<<<<<<<<<< - * cdef hypergraph.Hypergraph* hg - * cdef hypergraph.HypergraphNode* node + * cdef class IntList: # <<<<<<<<<<<<<< + * cdef int size + * cdef int increment */ -struct __pyx_obj_4cdec_5_cdec_HypergraphNode { +struct __pyx_obj_4cdec_2sa_3_sa_IntList { PyObject_HEAD - struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphNode *__pyx_vtab; - Hypergraph *hg; - Hypergraph::Node *node; -}; + struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *__pyx_vtab; + int size; + int increment; + int len; + int *arr; +}; + + +/* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":48 + * return sparse + * + * cdef class SparseVector: # <<<<<<<<<<<<<< + * cdef FastSparseVector[weight_t]* vector + * + */ +struct __pyx_obj_4cdec_5_cdec_SparseVector { + PyObject_HEAD + FastSparseVector *vector; +}; + + +/* "cdec/_cdec.pyx":32 + * SetSilent(yn) + * + * def _make_config(config): # <<<<<<<<<<<<<< + * for key, value in config.items(): + * if isinstance(value, dict): + */ +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_26__make_config { + PyObject_HEAD + PyObject *__pyx_v_config; + PyObject *__pyx_v_info; + PyObject *__pyx_v_key; + PyObject *__pyx_v_name; + PyObject *__pyx_v_value; + PyObject *__pyx_t_0; + PyObject *__pyx_t_1; + Py_ssize_t __pyx_t_2; + PyObject *(*__pyx_t_3)(PyObject *); + Py_ssize_t __pyx_t_4; + PyObject *(*__pyx_t_5)(PyObject *); +}; + + +/* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":8 + * return ' '.join(w.encode('utf8') if isinstance(w, unicode) else str(w) for w in phrase) + * + * cdef class NT: # <<<<<<<<<<<<<< + * cdef public bytes cat + * cdef public unsigned ref + */ +struct __pyx_obj_4cdec_5_cdec_NT { + PyObject_HEAD + PyObject *cat; + unsigned int ref; +}; -/* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":3 +/* "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi":3 * cimport lattice * * cdef class Lattice: # <<<<<<<<<<<<<< @@ -885,64 +844,72 @@ struct __pyx_obj_4cdec_5_cdec_Lattice { }; -/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":12 - * return stats +/* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":156 + * del hypos * - * cdef class Candidate: # <<<<<<<<<<<<<< - * cdef mteval.const_Candidate* candidate - * cdef public float score + * def sample_trees(self, unsigned n): # <<<<<<<<<<<<<< + * """hg.sample_trees(n) -> Sample of n trees from the hypergraph.""" + * cdef vector[string]* trees = new vector[string]() */ -struct __pyx_obj_4cdec_5_cdec_Candidate { +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15_sample_trees { PyObject_HEAD - const training::Candidate *candidate; - float score; + unsigned int __pyx_v_k; + unsigned int __pyx_v_n; + struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self; + std::vector *__pyx_v_trees; + size_t __pyx_t_0; + unsigned int __pyx_t_1; }; -/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":26 - * return fmap +/* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":244 + * return vector * - * cdef class SufficientStats: # <<<<<<<<<<<<<< - * cdef mteval.SufficientStats* stats - * cdef mteval.EvaluationMetric* metric + * cdef class HypergraphEdge: # <<<<<<<<<<<<<< + * cdef hypergraph.Hypergraph* hg + * cdef hypergraph.HypergraphEdge* edge */ -struct __pyx_obj_4cdec_5_cdec_SufficientStats { +struct __pyx_obj_4cdec_5_cdec_HypergraphEdge { PyObject_HEAD - SufficientStats *stats; - EvaluationMetric *metric; + struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphEdge *__pyx_vtab; + Hypergraph *hg; + Hypergraph::Edge *edge; + struct __pyx_obj_4cdec_5_cdec_TRule *trule; }; -/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":65 - * return result +/* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":5 + * import cdec.sa._sa as _sa + * + * def _phrase(phrase): # <<<<<<<<<<<<<< + * return ' '.join(w.encode('utf8') if isinstance(w, unicode) else str(w) for w in phrase) * - * cdef class CandidateSet: # <<<<<<<<<<<<<< - * cdef shared_ptr[mteval.SegmentEvaluator]* scorer - * cdef mteval.EvaluationMetric* metric */ -struct __pyx_obj_4cdec_5_cdec_CandidateSet { +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase { PyObject_HEAD - boost::shared_ptr *scorer; - EvaluationMetric *metric; - training::CandidateSet *cs; + PyObject *__pyx_v_phrase; }; -/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":100 - * self.cs.AddKBestCandidates(hypergraph.hg[0], k, self.scorer.get()) +/* "cdec/sa/_sa.pxd":35 + * cdef public int chunklen(self, int k) * - * cdef class SegmentEvaluator: # <<<<<<<<<<<<<< - * cdef shared_ptr[mteval.SegmentEvaluator]* scorer - * cdef mteval.EvaluationMetric* metric + * cdef class Rule: # <<<<<<<<<<<<<< + * cdef int lhs + * cdef readonly Phrase f, e */ -struct __pyx_obj_4cdec_5_cdec_SegmentEvaluator { +struct __pyx_obj_4cdec_2sa_3_sa_Rule { PyObject_HEAD - boost::shared_ptr *scorer; - EvaluationMetric *metric; + int lhs; + struct __pyx_obj_4cdec_2sa_3_sa_Phrase *f; + struct __pyx_obj_4cdec_2sa_3_sa_Phrase *e; + struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector *scores; + int n_scores; + PyObject *word_alignments; }; -/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":121 +/* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":121 * return CandidateSet(self) * * cdef class Scorer: # <<<<<<<<<<<<<< @@ -956,215 +923,220 @@ struct __pyx_obj_4cdec_5_cdec_Scorer { }; -/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":176 - * out.fields[i] = ss[i] +/* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":294 + * raise NotImplemented('comparison not implemented for HypergraphEdge') * - * cdef class Metric: # <<<<<<<<<<<<<< - * cdef Scorer scorer - * def __cinit__(self): + * cdef class HypergraphNode: # <<<<<<<<<<<<<< + * cdef hypergraph.Hypergraph* hg + * cdef hypergraph.HypergraphNode* node */ -struct __pyx_obj_4cdec_5_cdec_Metric { +struct __pyx_obj_4cdec_5_cdec_HypergraphNode { PyObject_HEAD - struct __pyx_obj_4cdec_5_cdec_Scorer *scorer; + struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphNode *__pyx_vtab; + Hypergraph *hg; + Hypergraph::Node *node; }; -/* "cdec/_cdec.pyx":43 - * yield key, str(value) +/* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":81 + * del e_derivations * - * cdef class Decoder: # <<<<<<<<<<<<<< - * cdef decoder.Decoder* dec - * cdef DenseVector weights + * def kbest_features(self, size): # <<<<<<<<<<<<<< + * """hg.kbest_trees(size) -> List of k-best feature vectors in the hypergraph.""" + * cdef kbest.KBestDerivations[FastSparseVector[weight_t], kbest.FeatureVectorTraversal, kbest.NoFilter[FastSparseVector[double]]]* derivations = new kbest.KBestDerivations[FastSparseVector[weight_t], kbest.FeatureVectorTraversal, kbest.NoFilter[FastSparseVector[double]]](self.hg[0], size) */ -struct __pyx_obj_4cdec_5_cdec_Decoder { +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features { PyObject_HEAD - Decoder *dec; - struct __pyx_obj_4cdec_5_cdec_DenseVector *weights; + KBest::KBestDerivations,FeatureVectorTraversal,KBest::NoFilter > >::Derivation *__pyx_v_derivation; + KBest::KBestDerivations,FeatureVectorTraversal,KBest::NoFilter > > *__pyx_v_derivations; + struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_fmap; + unsigned int __pyx_v_k; + struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self; + PyObject *__pyx_v_size; + unsigned int __pyx_t_0; + long __pyx_t_1; }; -/* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":32 - * self.vector[0][fid] = value +/* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":21 + * return '[%s]' % self.cat * - * def __iter__(self): # <<<<<<<<<<<<<< - * cdef unsigned fid - * for fid in range(1, self.vector.size()): + * cdef class NTRef: # <<<<<<<<<<<<<< + * cdef public unsigned ref + * def __init__(self, unsigned ref): */ -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__ { +struct __pyx_obj_4cdec_5_cdec_NTRef { PyObject_HEAD - unsigned int __pyx_v_fid; - struct __pyx_obj_4cdec_5_cdec_DenseVector *__pyx_v_self; - size_t __pyx_t_0; - unsigned int __pyx_t_1; + unsigned int ref; }; -/* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":72 - * self.vector.set_value(fid, value) +/* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":199 + * super(MRule, self).__init__(lhs, rhs, e, scores, None) + * + * cdef class Grammar: # <<<<<<<<<<<<<< + * cdef shared_ptr[grammar.Grammar]* grammar * - * def __iter__(self): # <<<<<<<<<<<<<< - * cdef FastSparseVector[weight_t].const_iterator* it = new FastSparseVector[weight_t].const_iterator(self.vector[0], False) - * cdef unsigned i */ -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__ { +struct __pyx_obj_4cdec_5_cdec_Grammar { PyObject_HEAD - unsigned int __pyx_v_i; - FastSparseVector::const_iterator *__pyx_v_it; - struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self; - size_t __pyx_t_0; - unsigned int __pyx_t_1; + boost::shared_ptr *grammar; }; -/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":5 - * import cdec.sa._sa as _sa - * - * def _phrase(phrase): # <<<<<<<<<<<<<< - * return ' '.join(w.encode('utf8') if isinstance(w, unicode) else str(w) for w in phrase) +/* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":4 + * cimport kbest * + * cdef class Hypergraph: # <<<<<<<<<<<<<< + * cdef hypergraph.Hypergraph* hg + * cdef MT19937* rng */ -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase { +struct __pyx_obj_4cdec_5_cdec_Hypergraph { PyObject_HEAD - PyObject *__pyx_v_phrase; + struct __pyx_vtabstruct_4cdec_5_cdec_Hypergraph *__pyx_vtab; + Hypergraph *hg; + MT19937 *rng; }; -/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":6 - * - * def _phrase(phrase): - * return ' '.join(w.encode('utf8') if isinstance(w, unicode) else str(w) for w in phrase) # <<<<<<<<<<<<<< +/* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":65 + * return result * - * cdef class NT: + * cdef class CandidateSet: # <<<<<<<<<<<<<< + * cdef shared_ptr[mteval.SegmentEvaluator]* scorer + * cdef mteval.EvaluationMetric* metric */ -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr { +struct __pyx_obj_4cdec_5_cdec_CandidateSet { PyObject_HEAD - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase *__pyx_outer_scope; - PyObject *__pyx_v_w; - PyObject *__pyx_t_0; - Py_ssize_t __pyx_t_1; - PyObject *(*__pyx_t_2)(PyObject *); + boost::shared_ptr *scorer; + EvaluationMetric *metric; + training::CandidateSet *cs; }; -/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":137 +/* "cdec/sa/_sa.pxd":3 + * from libc.stdio cimport FILE * - * property a: - * def __get__(self): # <<<<<<<<<<<<<< - * cdef unsigned i - * cdef vector[grammar.AlignmentPoint]* a = &self.rule.get().a_ + * cdef class FloatList: # <<<<<<<<<<<<<< + * cdef int size + * cdef int increment */ -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__ { +struct __pyx_obj_4cdec_2sa_3_sa_FloatList { PyObject_HEAD - std::vector *__pyx_v_a; - unsigned int __pyx_v_i; - struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self; - size_t __pyx_t_0; - unsigned int __pyx_t_1; + struct __pyx_vtabstruct_4cdec_2sa_3_sa_FloatList *__pyx_vtab; + int size; + int increment; + int len; + float *arr; }; -/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":178 - * self.rule.get().lhs_ = -TDConvert(( lhs).cat) +/* "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi":61 + * yield self[i] * - * def __str__(self): # <<<<<<<<<<<<<< - * scores = ' '.join('%s=%s' % feat for feat in self.scores) - * return '%s ||| %s ||| %s ||| %s' % (self.lhs, + * def todot(self): # <<<<<<<<<<<<<< + * """lattice.todot() -> Representation of the lattice in GraphViz dot format.""" + * def lines(): */ -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__ { +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22_todot { PyObject_HEAD - struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self; + struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self; }; -/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":179 +/* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":62 + * del derivations * - * def __str__(self): - * scores = ' '.join('%s=%s' % feat for feat in self.scores) # <<<<<<<<<<<<<< - * return '%s ||| %s ||| %s ||| %s' % (self.lhs, - * _phrase(self.f), _phrase(self.e), scores) + * def kbest_trees(self, size): # <<<<<<<<<<<<<< + * """hg.kbest_trees(size) -> List of k-best trees in the hypergrapt.NoFilter.""" + * cdef kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal, kbest.NoFilter[vector[int]]]* f_derivations = new kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal, kbest.NoFilter[vector[int]]](self.hg[0], size) */ -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr { +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees { PyObject_HEAD - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__ *__pyx_outer_scope; - PyObject *__pyx_v_feat; - PyObject *__pyx_t_0; - Py_ssize_t __pyx_t_1; - PyObject *(*__pyx_t_2)(PyObject *); + KBest::KBestDerivations,ETreeTraversal,KBest::NoFilter > >::Derivation *__pyx_v_e_derivation; + KBest::KBestDerivations,ETreeTraversal,KBest::NoFilter > > *__pyx_v_e_derivations; + PyObject *__pyx_v_e_tree; + KBest::KBestDerivations,FTreeTraversal,KBest::NoFilter > >::Derivation *__pyx_v_f_derivation; + KBest::KBestDerivations,FTreeTraversal,KBest::NoFilter > > *__pyx_v_f_derivations; + PyObject *__pyx_v_f_tree; + unsigned int __pyx_v_k; + struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self; + PyObject *__pyx_v_size; + unsigned int __pyx_t_0; + long __pyx_t_1; }; -/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":205 - * del self.grammar +/* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":178 + * self.rule.get().lhs_ = -TDConvert(( lhs).cat) * - * def __iter__(self): # <<<<<<<<<<<<<< - * cdef grammar.const_GrammarIter* root = self.grammar.get().GetRoot() - * cdef grammar.const_RuleBin* rbin = root.GetRules() + * def __str__(self): # <<<<<<<<<<<<<< + * scores = ' '.join('%s=%s' % feat for feat in self.scores) + * return '%s ||| %s ||| %s ||| %s' % (self.lhs, */ -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__ { +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__ { PyObject_HEAD - unsigned int __pyx_v_i; - const RuleBin *__pyx_v_rbin; - const GrammarIter *__pyx_v_root; - struct __pyx_obj_4cdec_5_cdec_Grammar *__pyx_v_self; - struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_trule; - int __pyx_t_0; - unsigned int __pyx_t_1; + struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self; }; -/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":49 - * return unicode(hypergraph.JoshuaVisualizationString(self.hg[0]).c_str(), 'utf8') +/* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":100 + * self.cs.AddKBestCandidates(hypergraph.hg[0], k, self.scorer.get()) * - * def kbest(self, size): # <<<<<<<<<<<<<< - * """hg.kbest(size) -> List of k-best hypotheses in the hypergraph.""" - * cdef kbest.KBestDerivations[vector[WordID], kbest.ESentenceTraversal]* derivations = new kbest.KBestDerivations[vector[WordID], kbest.ESentenceTraversal](self.hg[0], size) + * cdef class SegmentEvaluator: # <<<<<<<<<<<<<< + * cdef shared_ptr[mteval.SegmentEvaluator]* scorer + * cdef mteval.EvaluationMetric* metric */ -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest { +struct __pyx_obj_4cdec_5_cdec_SegmentEvaluator { PyObject_HEAD - KBest::KBestDerivations,ESentenceTraversal>::Derivation *__pyx_v_derivation; - KBest::KBestDerivations,ESentenceTraversal> *__pyx_v_derivations; - unsigned int __pyx_v_k; - struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self; - PyObject *__pyx_v_size; - unsigned int __pyx_t_0; - long __pyx_t_1; + boost::shared_ptr *scorer; + EvaluationMetric *metric; }; -/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":62 - * del derivations +/* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":209 * - * def kbest_trees(self, size): # <<<<<<<<<<<<<< - * """hg.kbest_trees(size) -> List of k-best trees in the hypergraph.""" - * cdef kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal]* f_derivations = new kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal](self.hg[0], size) + * property edges: + * def __get__(self): # <<<<<<<<<<<<<< + * cdef unsigned i + * for i in range(self.hg.edges_.size()): */ -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees { +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__ { PyObject_HEAD - KBest::KBestDerivations,ETreeTraversal>::Derivation *__pyx_v_e_derivation; - KBest::KBestDerivations,ETreeTraversal> *__pyx_v_e_derivations; - PyObject *__pyx_v_e_tree; - KBest::KBestDerivations,FTreeTraversal>::Derivation *__pyx_v_f_derivation; - KBest::KBestDerivations,FTreeTraversal> *__pyx_v_f_derivations; - PyObject *__pyx_v_f_tree; - unsigned int __pyx_v_k; + unsigned int __pyx_v_i; struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self; - PyObject *__pyx_v_size; - unsigned int __pyx_t_0; - long __pyx_t_1; + size_t __pyx_t_0; + unsigned int __pyx_t_1; +}; + + +/* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":314 + * + * property out_edges: + * def __get__(self): # <<<<<<<<<<<<<< + * cdef unsigned i + * for i in range(self.node.out_edges_.size()): + */ +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20___get__ { + PyObject_HEAD + unsigned int __pyx_v_i; + struct __pyx_obj_4cdec_5_cdec_HypergraphNode *__pyx_v_self; + size_t __pyx_t_0; + unsigned int __pyx_t_1; }; -/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":81 +/* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":129 * del e_derivations * - * def kbest_features(self, size): # <<<<<<<<<<<<<< - * """hg.kbest_trees(size) -> List of k-best feature vectors in the hypergraph.""" - * cdef kbest.KBestDerivations[FastSparseVector[weight_t], kbest.FeatureVectorTraversal]* derivations = new kbest.KBestDerivations[FastSparseVector[weight_t], kbest.FeatureVectorTraversal](self.hg[0], size) + * def unique_kbest_features(self, size): # <<<<<<<<<<<<<< + * """hg.kbest_trees(size) -> List of unique k-best feature vectors in the hypergraph.""" + * cdef kbest.KBestDerivations[FastSparseVector[weight_t], kbest.FeatureVectorTraversal, kbest.NoFilter[FastSparseVector[double]]]* derivations = new kbest.KBestDerivations[FastSparseVector[weight_t], kbest.FeatureVectorTraversal, kbest.NoFilter[FastSparseVector[double]]](self.hg[0], size) */ -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features { +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13_unique_kbest_features { PyObject_HEAD - KBest::KBestDerivations,FeatureVectorTraversal>::Derivation *__pyx_v_derivation; - KBest::KBestDerivations,FeatureVectorTraversal> *__pyx_v_derivations; + KBest::KBestDerivations,FeatureVectorTraversal,KBest::NoFilter > >::Derivation *__pyx_v_derivation; + KBest::KBestDerivations,FeatureVectorTraversal,KBest::NoFilter > > *__pyx_v_derivations; struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_fmap; unsigned int __pyx_v_k; struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self; @@ -1174,82 +1146,84 @@ struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features { }; -/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":97 - * del derivations - * - * def sample(self, unsigned n): # <<<<<<<<<<<<<< - * """hg.sample(n) -> Sample of n hypotheses from the hypergraph.""" - * cdef vector[hypergraph.Hypothesis]* hypos = new vector[hypergraph.Hypothesis]() +/* "cdec/_cdec.pyx":56 + * 'csplit', 'tagger', 'lexalign'): + * raise InvalidConfig('formalism "%s" unknown' % formalism) + * config_str = '\n'.join('%s = %s' % kv for kv in _make_config(config)) # <<<<<<<<<<<<<< + * cdef istringstream* config_stream = new istringstream(config_str) + * self.dec = new decoder.Decoder(config_stream) */ -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample { +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_28_genexpr { PyObject_HEAD - std::vector *__pyx_v_hypos; - unsigned int __pyx_v_k; - unsigned int __pyx_v_n; - struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self; - size_t __pyx_t_0; - unsigned int __pyx_t_1; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_27___init__ *__pyx_outer_scope; + PyObject *__pyx_v_kv; + PyObject *__pyx_t_0; + Py_ssize_t __pyx_t_1; + PyObject *(*__pyx_t_2)(PyObject *); }; -/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":108 - * del hypos +/* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":6 * - * def sample_trees(self, unsigned n): # <<<<<<<<<<<<<< - * """hg.sample_trees(n) -> Sample of n trees from the hypergraph.""" - * cdef vector[string]* trees = new vector[string]() + * def _phrase(phrase): + * return ' '.join(w.encode('utf8') if isinstance(w, unicode) else str(w) for w in phrase) # <<<<<<<<<<<<<< + * + * cdef class NT: */ -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees { +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr { PyObject_HEAD - unsigned int __pyx_v_k; - unsigned int __pyx_v_n; - struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self; - std::vector *__pyx_v_trees; - size_t __pyx_t_0; - unsigned int __pyx_t_1; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase *__pyx_outer_scope; + PyObject *__pyx_v_w; + PyObject *__pyx_t_0; + Py_ssize_t __pyx_t_1; + PyObject *(*__pyx_t_2)(PyObject *); }; -/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":161 +/* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":49 + * return unicode(hypergraph.JoshuaVisualizationString(self.hg[0]).c_str(), 'utf8') * - * property edges: - * def __get__(self): # <<<<<<<<<<<<<< - * cdef unsigned i - * for i in range(self.hg.edges_.size()): + * def kbest(self, size): # <<<<<<<<<<<<<< + * """hg.kbest(size) -> List of k-best hypotheses in the hypergraph.""" + * cdef kbest.KBestDerivations[vector[WordID], kbest.ESentenceTraversal, kbest.NoFilter[vector[int]]]* derivations = new kbest.KBestDerivations[vector[WordID], kbest.ESentenceTraversal, kbest.NoFilter[vector[int]]](self.hg[0], size) */ -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__ { +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest { PyObject_HEAD - unsigned int __pyx_v_i; + KBest::KBestDerivations,ESentenceTraversal,KBest::NoFilter > >::Derivation *__pyx_v_derivation; + KBest::KBestDerivations,ESentenceTraversal,KBest::NoFilter > > *__pyx_v_derivations; + unsigned int __pyx_v_k; struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self; - size_t __pyx_t_0; - unsigned int __pyx_t_1; + PyObject *__pyx_v_size; + unsigned int __pyx_t_0; + long __pyx_t_1; }; -/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":167 +/* "cdec/sa/_sa.pxd":29 + * cdef FloatList values * - * property nodes: - * def __get__(self): # <<<<<<<<<<<<<< - * cdef unsigned i - * for i in range(self.hg.nodes_.size()): + * cdef class Phrase: # <<<<<<<<<<<<<< + * cdef int *syms + * cdef int n, *varpos, n_vars */ -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__ { +struct __pyx_obj_4cdec_2sa_3_sa_Phrase { PyObject_HEAD - unsigned int __pyx_v_i; - struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self; - size_t __pyx_t_0; - unsigned int __pyx_t_1; + struct __pyx_vtabstruct_4cdec_2sa_3_sa_Phrase *__pyx_vtab; + int *syms; + int n; + int *varpos; + int n_vars; }; -/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":216 +/* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":264 * * property tail_nodes: * def __get__(self): # <<<<<<<<<<<<<< * cdef unsigned i * for i in range(self.edge.tail_nodes_.size()): */ -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__ { +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___get__ { PyObject_HEAD unsigned int __pyx_v_i; struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *__pyx_v_self; @@ -1258,30 +1232,33 @@ struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__ { }; -/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":260 +/* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":205 + * del self.grammar * - * property in_edges: - * def __get__(self): # <<<<<<<<<<<<<< - * cdef unsigned i - * for i in range(self.node.in_edges_.size()): + * def __iter__(self): # <<<<<<<<<<<<<< + * cdef grammar.const_GrammarIter* root = self.grammar.get().GetRoot() + * cdef grammar.const_RuleBin* rbin = root.GetRules() */ -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__ { +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__ { PyObject_HEAD unsigned int __pyx_v_i; - struct __pyx_obj_4cdec_5_cdec_HypergraphNode *__pyx_v_self; - size_t __pyx_t_0; + const RuleBin *__pyx_v_rbin; + const GrammarIter *__pyx_v_root; + struct __pyx_obj_4cdec_5_cdec_Grammar *__pyx_v_self; + struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_trule; + int __pyx_t_0; unsigned int __pyx_t_1; }; -/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":266 +/* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":308 * - * property out_edges: + * property in_edges: * def __get__(self): # <<<<<<<<<<<<<< * cdef unsigned i - * for i in range(self.node.out_edges_.size()): + * for i in range(self.node.in_edges_.size()): */ -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__ { +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19___get__ { PyObject_HEAD unsigned int __pyx_v_i; struct __pyx_obj_4cdec_5_cdec_HypergraphNode *__pyx_v_self; @@ -1290,158 +1267,213 @@ struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__ { }; -/* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":56 - * return unicode(str(self), 'utf8') +/* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":223 + * self.grammar.get().SetGrammarName(name) + * + * cdef class TextGrammar(Grammar): # <<<<<<<<<<<<<< + * def __init__(self, rules): + * """TextGrammar(rules) -> SCFG Grammar containing the rules.""" + */ +struct __pyx_obj_4cdec_5_cdec_TextGrammar { + struct __pyx_obj_4cdec_5_cdec_Grammar __pyx_base; +}; + + +/* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":90 + * return candidate * * def __iter__(self): # <<<<<<<<<<<<<< * cdef unsigned i * for i in range(len(self)): */ -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__ { +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25___iter__ { PyObject_HEAD unsigned int __pyx_v_i; - struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self; + struct __pyx_obj_4cdec_5_cdec_CandidateSet *__pyx_v_self; Py_ssize_t __pyx_t_0; unsigned int __pyx_t_1; }; -/* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":61 - * yield self[i] +/* "cdec/_cdec.pyx":43 + * yield key, str(value) * - * def todot(self): # <<<<<<<<<<<<<< - * """lattice.todot() -> Representation of the lattice in GraphViz dot format.""" - * def lines(): + * cdef class Decoder: # <<<<<<<<<<<<<< + * cdef decoder.Decoder* dec + * cdef DenseVector weights */ -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot { +struct __pyx_obj_4cdec_5_cdec_Decoder { PyObject_HEAD - struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self; + Decoder *dec; + struct __pyx_obj_4cdec_5_cdec_DenseVector *weights; }; -/* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":63 - * def todot(self): - * """lattice.todot() -> Representation of the lattice in GraphViz dot format.""" - * def lines(): # <<<<<<<<<<<<<< - * yield 'digraph lattice {' - * yield 'rankdir = LR;' +/* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":12 + * return stats + * + * cdef class Candidate: # <<<<<<<<<<<<<< + * cdef mteval.const_Candidate* candidate + * cdef public float score */ -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines { +struct __pyx_obj_4cdec_5_cdec_Candidate { PyObject_HEAD - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot *__pyx_outer_scope; - PyObject *__pyx_v_delta; - PyObject *__pyx_v_i; - PyObject *__pyx_v_label; - PyObject *__pyx_v_weight; - Py_ssize_t __pyx_t_0; - PyObject *__pyx_t_1; - PyObject *(*__pyx_t_2)(PyObject *); - PyObject *__pyx_t_3; - Py_ssize_t __pyx_t_4; - PyObject *(*__pyx_t_5)(PyObject *); + const training::Candidate *candidate; + float score; }; -/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":44 - * return self.stats.size() +/* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":145 + * del derivations * - * def __iter__(self): # <<<<<<<<<<<<<< - * for i in range(len(self)): - * yield self[i] + * def sample(self, unsigned n): # <<<<<<<<<<<<<< + * """hg.sample(n) -> Sample of n hypotheses from the hypergraph.""" + * cdef vector[hypergraph.Hypothesis]* hypos = new vector[hypergraph.Hypothesis]() */ -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__ { +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14_sample { PyObject_HEAD - Py_ssize_t __pyx_v_i; - struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_v_self; - Py_ssize_t __pyx_t_0; - Py_ssize_t __pyx_t_1; + std::vector *__pyx_v_hypos; + unsigned int __pyx_v_k; + unsigned int __pyx_v_n; + struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self; + size_t __pyx_t_0; + unsigned int __pyx_t_1; }; -/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":90 - * return candidate +/* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":215 * - * def __iter__(self): # <<<<<<<<<<<<<< - * cdef unsigned i - * for i in range(len(self)): + * property nodes: + * def __get__(self): # <<<<<<<<<<<<<< + * cdef unsigned i + * for i in range(self.hg.nodes_.size()): */ -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__ { +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__ { PyObject_HEAD unsigned int __pyx_v_i; - struct __pyx_obj_4cdec_5_cdec_CandidateSet *__pyx_v_self; - Py_ssize_t __pyx_t_0; - unsigned int __pyx_t_1; + struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self; + size_t __pyx_t_0; + unsigned int __pyx_t_1; }; -/* "cdec/_cdec.pyx":32 - * SetSilent(yn) +/* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":32 + * self.vector[0][fid] = value * - * def _make_config(config): # <<<<<<<<<<<<<< - * for key, value in config.items(): - * if isinstance(value, dict): + * def __iter__(self): # <<<<<<<<<<<<<< + * cdef unsigned fid + * for fid in range(1, self.vector.size()): */ -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config { +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__ { PyObject_HEAD - PyObject *__pyx_v_config; - PyObject *__pyx_v_info; - PyObject *__pyx_v_key; - PyObject *__pyx_v_name; - PyObject *__pyx_v_value; + unsigned int __pyx_v_fid; + struct __pyx_obj_4cdec_5_cdec_DenseVector *__pyx_v_self; + size_t __pyx_t_0; + unsigned int __pyx_t_1; +}; + + +/* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":179 + * + * def __str__(self): + * scores = ' '.join('%s=%s' % feat for feat in self.scores) # <<<<<<<<<<<<<< + * return '%s ||| %s ||| %s ||| %s' % (self.lhs, + * _phrase(self.f), _phrase(self.e), scores) + */ +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr { + PyObject_HEAD + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__ *__pyx_outer_scope; + PyObject *__pyx_v_feat; PyObject *__pyx_t_0; - PyObject *__pyx_t_1; - Py_ssize_t __pyx_t_2; - PyObject *(*__pyx_t_3)(PyObject *); - Py_ssize_t __pyx_t_4; - PyObject *(*__pyx_t_5)(PyObject *); + Py_ssize_t __pyx_t_1; + PyObject *(*__pyx_t_2)(PyObject *); }; -/* "cdec/_cdec.pyx":47 - * cdef DenseVector weights +/* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":110 + * del derivations * - * def __init__(self, config_str=None, **config): # <<<<<<<<<<<<<< - * """Decoder('formalism = scfg') -> initialize from configuration string - * Decoder(formalism='scfg') -> initialize from named parameters + * def unique_kbest_trees(self, size): # <<<<<<<<<<<<<< + * """hg.kbest_trees(size) -> List of unique k-best trees in the hypergraph.""" + * cdef kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal, kbest.FilterUnique]* f_derivations = new kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal, kbest.FilterUnique](self.hg[0], size) */ -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__ { +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_unique_kbest_trees { PyObject_HEAD - PyObject *__pyx_v_config; + KBest::KBestDerivations,ETreeTraversal,KBest::FilterUnique>::Derivation *__pyx_v_e_derivation; + KBest::KBestDerivations,ETreeTraversal,KBest::FilterUnique> *__pyx_v_e_derivations; + PyObject *__pyx_v_e_tree; + KBest::KBestDerivations,FTreeTraversal,KBest::FilterUnique>::Derivation *__pyx_v_f_derivation; + KBest::KBestDerivations,FTreeTraversal,KBest::FilterUnique> *__pyx_v_f_derivations; + PyObject *__pyx_v_f_tree; + unsigned int __pyx_v_k; + struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self; + PyObject *__pyx_v_size; + unsigned int __pyx_t_0; + long __pyx_t_1; }; -/* "cdec/_cdec.pyx":56 - * 'csplit', 'tagger', 'lexalign'): - * raise InvalidConfig('formalism "%s" unknown' % formalism) - * config_str = '\n'.join('%s = %s' % kv for kv in _make_config(config)) # <<<<<<<<<<<<<< - * cdef istringstream* config_stream = new istringstream(config_str) - * self.dec = new decoder.Decoder(config_stream) +/* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":137 + * + * property a: + * def __get__(self): # <<<<<<<<<<<<<< + * cdef unsigned i + * cdef vector[grammar.AlignmentPoint]* a = &self.rule.get().a_ */ -struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr { +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__ { PyObject_HEAD - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__ *__pyx_outer_scope; - PyObject *__pyx_v_kv; - PyObject *__pyx_t_0; - Py_ssize_t __pyx_t_1; - PyObject *(*__pyx_t_2)(PyObject *); + std::vector *__pyx_v_a; + unsigned int __pyx_v_i; + struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self; + size_t __pyx_t_0; + unsigned int __pyx_t_1; +}; + + +/* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":72 + * self.vector.set_value(fid, value) + * + * def __iter__(self): # <<<<<<<<<<<<<< + * cdef FastSparseVector[weight_t].const_iterator* it = new FastSparseVector[weight_t].const_iterator(self.vector[0], False) + * cdef unsigned i + */ +struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__ { + PyObject_HEAD + unsigned int __pyx_v_i; + FastSparseVector::const_iterator *__pyx_v_it; + struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self; + size_t __pyx_t_0; + unsigned int __pyx_t_1; }; -/* "cdec/sa/_sa.pxd":3 - * from libc.stdio cimport FILE +/* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":294 + * raise NotImplemented('comparison not implemented for HypergraphEdge') * - * cdef class FloatList: # <<<<<<<<<<<<<< - * cdef int size - * cdef int increment + * cdef class HypergraphNode: # <<<<<<<<<<<<<< + * cdef hypergraph.Hypergraph* hg + * cdef hypergraph.HypergraphNode* node */ -struct __pyx_vtabstruct_4cdec_2sa_3_sa_FloatList { - void (*set)(struct __pyx_obj_4cdec_2sa_3_sa_FloatList *, int, float); - void (*write_handle)(struct __pyx_obj_4cdec_2sa_3_sa_FloatList *, FILE *); - void (*read_handle)(struct __pyx_obj_4cdec_2sa_3_sa_FloatList *, FILE *); +struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphNode { + PyObject *(*init)(struct __pyx_obj_4cdec_5_cdec_HypergraphNode *, Hypergraph *, unsigned int); }; -static struct __pyx_vtabstruct_4cdec_2sa_3_sa_FloatList *__pyx_vtabptr_4cdec_2sa_3_sa_FloatList; +static struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphNode *__pyx_vtabptr_4cdec_5_cdec_HypergraphNode; + + +/* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":244 + * return vector + * + * cdef class HypergraphEdge: # <<<<<<<<<<<<<< + * cdef hypergraph.Hypergraph* hg + * cdef hypergraph.HypergraphEdge* edge + */ + +struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphEdge { + PyObject *(*init)(struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *, Hypergraph *, unsigned int); +}; +static struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphEdge *__pyx_vtabptr_4cdec_5_cdec_HypergraphEdge; /* "cdec/sa/_sa.pxd":12 @@ -1464,6 +1496,22 @@ struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList { static struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList *__pyx_vtabptr_4cdec_2sa_3_sa_IntList; +/* "cdec/sa/_sa.pxd":3 + * from libc.stdio cimport FILE + * + * cdef class FloatList: # <<<<<<<<<<<<<< + * cdef int size + * cdef int increment + */ + +struct __pyx_vtabstruct_4cdec_2sa_3_sa_FloatList { + void (*set)(struct __pyx_obj_4cdec_2sa_3_sa_FloatList *, int, float); + void (*write_handle)(struct __pyx_obj_4cdec_2sa_3_sa_FloatList *, FILE *); + void (*read_handle)(struct __pyx_obj_4cdec_2sa_3_sa_FloatList *, FILE *); +}; +static struct __pyx_vtabstruct_4cdec_2sa_3_sa_FloatList *__pyx_vtabptr_4cdec_2sa_3_sa_FloatList; + + /* "cdec/sa/_sa.pxd":29 * cdef FloatList values * @@ -1479,7 +1527,7 @@ struct __pyx_vtabstruct_4cdec_2sa_3_sa_Phrase { static struct __pyx_vtabstruct_4cdec_2sa_3_sa_Phrase *__pyx_vtabptr_4cdec_2sa_3_sa_Phrase; -/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":4 +/* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":4 * cimport kbest * * cdef class Hypergraph: # <<<<<<<<<<<<<< @@ -1491,34 +1539,6 @@ struct __pyx_vtabstruct_4cdec_5_cdec_Hypergraph { MT19937 *(*_rng)(struct __pyx_obj_4cdec_5_cdec_Hypergraph *); }; static struct __pyx_vtabstruct_4cdec_5_cdec_Hypergraph *__pyx_vtabptr_4cdec_5_cdec_Hypergraph; - - -/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":196 - * return vector - * - * cdef class HypergraphEdge: # <<<<<<<<<<<<<< - * cdef hypergraph.Hypergraph* hg - * cdef hypergraph.HypergraphEdge* edge - */ - -struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphEdge { - PyObject *(*init)(struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *, Hypergraph *, unsigned int); -}; -static struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphEdge *__pyx_vtabptr_4cdec_5_cdec_HypergraphEdge; - - -/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":246 - * raise NotImplemented('comparison not implemented for HypergraphEdge') - * - * cdef class HypergraphNode: # <<<<<<<<<<<<<< - * cdef hypergraph.Hypergraph* hg - * cdef hypergraph.HypergraphNode* node - */ - -struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphNode { - PyObject *(*init)(struct __pyx_obj_4cdec_5_cdec_HypergraphNode *, Hypergraph *, unsigned int); -}; -static struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphNode *__pyx_vtabptr_4cdec_5_cdec_HypergraphNode; #ifndef CYTHON_REFNANNY #define CYTHON_REFNANNY 0 #endif @@ -1570,14 +1590,6 @@ static struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphNode *__pyx_vtabptr_4cdec_ #define __Pyx_XGOTREF(r) #define __Pyx_XGIVEREF(r) #endif /* CYTHON_REFNANNY */ -#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) @@ -1598,12 +1610,6 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject static PyObject *__Pyx_GetBuiltinName(PyObject *name); /*proto*/ -#if CYTHON_COMPILING_IN_CPYTHON -static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); /*proto*/ -#else -#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) -#endif - static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ @@ -1614,37 +1620,13 @@ static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, static CYTHON_INLINE int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed); /*proto*/ -static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, +static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact); /*proto*/ static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/ -static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ - -static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ - -static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ -static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ - static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname); -#if PY_MAJOR_VERSION < 3 -#define __Pyx_PyString_Join __Pyx_PyBytes_Join -#define __Pyx_PyBaseString_Join(s, v) (PyUnicode_CheckExact(s) ? PyUnicode_Join(s, v) : __Pyx_PyBytes_Join(s, v)) -#else -#define __Pyx_PyString_Join PyUnicode_Join -#define __Pyx_PyBaseString_Join PyUnicode_Join -#endif -#if CYTHON_COMPILING_IN_CPYTHON - #if PY_MAJOR_VERSION < 3 - #define __Pyx_PyBytes_Join _PyString_Join - #else - #define __Pyx_PyBytes_Join _PyBytes_Join - #endif -#else -static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values); /*proto*/ -#endif - static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); /*proto*/ static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], \ @@ -1689,7 +1671,7 @@ static PyObject* __Pyx_PyObject_CallMethodTuple(PyObject* obj, PyObject* method_ if (unlikely(!args)) return NULL; method = __Pyx_PyObject_GetAttrStr(obj, method_name); if (unlikely(!method)) goto bad; - result = __Pyx_PyObject_Call(method, args, NULL); + result = PyObject_Call(method, args, NULL); Py_DECREF(method); bad: Py_DECREF(args); @@ -1704,23 +1686,22 @@ bad: #define __Pyx_PyObject_CallMethod0(obj, name) \ __Pyx_PyObject_CallMethodTuple(obj, name, (Py_INCREF(__pyx_empty_tuple), __pyx_empty_tuple)) -static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x); /*proto*/ - -#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_PyObject_Append(PyObject* L, PyObject* x); /*proto*/ + +#define __Pyx_GetItemInt(o, i, size, to_py_func, is_list, wraparound, boundscheck) \ + (((size) <= sizeof(Py_ssize_t)) ? \ + __Pyx_GetItemInt_Fast(o, i, is_list, wraparound, boundscheck) : \ + __Pyx_GetItemInt_Generic(o, to_py_func(i))) +#define __Pyx_GetItemInt_List(o, i, size, to_py_func, is_list, wraparound, boundscheck) \ + (((size) <= sizeof(Py_ssize_t)) ? \ + __Pyx_GetItemInt_List_Fast(o, i, wraparound, boundscheck) : \ + __Pyx_GetItemInt_Generic(o, to_py_func(i))) 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)) +#define __Pyx_GetItemInt_Tuple(o, i, size, to_py_func, is_list, wraparound, boundscheck) \ + (((size) <= sizeof(Py_ssize_t)) ? \ + __Pyx_GetItemInt_Tuple_Fast(o, i, wraparound, boundscheck) : \ + __Pyx_GetItemInt_Generic(o, to_py_func(i))) 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); @@ -1738,8 +1719,7 @@ static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name); /*proto*/ static void __Pyx_WriteUnraisable(const char *name, int clineno, - int lineno, const char *filename, - int full_traceback); /*proto*/ + int lineno, const char *filename); /*proto*/ static CYTHON_INLINE int __Pyx_PyDict_Contains(PyObject* item, PyObject* dict, int eq) { int result = PyDict_Contains(dict, item); @@ -1749,8 +1729,6 @@ static CYTHON_INLINE int __Pyx_PyDict_Contains(PyObject* item, PyObject* dict, i #define __Pyx_PyIter_Next(obj) __Pyx_PyIter_Next2(obj, NULL) static CYTHON_INLINE PyObject *__Pyx_PyIter_Next2(PyObject *, PyObject *); /*proto*/ -static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type); - #define __Pyx_CyFunction_USED 1 #include #define __Pyx_CYFUNCTION_STATICMETHOD 0x01 @@ -1766,30 +1744,28 @@ static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type); ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) typedef struct { PyCFunctionObject func; + int flags; PyObject *func_dict; PyObject *func_weakreflist; PyObject *func_name; PyObject *func_qualname; PyObject *func_doc; - PyObject *func_globals; PyObject *func_code; PyObject *func_closure; PyObject *func_classobj; /* No-args super() class cell */ void *defaults; int defaults_pyobjects; - int flags; PyObject *defaults_tuple; /* Const defaults tuple */ PyObject *defaults_kwdict; /* Const kwonly defaults dict */ PyObject *(*defaults_getter)(PyObject *); PyObject *func_annotations; /* function annotations dict */ } __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) +#define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, code) \ + __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, code) static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml, int flags, PyObject* qualname, - PyObject *self, - PyObject *module, PyObject *globals, + PyObject *self, PyObject *module, PyObject* code); static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m, size_t size, @@ -1804,43 +1780,6 @@ static int __Pyx_CyFunction_init(void); static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value); /*proto*/ -#include - -static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); /*proto*/ - -static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); /*proto*/ - -#if PY_MAJOR_VERSION >= 3 -#define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals -#else -#define __Pyx_PyString_Equals __Pyx_PyBytes_Equals -#endif - -#if CYTHON_COMPILING_IN_CPYTHON && (PY_VERSION_HEX >= 0x03020000 || PY_MAJOR_VERSION < 3 && 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 double __Pyx__PyObject_AsDouble(PyObject* obj); /* proto */ #if CYTHON_COMPILING_IN_PYPY #define __Pyx_PyObject_AsDouble(obj) \ @@ -1853,24 +1792,23 @@ static double __Pyx__PyObject_AsDouble(PyObject* obj); /* proto */ PyFloat_AS_DOUBLE(obj) : __Pyx__PyObject_AsDouble(obj)) #endif -static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/ +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ -static void* __Pyx_GetVtable(PyObject *dict); /*proto*/ +#include -static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases); +static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/ -static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname, - PyObject *mkw, PyObject *modname, PyObject *doc); /*proto*/ -static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict, - PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass); /*proto*/ +static void* __Pyx_GetVtable(PyObject *dict); /*proto*/ -static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_int(unsigned int value); +static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ +static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ -static CYTHON_INLINE unsigned int __Pyx_PyInt_As_unsigned_int(PyObject *); +static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); /*proto*/ -static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); +static PyObject *__Pyx_FindPy2Metaclass(PyObject *bases); /*proto*/ -static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); /*proto*/ +static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name, + PyObject *qualname, PyObject *modname); /*proto*/ #ifndef __Pyx_CppExn2PyErr #include @@ -1911,19 +1849,43 @@ static void __Pyx_CppExn2PyErr() { } #endif -static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); +static CYTHON_INLINE WordID __Pyx_PyInt_from_py_WordID(PyObject *); + +static PyObject* __Pyx_Globals(void); /*proto*/ -static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); +static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *); -static CYTHON_INLINE WordID __Pyx_PyInt_As_WordID(PyObject *); +static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *); -static CYTHON_INLINE PyObject* __Pyx_PyInt_From_short(short value); +static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *); -static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *); /*proto*/ +static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject *); -static PyObject* __Pyx_Globals(void); /*proto*/ +static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject *); + +static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject *); + +static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *); -static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); +static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *); + +static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *); + +static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject *); + +static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *); + +static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *); + +static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject *); + +static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *); + +static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *); + +static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *); + +static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ #define __Pyx_Generator_USED #include @@ -1940,7 +1902,7 @@ typedef struct { PyObject *classobj; PyObject *yieldfrom; int resume_label; - char is_running; + char is_running; // using T_BOOL for property below requires char value } __pyx_GeneratorObject; static __pyx_GeneratorObject *__Pyx_Generator_New(__pyx_generator_body_t body, PyObject *closure); @@ -2026,51 +1988,54 @@ static int (*__pyx_f_4cdec_2sa_3_sa_sym_getindex)(int); /*proto*/ /* Module declarations from 'cdec.mteval' */ /* Module declarations from 'cdec._cdec' */ +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_24___iter__ = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec_TRule = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec_MRule = 0; static PyTypeObject *__pyx_ptype_4cdec_5_cdec_DenseVector = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec_SufficientStats = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_23_lines = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_27___init__ = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_21___iter__ = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec_Metric = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_11_unique_kbest = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec_Candidate = 0; static PyTypeObject *__pyx_ptype_4cdec_5_cdec_SparseVector = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_26__make_config = 0; static PyTypeObject *__pyx_ptype_4cdec_5_cdec_NT = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec_Lattice = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_15_sample_trees = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec_HypergraphEdge = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_2__phrase = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec_Scorer = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec_HypergraphNode = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_10_kbest_features = 0; static PyTypeObject *__pyx_ptype_4cdec_5_cdec_NTRef = 0; -static PyTypeObject *__pyx_ptype_4cdec_5_cdec_TRule = 0; -static PyTypeObject *__pyx_ptype_4cdec_5_cdec_MRule = 0; static PyTypeObject *__pyx_ptype_4cdec_5_cdec_Grammar = 0; -static PyTypeObject *__pyx_ptype_4cdec_5_cdec_TextGrammar = 0; static PyTypeObject *__pyx_ptype_4cdec_5_cdec_Hypergraph = 0; -static PyTypeObject *__pyx_ptype_4cdec_5_cdec_HypergraphEdge = 0; -static PyTypeObject *__pyx_ptype_4cdec_5_cdec_HypergraphNode = 0; -static PyTypeObject *__pyx_ptype_4cdec_5_cdec_Lattice = 0; -static PyTypeObject *__pyx_ptype_4cdec_5_cdec_Candidate = 0; -static PyTypeObject *__pyx_ptype_4cdec_5_cdec_SufficientStats = 0; static PyTypeObject *__pyx_ptype_4cdec_5_cdec_CandidateSet = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_22_todot = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_5___str__ = 0; static PyTypeObject *__pyx_ptype_4cdec_5_cdec_SegmentEvaluator = 0; -static PyTypeObject *__pyx_ptype_4cdec_5_cdec_Scorer = 0; -static PyTypeObject *__pyx_ptype_4cdec_5_cdec_Metric = 0; -static PyTypeObject *__pyx_ptype_4cdec_5_cdec_Decoder = 0; -static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct____iter__ = 0; -static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_1___iter__ = 0; -static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_2__phrase = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_16___get__ = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_20___get__ = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_13_unique_kbest_features = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_28_genexpr = 0; static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_3_genexpr = 0; -static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_4___get__ = 0; -static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_5___str__ = 0; -static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_6_genexpr = 0; -static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_7___iter__ = 0; static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_8_kbest = 0; -static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees = 0; -static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_10_kbest_features = 0; -static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_11_sample = 0; -static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_12_sample_trees = 0; -static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_13___get__ = 0; -static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_14___get__ = 0; -static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_15___get__ = 0; -static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_16___get__ = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_18___get__ = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_7___iter__ = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_19___get__ = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec_TextGrammar = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_25___iter__ = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec_Decoder = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct____iter__ = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_14_sample = 0; static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_17___get__ = 0; -static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_18___iter__ = 0; -static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_19_todot = 0; -static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_20_lines = 0; -static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_21___iter__ = 0; -static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_22___iter__ = 0; -static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_23__make_config = 0; -static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_24___init__ = 0; -static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_25_genexpr = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_6_genexpr = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_12_unique_kbest_trees = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_4___get__ = 0; +static PyTypeObject *__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_1___iter__ = 0; static PyObject *__pyx_f_4cdec_5_cdec_as_str(PyObject *, struct __pyx_opt_args_4cdec_5_cdec_as_str *__pyx_optional_args); /*proto*/ static struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_f_4cdec_5_cdec_convert_rule(struct __pyx_obj_4cdec_2sa_3_sa_Rule *); /*proto*/ static struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_f_4cdec_5_cdec_as_stats(PyObject *, PyObject *); /*proto*/ @@ -2101,7 +2066,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_11DenseVector_10__iter__(struct __pyx_obj static PyObject *__pyx_pf_4cdec_5_cdec_11DenseVector_13dot(struct __pyx_obj_4cdec_5_cdec_DenseVector *__pyx_v_self, struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_other); /* proto */ static PyObject *__pyx_pf_4cdec_5_cdec_11DenseVector_15tosparse(struct __pyx_obj_4cdec_5_cdec_DenseVector *__pyx_v_self); /* proto */ static int __pyx_pf_4cdec_5_cdec_12SparseVector___init__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self); /* proto */ -static void __pyx_pf_4cdec_5_cdec_12SparseVector_2__dealloc__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self); /* proto */ +static void __pyx_pf_4cdec_5_cdec_12SparseVector_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_4copy(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_6__getitem__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self, char *__pyx_v_fname); /* proto */ static int __pyx_pf_4cdec_5_cdec_12SparseVector_8__setitem__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self, char *__pyx_v_fname, float __pyx_v_value); /* proto */ @@ -2137,7 +2102,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5NTRef_2__str__(struct __pyx_obj_4cdec_5_ static PyObject *__pyx_pf_4cdec_5_cdec_5NTRef_3ref___get__(struct __pyx_obj_4cdec_5_cdec_NTRef *__pyx_v_self); /* proto */ static int __pyx_pf_4cdec_5_cdec_5NTRef_3ref_2__set__(struct __pyx_obj_4cdec_5_cdec_NTRef *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ static int __pyx_pf_4cdec_5_cdec_5TRule___init__(struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_f, PyObject *__pyx_v_e, PyObject *__pyx_v_scores, PyObject *__pyx_v_a, PyObject *__pyx_v_text); /* proto */ -static void __pyx_pf_4cdec_5_cdec_5TRule_2__dealloc__(struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self); /* proto */ +static void __pyx_pf_4cdec_5_cdec_5TRule_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_5arity___get__(struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_1f___get__(struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self); /* proto */ static int __pyx_pf_4cdec_5_cdec_5TRule_1f_2__set__(struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self, PyObject *__pyx_v_f); /* proto */ @@ -2152,7 +2117,7 @@ static int __pyx_pf_4cdec_5_cdec_5TRule_3lhs_2__set__(struct __pyx_obj_4cdec_5_c static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_7__str___genexpr(PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_4__str__(struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self); /* proto */ static int __pyx_pf_4cdec_5_cdec_5MRule___init__(struct __pyx_obj_4cdec_5_cdec_MRule *__pyx_v_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, PyObject *__pyx_v_scores); /* proto */ -static void __pyx_pf_4cdec_5_cdec_7Grammar___dealloc__(struct __pyx_obj_4cdec_5_cdec_Grammar *__pyx_v_self); /* proto */ +static void __pyx_pf_4cdec_5_cdec_7Grammar___dealloc__(CYTHON_UNUSED struct __pyx_obj_4cdec_5_cdec_Grammar *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_4cdec_5_cdec_7Grammar_2__iter__(struct __pyx_obj_4cdec_5_cdec_Grammar *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_4cdec_5_cdec_7Grammar_4name___get__(struct __pyx_obj_4cdec_5_cdec_Grammar *__pyx_v_self); /* proto */ static int __pyx_pf_4cdec_5_cdec_7Grammar_4name_2__set__(struct __pyx_obj_4cdec_5_cdec_Grammar *__pyx_v_self, PyObject *__pyx_v_name); /* proto */ @@ -2166,18 +2131,21 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_10viterbi_joshua(struct __py static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_12kbest(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self, PyObject *__pyx_v_size); /* proto */ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_15kbest_trees(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self, PyObject *__pyx_v_size); /* proto */ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_18kbest_features(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self, PyObject *__pyx_v_size); /* proto */ -static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_21sample(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self, unsigned int __pyx_v_n); /* proto */ -static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_24sample_trees(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self, unsigned int __pyx_v_n); /* proto */ -static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_27intersect(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self, PyObject *__pyx_v_inp); /* proto */ -static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_29prune(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self, PyObject *__pyx_v_beam_alpha, PyObject *__pyx_v_density, PyObject *__pyx_v_kwargs); /* proto */ -static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_31lattice(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_33plf(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_35reweight(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self, PyObject *__pyx_v_weights); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_21unique_kbest(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self, PyObject *__pyx_v_size); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_24unique_kbest_trees(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self, PyObject *__pyx_v_size); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_27unique_kbest_features(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self, PyObject *__pyx_v_size); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_30sample(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self, unsigned int __pyx_v_n); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_33sample_trees(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self, unsigned int __pyx_v_n); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_36intersect(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self, PyObject *__pyx_v_inp); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_38prune(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self, PyObject *__pyx_v_beam_alpha, PyObject *__pyx_v_density, PyObject *__pyx_v_kwargs); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_40lattice(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_42plf(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_44reweight(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self, PyObject *__pyx_v_weights); /* proto */ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_5edges___get__(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_5nodes___get__(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_4goal___get__(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_6npaths___get__(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_37inside_outside(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_46inside_outside(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self); /* proto */ static Py_ssize_t __pyx_pf_4cdec_5_cdec_14HypergraphEdge___len__(struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_9head_node___get__(struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_10tail_nodes___get__(struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *__pyx_v_self); /* proto */ @@ -2197,7 +2165,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphNode_3cat___get__(struct __py static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphNode___richcmp__(struct __pyx_obj_4cdec_5_cdec_HypergraphNode *__pyx_v_x, struct __pyx_obj_4cdec_5_cdec_HypergraphNode *__pyx_v_y, int __pyx_v_op); /* proto */ static int __pyx_pf_4cdec_5_cdec_7Lattice___cinit__(struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self); /* proto */ static int __pyx_pf_4cdec_5_cdec_7Lattice_2__init__(struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self, PyObject *__pyx_v_inp); /* proto */ -static void __pyx_pf_4cdec_5_cdec_7Lattice_4__dealloc__(struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self); /* proto */ +static void __pyx_pf_4cdec_5_cdec_7Lattice_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_6__getitem__(struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self, int __pyx_v_index); /* proto */ static int __pyx_pf_4cdec_5_cdec_7Lattice_8__setitem__(struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self, int __pyx_v_index, PyObject *__pyx_v_arcs); /* proto */ static Py_ssize_t __pyx_pf_4cdec_5_cdec_7Lattice_10__len__(struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self); /* proto */ @@ -2211,7 +2179,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_9Candidate_5words___get__(struct __pyx_ob static PyObject *__pyx_pf_4cdec_5_cdec_9Candidate_4fmap___get__(struct __pyx_obj_4cdec_5_cdec_Candidate *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_4cdec_5_cdec_9Candidate_5score___get__(struct __pyx_obj_4cdec_5_cdec_Candidate *__pyx_v_self); /* proto */ static int __pyx_pf_4cdec_5_cdec_9Candidate_5score_2__set__(struct __pyx_obj_4cdec_5_cdec_Candidate *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ -static void __pyx_pf_4cdec_5_cdec_15SufficientStats___dealloc__(struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_v_self); /* proto */ +static void __pyx_pf_4cdec_5_cdec_15SufficientStats___dealloc__(CYTHON_UNUSED struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_5score___get__(struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_6detail___get__(struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_v_self); /* proto */ static Py_ssize_t __pyx_pf_4cdec_5_cdec_15SufficientStats_2__len__(struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_v_self); /* proto */ @@ -2220,16 +2188,16 @@ static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_7__getitem__(struct __p static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_9__iadd__(struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_v_self, struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_v_other); /* proto */ static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_11__add__(PyObject *__pyx_v_x, PyObject *__pyx_v_y); /* proto */ static int __pyx_pf_4cdec_5_cdec_12CandidateSet___cinit__(struct __pyx_obj_4cdec_5_cdec_CandidateSet *__pyx_v_self, struct __pyx_obj_4cdec_5_cdec_SegmentEvaluator *__pyx_v_evaluator); /* proto */ -static void __pyx_pf_4cdec_5_cdec_12CandidateSet_2__dealloc__(struct __pyx_obj_4cdec_5_cdec_CandidateSet *__pyx_v_self); /* proto */ +static void __pyx_pf_4cdec_5_cdec_12CandidateSet_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cdec_5_cdec_CandidateSet *__pyx_v_self); /* proto */ static Py_ssize_t __pyx_pf_4cdec_5_cdec_12CandidateSet_4__len__(struct __pyx_obj_4cdec_5_cdec_CandidateSet *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_4cdec_5_cdec_12CandidateSet_6__getitem__(struct __pyx_obj_4cdec_5_cdec_CandidateSet *__pyx_v_self, int __pyx_v_k); /* proto */ static PyObject *__pyx_pf_4cdec_5_cdec_12CandidateSet_8__iter__(struct __pyx_obj_4cdec_5_cdec_CandidateSet *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_4cdec_5_cdec_12CandidateSet_11add_kbest(struct __pyx_obj_4cdec_5_cdec_CandidateSet *__pyx_v_self, struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_hypergraph, unsigned int __pyx_v_k); /* proto */ -static void __pyx_pf_4cdec_5_cdec_16SegmentEvaluator___dealloc__(struct __pyx_obj_4cdec_5_cdec_SegmentEvaluator *__pyx_v_self); /* proto */ +static void __pyx_pf_4cdec_5_cdec_16SegmentEvaluator___dealloc__(CYTHON_UNUSED struct __pyx_obj_4cdec_5_cdec_SegmentEvaluator *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_4cdec_5_cdec_16SegmentEvaluator_2evaluate(struct __pyx_obj_4cdec_5_cdec_SegmentEvaluator *__pyx_v_self, PyObject *__pyx_v_sentence); /* proto */ static PyObject *__pyx_pf_4cdec_5_cdec_16SegmentEvaluator_4candidate_set(struct __pyx_obj_4cdec_5_cdec_SegmentEvaluator *__pyx_v_self); /* proto */ static int __pyx_pf_4cdec_5_cdec_6Scorer___cinit__(struct __pyx_obj_4cdec_5_cdec_Scorer *__pyx_v_self, PyObject *__pyx_v_name); /* proto */ -static void __pyx_pf_4cdec_5_cdec_6Scorer_2__dealloc__(struct __pyx_obj_4cdec_5_cdec_Scorer *__pyx_v_self); /* proto */ +static void __pyx_pf_4cdec_5_cdec_6Scorer_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cdec_5_cdec_Scorer *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_4cdec_5_cdec_6Scorer_4__call__(struct __pyx_obj_4cdec_5_cdec_Scorer *__pyx_v_self, PyObject *__pyx_v_refs); /* proto */ static PyObject *__pyx_pf_4cdec_5_cdec_6Scorer_6__str__(struct __pyx_obj_4cdec_5_cdec_Scorer *__pyx_v_self); /* proto */ static int __pyx_pf_4cdec_5_cdec_6Metric___cinit__(struct __pyx_obj_4cdec_5_cdec_Metric *__pyx_v_self); /* proto */ @@ -2240,377 +2208,376 @@ static PyObject *__pyx_pf_4cdec_5_cdec_2set_silent(CYTHON_UNUSED PyObject *__pyx static PyObject *__pyx_pf_4cdec_5_cdec_4_make_config(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_config); /* proto */ static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_8__init___genexpr(PyObject *__pyx_self); /* proto */ static int __pyx_pf_4cdec_5_cdec_7Decoder___init__(struct __pyx_obj_4cdec_5_cdec_Decoder *__pyx_v_self, PyObject *__pyx_v_config_str, PyObject *__pyx_v_config); /* proto */ -static void __pyx_pf_4cdec_5_cdec_7Decoder_2__dealloc__(struct __pyx_obj_4cdec_5_cdec_Decoder *__pyx_v_self); /* proto */ +static void __pyx_pf_4cdec_5_cdec_7Decoder_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cdec_5_cdec_Decoder *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_7weights___get__(struct __pyx_obj_4cdec_5_cdec_Decoder *__pyx_v_self); /* proto */ static int __pyx_pf_4cdec_5_cdec_7Decoder_7weights_2__set__(struct __pyx_obj_4cdec_5_cdec_Decoder *__pyx_v_self, PyObject *__pyx_v_weights); /* proto */ static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_9formalism___get__(struct __pyx_obj_4cdec_5_cdec_Decoder *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_4read_weights(struct __pyx_obj_4cdec_5_cdec_Decoder *__pyx_v_self, PyObject *__pyx_v_weights); /* proto */ static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_6translate(struct __pyx_obj_4cdec_5_cdec_Decoder *__pyx_v_self, PyObject *__pyx_v_sentence, PyObject *__pyx_v_grammar); /* proto */ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_24___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec_TRule(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec_MRule(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_4cdec_5_cdec_DenseVector(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec_SufficientStats(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_23_lines(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_27___init__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_21___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec_Metric(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_11_unique_kbest(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec_Candidate(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_4cdec_5_cdec_SparseVector(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_26__make_config(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_4cdec_5_cdec_NT(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec_Lattice(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_15_sample_trees(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec_HypergraphEdge(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_2__phrase(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec_Scorer(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec_HypergraphNode(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_10_kbest_features(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_4cdec_5_cdec_NTRef(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_4cdec_5_cdec_TRule(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_4cdec_5_cdec_MRule(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_4cdec_5_cdec_Grammar(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_4cdec_5_cdec_TextGrammar(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_4cdec_5_cdec_Hypergraph(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_4cdec_5_cdec_HypergraphEdge(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_4cdec_5_cdec_HypergraphNode(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_4cdec_5_cdec_Lattice(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_4cdec_5_cdec_Candidate(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_4cdec_5_cdec_SufficientStats(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_4cdec_5_cdec_CandidateSet(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_22_todot(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_5___str__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_4cdec_5_cdec_SegmentEvaluator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_4cdec_5_cdec_Scorer(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_4cdec_5_cdec_Metric(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_4cdec_5_cdec_Decoder(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct____iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_1___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_2__phrase(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_16___get__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_20___get__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_13_unique_kbest_features(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_28_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_3_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_4___get__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_5___str__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_6_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_7___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_8_kbest(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_10_kbest_features(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_11_sample(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_12_sample_trees(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_13___get__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_14___get__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_15___get__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_16___get__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_18___get__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_7___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_19___get__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec_TextGrammar(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_25___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec_Decoder(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct____iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_14_sample(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_17___get__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_18___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_19_todot(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_20_lines(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_21___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_22___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_23__make_config(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_24___init__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_25_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static char __pyx_k_a[] = "a"; -static char __pyx_k_d[] = "[%d]"; -static char __pyx_k_e[] = "e"; -static char __pyx_k_f[] = "f"; -static char __pyx_k_i[] = "i"; -static char __pyx_k_k[] = "k"; -static char __pyx_k_s[] = "[%s]"; -static char __pyx_k__4[] = " "; -static char __pyx_k_pb[] = "pb"; -static char __pyx_k_sa[] = "_sa"; -static char __pyx_k_yn[] = "yn"; -static char __pyx_k_CER[] = "CER"; -static char __pyx_k_SSK[] = "SSK"; -static char __pyx_k_TER[] = "TER"; -static char __pyx_k__10[] = "\""; -static char __pyx_k__11[] = "\\\""; -static char __pyx_k__13[] = "}"; -static char __pyx_k__16[] = "\n"; -static char __pyx_k__20[] = "#"; -static char __pyx_k__23[] = "*"; -static char __pyx_k_cat[] = "cat"; -static char __pyx_k_doc[] = "__doc__"; -static char __pyx_k_dot[] = "dot"; -static char __pyx_k_fst[] = "fst"; -static char __pyx_k_get[] = "get"; -static char __pyx_k_hyp[] = "hyp"; -static char __pyx_k_inp[] = "inp"; -static char __pyx_k_key[] = "key"; -static char __pyx_k_lhs[] = "lhs"; -static char __pyx_k_plf[] = "plf"; -static char __pyx_k_ref[] = "ref"; -static char __pyx_k_rhs[] = "rhs"; -static char __pyx_k_s_d[] = "[%s,%d]"; -static char __pyx_k_s_s[] = "%s=%s"; -static char __pyx_k_BLEU[] = "BLEU"; -static char __pyx_k_QCRI[] = "QCRI"; -static char __pyx_k_args[] = "args"; -static char __pyx_k_dict[] = "__dict__"; -static char __pyx_k_eval[] = "eval"; -static char __pyx_k_exit[] = "__exit__"; -static char __pyx_k_info[] = "info"; -static char __pyx_k_init[] = "__init__"; -static char __pyx_k_join[] = "join"; -static char __pyx_k_main[] = "__main__"; -static char __pyx_k_name[] = "name"; -static char __pyx_k_open[] = "open"; -static char __pyx_k_refs[] = "refs"; -static char __pyx_k_scfg[] = "scfg"; -static char __pyx_k_self[] = "self"; -static char __pyx_k_send[] = "send"; -static char __pyx_k_span[] = "span"; -static char __pyx_k_test[] = "__test__"; -static char __pyx_k_text[] = "text"; -static char __pyx_k_utf8[] = "utf8"; -static char __pyx_k_class[] = "__class__"; -static char __pyx_k_close[] = "close"; -static char __pyx_k_delta[] = "delta"; -static char __pyx_k_enter[] = "__enter__"; -static char __pyx_k_items[] = "items"; -static char __pyx_k_label[] = "label"; -static char __pyx_k_lines[] = "lines"; -static char __pyx_k_range[] = "range"; -static char __pyx_k_rules[] = "rules"; -static char __pyx_k_s_s_2[] = "%s %s"; -static char __pyx_k_s_s_3[] = "%s = %s"; -static char __pyx_k_score[] = "score"; -static char __pyx_k_split[] = "split"; -static char __pyx_k_strip[] = "strip"; -static char __pyx_k_super[] = "super"; -static char __pyx_k_throw[] = "throw"; -static char __pyx_k_value[] = "value"; -static char __pyx_k_append[] = "append"; -static char __pyx_k_config[] = "config"; -static char __pyx_k_csplit[] = "csplit"; -static char __pyx_k_encode[] = "encode"; -static char __pyx_k_format[] = "format"; -static char __pyx_k_import[] = "__import__"; -static char __pyx_k_module[] = "__module__"; -static char __pyx_k_name_2[] = "__name__"; -static char __pyx_k_phrase[] = "_phrase"; -static char __pyx_k_scores[] = "scores"; -static char __pyx_k_tagger[] = "tagger"; -static char __pyx_k_weight[] = "weight"; -static char __pyx_k_density[] = "density"; -static char __pyx_k_genexpr[] = "genexpr"; -static char __pyx_k_grammar[] = "grammar"; -static char __pyx_k_prepare[] = "__prepare__"; -static char __pyx_k_replace[] = "replace"; -static char __pyx_k_s_s_s_s[] = "%s ||| %s ||| %s ||| %s"; -static char __pyx_k_IBM_BLEU[] = "IBM_BLEU"; -static char __pyx_k_KeyError[] = "KeyError"; -static char __pyx_k_encoding[] = "encoding"; -static char __pyx_k_evaluate[] = "evaluate"; -static char __pyx_k_in_edges[] = "in_edges"; -static char __pyx_k_lexalign[] = "lexalign"; -static char __pyx_k_lextrans[] = "lextrans"; -static char __pyx_k_phrase_2[] = "phrase"; -static char __pyx_k_qualname[] = "__qualname__"; -static char __pyx_k_sentence[] = "sentence"; -static char __pyx_k_Exception[] = "Exception"; -static char __pyx_k_QCRI_BLEU[] = "QCRI_BLEU"; -static char __pyx_k_TypeError[] = "TypeError"; -static char __pyx_k_enumerate[] = "enumerate"; -static char __pyx_k_evaluator[] = "evaluator"; -static char __pyx_k_formalism[] = "formalism"; -static char __pyx_k_metaclass[] = "__metaclass__"; -static char __pyx_k_IndexError[] = "IndexError"; -static char __pyx_k_ValueError[] = "ValueError"; -static char __pyx_k_alignments[] = "alignments"; -static char __pyx_k_beam_alpha[] = "beam_alpha"; -static char __pyx_k_cdec__cdec[] = "cdec._cdec"; -static char __pyx_k_config_str[] = "config_str"; -static char __pyx_k_hypergraph[] = "hypergraph"; -static char __pyx_k_pyx_vtable[] = "__pyx_vtable__"; -static char __pyx_k_rankdir_LR[] = "rankdir = LR;"; -static char __pyx_k_set_silent[] = "set_silent"; -static char __pyx_k_startswith[] = "startswith"; -static char __pyx_k_ParseFailed[] = "ParseFailed"; -static char __pyx_k_cdec_sa__sa[] = "cdec.sa._sa"; -static char __pyx_k_d_d_label_s[] = "%d -> %d [label=\"%s\"];"; -static char __pyx_k_make_config[] = "_make_config"; -static char __pyx_k_InvalidConfig[] = "InvalidConfig"; -static char __pyx_k_NotImplemented[] = "NotImplemented"; -static char __pyx_k_digraph_lattice[] = "digraph lattice {"; -static char __pyx_k_node_shape_circle[] = "node [shape=circle];"; -static char __pyx_k_todot_locals_lines[] = "todot..lines"; -static char __pyx_k_formalism_s_unknown[] = "formalism \"%s\" unknown"; -static char __pyx_k_d_shape_doublecircle[] = "%d [shape=doublecircle]"; -static char __pyx_k_csplit_preserve_full_word[] = "csplit_preserve_full_word"; -static char __pyx_k_lattice_index_out_of_range[] = "lattice index out of range"; -static char __pyx_k_Cannot_convert_type_s_to_str[] = "Cannot convert type %s to str"; -static char __pyx_k_cannot_create_lattice_from_s[] = "cannot create lattice from %s"; -static char __pyx_k_Cannot_translate_input_type_s[] = "Cannot translate input type %s"; -static char __pyx_k_cannot_reweight_hypergraph_with[] = "cannot reweight hypergraph with %s"; -static char __pyx_k_usr0_home_cdyer_cdec_python_cde[] = "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi"; -static char __pyx_k_candidate_set_index_out_of_range[] = "candidate set index out of range"; -static char __pyx_k_cannot_initialize_weights_with_s[] = "cannot initialize weights with %s"; -static char __pyx_k_cannot_intersect_hypergraph_with[] = "cannot intersect hypergraph with %s"; -static char __pyx_k_cannot_take_the_dot_product_of_s[] = "cannot take the dot product of %s and SparseVector"; -static char __pyx_k_comparison_not_implemented_for_H[] = "comparison not implemented for HypergraphEdge"; -static char __pyx_k_comparison_not_implemented_for_S[] = "comparison not implemented for SparseVector"; -static char __pyx_k_sufficient_stats_vector_index_ou[] = "sufficient stats vector index out of range"; -static char __pyx_k_the_grammar_should_contain_TRule[] = "the grammar should contain TRule objects"; -static char __pyx_k_usr0_home_cdyer_cdec_python_cde_2[] = "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi"; -static char __pyx_k_usr0_home_cdyer_cdec_python_cde_3[] = "/usr0/home/cdyer/cdec/python/cdec/_cdec.pyx"; -static char __pyx_k_comparison_not_implemented_for_H_2[] = "comparison not implemented for HypergraphNode"; -static PyObject *__pyx_n_s_BLEU; -static PyObject *__pyx_n_s_CER; -static PyObject *__pyx_kp_s_Cannot_translate_input_type_s; -static PyObject *__pyx_n_s_Exception; -static PyObject *__pyx_n_s_IBM_BLEU; -static PyObject *__pyx_n_s_IndexError; -static PyObject *__pyx_n_s_InvalidConfig; -static PyObject *__pyx_n_s_KeyError; -static PyObject *__pyx_n_s_NotImplemented; -static PyObject *__pyx_n_s_ParseFailed; -static PyObject *__pyx_n_s_QCRI; -static PyObject *__pyx_n_s_QCRI_BLEU; -static PyObject *__pyx_n_s_SSK; -static PyObject *__pyx_n_s_TER; -static PyObject *__pyx_n_s_TypeError; -static PyObject *__pyx_n_s_ValueError; -static PyObject *__pyx_kp_s__10; -static PyObject *__pyx_kp_s__11; -static PyObject *__pyx_kp_s__13; -static PyObject *__pyx_kp_s__16; -static PyObject *__pyx_kp_s__20; -static PyObject *__pyx_n_s__23; -static PyObject *__pyx_kp_s__4; -static PyObject *__pyx_n_s_a; -static PyObject *__pyx_n_s_alignments; -static PyObject *__pyx_n_s_append; -static PyObject *__pyx_n_s_args; -static PyObject *__pyx_n_s_beam_alpha; -static PyObject *__pyx_kp_s_candidate_set_index_out_of_range; -static PyObject *__pyx_kp_s_cannot_create_lattice_from_s; -static PyObject *__pyx_kp_s_cannot_initialize_weights_with_s; -static PyObject *__pyx_kp_s_cannot_intersect_hypergraph_with; -static PyObject *__pyx_kp_s_cannot_reweight_hypergraph_with; -static PyObject *__pyx_kp_s_cannot_take_the_dot_product_of_s; -static PyObject *__pyx_n_s_cat; -static PyObject *__pyx_n_s_cdec__cdec; -static PyObject *__pyx_n_s_cdec_sa__sa; -static PyObject *__pyx_n_s_class; -static PyObject *__pyx_n_s_close; -static PyObject *__pyx_kp_s_comparison_not_implemented_for_H; -static PyObject *__pyx_kp_s_comparison_not_implemented_for_H_2; -static PyObject *__pyx_kp_s_comparison_not_implemented_for_S; -static PyObject *__pyx_n_s_config; -static PyObject *__pyx_n_s_config_str; -static PyObject *__pyx_n_s_csplit; -static PyObject *__pyx_n_s_csplit_preserve_full_word; -static PyObject *__pyx_kp_s_d; -static PyObject *__pyx_kp_s_d_d_label_s; -static PyObject *__pyx_kp_s_d_shape_doublecircle; -static PyObject *__pyx_n_s_delta; -static PyObject *__pyx_n_s_density; -static PyObject *__pyx_n_s_dict; -static PyObject *__pyx_kp_s_digraph_lattice; -static PyObject *__pyx_n_s_doc; -static PyObject *__pyx_n_s_dot; -static PyObject *__pyx_n_s_e; -static PyObject *__pyx_n_s_encode; -static PyObject *__pyx_n_s_encoding; -static PyObject *__pyx_n_s_enter; -static PyObject *__pyx_n_s_enumerate; -static PyObject *__pyx_n_s_eval; -static PyObject *__pyx_n_s_evaluate; -static PyObject *__pyx_n_s_evaluator; -static PyObject *__pyx_n_s_exit; -static PyObject *__pyx_n_s_f; -static PyObject *__pyx_n_s_formalism; -static PyObject *__pyx_kp_s_formalism_s_unknown; -static PyObject *__pyx_n_s_format; -static PyObject *__pyx_n_s_fst; -static PyObject *__pyx_n_s_genexpr; -static PyObject *__pyx_n_s_get; -static PyObject *__pyx_n_s_grammar; -static PyObject *__pyx_n_s_hyp; -static PyObject *__pyx_n_s_hypergraph; -static PyObject *__pyx_n_s_i; -static PyObject *__pyx_n_s_import; -static PyObject *__pyx_n_s_in_edges; -static PyObject *__pyx_n_s_info; -static PyObject *__pyx_n_s_init; -static PyObject *__pyx_n_s_inp; -static PyObject *__pyx_n_s_items; -static PyObject *__pyx_n_s_join; -static PyObject *__pyx_n_s_k; -static PyObject *__pyx_n_s_key; -static PyObject *__pyx_n_s_label; -static PyObject *__pyx_kp_s_lattice_index_out_of_range; -static PyObject *__pyx_n_s_lexalign; -static PyObject *__pyx_n_s_lextrans; -static PyObject *__pyx_n_s_lhs; -static PyObject *__pyx_n_s_lines; -static PyObject *__pyx_n_s_main; -static PyObject *__pyx_n_s_make_config; -static PyObject *__pyx_n_s_metaclass; -static PyObject *__pyx_n_s_module; -static PyObject *__pyx_n_s_name; -static PyObject *__pyx_n_s_name_2; -static PyObject *__pyx_kp_s_node_shape_circle; -static PyObject *__pyx_n_s_open; -static PyObject *__pyx_n_s_pb; -static PyObject *__pyx_n_s_phrase; -static PyObject *__pyx_n_s_phrase_2; -static PyObject *__pyx_n_s_plf; -static PyObject *__pyx_n_s_prepare; -static PyObject *__pyx_n_s_pyx_vtable; -static PyObject *__pyx_n_s_qualname; -static PyObject *__pyx_n_s_range; -static PyObject *__pyx_kp_s_rankdir_LR; -static PyObject *__pyx_n_s_ref; -static PyObject *__pyx_n_s_refs; -static PyObject *__pyx_n_s_replace; -static PyObject *__pyx_n_s_rhs; -static PyObject *__pyx_n_s_rules; -static PyObject *__pyx_kp_s_s; -static PyObject *__pyx_kp_s_s_d; -static PyObject *__pyx_kp_s_s_s; -static PyObject *__pyx_kp_s_s_s_2; -static PyObject *__pyx_kp_s_s_s_3; -static PyObject *__pyx_kp_s_s_s_s_s; -static PyObject *__pyx_n_s_sa; -static PyObject *__pyx_n_s_scfg; -static PyObject *__pyx_n_s_score; -static PyObject *__pyx_n_s_scores; -static PyObject *__pyx_n_s_self; -static PyObject *__pyx_n_s_send; -static PyObject *__pyx_n_s_sentence; -static PyObject *__pyx_n_s_set_silent; -static PyObject *__pyx_n_s_span; -static PyObject *__pyx_n_s_split; -static PyObject *__pyx_n_s_startswith; -static PyObject *__pyx_n_s_strip; -static PyObject *__pyx_kp_s_sufficient_stats_vector_index_ou; -static PyObject *__pyx_n_s_super; -static PyObject *__pyx_n_s_tagger; -static PyObject *__pyx_n_s_test; -static PyObject *__pyx_n_s_text; -static PyObject *__pyx_kp_s_the_grammar_should_contain_TRule; -static PyObject *__pyx_n_s_throw; -static PyObject *__pyx_n_s_todot_locals_lines; -static PyObject *__pyx_kp_s_usr0_home_cdyer_cdec_python_cde; -static PyObject *__pyx_kp_s_usr0_home_cdyer_cdec_python_cde_2; -static PyObject *__pyx_kp_s_usr0_home_cdyer_cdec_python_cde_3; -static PyObject *__pyx_n_s_utf8; -static PyObject *__pyx_n_s_value; -static PyObject *__pyx_n_s_weight; -static PyObject *__pyx_n_s_yn; +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_6_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_12_unique_kbest_trees(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_4___get__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_1___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static char __pyx_k_1[] = "Cannot convert type %s to str"; +static char __pyx_k_3[] = "cannot take the dot product of %s and SparseVector"; +static char __pyx_k_4[] = "comparison not implemented for SparseVector"; +static char __pyx_k_7[] = " "; +static char __pyx_k_8[] = "[%s,%d]"; +static char __pyx_k_9[] = "[%s]"; +static char __pyx_k_10[] = "[%d]"; +static char __pyx_k_11[] = "%s=%s"; +static char __pyx_k_12[] = "%s ||| %s ||| %s ||| %s"; +static char __pyx_k_13[] = "the grammar should contain TRule objects"; +static char __pyx_k_15[] = "cannot intersect hypergraph with %s"; +static char __pyx_k_16[] = "csplit_preserve_full_word"; +static char __pyx_k_17[] = "cannot reweight hypergraph with %s"; +static char __pyx_k_18[] = "comparison not implemented for HypergraphEdge"; +static char __pyx_k_20[] = "comparison not implemented for HypergraphNode"; +static char __pyx_k_22[] = "cannot create lattice from %s"; +static char __pyx_k_23[] = "lattice index out of range"; +static char __pyx_k_26[] = "digraph lattice {"; + static char __pyx_k_27[] = "rankdir = LR;"; + static char __pyx_k_28[] = "node [shape=circle];"; + static char __pyx_k_29[] = "%d -> %d [label=\"%s\"];"; + static char __pyx_k_30[] = "\""; + static char __pyx_k_31[] = "\\\""; + static char __pyx_k_33[] = "%d [shape=doublecircle]"; +static char __pyx_k_34[] = "}"; +static char __pyx_k_37[] = "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi"; +static char __pyx_k_38[] = "Lattice.todot..lines"; +static char __pyx_k_39[] = "cdec._cdec"; +static char __pyx_k_40[] = "\n"; +static char __pyx_k_42[] = "sufficient stats vector index out of range"; +static char __pyx_k_44[] = "candidate set index out of range"; +static char __pyx_k_46[] = "%s %s"; +static char __pyx_k_47[] = "%s = %s"; +static char __pyx_k_48[] = "formalism \"%s\" unknown"; +static char __pyx_k_49[] = "cannot initialize weights with %s"; +static char __pyx_k_50[] = "#"; +static char __pyx_k_53[] = "Cannot translate input type %s"; +static char __pyx_k_54[] = "cdec.sa._sa"; +static char __pyx_k_55[] = "*"; +static char __pyx_k_58[] = "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi"; +static char __pyx_k_66[] = "/usr0/home/austinma/git/cdec/python/cdec/_cdec.pyx"; +static char __pyx_k__a[] = "a"; +static char __pyx_k__e[] = "e"; +static char __pyx_k__f[] = "f"; +static char __pyx_k__i[] = "i"; +static char __pyx_k__k[] = "k"; +static char __pyx_k__pb[] = "pb"; +static char __pyx_k__yn[] = "yn"; +static char __pyx_k__CER[] = "CER"; +static char __pyx_k__SSK[] = "SSK"; +static char __pyx_k__TER[] = "TER"; +static char __pyx_k___sa[] = "_sa"; +static char __pyx_k__cat[] = "cat"; +static char __pyx_k__dot[] = "dot"; +static char __pyx_k__fst[] = "fst"; +static char __pyx_k__get[] = "get"; +static char __pyx_k__hyp[] = "hyp"; +static char __pyx_k__inp[] = "inp"; +static char __pyx_k__key[] = "key"; +static char __pyx_k__lhs[] = "lhs"; +static char __pyx_k__plf[] = "plf"; +static char __pyx_k__ref[] = "ref"; +static char __pyx_k__rhs[] = "rhs"; +static char __pyx_k__BLEU[] = "BLEU"; +static char __pyx_k__QCRI[] = "QCRI"; +static char __pyx_k__args[] = "args"; +static char __pyx_k__eval[] = "eval"; +static char __pyx_k__info[] = "info"; +static char __pyx_k__join[] = "join"; +static char __pyx_k__name[] = "name"; +static char __pyx_k__open[] = "open"; +static char __pyx_k__refs[] = "refs"; +static char __pyx_k__scfg[] = "scfg"; +static char __pyx_k__self[] = "self"; +static char __pyx_k__send[] = "send"; +static char __pyx_k__span[] = "span"; +static char __pyx_k__text[] = "text"; +static char __pyx_k__utf8[] = "utf8"; +static char __pyx_k__close[] = "close"; +static char __pyx_k__delta[] = "delta"; +static char __pyx_k__items[] = "items"; +static char __pyx_k__label[] = "label"; +static char __pyx_k__lines[] = "lines"; +static char __pyx_k__range[] = "range"; +static char __pyx_k__rules[] = "rules"; +static char __pyx_k__score[] = "score"; +static char __pyx_k__split[] = "split"; +static char __pyx_k__strip[] = "strip"; +static char __pyx_k__super[] = "super"; +static char __pyx_k__throw[] = "throw"; +static char __pyx_k__value[] = "value"; +static char __pyx_k__append[] = "append"; +static char __pyx_k__config[] = "config"; +static char __pyx_k__csplit[] = "csplit"; +static char __pyx_k__encode[] = "encode"; +static char __pyx_k__format[] = "format"; +static char __pyx_k__phrase[] = "phrase"; +static char __pyx_k__scores[] = "scores"; +static char __pyx_k__tagger[] = "tagger"; +static char __pyx_k__weight[] = "weight"; +static char __pyx_k___phrase[] = "_phrase"; +static char __pyx_k__density[] = "density"; +static char __pyx_k__genexpr[] = "genexpr"; +static char __pyx_k__grammar[] = "grammar"; +static char __pyx_k__replace[] = "replace"; +static char __pyx_k__IBM_BLEU[] = "IBM_BLEU"; +static char __pyx_k__KeyError[] = "KeyError"; +static char __pyx_k____dict__[] = "__dict__"; +static char __pyx_k____exit__[] = "__exit__"; +static char __pyx_k____init__[] = "__init__"; +static char __pyx_k____main__[] = "__main__"; +static char __pyx_k____name__[] = "__name__"; +static char __pyx_k____test__[] = "__test__"; +static char __pyx_k__encoding[] = "encoding"; +static char __pyx_k__evaluate[] = "evaluate"; +static char __pyx_k__in_edges[] = "in_edges"; +static char __pyx_k__lexalign[] = "lexalign"; +static char __pyx_k__lextrans[] = "lextrans"; +static char __pyx_k__sentence[] = "sentence"; +static char __pyx_k__Exception[] = "Exception"; +static char __pyx_k__QCRI_BLEU[] = "QCRI_BLEU"; +static char __pyx_k__TypeError[] = "TypeError"; +static char __pyx_k____class__[] = "__class__"; +static char __pyx_k____enter__[] = "__enter__"; +static char __pyx_k__enumerate[] = "enumerate"; +static char __pyx_k__evaluator[] = "evaluator"; +static char __pyx_k__formalism[] = "formalism"; +static char __pyx_k__IndexError[] = "IndexError"; +static char __pyx_k__ValueError[] = "ValueError"; +static char __pyx_k____import__[] = "__import__"; +static char __pyx_k____module__[] = "__module__"; +static char __pyx_k__alignments[] = "alignments"; +static char __pyx_k__beam_alpha[] = "beam_alpha"; +static char __pyx_k__config_str[] = "config_str"; +static char __pyx_k__hypergraph[] = "hypergraph"; +static char __pyx_k__set_silent[] = "set_silent"; +static char __pyx_k__startswith[] = "startswith"; +static char __pyx_k__ParseFailed[] = "ParseFailed"; +static char __pyx_k____qualname__[] = "__qualname__"; +static char __pyx_k___make_config[] = "_make_config"; +static char __pyx_k__InvalidConfig[] = "InvalidConfig"; +static char __pyx_k____metaclass__[] = "__metaclass__"; +static char __pyx_k__NotImplemented[] = "NotImplemented"; +static char __pyx_k____pyx_vtable__[] = "__pyx_vtable__"; +static PyObject *__pyx_kp_s_10; +static PyObject *__pyx_kp_s_11; +static PyObject *__pyx_kp_s_12; +static PyObject *__pyx_kp_s_13; +static PyObject *__pyx_kp_s_15; +static PyObject *__pyx_n_s_16; +static PyObject *__pyx_kp_s_17; +static PyObject *__pyx_kp_s_18; +static PyObject *__pyx_kp_s_20; +static PyObject *__pyx_kp_s_22; +static PyObject *__pyx_kp_s_23; +static PyObject *__pyx_kp_s_26; +static PyObject *__pyx_kp_s_27; +static PyObject *__pyx_kp_s_28; +static PyObject *__pyx_kp_s_29; +static PyObject *__pyx_kp_s_3; +static PyObject *__pyx_kp_s_30; +static PyObject *__pyx_kp_s_31; +static PyObject *__pyx_kp_s_33; +static PyObject *__pyx_kp_s_34; +static PyObject *__pyx_kp_s_37; +static PyObject *__pyx_n_s_38; +static PyObject *__pyx_n_s_39; +static PyObject *__pyx_kp_s_4; +static PyObject *__pyx_kp_s_40; +static PyObject *__pyx_kp_s_42; +static PyObject *__pyx_kp_s_44; +static PyObject *__pyx_kp_s_46; +static PyObject *__pyx_kp_s_47; +static PyObject *__pyx_kp_s_48; +static PyObject *__pyx_kp_s_49; +static PyObject *__pyx_kp_s_50; +static PyObject *__pyx_kp_s_53; +static PyObject *__pyx_n_s_54; +static PyObject *__pyx_n_s_55; +static PyObject *__pyx_kp_s_58; +static PyObject *__pyx_kp_s_66; +static PyObject *__pyx_kp_s_7; +static PyObject *__pyx_kp_s_8; +static PyObject *__pyx_kp_s_9; +static PyObject *__pyx_n_s__BLEU; +static PyObject *__pyx_n_s__CER; +static PyObject *__pyx_n_s__Exception; +static PyObject *__pyx_n_s__IBM_BLEU; +static PyObject *__pyx_n_s__IndexError; +static PyObject *__pyx_n_s__InvalidConfig; +static PyObject *__pyx_n_s__KeyError; +static PyObject *__pyx_n_s__NotImplemented; +static PyObject *__pyx_n_s__ParseFailed; +static PyObject *__pyx_n_s__QCRI; +static PyObject *__pyx_n_s__QCRI_BLEU; +static PyObject *__pyx_n_s__SSK; +static PyObject *__pyx_n_s__TER; +static PyObject *__pyx_n_s__TypeError; +static PyObject *__pyx_n_s__ValueError; +static PyObject *__pyx_n_s____class__; +static PyObject *__pyx_n_s____dict__; +static PyObject *__pyx_n_s____enter__; +static PyObject *__pyx_n_s____exit__; +static PyObject *__pyx_n_s____import__; +static PyObject *__pyx_n_s____init__; +static PyObject *__pyx_n_s____main__; +static PyObject *__pyx_n_s____metaclass__; +static PyObject *__pyx_n_s____module__; +static PyObject *__pyx_n_s____name__; +static PyObject *__pyx_n_s____pyx_vtable__; +static PyObject *__pyx_n_s____qualname__; +static PyObject *__pyx_n_s____test__; +static PyObject *__pyx_n_s___make_config; +static PyObject *__pyx_n_s___phrase; +static PyObject *__pyx_n_s___sa; +static PyObject *__pyx_n_s__a; +static PyObject *__pyx_n_s__alignments; +static PyObject *__pyx_n_s__append; +static PyObject *__pyx_n_s__args; +static PyObject *__pyx_n_s__beam_alpha; +static PyObject *__pyx_n_s__cat; +static PyObject *__pyx_n_s__close; +static PyObject *__pyx_n_s__config; +static PyObject *__pyx_n_s__config_str; +static PyObject *__pyx_n_s__csplit; +static PyObject *__pyx_n_s__delta; +static PyObject *__pyx_n_s__density; +static PyObject *__pyx_n_s__dot; +static PyObject *__pyx_n_s__e; +static PyObject *__pyx_n_s__encode; +static PyObject *__pyx_n_s__encoding; +static PyObject *__pyx_n_s__enumerate; +static PyObject *__pyx_n_s__eval; +static PyObject *__pyx_n_s__evaluate; +static PyObject *__pyx_n_s__evaluator; +static PyObject *__pyx_n_s__f; +static PyObject *__pyx_n_s__formalism; +static PyObject *__pyx_n_s__format; +static PyObject *__pyx_n_s__fst; +static PyObject *__pyx_n_s__genexpr; +static PyObject *__pyx_n_s__get; +static PyObject *__pyx_n_s__grammar; +static PyObject *__pyx_n_s__hyp; +static PyObject *__pyx_n_s__hypergraph; +static PyObject *__pyx_n_s__i; +static PyObject *__pyx_n_s__in_edges; +static PyObject *__pyx_n_s__info; +static PyObject *__pyx_n_s__inp; +static PyObject *__pyx_n_s__items; +static PyObject *__pyx_n_s__join; +static PyObject *__pyx_n_s__k; +static PyObject *__pyx_n_s__key; +static PyObject *__pyx_n_s__label; +static PyObject *__pyx_n_s__lexalign; +static PyObject *__pyx_n_s__lextrans; +static PyObject *__pyx_n_s__lhs; +static PyObject *__pyx_n_s__lines; +static PyObject *__pyx_n_s__name; +static PyObject *__pyx_n_s__open; +static PyObject *__pyx_n_s__pb; +static PyObject *__pyx_n_s__phrase; +static PyObject *__pyx_n_s__plf; +static PyObject *__pyx_n_s__range; +static PyObject *__pyx_n_s__ref; +static PyObject *__pyx_n_s__refs; +static PyObject *__pyx_n_s__replace; +static PyObject *__pyx_n_s__rhs; +static PyObject *__pyx_n_s__rules; +static PyObject *__pyx_n_s__scfg; +static PyObject *__pyx_n_s__score; +static PyObject *__pyx_n_s__scores; +static PyObject *__pyx_n_s__self; +static PyObject *__pyx_n_s__send; +static PyObject *__pyx_n_s__sentence; +static PyObject *__pyx_n_s__set_silent; +static PyObject *__pyx_n_s__span; +static PyObject *__pyx_n_s__split; +static PyObject *__pyx_n_s__startswith; +static PyObject *__pyx_n_s__strip; +static PyObject *__pyx_n_s__super; +static PyObject *__pyx_n_s__tagger; +static PyObject *__pyx_n_s__text; +static PyObject *__pyx_n_s__throw; +static PyObject *__pyx_n_s__utf8; +static PyObject *__pyx_n_s__value; +static PyObject *__pyx_n_s__weight; +static PyObject *__pyx_n_s__yn; static PyObject *__pyx_int_0; static PyObject *__pyx_int_1; -static PyObject *__pyx_tuple_; -static PyObject *__pyx_tuple__2; -static PyObject *__pyx_tuple__3; -static PyObject *__pyx_tuple__5; -static PyObject *__pyx_tuple__6; -static PyObject *__pyx_tuple__7; -static PyObject *__pyx_tuple__8; -static PyObject *__pyx_tuple__9; -static PyObject *__pyx_tuple__12; -static PyObject *__pyx_tuple__14; -static PyObject *__pyx_tuple__17; -static PyObject *__pyx_tuple__18; -static PyObject *__pyx_tuple__19; -static PyObject *__pyx_tuple__21; -static PyObject *__pyx_tuple__22; -static PyObject *__pyx_tuple__24; -static PyObject *__pyx_tuple__26; -static PyObject *__pyx_tuple__27; -static PyObject *__pyx_tuple__28; -static PyObject *__pyx_tuple__29; -static PyObject *__pyx_tuple__30; -static PyObject *__pyx_tuple__31; -static PyObject *__pyx_tuple__33; -static PyObject *__pyx_codeobj__15; -static PyObject *__pyx_codeobj__25; -static PyObject *__pyx_codeobj__32; -static PyObject *__pyx_codeobj__34; +static PyObject *__pyx_k_tuple_2; +static PyObject *__pyx_k_tuple_5; +static PyObject *__pyx_k_tuple_6; +static PyObject *__pyx_k_tuple_14; +static PyObject *__pyx_k_tuple_19; +static PyObject *__pyx_k_tuple_21; +static PyObject *__pyx_k_tuple_24; +static PyObject *__pyx_k_tuple_25; +static PyObject *__pyx_k_tuple_32; +static PyObject *__pyx_k_tuple_35; +static PyObject *__pyx_k_tuple_41; +static PyObject *__pyx_k_tuple_43; +static PyObject *__pyx_k_tuple_45; +static PyObject *__pyx_k_tuple_51; +static PyObject *__pyx_k_tuple_52; +static PyObject *__pyx_k_tuple_56; +static PyObject *__pyx_k_tuple_59; +static PyObject *__pyx_k_tuple_60; +static PyObject *__pyx_k_tuple_61; +static PyObject *__pyx_k_tuple_62; +static PyObject *__pyx_k_tuple_63; +static PyObject *__pyx_k_tuple_64; +static PyObject *__pyx_k_tuple_67; +static PyObject *__pyx_k_codeobj_36; +static PyObject *__pyx_k_codeobj_57; +static PyObject *__pyx_k_codeobj_65; +static PyObject *__pyx_k_codeobj_68; /* "cdec/_cdec.pyx":6 * cimport decoder @@ -2621,7 +2588,7 @@ static PyObject *__pyx_codeobj__34; */ static PyObject *__pyx_f_4cdec_5_cdec_as_str(PyObject *__pyx_v_data, struct __pyx_opt_args_4cdec_5_cdec_as_str *__pyx_optional_args) { - char *__pyx_v_error_msg = ((char *)__pyx_k_Cannot_convert_type_s_to_str); + char *__pyx_v_error_msg = ((char *)__pyx_k_1); PyObject *__pyx_v_ret = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -2658,12 +2625,12 @@ static PyObject *__pyx_f_4cdec_5_cdec_as_str(PyObject *__pyx_v_data, struct __py * elif isinstance(data, str): * ret = data */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s__encode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_2), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_4)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_4)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ret = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L3; @@ -2687,11 +2654,9 @@ static PyObject *__pyx_f_4cdec_5_cdec_as_str(PyObject *__pyx_v_data, struct __py * else: * raise TypeError(error_msg.format(type(data))) */ - if (!(likely(PyBytes_CheckExact(__pyx_v_data))||((__pyx_v_data) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_data)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_4 = __pyx_v_data; - __Pyx_INCREF(__pyx_t_4); - __pyx_v_ret = ((PyObject*)__pyx_t_4); - __pyx_t_4 = 0; + if (!(likely(PyBytes_CheckExact(__pyx_v_data))||((__pyx_v_data) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_v_data)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_INCREF(__pyx_v_data); + __pyx_v_ret = ((PyObject*)__pyx_v_data); goto __pyx_L3; } /*else*/ { @@ -2704,27 +2669,27 @@ static PyObject *__pyx_f_4cdec_5_cdec_as_str(PyObject *__pyx_v_data, struct __py * */ __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_error_msg); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_4)); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_t_4), __pyx_n_s__format); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_data))); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)Py_TYPE(__pyx_v_data))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_data))); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -2738,20 +2703,13 @@ static PyObject *__pyx_f_4cdec_5_cdec_as_str(PyObject *__pyx_v_data, struct __py * * include "vectors.pxi" */ - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_v_ret); + __Pyx_XDECREF(((PyObject *)__pyx_r)); + __Pyx_INCREF(((PyObject *)__pyx_v_ret)); __pyx_r = __pyx_v_ret; goto __pyx_L0; - /* "cdec/_cdec.pyx":6 - * cimport decoder - * - * cdef bytes as_str(data, char* error_msg='Cannot convert type %s to str'): # <<<<<<<<<<<<<< - * cdef bytes ret - * if isinstance(data, unicode): - */ - - /* function exit code */ + __pyx_r = ((PyObject*)Py_None); __Pyx_INCREF(Py_None); + goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); @@ -2765,14 +2723,6 @@ static PyObject *__pyx_f_4cdec_5_cdec_as_str(PyObject *__pyx_v_data, struct __py return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":7 - * cdef bint owned # if True, do not manage memory - * - * def __init__(self): # <<<<<<<<<<<<<< - * """DenseVector() -> Dense weight/feature vector.""" - * self.vector = new vector[weight_t]() - */ - /* Python wrapper */ static int __pyx_pw_4cdec_5_cdec_11DenseVector_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4cdec_5_cdec_11DenseVector___init__[] = "DenseVector() -> Dense weight/feature vector."; @@ -2787,12 +2737,18 @@ static int __pyx_pw_4cdec_5_cdec_11DenseVector_1__init__(PyObject *__pyx_v_self, __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1; __pyx_r = __pyx_pf_4cdec_5_cdec_11DenseVector___init__(((struct __pyx_obj_4cdec_5_cdec_DenseVector *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":7 + * cdef bint owned # if True, do not manage memory + * + * def __init__(self): # <<<<<<<<<<<<<< + * """DenseVector() -> Dense weight/feature vector.""" + * self.vector = new vector[weight_t]() + */ + static int __pyx_pf_4cdec_5_cdec_11DenseVector___init__(struct __pyx_obj_4cdec_5_cdec_DenseVector *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations @@ -2802,7 +2758,7 @@ static int __pyx_pf_4cdec_5_cdec_11DenseVector___init__(struct __pyx_obj_4cdec_5 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":9 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":9 * def __init__(self): * """DenseVector() -> Dense weight/feature vector.""" * self.vector = new vector[weight_t]() # <<<<<<<<<<<<<< @@ -2817,7 +2773,7 @@ static int __pyx_pf_4cdec_5_cdec_11DenseVector___init__(struct __pyx_obj_4cdec_5 } __pyx_v_self->vector = __pyx_t_1; - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":10 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":10 * """DenseVector() -> Dense weight/feature vector.""" * self.vector = new vector[weight_t]() * self.owned = False # <<<<<<<<<<<<<< @@ -2826,15 +2782,6 @@ static int __pyx_pf_4cdec_5_cdec_11DenseVector___init__(struct __pyx_obj_4cdec_5 */ __pyx_v_self->owned = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":7 - * cdef bint owned # if True, do not manage memory - * - * def __init__(self): # <<<<<<<<<<<<<< - * """DenseVector() -> Dense weight/feature vector.""" - * self.vector = new vector[weight_t]() - */ - - /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; @@ -2845,31 +2792,29 @@ static int __pyx_pf_4cdec_5_cdec_11DenseVector___init__(struct __pyx_obj_4cdec_5 return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":12 - * self.owned = False - * - * def __dealloc__(self): # <<<<<<<<<<<<<< - * if not self.owned: - * del self.vector - */ - /* Python wrapper */ static void __pyx_pw_4cdec_5_cdec_11DenseVector_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_4cdec_5_cdec_11DenseVector_3__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_4cdec_5_cdec_11DenseVector_2__dealloc__(((struct __pyx_obj_4cdec_5_cdec_DenseVector *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); } +/* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":12 + * self.owned = False + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * if not self.owned: + * del self.vector + */ + static void __pyx_pf_4cdec_5_cdec_11DenseVector_2__dealloc__(struct __pyx_obj_4cdec_5_cdec_DenseVector *__pyx_v_self) { __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":13 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":13 * * def __dealloc__(self): * if not self.owned: # <<<<<<<<<<<<<< @@ -2879,7 +2824,7 @@ static void __pyx_pf_4cdec_5_cdec_11DenseVector_2__dealloc__(struct __pyx_obj_4c __pyx_t_1 = ((!(__pyx_v_self->owned != 0)) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":14 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":14 * def __dealloc__(self): * if not self.owned: * del self.vector # <<<<<<<<<<<<<< @@ -2891,26 +2836,9 @@ static void __pyx_pf_4cdec_5_cdec_11DenseVector_2__dealloc__(struct __pyx_obj_4c } __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":12 - * self.owned = False - * - * def __dealloc__(self): # <<<<<<<<<<<<<< - * if not self.owned: - * del self.vector - */ - - /* function exit code */ __Pyx_RefNannyFinishContext(); } -/* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":16 - * del self.vector - * - * def __len__(self): # <<<<<<<<<<<<<< - * return self.vector.size() - * - */ - /* Python wrapper */ static Py_ssize_t __pyx_pw_4cdec_5_cdec_11DenseVector_5__len__(PyObject *__pyx_v_self); /*proto*/ static Py_ssize_t __pyx_pw_4cdec_5_cdec_11DenseVector_5__len__(PyObject *__pyx_v_self) { @@ -2918,18 +2846,24 @@ static Py_ssize_t __pyx_pw_4cdec_5_cdec_11DenseVector_5__len__(PyObject *__pyx_v __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_11DenseVector_4__len__(((struct __pyx_obj_4cdec_5_cdec_DenseVector *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":16 + * del self.vector + * + * def __len__(self): # <<<<<<<<<<<<<< + * return self.vector.size() + * + */ + static Py_ssize_t __pyx_pf_4cdec_5_cdec_11DenseVector_4__len__(struct __pyx_obj_4cdec_5_cdec_DenseVector *__pyx_v_self) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":17 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":17 * * def __len__(self): * return self.vector.size() # <<<<<<<<<<<<<< @@ -2939,28 +2873,12 @@ static Py_ssize_t __pyx_pf_4cdec_5_cdec_11DenseVector_4__len__(struct __pyx_obj_ __pyx_r = __pyx_v_self->vector->size(); goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":16 - * del self.vector - * - * def __len__(self): # <<<<<<<<<<<<<< - * return self.vector.size() - * - */ - - /* function exit code */ + __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":19 - * return self.vector.size() - * - * def __getitem__(self, char* fname): # <<<<<<<<<<<<<< - * cdef int fid = FDConvert(fname) - * if 0 <= fid < self.vector.size(): - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_11DenseVector_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_fname); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_11DenseVector_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_fname) { @@ -2981,12 +2899,18 @@ static PyObject *__pyx_pw_4cdec_5_cdec_11DenseVector_7__getitem__(PyObject *__py return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4cdec_5_cdec_11DenseVector_6__getitem__(((struct __pyx_obj_4cdec_5_cdec_DenseVector *)__pyx_v_self), ((char *)__pyx_v_fname)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":19 + * return self.vector.size() + * + * def __getitem__(self, char* fname): # <<<<<<<<<<<<<< + * cdef int fid = FDConvert(fname) + * if 0 <= fid < self.vector.size(): + */ + static PyObject *__pyx_pf_4cdec_5_cdec_11DenseVector_6__getitem__(struct __pyx_obj_4cdec_5_cdec_DenseVector *__pyx_v_self, char *__pyx_v_fname) { int __pyx_v_fid; PyObject *__pyx_r = NULL; @@ -3000,7 +2924,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_11DenseVector_6__getitem__(struct __pyx_o int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getitem__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":20 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":20 * * def __getitem__(self, char* fname): * cdef int fid = FDConvert(fname) # <<<<<<<<<<<<<< @@ -3009,7 +2933,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_11DenseVector_6__getitem__(struct __pyx_o */ __pyx_v_fid = FD::Convert(__pyx_v_fname); - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":21 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":21 * def __getitem__(self, char* fname): * cdef int fid = FDConvert(fname) * if 0 <= fid < self.vector.size(): # <<<<<<<<<<<<<< @@ -3023,7 +2947,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_11DenseVector_6__getitem__(struct __pyx_o __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":22 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":22 * cdef int fid = FDConvert(fname) * if 0 <= fid < self.vector.size(): * return self.vector[0][fid] # <<<<<<<<<<<<<< @@ -3036,9 +2960,11 @@ static PyObject *__pyx_pf_4cdec_5_cdec_11DenseVector_6__getitem__(struct __pyx_o __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; + goto __pyx_L3; } + __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":23 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":23 * if 0 <= fid < self.vector.size(): * return self.vector[0][fid] * raise KeyError(fname) # <<<<<<<<<<<<<< @@ -3046,28 +2972,21 @@ static PyObject *__pyx_pf_4cdec_5_cdec_11DenseVector_6__getitem__(struct __pyx_o * def __setitem__(self, char* fname, float value): */ __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_fname); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); + __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); - __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_3)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_Call(__pyx_builtin_KeyError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(((PyObject *)__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 = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":19 - * return self.vector.size() - * - * def __getitem__(self, char* fname): # <<<<<<<<<<<<<< - * cdef int fid = FDConvert(fname) - * if 0 <= fid < self.vector.size(): - */ - - /* 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); @@ -3079,14 +2998,6 @@ static PyObject *__pyx_pf_4cdec_5_cdec_11DenseVector_6__getitem__(struct __pyx_o return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":25 - * raise KeyError(fname) - * - * def __setitem__(self, char* fname, float value): # <<<<<<<<<<<<<< - * cdef int fid = FDConvert(fname) - * if fid < 0: raise KeyError(fname) - */ - /* Python wrapper */ static int __pyx_pw_4cdec_5_cdec_11DenseVector_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_fname, PyObject *__pyx_arg_value); /*proto*/ static int __pyx_pw_4cdec_5_cdec_11DenseVector_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_fname, PyObject *__pyx_arg_value) { @@ -3111,12 +3022,18 @@ static int __pyx_pw_4cdec_5_cdec_11DenseVector_9__setitem__(PyObject *__pyx_v_se return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4cdec_5_cdec_11DenseVector_8__setitem__(((struct __pyx_obj_4cdec_5_cdec_DenseVector *)__pyx_v_self), ((char *)__pyx_v_fname), ((float)__pyx_v_value)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":25 + * raise KeyError(fname) + * + * def __setitem__(self, char* fname, float value): # <<<<<<<<<<<<<< + * cdef int fid = FDConvert(fname) + * if fid < 0: raise KeyError(fname) + */ + static int __pyx_pf_4cdec_5_cdec_11DenseVector_8__setitem__(struct __pyx_obj_4cdec_5_cdec_DenseVector *__pyx_v_self, char *__pyx_v_fname, float __pyx_v_value) { int __pyx_v_fid; int __pyx_r; @@ -3129,7 +3046,7 @@ static int __pyx_pf_4cdec_5_cdec_11DenseVector_8__setitem__(struct __pyx_obj_4cd int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setitem__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":26 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":26 * * def __setitem__(self, char* fname, float value): * cdef int fid = FDConvert(fname) # <<<<<<<<<<<<<< @@ -3138,7 +3055,7 @@ static int __pyx_pf_4cdec_5_cdec_11DenseVector_8__setitem__(struct __pyx_obj_4cd */ __pyx_v_fid = FD::Convert(__pyx_v_fname); - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":27 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":27 * def __setitem__(self, char* fname, float value): * cdef int fid = FDConvert(fname) * if fid < 0: raise KeyError(fname) # <<<<<<<<<<<<<< @@ -3148,21 +3065,23 @@ static int __pyx_pf_4cdec_5_cdec_11DenseVector_8__setitem__(struct __pyx_obj_4cd __pyx_t_1 = ((__pyx_v_fid < 0) != 0); if (__pyx_t_1) { __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_fname); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); + __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); - __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_2)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_Call(__pyx_builtin_KeyError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L3; } + __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":28 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":28 * cdef int fid = FDConvert(fname) * if fid < 0: raise KeyError(fname) * if self.vector.size() <= fid: # <<<<<<<<<<<<<< @@ -3172,7 +3091,7 @@ static int __pyx_pf_4cdec_5_cdec_11DenseVector_8__setitem__(struct __pyx_obj_4cd __pyx_t_1 = ((__pyx_v_self->vector->size() <= __pyx_v_fid) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":29 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":29 * if fid < 0: raise KeyError(fname) * if self.vector.size() <= fid: * self.vector.resize(fid + 1) # <<<<<<<<<<<<<< @@ -3184,7 +3103,7 @@ static int __pyx_pf_4cdec_5_cdec_11DenseVector_8__setitem__(struct __pyx_obj_4cd } __pyx_L4:; - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":30 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":30 * if self.vector.size() <= fid: * self.vector.resize(fid + 1) * self.vector[0][fid] = value # <<<<<<<<<<<<<< @@ -3193,15 +3112,6 @@ static int __pyx_pf_4cdec_5_cdec_11DenseVector_8__setitem__(struct __pyx_obj_4cd */ ((__pyx_v_self->vector[0])[__pyx_v_fid]) = __pyx_v_value; - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":25 - * raise KeyError(fname) - * - * def __setitem__(self, char* fname, float value): # <<<<<<<<<<<<<< - * cdef int fid = FDConvert(fname) - * if fid < 0: raise KeyError(fname) - */ - - /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; @@ -3215,14 +3125,6 @@ static int __pyx_pf_4cdec_5_cdec_11DenseVector_8__setitem__(struct __pyx_obj_4cd } static PyObject *__pyx_gb_4cdec_5_cdec_11DenseVector_12generator(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":32 - * self.vector[0][fid] = value - * - * def __iter__(self): # <<<<<<<<<<<<<< - * cdef unsigned fid - * for fid in range(1, self.vector.size()): - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_11DenseVector_11__iter__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_11DenseVector_11__iter__(PyObject *__pyx_v_self) { @@ -3230,12 +3132,18 @@ static PyObject *__pyx_pw_4cdec_5_cdec_11DenseVector_11__iter__(PyObject *__pyx_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_11DenseVector_10__iter__(((struct __pyx_obj_4cdec_5_cdec_DenseVector *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":32 + * self.vector[0][fid] = value + * + * def __iter__(self): # <<<<<<<<<<<<<< + * cdef unsigned fid + * for fid in range(1, self.vector.size()): + */ + static PyObject *__pyx_pf_4cdec_5_cdec_11DenseVector_10__iter__(struct __pyx_obj_4cdec_5_cdec_DenseVector *__pyx_v_self) { struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__ *__pyx_cur_scope; PyObject *__pyx_r = NULL; @@ -3260,7 +3168,6 @@ static PyObject *__pyx_pf_4cdec_5_cdec_11DenseVector_10__iter__(struct __pyx_obj return (PyObject *) gen; } - /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; @@ -3297,7 +3204,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_11DenseVector_12generator(__pyx_Generator __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":34 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":34 * def __iter__(self): * cdef unsigned fid * for fid in range(1, self.vector.size()): # <<<<<<<<<<<<<< @@ -3308,7 +3215,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_11DenseVector_12generator(__pyx_Generator for (__pyx_t_2 = 1; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_cur_scope->__pyx_v_fid = __pyx_t_2; - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":35 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":35 * cdef unsigned fid * for fid in range(1, self.vector.size()): * yield str(FDConvert(fid).c_str()), self.vector[0][fid] # <<<<<<<<<<<<<< @@ -3316,15 +3223,15 @@ static PyObject *__pyx_gb_4cdec_5_cdec_11DenseVector_12generator(__pyx_Generator * def dot(self, SparseVector other): */ __pyx_t_3 = __Pyx_PyBytes_FromString(FD::Convert(__pyx_cur_scope->__pyx_v_fid).c_str()); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); + __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); - __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_3)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_4 = PyFloat_FromDouble(((__pyx_cur_scope->__pyx_v_self->vector[0])[__pyx_cur_scope->__pyx_v_fid])); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -3335,7 +3242,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_11DenseVector_12generator(__pyx_Generator __Pyx_GIVEREF(__pyx_t_4); __pyx_t_3 = 0; __pyx_t_4 = 0; - __pyx_r = __pyx_t_5; + __pyx_r = ((PyObject *)__pyx_t_5); __pyx_t_5 = 0; __pyx_cur_scope->__pyx_t_0 = __pyx_t_1; __pyx_cur_scope->__pyx_t_1 = __pyx_t_2; @@ -3349,16 +3256,6 @@ static PyObject *__pyx_gb_4cdec_5_cdec_11DenseVector_12generator(__pyx_Generator __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":32 - * self.vector[0][fid] = value - * - * def __iter__(self): # <<<<<<<<<<<<<< - * cdef unsigned fid - * for fid in range(1, self.vector.size()): - */ - - /* function exit code */ PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; @@ -3374,14 +3271,6 @@ static PyObject *__pyx_gb_4cdec_5_cdec_11DenseVector_12generator(__pyx_Generator return NULL; } -/* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":37 - * yield str(FDConvert(fid).c_str()), self.vector[0][fid] - * - * def dot(self, SparseVector other): # <<<<<<<<<<<<<< - * """vector.dot(SparseVector other) -> Dot product of the two vectors.""" - * return other.dot(self) - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_11DenseVector_14dot(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ static char __pyx_doc_4cdec_5_cdec_11DenseVector_13dot[] = "vector.dot(SparseVector other) -> Dot product of the two vectors."; @@ -3394,8 +3283,6 @@ static PyObject *__pyx_pw_4cdec_5_cdec_11DenseVector_14dot(PyObject *__pyx_v_sel __Pyx_RefNannySetupContext("dot (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_4cdec_5_cdec_SparseVector, 1, "other", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_4cdec_5_cdec_11DenseVector_13dot(((struct __pyx_obj_4cdec_5_cdec_DenseVector *)__pyx_v_self), ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_other)); - - /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; @@ -3404,6 +3291,14 @@ static PyObject *__pyx_pw_4cdec_5_cdec_11DenseVector_14dot(PyObject *__pyx_v_sel return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":37 + * yield str(FDConvert(fid).c_str()), self.vector[0][fid] + * + * def dot(self, SparseVector other): # <<<<<<<<<<<<<< + * """vector.dot(SparseVector other) -> Dot product of the two vectors.""" + * return other.dot(self) + */ + static PyObject *__pyx_pf_4cdec_5_cdec_11DenseVector_13dot(struct __pyx_obj_4cdec_5_cdec_DenseVector *__pyx_v_self, struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_other) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -3415,7 +3310,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_11DenseVector_13dot(struct __pyx_obj_4cde int __pyx_clineno = 0; __Pyx_RefNannySetupContext("dot", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":39 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":39 * def dot(self, SparseVector other): * """vector.dot(SparseVector other) -> Dot product of the two vectors.""" * return other.dot(self) # <<<<<<<<<<<<<< @@ -3423,30 +3318,23 @@ static PyObject *__pyx_pf_4cdec_5_cdec_11DenseVector_13dot(struct __pyx_obj_4cde * def tosparse(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_dot); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s__dot); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 39; __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[1]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":37 - * yield str(FDConvert(fid).c_str()), self.vector[0][fid] - * - * def dot(self, SparseVector other): # <<<<<<<<<<<<<< - * """vector.dot(SparseVector other) -> Dot product of the two vectors.""" - * return other.dot(self) - */ - - /* 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); @@ -3459,14 +3347,6 @@ static PyObject *__pyx_pf_4cdec_5_cdec_11DenseVector_13dot(struct __pyx_obj_4cde return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":41 - * return other.dot(self) - * - * def tosparse(self): # <<<<<<<<<<<<<< - * """vector.tosparse() -> Equivalent SparseVector.""" - * cdef SparseVector sparse = SparseVector.__new__(SparseVector) - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_11DenseVector_16tosparse(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_4cdec_5_cdec_11DenseVector_15tosparse[] = "vector.tosparse() -> Equivalent SparseVector."; @@ -3475,12 +3355,18 @@ static PyObject *__pyx_pw_4cdec_5_cdec_11DenseVector_16tosparse(PyObject *__pyx_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("tosparse (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_11DenseVector_15tosparse(((struct __pyx_obj_4cdec_5_cdec_DenseVector *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":41 + * return other.dot(self) + * + * def tosparse(self): # <<<<<<<<<<<<<< + * """vector.tosparse() -> Equivalent SparseVector.""" + * cdef SparseVector sparse = SparseVector.__new__(SparseVector) + */ + static PyObject *__pyx_pf_4cdec_5_cdec_11DenseVector_15tosparse(struct __pyx_obj_4cdec_5_cdec_DenseVector *__pyx_v_self) { struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_sparse = 0; PyObject *__pyx_r = NULL; @@ -3491,20 +3377,20 @@ static PyObject *__pyx_pf_4cdec_5_cdec_11DenseVector_15tosparse(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("tosparse", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":43 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":43 * def tosparse(self): * """vector.tosparse() -> Equivalent SparseVector.""" * cdef SparseVector sparse = SparseVector.__new__(SparseVector) # <<<<<<<<<<<<<< * sparse.vector = new FastSparseVector[weight_t]() * InitSparseVector(self.vector[0], sparse.vector) */ - __pyx_t_1 = __pyx_tp_new_4cdec_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SparseVector)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_tp_new_4cdec_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SparseVector)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4cdec_5_cdec_SparseVector)))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_sparse = ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":44 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":44 * """vector.tosparse() -> Equivalent SparseVector.""" * cdef SparseVector sparse = SparseVector.__new__(SparseVector) * sparse.vector = new FastSparseVector[weight_t]() # <<<<<<<<<<<<<< @@ -3513,7 +3399,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_11DenseVector_15tosparse(struct __pyx_obj */ __pyx_v_sparse->vector = new FastSparseVector(); - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":45 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":45 * cdef SparseVector sparse = SparseVector.__new__(SparseVector) * sparse.vector = new FastSparseVector[weight_t]() * InitSparseVector(self.vector[0], sparse.vector) # <<<<<<<<<<<<<< @@ -3522,7 +3408,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_11DenseVector_15tosparse(struct __pyx_obj */ Weights::InitSparseVector((__pyx_v_self->vector[0]), __pyx_v_sparse->vector); - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":46 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":46 * sparse.vector = new FastSparseVector[weight_t]() * InitSparseVector(self.vector[0], sparse.vector) * return sparse # <<<<<<<<<<<<<< @@ -3534,15 +3420,8 @@ static PyObject *__pyx_pf_4cdec_5_cdec_11DenseVector_15tosparse(struct __pyx_obj __pyx_r = ((PyObject *)__pyx_v_sparse); goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":41 - * return other.dot(self) - * - * def tosparse(self): # <<<<<<<<<<<<<< - * """vector.tosparse() -> Equivalent SparseVector.""" - * cdef SparseVector sparse = SparseVector.__new__(SparseVector) - */ - - /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cdec._cdec.DenseVector.tosparse", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -3554,14 +3433,6 @@ static PyObject *__pyx_pf_4cdec_5_cdec_11DenseVector_15tosparse(struct __pyx_obj return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":51 - * cdef FastSparseVector[weight_t]* vector - * - * def __init__(self): # <<<<<<<<<<<<<< - * """SparseVector() -> Sparse feature/weight vector.""" - * self.vector = new FastSparseVector[weight_t]() - */ - /* Python wrapper */ static int __pyx_pw_4cdec_5_cdec_12SparseVector_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4cdec_5_cdec_12SparseVector___init__[] = "SparseVector() -> Sparse feature/weight vector."; @@ -3576,18 +3447,24 @@ static int __pyx_pw_4cdec_5_cdec_12SparseVector_1__init__(PyObject *__pyx_v_self __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1; __pyx_r = __pyx_pf_4cdec_5_cdec_12SparseVector___init__(((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":51 + * cdef FastSparseVector[weight_t]* vector + * + * def __init__(self): # <<<<<<<<<<<<<< + * """SparseVector() -> Sparse feature/weight vector.""" + * self.vector = new FastSparseVector[weight_t]() + */ + static int __pyx_pf_4cdec_5_cdec_12SparseVector___init__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":53 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":53 * def __init__(self): * """SparseVector() -> Sparse feature/weight vector.""" * self.vector = new FastSparseVector[weight_t]() # <<<<<<<<<<<<<< @@ -3596,44 +3473,33 @@ static int __pyx_pf_4cdec_5_cdec_12SparseVector___init__(struct __pyx_obj_4cdec_ */ __pyx_v_self->vector = new FastSparseVector(); - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":51 - * cdef FastSparseVector[weight_t]* vector - * - * def __init__(self): # <<<<<<<<<<<<<< - * """SparseVector() -> Sparse feature/weight vector.""" - * self.vector = new FastSparseVector[weight_t]() - */ - - /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":55 - * self.vector = new FastSparseVector[weight_t]() - * - * def __dealloc__(self): # <<<<<<<<<<<<<< - * del self.vector - * - */ - /* Python wrapper */ static void __pyx_pw_4cdec_5_cdec_12SparseVector_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_4cdec_5_cdec_12SparseVector_3__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_4cdec_5_cdec_12SparseVector_2__dealloc__(((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); } -static void __pyx_pf_4cdec_5_cdec_12SparseVector_2__dealloc__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self) { +/* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":55 + * self.vector = new FastSparseVector[weight_t]() + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * del self.vector + * + */ + +static void __pyx_pf_4cdec_5_cdec_12SparseVector_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":56 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":56 * * def __dealloc__(self): * del self.vector # <<<<<<<<<<<<<< @@ -3642,26 +3508,9 @@ static void __pyx_pf_4cdec_5_cdec_12SparseVector_2__dealloc__(struct __pyx_obj_4 */ delete __pyx_v_self->vector; - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":55 - * self.vector = new FastSparseVector[weight_t]() - * - * def __dealloc__(self): # <<<<<<<<<<<<<< - * del self.vector - * - */ - - /* function exit code */ __Pyx_RefNannyFinishContext(); } -/* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":58 - * del self.vector - * - * def copy(self): # <<<<<<<<<<<<<< - * """vector.copy() -> SparseVector copy.""" - * return self * 1 - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_5copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_4cdec_5_cdec_12SparseVector_4copy[] = "vector.copy() -> SparseVector copy."; @@ -3670,12 +3519,18 @@ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_5copy(PyObject *__pyx_v_se __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("copy (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_12SparseVector_4copy(((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":58 + * del self.vector + * + * def copy(self): # <<<<<<<<<<<<<< + * """vector.copy() -> SparseVector copy.""" + * return self * 1 + */ + static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_4copy(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -3685,7 +3540,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_4copy(struct __pyx_obj_4cd int __pyx_clineno = 0; __Pyx_RefNannySetupContext("copy", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":60 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":60 * def copy(self): * """vector.copy() -> SparseVector copy.""" * return self * 1 # <<<<<<<<<<<<<< @@ -3699,15 +3554,8 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_4copy(struct __pyx_obj_4cd __pyx_t_1 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":58 - * del self.vector - * - * def copy(self): # <<<<<<<<<<<<<< - * """vector.copy() -> SparseVector copy.""" - * return self * 1 - */ - - /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cdec._cdec.SparseVector.copy", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -3718,14 +3566,6 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_4copy(struct __pyx_obj_4cd return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":62 - * return self * 1 - * - * def __getitem__(self, char* fname): # <<<<<<<<<<<<<< - * cdef int fid = FDConvert(fname) - * if fid < 0: raise KeyError(fname) - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_fname); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_fname) { @@ -3746,12 +3586,18 @@ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_7__getitem__(PyObject *__p return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4cdec_5_cdec_12SparseVector_6__getitem__(((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_self), ((char *)__pyx_v_fname)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":62 + * return self * 1 + * + * def __getitem__(self, char* fname): # <<<<<<<<<<<<<< + * cdef int fid = FDConvert(fname) + * if fid < 0: raise KeyError(fname) + */ + static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_6__getitem__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self, char *__pyx_v_fname) { int __pyx_v_fid; PyObject *__pyx_r = NULL; @@ -3764,7 +3610,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_6__getitem__(struct __pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getitem__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":63 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":63 * * def __getitem__(self, char* fname): * cdef int fid = FDConvert(fname) # <<<<<<<<<<<<<< @@ -3773,7 +3619,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_6__getitem__(struct __pyx_ */ __pyx_v_fid = FD::Convert(__pyx_v_fname); - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":64 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":64 * def __getitem__(self, char* fname): * cdef int fid = FDConvert(fname) * if fid < 0: raise KeyError(fname) # <<<<<<<<<<<<<< @@ -3783,21 +3629,23 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_6__getitem__(struct __pyx_ __pyx_t_1 = ((__pyx_v_fid < 0) != 0); if (__pyx_t_1) { __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_fname); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); + __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); - __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_2)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_Call(__pyx_builtin_KeyError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L3; } + __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":65 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":65 * cdef int fid = FDConvert(fname) * if fid < 0: raise KeyError(fname) * return self.vector.value(fid) # <<<<<<<<<<<<<< @@ -3811,15 +3659,8 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_6__getitem__(struct __pyx_ __pyx_t_2 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":62 - * return self * 1 - * - * def __getitem__(self, char* fname): # <<<<<<<<<<<<<< - * cdef int fid = FDConvert(fname) - * if fid < 0: raise KeyError(fname) - */ - - /* 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); @@ -3831,14 +3672,6 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_6__getitem__(struct __pyx_ return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":67 - * return self.vector.value(fid) - * - * def __setitem__(self, char* fname, float value): # <<<<<<<<<<<<<< - * cdef int fid = FDConvert(fname) - * if fid < 0: raise KeyError(fname) - */ - /* Python wrapper */ static int __pyx_pw_4cdec_5_cdec_12SparseVector_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_fname, PyObject *__pyx_arg_value); /*proto*/ static int __pyx_pw_4cdec_5_cdec_12SparseVector_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_fname, PyObject *__pyx_arg_value) { @@ -3863,12 +3696,18 @@ static int __pyx_pw_4cdec_5_cdec_12SparseVector_9__setitem__(PyObject *__pyx_v_s return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4cdec_5_cdec_12SparseVector_8__setitem__(((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_self), ((char *)__pyx_v_fname), ((float)__pyx_v_value)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":67 + * return self.vector.value(fid) + * + * def __setitem__(self, char* fname, float value): # <<<<<<<<<<<<<< + * cdef int fid = FDConvert(fname) + * if fid < 0: raise KeyError(fname) + */ + static int __pyx_pf_4cdec_5_cdec_12SparseVector_8__setitem__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self, char *__pyx_v_fname, float __pyx_v_value) { int __pyx_v_fid; int __pyx_r; @@ -3881,7 +3720,7 @@ static int __pyx_pf_4cdec_5_cdec_12SparseVector_8__setitem__(struct __pyx_obj_4c int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setitem__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":68 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":68 * * def __setitem__(self, char* fname, float value): * cdef int fid = FDConvert(fname) # <<<<<<<<<<<<<< @@ -3890,7 +3729,7 @@ static int __pyx_pf_4cdec_5_cdec_12SparseVector_8__setitem__(struct __pyx_obj_4c */ __pyx_v_fid = FD::Convert(__pyx_v_fname); - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":69 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":69 * def __setitem__(self, char* fname, float value): * cdef int fid = FDConvert(fname) * if fid < 0: raise KeyError(fname) # <<<<<<<<<<<<<< @@ -3900,21 +3739,23 @@ static int __pyx_pf_4cdec_5_cdec_12SparseVector_8__setitem__(struct __pyx_obj_4c __pyx_t_1 = ((__pyx_v_fid < 0) != 0); if (__pyx_t_1) { __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_fname); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); + __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); - __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_2)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_Call(__pyx_builtin_KeyError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L3; } + __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":70 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":70 * cdef int fid = FDConvert(fname) * if fid < 0: raise KeyError(fname) * self.vector.set_value(fid, value) # <<<<<<<<<<<<<< @@ -3923,15 +3764,6 @@ static int __pyx_pf_4cdec_5_cdec_12SparseVector_8__setitem__(struct __pyx_obj_4c */ __pyx_v_self->vector->set_value(__pyx_v_fid, __pyx_v_value); - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":67 - * return self.vector.value(fid) - * - * def __setitem__(self, char* fname, float value): # <<<<<<<<<<<<<< - * cdef int fid = FDConvert(fname) - * if fid < 0: raise KeyError(fname) - */ - - /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; @@ -3945,14 +3777,6 @@ static int __pyx_pf_4cdec_5_cdec_12SparseVector_8__setitem__(struct __pyx_obj_4c } static PyObject *__pyx_gb_4cdec_5_cdec_12SparseVector_12generator1(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":72 - * self.vector.set_value(fid, value) - * - * def __iter__(self): # <<<<<<<<<<<<<< - * cdef FastSparseVector[weight_t].const_iterator* it = new FastSparseVector[weight_t].const_iterator(self.vector[0], False) - * cdef unsigned i - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_11__iter__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_11__iter__(PyObject *__pyx_v_self) { @@ -3960,12 +3784,18 @@ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_11__iter__(PyObject *__pyx __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_12SparseVector_10__iter__(((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":72 + * self.vector.set_value(fid, value) + * + * def __iter__(self): # <<<<<<<<<<<<<< + * cdef FastSparseVector[weight_t].const_iterator* it = new FastSparseVector[weight_t].const_iterator(self.vector[0], False) + * cdef unsigned i + */ + static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_10__iter__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self) { struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__ *__pyx_cur_scope; PyObject *__pyx_r = NULL; @@ -3990,7 +3820,6 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_10__iter__(struct __pyx_ob return (PyObject *) gen; } - /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; @@ -4012,15 +3841,6 @@ static PyObject *__pyx_gb_4cdec_5_cdec_12SparseVector_12generator1(__pyx_Generat PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; - int __pyx_t_6; - int __pyx_t_7; - char const *__pyx_t_8; - PyObject *__pyx_t_9 = NULL; - PyObject *__pyx_t_10 = NULL; - PyObject *__pyx_t_11 = NULL; - PyObject *__pyx_t_12 = NULL; - PyObject *__pyx_t_13 = NULL; - PyObject *__pyx_t_14 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -4036,7 +3856,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_12SparseVector_12generator1(__pyx_Generat __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":73 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":73 * * def __iter__(self): * cdef FastSparseVector[weight_t].const_iterator* it = new FastSparseVector[weight_t].const_iterator(self.vector[0], False) # <<<<<<<<<<<<<< @@ -4045,7 +3865,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_12SparseVector_12generator1(__pyx_Generat */ __pyx_cur_scope->__pyx_v_it = new FastSparseVector::const_iterator((__pyx_cur_scope->__pyx_v_self->vector[0]), 0); - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":75 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":75 * cdef FastSparseVector[weight_t].const_iterator* it = new FastSparseVector[weight_t].const_iterator(self.vector[0], False) * cdef unsigned i * try: # <<<<<<<<<<<<<< @@ -4054,7 +3874,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_12SparseVector_12generator1(__pyx_Generat */ /*try:*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":76 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":76 * cdef unsigned i * try: * for i in range(self.vector.size()): # <<<<<<<<<<<<<< @@ -4065,26 +3885,26 @@ static PyObject *__pyx_gb_4cdec_5_cdec_12SparseVector_12generator1(__pyx_Generat for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_cur_scope->__pyx_v_i = __pyx_t_2; - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":77 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":77 * try: * for i in range(self.vector.size()): * yield (str(FDConvert(it[0].ptr().first).c_str()), it[0].ptr().second) # <<<<<<<<<<<<<< * pinc(it[0]) # ++it * finally: */ - __pyx_t_3 = __Pyx_PyBytes_FromString(FD::Convert((__pyx_cur_scope->__pyx_v_it[0]).operator->()->first).c_str()); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L5_error;} - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + __pyx_t_3 = __Pyx_PyBytes_FromString(FD::Convert((__pyx_cur_scope->__pyx_v_it[0]).operator->()->first).c_str()); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L5;} + __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L5;} __Pyx_GOTREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); - __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_3)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L5;} __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyFloat_FromDouble((__pyx_cur_scope->__pyx_v_it[0]).operator->()->second); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; + __pyx_t_4 = PyFloat_FromDouble((__pyx_cur_scope->__pyx_v_it[0]).operator->()->second); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L5;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L5;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); @@ -4092,7 +3912,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_12SparseVector_12generator1(__pyx_Generat __Pyx_GIVEREF(__pyx_t_4); __pyx_t_3 = 0; __pyx_t_4 = 0; - __pyx_r = __pyx_t_5; + __pyx_r = ((PyObject *)__pyx_t_5); __pyx_t_5 = 0; __pyx_cur_scope->__pyx_t_0 = __pyx_t_1; __pyx_cur_scope->__pyx_t_1 = __pyx_t_2; @@ -4104,9 +3924,9 @@ static PyObject *__pyx_gb_4cdec_5_cdec_12SparseVector_12generator1(__pyx_Generat __pyx_L9_resume_from_yield:; __pyx_t_1 = __pyx_cur_scope->__pyx_t_0; __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L5;} - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":78 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":78 * for i in range(self.vector.size()): * yield (str(FDConvert(it[0].ptr().first).c_str()), it[0].ptr().second) * pinc(it[0]) # ++it # <<<<<<<<<<<<<< @@ -4117,7 +3937,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_12SparseVector_12generator1(__pyx_Generat } } - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":80 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":80 * pinc(it[0]) # ++it * finally: * del it # <<<<<<<<<<<<<< @@ -4125,54 +3945,33 @@ static PyObject *__pyx_gb_4cdec_5_cdec_12SparseVector_12generator1(__pyx_Generat * def dot(self, other): */ /*finally:*/ { - /*normal exit:*/{ - delete __pyx_cur_scope->__pyx_v_it; - goto __pyx_L6; - } - /*exception exit:*/{ - __pyx_L5_error:; - __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; + int __pyx_why; + PyObject *__pyx_exc_type, *__pyx_exc_value, *__pyx_exc_tb; + int __pyx_exc_lineno; + __pyx_exc_type = 0; __pyx_exc_value = 0; __pyx_exc_tb = 0; __pyx_exc_lineno = 0; + __pyx_why = 0; goto __pyx_L6; + __pyx_L5: { + __pyx_why = 4; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); - if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11) < 0)) __Pyx_ErrFetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); - __Pyx_XGOTREF(__pyx_t_9); - __Pyx_XGOTREF(__pyx_t_10); - __Pyx_XGOTREF(__pyx_t_11); - __Pyx_XGOTREF(__pyx_t_12); - __Pyx_XGOTREF(__pyx_t_13); - __Pyx_XGOTREF(__pyx_t_14); - __pyx_t_6 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_8 = __pyx_filename; - { - delete __pyx_cur_scope->__pyx_v_it; - } - if (PY_MAJOR_VERSION >= 3) { - __Pyx_XGIVEREF(__pyx_t_12); - __Pyx_XGIVEREF(__pyx_t_13); - __Pyx_XGIVEREF(__pyx_t_14); - __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); - } - __Pyx_XGIVEREF(__pyx_t_9); - __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_XGIVEREF(__pyx_t_11); - __Pyx_ErrRestore(__pyx_t_9, __pyx_t_10, __pyx_t_11); - __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; - __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_8; - goto __pyx_L1_error; + __Pyx_ErrFetch(&__pyx_exc_type, &__pyx_exc_value, &__pyx_exc_tb); + __pyx_exc_lineno = __pyx_lineno; + goto __pyx_L6; } __pyx_L6:; + delete __pyx_cur_scope->__pyx_v_it; + switch (__pyx_why) { + case 4: { + __Pyx_ErrRestore(__pyx_exc_type, __pyx_exc_value, __pyx_exc_tb); + __pyx_lineno = __pyx_exc_lineno; + __pyx_exc_type = 0; + __pyx_exc_value = 0; + __pyx_exc_tb = 0; + goto __pyx_L1_error; + } + } } - - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":72 - * self.vector.set_value(fid, value) - * - * def __iter__(self): # <<<<<<<<<<<<<< - * cdef FastSparseVector[weight_t].const_iterator* it = new FastSparseVector[weight_t].const_iterator(self.vector[0], False) - * cdef unsigned i - */ - - /* function exit code */ PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; @@ -4188,14 +3987,6 @@ static PyObject *__pyx_gb_4cdec_5_cdec_12SparseVector_12generator1(__pyx_Generat return NULL; } -/* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":82 - * del it - * - * def dot(self, other): # <<<<<<<<<<<<<< - * """vector.dot(SparseVector/DenseVector other) -> Dot product of the two vectors.""" - * if isinstance(other, DenseVector): - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_14dot(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ static char __pyx_doc_4cdec_5_cdec_12SparseVector_13dot[] = "vector.dot(SparseVector/DenseVector other) -> Dot product of the two vectors."; @@ -4204,12 +3995,18 @@ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_14dot(PyObject *__pyx_v_se __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("dot (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_12SparseVector_13dot(((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_self), ((PyObject *)__pyx_v_other)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":82 + * del it + * + * def dot(self, other): # <<<<<<<<<<<<<< + * """vector.dot(SparseVector/DenseVector other) -> Dot product of the two vectors.""" + * if isinstance(other, DenseVector): + */ + static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_13dot(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self, PyObject *__pyx_v_other) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -4222,7 +4019,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_13dot(struct __pyx_obj_4cd int __pyx_clineno = 0; __Pyx_RefNannySetupContext("dot", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":84 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":84 * def dot(self, other): * """vector.dot(SparseVector/DenseVector other) -> Dot product of the two vectors.""" * if isinstance(other, DenseVector): # <<<<<<<<<<<<<< @@ -4233,7 +4030,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_13dot(struct __pyx_obj_4cd __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":85 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":85 * """vector.dot(SparseVector/DenseVector other) -> Dot product of the two vectors.""" * if isinstance(other, DenseVector): * return self.vector.dot(( other).vector[0]) # <<<<<<<<<<<<<< @@ -4246,9 +4043,10 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_13dot(struct __pyx_obj_4cd __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; + goto __pyx_L3; } - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":86 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":86 * if isinstance(other, DenseVector): * return self.vector.dot(( other).vector[0]) * elif isinstance(other, SparseVector): # <<<<<<<<<<<<<< @@ -4259,7 +4057,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_13dot(struct __pyx_obj_4cd __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":87 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":87 * return self.vector.dot(( other).vector[0]) * elif isinstance(other, SparseVector): * return self.vector.dot(( other).vector[0]) # <<<<<<<<<<<<<< @@ -4272,38 +4070,33 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_13dot(struct __pyx_obj_4cd __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; + goto __pyx_L3; } + __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":88 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":88 * elif isinstance(other, SparseVector): * return self.vector.dot(( other).vector[0]) * raise TypeError('cannot take the dot product of %s and SparseVector' % type(other)) # <<<<<<<<<<<<<< * * def __richcmp__(SparseVector x, SparseVector y, int op): */ - __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_cannot_take_the_dot_product_of_s, ((PyObject *)Py_TYPE(__pyx_v_other))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_3), ((PyObject *)Py_TYPE(__pyx_v_other))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); - __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_3)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(((PyObject *)__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 = 88; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":82 - * del it - * - * def dot(self, other): # <<<<<<<<<<<<<< - * """vector.dot(SparseVector/DenseVector other) -> Dot product of the two vectors.""" - * if isinstance(other, DenseVector): - */ - - /* 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); @@ -4315,14 +4108,6 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_13dot(struct __pyx_obj_4cd return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":90 - * raise TypeError('cannot take the dot product of %s and SparseVector' % type(other)) - * - * def __richcmp__(SparseVector x, SparseVector y, int op): # <<<<<<<<<<<<<< - * if op == 2: # == - * return x.vector[0] == y.vector[0] - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_16__richcmp__(PyObject *__pyx_v_x, PyObject *__pyx_v_y, int __pyx_v_op); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_16__richcmp__(PyObject *__pyx_v_x, PyObject *__pyx_v_y, int __pyx_v_op) { @@ -4335,8 +4120,6 @@ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_16__richcmp__(PyObject *__ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_4cdec_5_cdec_SparseVector, 1, "x", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_4cdec_5_cdec_SparseVector, 1, "y", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_4cdec_5_cdec_12SparseVector_15__richcmp__(((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_x), ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_y), ((int)__pyx_v_op)); - - /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; @@ -4345,6 +4128,14 @@ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_16__richcmp__(PyObject *__ return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":90 + * raise TypeError('cannot take the dot product of %s and SparseVector' % type(other)) + * + * def __richcmp__(SparseVector x, SparseVector y, int op): # <<<<<<<<<<<<<< + * if op == 2: # == + * return x.vector[0] == y.vector[0] + */ + static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_15__richcmp__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_x, struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_y, int __pyx_v_op) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -4355,7 +4146,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_15__richcmp__(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__richcmp__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":93 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":93 * if op == 2: # == * return x.vector[0] == y.vector[0] * elif op == 3: # != # <<<<<<<<<<<<<< @@ -4364,7 +4155,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_15__richcmp__(struct __pyx */ switch (__pyx_v_op) { - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":91 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":91 * * def __richcmp__(SparseVector x, SparseVector y, int op): * if op == 2: # == # <<<<<<<<<<<<<< @@ -4373,7 +4164,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_15__richcmp__(struct __pyx */ case 2: - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":92 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":92 * def __richcmp__(SparseVector x, SparseVector y, int op): * if op == 2: # == * return x.vector[0] == y.vector[0] # <<<<<<<<<<<<<< @@ -4388,7 +4179,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_15__richcmp__(struct __pyx goto __pyx_L0; break; - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":93 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":93 * if op == 2: # == * return x.vector[0] == y.vector[0] * elif op == 3: # != # <<<<<<<<<<<<<< @@ -4397,7 +4188,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_15__richcmp__(struct __pyx */ case 3: - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":94 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":94 * return x.vector[0] == y.vector[0] * elif op == 3: # != * return not (x == y) # <<<<<<<<<<<<<< @@ -4414,31 +4205,23 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_15__richcmp__(struct __pyx __pyx_t_1 = 0; goto __pyx_L0; break; - default: break; } - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":95 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":95 * elif op == 3: # != * return not (x == y) * raise NotImplemented('comparison not implemented for SparseVector') # <<<<<<<<<<<<<< * * def __len__(self): */ - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_NotImplemented, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(__pyx_builtin_NotImplemented, ((PyObject *)__pyx_k_tuple_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[1]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":90 - * raise TypeError('cannot take the dot product of %s and SparseVector' % type(other)) - * - * def __richcmp__(SparseVector x, SparseVector y, int op): # <<<<<<<<<<<<<< - * if op == 2: # == - * return x.vector[0] == y.vector[0] - */ - - /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cdec._cdec.SparseVector.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -4449,14 +4232,6 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_15__richcmp__(struct __pyx return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":97 - * raise NotImplemented('comparison not implemented for SparseVector') - * - * def __len__(self): # <<<<<<<<<<<<<< - * return self.vector.size() - * - */ - /* Python wrapper */ static Py_ssize_t __pyx_pw_4cdec_5_cdec_12SparseVector_18__len__(PyObject *__pyx_v_self); /*proto*/ static Py_ssize_t __pyx_pw_4cdec_5_cdec_12SparseVector_18__len__(PyObject *__pyx_v_self) { @@ -4464,18 +4239,24 @@ static Py_ssize_t __pyx_pw_4cdec_5_cdec_12SparseVector_18__len__(PyObject *__pyx __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_12SparseVector_17__len__(((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static Py_ssize_t __pyx_pf_4cdec_5_cdec_12SparseVector_17__len__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self) { - Py_ssize_t __pyx_r; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__len__", 0); +/* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":97 + * raise NotImplemented('comparison not implemented for SparseVector') + * + * def __len__(self): # <<<<<<<<<<<<<< + * return self.vector.size() + * + */ + +static Py_ssize_t __pyx_pf_4cdec_5_cdec_12SparseVector_17__len__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self) { + Py_ssize_t __pyx_r; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__len__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":98 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":98 * * def __len__(self): * return self.vector.size() # <<<<<<<<<<<<<< @@ -4485,28 +4266,12 @@ static Py_ssize_t __pyx_pf_4cdec_5_cdec_12SparseVector_17__len__(struct __pyx_ob __pyx_r = __pyx_v_self->vector->size(); goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":97 - * raise NotImplemented('comparison not implemented for SparseVector') - * - * def __len__(self): # <<<<<<<<<<<<<< - * return self.vector.size() - * - */ - - /* function exit code */ + __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":100 - * return self.vector.size() - * - * def __contains__(self, char* fname): # <<<<<<<<<<<<<< - * return self.vector.nonzero(FDConvert(fname)) - * - */ - /* Python wrapper */ static int __pyx_pw_4cdec_5_cdec_12SparseVector_20__contains__(PyObject *__pyx_v_self, PyObject *__pyx_arg_fname); /*proto*/ static int __pyx_pw_4cdec_5_cdec_12SparseVector_20__contains__(PyObject *__pyx_v_self, PyObject *__pyx_arg_fname) { @@ -4527,18 +4292,24 @@ static int __pyx_pw_4cdec_5_cdec_12SparseVector_20__contains__(PyObject *__pyx_v return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4cdec_5_cdec_12SparseVector_19__contains__(((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_self), ((char *)__pyx_v_fname)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":100 + * return self.vector.size() + * + * def __contains__(self, char* fname): # <<<<<<<<<<<<<< + * return self.vector.nonzero(FDConvert(fname)) + * + */ + static int __pyx_pf_4cdec_5_cdec_12SparseVector_19__contains__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self, char *__pyx_v_fname) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__contains__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":101 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":101 * * def __contains__(self, char* fname): * return self.vector.nonzero(FDConvert(fname)) # <<<<<<<<<<<<<< @@ -4548,28 +4319,12 @@ static int __pyx_pf_4cdec_5_cdec_12SparseVector_19__contains__(struct __pyx_obj_ __pyx_r = __pyx_v_self->vector->nonzero(FD::Convert(__pyx_v_fname)); goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":100 - * return self.vector.size() - * - * def __contains__(self, char* fname): # <<<<<<<<<<<<<< - * return self.vector.nonzero(FDConvert(fname)) - * - */ - - /* function exit code */ + __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":103 - * return self.vector.nonzero(FDConvert(fname)) - * - * def __neg__(self): # <<<<<<<<<<<<<< - * cdef SparseVector result = SparseVector.__new__(SparseVector) - * result.vector = new FastSparseVector[weight_t](self.vector[0]) - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_22__neg__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_22__neg__(PyObject *__pyx_v_self) { @@ -4577,12 +4332,18 @@ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_22__neg__(PyObject *__pyx_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__neg__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_12SparseVector_21__neg__(((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":103 + * return self.vector.nonzero(FDConvert(fname)) + * + * def __neg__(self): # <<<<<<<<<<<<<< + * cdef SparseVector result = SparseVector.__new__(SparseVector) + * result.vector = new FastSparseVector[weight_t](self.vector[0]) + */ + static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_21__neg__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self) { struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_result = 0; PyObject *__pyx_r = NULL; @@ -4593,20 +4354,20 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_21__neg__(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__neg__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":104 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":104 * * def __neg__(self): * cdef SparseVector result = SparseVector.__new__(SparseVector) # <<<<<<<<<<<<<< * result.vector = new FastSparseVector[weight_t](self.vector[0]) * result.vector[0] *= -1.0 */ - __pyx_t_1 = __pyx_tp_new_4cdec_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SparseVector)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_tp_new_4cdec_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SparseVector)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4cdec_5_cdec_SparseVector)))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_result = ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":105 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":105 * def __neg__(self): * cdef SparseVector result = SparseVector.__new__(SparseVector) * result.vector = new FastSparseVector[weight_t](self.vector[0]) # <<<<<<<<<<<<<< @@ -4615,7 +4376,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_21__neg__(struct __pyx_obj */ __pyx_v_result->vector = new FastSparseVector((__pyx_v_self->vector[0])); - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":106 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":106 * cdef SparseVector result = SparseVector.__new__(SparseVector) * result.vector = new FastSparseVector[weight_t](self.vector[0]) * result.vector[0] *= -1.0 # <<<<<<<<<<<<<< @@ -4624,7 +4385,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_21__neg__(struct __pyx_obj */ (__pyx_v_result->vector[0]) *= -1.0; - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":107 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":107 * result.vector = new FastSparseVector[weight_t](self.vector[0]) * result.vector[0] *= -1.0 * return result # <<<<<<<<<<<<<< @@ -4636,15 +4397,8 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_21__neg__(struct __pyx_obj __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":103 - * return self.vector.nonzero(FDConvert(fname)) - * - * def __neg__(self): # <<<<<<<<<<<<<< - * cdef SparseVector result = SparseVector.__new__(SparseVector) - * result.vector = new FastSparseVector[weight_t](self.vector[0]) - */ - - /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cdec._cdec.SparseVector.__neg__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -4656,14 +4410,6 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_21__neg__(struct __pyx_obj return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":109 - * return result - * - * def __iadd__(SparseVector self, SparseVector other): # <<<<<<<<<<<<<< - * self.vector[0] += other.vector[0] - * return self - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_24__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_24__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { @@ -4675,8 +4421,6 @@ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_24__iadd__(PyObject *__pyx __Pyx_RefNannySetupContext("__iadd__ (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_4cdec_5_cdec_SparseVector, 1, "other", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_4cdec_5_cdec_12SparseVector_23__iadd__(((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_self), ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_other)); - - /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; @@ -4685,12 +4429,20 @@ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_24__iadd__(PyObject *__pyx return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":109 + * return result + * + * def __iadd__(SparseVector self, SparseVector other): # <<<<<<<<<<<<<< + * self.vector[0] += other.vector[0] + * return self + */ + static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_23__iadd__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self, struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_other) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__iadd__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":110 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":110 * * def __iadd__(SparseVector self, SparseVector other): * self.vector[0] += other.vector[0] # <<<<<<<<<<<<<< @@ -4699,7 +4451,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_23__iadd__(struct __pyx_ob */ (__pyx_v_self->vector[0]) += (__pyx_v_other->vector[0]); - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":111 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":111 * def __iadd__(SparseVector self, SparseVector other): * self.vector[0] += other.vector[0] * return self # <<<<<<<<<<<<<< @@ -4711,29 +4463,13 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_23__iadd__(struct __pyx_ob __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":109 - * return result - * - * def __iadd__(SparseVector self, SparseVector other): # <<<<<<<<<<<<<< - * self.vector[0] += other.vector[0] - * return self - */ - - /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":113 - * return self - * - * def __isub__(SparseVector self, SparseVector other): # <<<<<<<<<<<<<< - * self.vector[0] -= other.vector[0] - * return self - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_26__isub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_26__isub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { @@ -4745,8 +4481,6 @@ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_26__isub__(PyObject *__pyx __Pyx_RefNannySetupContext("__isub__ (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_4cdec_5_cdec_SparseVector, 1, "other", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_4cdec_5_cdec_12SparseVector_25__isub__(((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_self), ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_other)); - - /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; @@ -4755,12 +4489,20 @@ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_26__isub__(PyObject *__pyx return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":113 + * return self + * + * def __isub__(SparseVector self, SparseVector other): # <<<<<<<<<<<<<< + * self.vector[0] -= other.vector[0] + * return self + */ + static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_25__isub__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self, struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_other) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__isub__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":114 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":114 * * def __isub__(SparseVector self, SparseVector other): * self.vector[0] -= other.vector[0] # <<<<<<<<<<<<<< @@ -4769,7 +4511,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_25__isub__(struct __pyx_ob */ (__pyx_v_self->vector[0]) -= (__pyx_v_other->vector[0]); - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":115 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":115 * def __isub__(SparseVector self, SparseVector other): * self.vector[0] -= other.vector[0] * return self # <<<<<<<<<<<<<< @@ -4781,29 +4523,13 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_25__isub__(struct __pyx_ob __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":113 - * return self - * - * def __isub__(SparseVector self, SparseVector other): # <<<<<<<<<<<<<< - * self.vector[0] -= other.vector[0] - * return self - */ - - /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":117 - * return self - * - * def __imul__(SparseVector self, float scalar): # <<<<<<<<<<<<<< - * self.vector[0] *= scalar - * return self - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_28__imul__(PyObject *__pyx_v_self, PyObject *__pyx_arg_scalar); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_28__imul__(PyObject *__pyx_v_self, PyObject *__pyx_arg_scalar) { @@ -4824,18 +4550,24 @@ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_28__imul__(PyObject *__pyx return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4cdec_5_cdec_12SparseVector_27__imul__(((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_self), ((float)__pyx_v_scalar)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":117 + * return self + * + * def __imul__(SparseVector self, float scalar): # <<<<<<<<<<<<<< + * self.vector[0] *= scalar + * return self + */ + static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_27__imul__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self, float __pyx_v_scalar) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__imul__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":118 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":118 * * def __imul__(SparseVector self, float scalar): * self.vector[0] *= scalar # <<<<<<<<<<<<<< @@ -4844,7 +4576,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_27__imul__(struct __pyx_ob */ (__pyx_v_self->vector[0]) *= __pyx_v_scalar; - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":119 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":119 * def __imul__(SparseVector self, float scalar): * self.vector[0] *= scalar * return self # <<<<<<<<<<<<<< @@ -4856,29 +4588,13 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_27__imul__(struct __pyx_ob __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":117 - * return self - * - * def __imul__(SparseVector self, float scalar): # <<<<<<<<<<<<<< - * self.vector[0] *= scalar - * return self - */ - - /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":121 - * return self - * - * def __idiv__(SparseVector self, float scalar): # <<<<<<<<<<<<<< - * self.vector[0] /= scalar - * return self - */ - /* Python wrapper */ #if PY_MAJOR_VERSION < 3 static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_30__idiv__(PyObject *__pyx_v_self, PyObject *__pyx_arg_scalar); /*proto*/ @@ -4900,20 +4616,26 @@ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_30__idiv__(PyObject *__pyx return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4cdec_5_cdec_12SparseVector_29__idiv__(((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_self), ((float)__pyx_v_scalar)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } #endif /*!(#if PY_MAJOR_VERSION < 3)*/ +/* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":121 + * return self + * + * def __idiv__(SparseVector self, float scalar): # <<<<<<<<<<<<<< + * self.vector[0] /= scalar + * return self + */ + #if PY_MAJOR_VERSION < 3 static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_29__idiv__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_self, float __pyx_v_scalar) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__idiv__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":122 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":122 * * def __idiv__(SparseVector self, float scalar): * self.vector[0] /= scalar # <<<<<<<<<<<<<< @@ -4922,7 +4644,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_29__idiv__(struct __pyx_ob */ (__pyx_v_self->vector[0]) /= __pyx_v_scalar; - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":123 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":123 * def __idiv__(SparseVector self, float scalar): * self.vector[0] /= scalar * return self # <<<<<<<<<<<<<< @@ -4934,15 +4656,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_29__idiv__(struct __pyx_ob __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":121 - * return self - * - * def __idiv__(SparseVector self, float scalar): # <<<<<<<<<<<<<< - * self.vector[0] /= scalar - * return self - */ - - /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); @@ -4950,14 +4664,6 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_29__idiv__(struct __pyx_ob } #endif /*!(#if PY_MAJOR_VERSION < 3)*/ -/* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":125 - * return self - * - * def __add__(SparseVector x, SparseVector y): # <<<<<<<<<<<<<< - * cdef SparseVector result = SparseVector.__new__(SparseVector) - * result.vector = new FastSparseVector[weight_t](x.vector[0] + y.vector[0]) - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_32__add__(PyObject *__pyx_v_x, PyObject *__pyx_v_y); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_32__add__(PyObject *__pyx_v_x, PyObject *__pyx_v_y) { @@ -4970,8 +4676,6 @@ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_32__add__(PyObject *__pyx_ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_4cdec_5_cdec_SparseVector, 1, "x", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_4cdec_5_cdec_SparseVector, 1, "y", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_4cdec_5_cdec_12SparseVector_31__add__(((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_x), ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_y)); - - /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; @@ -4980,6 +4684,14 @@ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_32__add__(PyObject *__pyx_ return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":125 + * return self + * + * def __add__(SparseVector x, SparseVector y): # <<<<<<<<<<<<<< + * cdef SparseVector result = SparseVector.__new__(SparseVector) + * result.vector = new FastSparseVector[weight_t](x.vector[0] + y.vector[0]) + */ + static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_31__add__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_x, struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_y) { struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_result = 0; PyObject *__pyx_r = NULL; @@ -4990,20 +4702,20 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_31__add__(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__add__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":126 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":126 * * def __add__(SparseVector x, SparseVector y): * cdef SparseVector result = SparseVector.__new__(SparseVector) # <<<<<<<<<<<<<< * result.vector = new FastSparseVector[weight_t](x.vector[0] + y.vector[0]) * return result */ - __pyx_t_1 = __pyx_tp_new_4cdec_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SparseVector)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_tp_new_4cdec_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SparseVector)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4cdec_5_cdec_SparseVector)))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_result = ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":127 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":127 * def __add__(SparseVector x, SparseVector y): * cdef SparseVector result = SparseVector.__new__(SparseVector) * result.vector = new FastSparseVector[weight_t](x.vector[0] + y.vector[0]) # <<<<<<<<<<<<<< @@ -5012,7 +4724,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_31__add__(struct __pyx_obj */ __pyx_v_result->vector = new FastSparseVector(((__pyx_v_x->vector[0]) + (__pyx_v_y->vector[0]))); - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":128 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":128 * cdef SparseVector result = SparseVector.__new__(SparseVector) * result.vector = new FastSparseVector[weight_t](x.vector[0] + y.vector[0]) * return result # <<<<<<<<<<<<<< @@ -5024,15 +4736,8 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_31__add__(struct __pyx_obj __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":125 - * return self - * - * def __add__(SparseVector x, SparseVector y): # <<<<<<<<<<<<<< - * cdef SparseVector result = SparseVector.__new__(SparseVector) - * result.vector = new FastSparseVector[weight_t](x.vector[0] + y.vector[0]) - */ - - /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cdec._cdec.SparseVector.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -5044,14 +4749,6 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_31__add__(struct __pyx_obj return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":130 - * return result - * - * def __sub__(SparseVector x, SparseVector y): # <<<<<<<<<<<<<< - * cdef SparseVector result = SparseVector.__new__(SparseVector) - * result.vector = new FastSparseVector[weight_t](x.vector[0] - y.vector[0]) - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_34__sub__(PyObject *__pyx_v_x, PyObject *__pyx_v_y); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_34__sub__(PyObject *__pyx_v_x, PyObject *__pyx_v_y) { @@ -5064,8 +4761,6 @@ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_34__sub__(PyObject *__pyx_ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_4cdec_5_cdec_SparseVector, 1, "x", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_4cdec_5_cdec_SparseVector, 1, "y", 0))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_4cdec_5_cdec_12SparseVector_33__sub__(((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_x), ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_v_y)); - - /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; @@ -5074,6 +4769,14 @@ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_34__sub__(PyObject *__pyx_ return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":130 + * return result + * + * def __sub__(SparseVector x, SparseVector y): # <<<<<<<<<<<<<< + * cdef SparseVector result = SparseVector.__new__(SparseVector) + * result.vector = new FastSparseVector[weight_t](x.vector[0] - y.vector[0]) + */ + static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_33__sub__(struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_x, struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_y) { struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_result = 0; PyObject *__pyx_r = NULL; @@ -5084,20 +4787,20 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_33__sub__(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__sub__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":131 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":131 * * def __sub__(SparseVector x, SparseVector y): * cdef SparseVector result = SparseVector.__new__(SparseVector) # <<<<<<<<<<<<<< * result.vector = new FastSparseVector[weight_t](x.vector[0] - y.vector[0]) * return result */ - __pyx_t_1 = __pyx_tp_new_4cdec_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SparseVector)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_tp_new_4cdec_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SparseVector)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4cdec_5_cdec_SparseVector)))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_result = ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":132 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":132 * def __sub__(SparseVector x, SparseVector y): * cdef SparseVector result = SparseVector.__new__(SparseVector) * result.vector = new FastSparseVector[weight_t](x.vector[0] - y.vector[0]) # <<<<<<<<<<<<<< @@ -5106,7 +4809,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_33__sub__(struct __pyx_obj */ __pyx_v_result->vector = new FastSparseVector(((__pyx_v_x->vector[0]) - (__pyx_v_y->vector[0]))); - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":133 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":133 * cdef SparseVector result = SparseVector.__new__(SparseVector) * result.vector = new FastSparseVector[weight_t](x.vector[0] - y.vector[0]) * return result # <<<<<<<<<<<<<< @@ -5118,15 +4821,8 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_33__sub__(struct __pyx_obj __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":130 - * return result - * - * def __sub__(SparseVector x, SparseVector y): # <<<<<<<<<<<<<< - * cdef SparseVector result = SparseVector.__new__(SparseVector) - * result.vector = new FastSparseVector[weight_t](x.vector[0] - y.vector[0]) - */ - - /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cdec._cdec.SparseVector.__sub__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -5138,14 +4834,6 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_33__sub__(struct __pyx_obj return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":135 - * return result - * - * def __mul__(x, y): # <<<<<<<<<<<<<< - * cdef SparseVector vector - * cdef float scalar - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_36__mul__(PyObject *__pyx_v_x, PyObject *__pyx_v_y); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_36__mul__(PyObject *__pyx_v_x, PyObject *__pyx_v_y) { @@ -5153,12 +4841,18 @@ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_36__mul__(PyObject *__pyx_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__mul__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_12SparseVector_35__mul__(((PyObject *)__pyx_v_x), ((PyObject *)__pyx_v_y)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":135 + * return result + * + * def __mul__(x, y): # <<<<<<<<<<<<<< + * cdef SparseVector vector + * cdef float scalar + */ + static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_35__mul__(PyObject *__pyx_v_x, PyObject *__pyx_v_y) { struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_vector = 0; float __pyx_v_scalar; @@ -5174,7 +4868,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_35__mul__(PyObject *__pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__mul__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":138 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":138 * cdef SparseVector vector * cdef float scalar * if isinstance(x, SparseVector): vector, scalar = x, y # <<<<<<<<<<<<<< @@ -5195,7 +4889,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_35__mul__(PyObject *__pyx_ } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":139 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":139 * cdef float scalar * if isinstance(x, SparseVector): vector, scalar = x, y * else: vector, scalar = y, x # <<<<<<<<<<<<<< @@ -5212,20 +4906,20 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_35__mul__(PyObject *__pyx_ } __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":140 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":140 * if isinstance(x, SparseVector): vector, scalar = x, y * else: vector, scalar = y, x * cdef SparseVector result = SparseVector.__new__(SparseVector) # <<<<<<<<<<<<<< * result.vector = new FastSparseVector[weight_t](vector.vector[0] * scalar) * return result */ - __pyx_t_3 = __pyx_tp_new_4cdec_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SparseVector)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __pyx_tp_new_4cdec_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SparseVector)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_4cdec_5_cdec_SparseVector)))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_result = ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":141 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":141 * else: vector, scalar = y, x * cdef SparseVector result = SparseVector.__new__(SparseVector) * result.vector = new FastSparseVector[weight_t](vector.vector[0] * scalar) # <<<<<<<<<<<<<< @@ -5234,7 +4928,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_35__mul__(PyObject *__pyx_ */ __pyx_v_result->vector = new FastSparseVector(((__pyx_v_vector->vector[0]) * __pyx_v_scalar)); - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":142 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":142 * cdef SparseVector result = SparseVector.__new__(SparseVector) * result.vector = new FastSparseVector[weight_t](vector.vector[0] * scalar) * return result # <<<<<<<<<<<<<< @@ -5246,15 +4940,8 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_35__mul__(PyObject *__pyx_ __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":135 - * return result - * - * def __mul__(x, y): # <<<<<<<<<<<<<< - * cdef SparseVector vector - * cdef float scalar - */ - - /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("cdec._cdec.SparseVector.__mul__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -5267,14 +4954,6 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_35__mul__(PyObject *__pyx_ return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":144 - * return result - * - * def __div__(x, y): # <<<<<<<<<<<<<< - * cdef SparseVector vector - * cdef float scalar - */ - /* Python wrapper */ #if PY_MAJOR_VERSION < 3 static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_38__div__(PyObject *__pyx_v_x, PyObject *__pyx_v_y); /*proto*/ @@ -5283,13 +4962,19 @@ static PyObject *__pyx_pw_4cdec_5_cdec_12SparseVector_38__div__(PyObject *__pyx_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__div__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_12SparseVector_37__div__(((PyObject *)__pyx_v_x), ((PyObject *)__pyx_v_y)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } #endif /*!(#if PY_MAJOR_VERSION < 3)*/ +/* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":144 + * return result + * + * def __div__(x, y): # <<<<<<<<<<<<<< + * cdef SparseVector vector + * cdef float scalar + */ + #if PY_MAJOR_VERSION < 3 static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_37__div__(PyObject *__pyx_v_x, PyObject *__pyx_v_y) { struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_vector = 0; @@ -5306,7 +4991,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_37__div__(PyObject *__pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__div__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":147 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":147 * cdef SparseVector vector * cdef float scalar * if isinstance(x, SparseVector): vector, scalar = x, y # <<<<<<<<<<<<<< @@ -5327,7 +5012,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_37__div__(PyObject *__pyx_ } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":148 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":148 * cdef float scalar * if isinstance(x, SparseVector): vector, scalar = x, y * else: vector, scalar = y, x # <<<<<<<<<<<<<< @@ -5344,20 +5029,20 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_37__div__(PyObject *__pyx_ } __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":149 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":149 * if isinstance(x, SparseVector): vector, scalar = x, y * else: vector, scalar = y, x * cdef SparseVector result = SparseVector.__new__(SparseVector) # <<<<<<<<<<<<<< * result.vector = new FastSparseVector[weight_t](vector.vector[0] / scalar) * return result */ - __pyx_t_3 = __pyx_tp_new_4cdec_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SparseVector)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __pyx_tp_new_4cdec_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SparseVector)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_4cdec_5_cdec_SparseVector)))) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_result = ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":150 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":150 * else: vector, scalar = y, x * cdef SparseVector result = SparseVector.__new__(SparseVector) * result.vector = new FastSparseVector[weight_t](vector.vector[0] / scalar) # <<<<<<<<<<<<<< @@ -5365,7 +5050,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_37__div__(PyObject *__pyx_ */ __pyx_v_result->vector = new FastSparseVector(((__pyx_v_vector->vector[0]) / __pyx_v_scalar)); - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":151 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":151 * cdef SparseVector result = SparseVector.__new__(SparseVector) * result.vector = new FastSparseVector[weight_t](vector.vector[0] / scalar) * return result # <<<<<<<<<<<<<< @@ -5375,15 +5060,8 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_37__div__(PyObject *__pyx_ __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":144 - * return result - * - * def __div__(x, y): # <<<<<<<<<<<<<< - * cdef SparseVector vector - * cdef float scalar - */ - - /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("cdec._cdec.SparseVector.__div__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -5397,14 +5075,6 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12SparseVector_37__div__(PyObject *__pyx_ } #endif /*!(#if PY_MAJOR_VERSION < 3)*/ -/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":5 - * import cdec.sa._sa as _sa - * - * def _phrase(phrase): # <<<<<<<<<<<<<< - * return ' '.join(w.encode('utf8') if isinstance(w, unicode) else str(w) for w in phrase) - * - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_1_phrase(PyObject *__pyx_self, PyObject *__pyx_v_phrase); /*proto*/ static PyMethodDef __pyx_mdef_4cdec_5_cdec_1_phrase = {__Pyx_NAMESTR("_phrase"), (PyCFunction)__pyx_pw_4cdec_5_cdec_1_phrase, METH_O, __Pyx_DOCSTR(0)}; @@ -5413,14 +5083,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_1_phrase(PyObject *__pyx_self, PyObject * __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_phrase (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec__phrase(__pyx_self, ((PyObject *)__pyx_v_phrase)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_gb_4cdec_5_cdec_7_phrase_2generator18(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ +static PyObject *__pyx_gb_4cdec_5_cdec_7_phrase_2generator21(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":6 +/* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":6 * * def _phrase(phrase): * return ' '.join(w.encode('utf8') if isinstance(w, unicode) else str(w) for w in phrase) # <<<<<<<<<<<<<< @@ -5446,13 +5114,12 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7_phrase_genexpr(PyObject *__pyx_self) { __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); { - __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_5_cdec_7_phrase_2generator18, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_5_cdec_7_phrase_2generator21, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } - /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; @@ -5465,7 +5132,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7_phrase_genexpr(PyObject *__pyx_self) { return __pyx_r; } -static PyObject *__pyx_gb_4cdec_5_cdec_7_phrase_2generator18(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ +static PyObject *__pyx_gb_4cdec_5_cdec_7_phrase_2generator21(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr *__pyx_cur_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr *)__pyx_generator->closure); PyObject *__pyx_r = NULL; @@ -5517,9 +5184,8 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7_phrase_2generator18(__pyx_GeneratorObje } else { __pyx_t_4 = __pyx_t_3(__pyx_t_1); if (unlikely(!__pyx_t_4)) { - PyObject* exc_type = PyErr_Occurred(); - if (exc_type) { - if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + if (PyErr_Occurred()) { + if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; @@ -5527,14 +5193,15 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7_phrase_2generator18(__pyx_GeneratorObje __Pyx_GOTREF(__pyx_t_4); } __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_w); - __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_w, __pyx_t_4); + __Pyx_XDECREF(__pyx_cur_scope->__pyx_v_w); __Pyx_GIVEREF(__pyx_t_4); + __pyx_cur_scope->__pyx_v_w = __pyx_t_4; __pyx_t_4 = 0; __pyx_t_5 = PyUnicode_Check(__pyx_cur_scope->__pyx_v_w); if ((__pyx_t_5 != 0)) { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_w, __pyx_n_s_encode); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_w, __pyx_n_s__encode); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_k_tuple_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = __pyx_t_7; @@ -5545,9 +5212,9 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7_phrase_2generator18(__pyx_GeneratorObje __Pyx_INCREF(__pyx_cur_scope->__pyx_v_w); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_cur_scope->__pyx_v_w); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_w); - __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __pyx_t_4 = __pyx_t_6; __pyx_t_6 = 0; } @@ -5571,8 +5238,6 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7_phrase_2generator18(__pyx_GeneratorObje if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* function exit code */ PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; @@ -5589,7 +5254,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7_phrase_2generator18(__pyx_GeneratorObje return NULL; } -/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":5 +/* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":5 * import cdec.sa._sa as _sa * * def _phrase(phrase): # <<<<<<<<<<<<<< @@ -5603,6 +5268,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec__phrase(CYTHON_UNUSED PyObject *__pyx_sel __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; @@ -5617,7 +5283,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec__phrase(CYTHON_UNUSED PyObject *__pyx_sel __Pyx_INCREF(__pyx_cur_scope->__pyx_v_phrase); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_phrase); - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":6 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":6 * * def _phrase(phrase): * return ' '.join(w.encode('utf8') if isinstance(w, unicode) else str(w) for w in phrase) # <<<<<<<<<<<<<< @@ -5625,27 +5291,29 @@ static PyObject *__pyx_pf_4cdec_5_cdec__phrase(CYTHON_UNUSED PyObject *__pyx_sel * cdef class NT: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_pf_4cdec_5_cdec_7_phrase_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_kp_s_7), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyString_Join(__pyx_kp_s__4, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_pf_4cdec_5_cdec_7_phrase_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_2); + __pyx_t_2 = 0; + __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":5 - * import cdec.sa._sa as _sa - * - * def _phrase(phrase): # <<<<<<<<<<<<<< - * return ' '.join(w.encode('utf8') if isinstance(w, unicode) else str(w) for w in phrase) - * - */ - - /* 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("cdec._cdec._phrase", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -5655,14 +5323,6 @@ static PyObject *__pyx_pf_4cdec_5_cdec__phrase(CYTHON_UNUSED PyObject *__pyx_sel return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":11 - * cdef public bytes cat - * cdef public unsigned ref - * def __init__(self, bytes cat, unsigned ref=0): # <<<<<<<<<<<<<< - * """NT(bytes cat, int ref=0) -> Non-terminal from category `cat`.""" - * self.cat = cat - */ - /* Python wrapper */ static int __pyx_pw_4cdec_5_cdec_2NT_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4cdec_5_cdec_2NT___init__[] = "NT(bytes cat, int ref=0) -> Non-terminal from category `cat`."; @@ -5679,7 +5339,7 @@ static int __pyx_pw_4cdec_5_cdec_2NT_1__init__(PyObject *__pyx_v_self, PyObject __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cat,&__pyx_n_s_ref,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__cat,&__pyx_n_s__ref,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; @@ -5693,11 +5353,11 @@ static int __pyx_pw_4cdec_5_cdec_2NT_1__init__(PyObject *__pyx_v_self, PyObject kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cat)) != 0)) kw_args--; + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cat)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { - PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ref); + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ref); if (value) { values[1] = value; kw_args--; } } } @@ -5714,7 +5374,7 @@ static int __pyx_pw_4cdec_5_cdec_2NT_1__init__(PyObject *__pyx_v_self, PyObject } __pyx_v_cat = ((PyObject*)values[0]); if (values[1]) { - __pyx_v_ref = __Pyx_PyInt_As_unsigned_int(values[1]); if (unlikely((__pyx_v_ref == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_ref = __Pyx_PyInt_AsUnsignedInt(values[1]); if (unlikely((__pyx_v_ref == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_ref = ((unsigned int)0); } @@ -5729,8 +5389,6 @@ static int __pyx_pw_4cdec_5_cdec_2NT_1__init__(PyObject *__pyx_v_self, PyObject __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cat), (&PyBytes_Type), 1, "cat", 1))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_4cdec_5_cdec_2NT___init__(((struct __pyx_obj_4cdec_5_cdec_NT *)__pyx_v_self), __pyx_v_cat, __pyx_v_ref); - - /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = -1; @@ -5739,25 +5397,33 @@ static int __pyx_pw_4cdec_5_cdec_2NT_1__init__(PyObject *__pyx_v_self, PyObject return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":11 + * cdef public bytes cat + * cdef public unsigned ref + * def __init__(self, bytes cat, unsigned ref=0): # <<<<<<<<<<<<<< + * """NT(bytes cat, int ref=0) -> Non-terminal from category `cat`.""" + * self.cat = cat + */ + static int __pyx_pf_4cdec_5_cdec_2NT___init__(struct __pyx_obj_4cdec_5_cdec_NT *__pyx_v_self, PyObject *__pyx_v_cat, unsigned int __pyx_v_ref) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":13 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":13 * def __init__(self, bytes cat, unsigned ref=0): * """NT(bytes cat, int ref=0) -> Non-terminal from category `cat`.""" * self.cat = cat # <<<<<<<<<<<<<< * self.ref = ref * */ - __Pyx_INCREF(__pyx_v_cat); - __Pyx_GIVEREF(__pyx_v_cat); + __Pyx_INCREF(((PyObject *)__pyx_v_cat)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_cat)); __Pyx_GOTREF(__pyx_v_self->cat); - __Pyx_DECREF(__pyx_v_self->cat); + __Pyx_DECREF(((PyObject *)__pyx_v_self->cat)); __pyx_v_self->cat = __pyx_v_cat; - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":14 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":14 * """NT(bytes cat, int ref=0) -> Non-terminal from category `cat`.""" * self.cat = cat * self.ref = ref # <<<<<<<<<<<<<< @@ -5766,28 +5432,11 @@ static int __pyx_pf_4cdec_5_cdec_2NT___init__(struct __pyx_obj_4cdec_5_cdec_NT * */ __pyx_v_self->ref = __pyx_v_ref; - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":11 - * cdef public bytes cat - * cdef public unsigned ref - * def __init__(self, bytes cat, unsigned ref=0): # <<<<<<<<<<<<<< - * """NT(bytes cat, int ref=0) -> Non-terminal from category `cat`.""" - * self.cat = cat - */ - - /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":16 - * self.ref = ref - * - * def __str__(self): # <<<<<<<<<<<<<< - * if self.ref > 0: - * return '[%s,%d]' % (self.cat, self.ref) - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_2NT_3__str__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_2NT_3__str__(PyObject *__pyx_v_self) { @@ -5795,12 +5444,18 @@ static PyObject *__pyx_pw_4cdec_5_cdec_2NT_3__str__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__str__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_2NT_2__str__(((struct __pyx_obj_4cdec_5_cdec_NT *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":16 + * self.ref = ref + * + * def __str__(self): # <<<<<<<<<<<<<< + * if self.ref > 0: + * return '[%s,%d]' % (self.cat, self.ref) + */ + static PyObject *__pyx_pf_4cdec_5_cdec_2NT_2__str__(struct __pyx_obj_4cdec_5_cdec_NT *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -5812,7 +5467,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_2NT_2__str__(struct __pyx_obj_4cdec_5_cde int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__str__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":17 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":17 * * def __str__(self): * if self.ref > 0: # <<<<<<<<<<<<<< @@ -5822,7 +5477,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_2NT_2__str__(struct __pyx_obj_4cdec_5_cde __pyx_t_1 = ((__pyx_v_self->ref > 0) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":18 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":18 * def __str__(self): * if self.ref > 0: * return '[%s,%d]' % (self.cat, self.ref) # <<<<<<<<<<<<<< @@ -5830,25 +5485,27 @@ static PyObject *__pyx_pf_4cdec_5_cdec_2NT_2__str__(struct __pyx_obj_4cdec_5_cde * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->ref); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyLong_FromUnsignedLong(__pyx_v_self->ref); 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_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __Pyx_INCREF(__pyx_v_self->cat); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->cat); - __Pyx_GIVEREF(__pyx_v_self->cat); + __Pyx_INCREF(((PyObject *)__pyx_v_self->cat)); + PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self->cat)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_self->cat)); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_s_d, __pyx_t_3); 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_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_r = __pyx_t_2; + __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_8), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __pyx_r = ((PyObject *)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; + goto __pyx_L3; } + __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":19 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":19 * if self.ref > 0: * return '[%s,%d]' % (self.cat, self.ref) * return '[%s]' % self.cat # <<<<<<<<<<<<<< @@ -5856,21 +5513,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_2NT_2__str__(struct __pyx_obj_4cdec_5_cde * cdef class NTRef: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_s, __pyx_v_self->cat); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __pyx_r = __pyx_t_2; + __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_9), ((PyObject *)__pyx_v_self->cat)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __pyx_r = ((PyObject *)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":16 - * self.ref = ref - * - * def __str__(self): # <<<<<<<<<<<<<< - * if self.ref > 0: - * return '[%s,%d]' % (self.cat, self.ref) - */ - - /* 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); @@ -5882,14 +5532,6 @@ static PyObject *__pyx_pf_4cdec_5_cdec_2NT_2__str__(struct __pyx_obj_4cdec_5_cde return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":9 - * - * cdef class NT: - * cdef public bytes cat # <<<<<<<<<<<<<< - * cdef public unsigned ref - * def __init__(self, bytes cat, unsigned ref=0): - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_2NT_3cat_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_2NT_3cat_1__get__(PyObject *__pyx_v_self) { @@ -5897,22 +5539,28 @@ static PyObject *__pyx_pw_4cdec_5_cdec_2NT_3cat_1__get__(PyObject *__pyx_v_self) __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_2NT_3cat___get__(((struct __pyx_obj_4cdec_5_cdec_NT *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":9 + * + * cdef class NT: + * cdef public bytes cat # <<<<<<<<<<<<<< + * cdef public unsigned ref + * def __init__(self, bytes cat, unsigned ref=0): + */ + static PyObject *__pyx_pf_4cdec_5_cdec_2NT_3cat___get__(struct __pyx_obj_4cdec_5_cdec_NT *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_v_self->cat); - __pyx_r = __pyx_v_self->cat; + __Pyx_INCREF(((PyObject *)__pyx_v_self->cat)); + __pyx_r = ((PyObject *)__pyx_v_self->cat); goto __pyx_L0; - /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); @@ -5926,8 +5574,6 @@ static int __pyx_pw_4cdec_5_cdec_2NT_3cat_3__set__(PyObject *__pyx_v_self, PyObj __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_2NT_3cat_2__set__(((struct __pyx_obj_4cdec_5_cdec_NT *)__pyx_v_self), ((PyObject *)__pyx_v_value)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -5935,25 +5581,20 @@ static int __pyx_pw_4cdec_5_cdec_2NT_3cat_3__set__(PyObject *__pyx_v_self, PyObj static int __pyx_pf_4cdec_5_cdec_2NT_3cat_2__set__(struct __pyx_obj_4cdec_5_cdec_NT *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - if (!(likely(PyBytes_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_value)->tp_name), 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_1 = __pyx_v_value; - __Pyx_INCREF(__pyx_t_1); - __Pyx_GIVEREF(__pyx_t_1); + if (!(likely(PyBytes_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_v_value)->tp_name), 0))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->cat); - __Pyx_DECREF(__pyx_v_self->cat); - __pyx_v_self->cat = ((PyObject*)__pyx_t_1); - __pyx_t_1 = 0; + __Pyx_DECREF(((PyObject *)__pyx_v_self->cat)); + __pyx_v_self->cat = ((PyObject*)__pyx_v_value); - /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cdec._cdec.NT.cat.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; @@ -5968,8 +5609,6 @@ static int __pyx_pw_4cdec_5_cdec_2NT_3cat_5__del__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_2NT_3cat_4__del__(((struct __pyx_obj_4cdec_5_cdec_NT *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -5981,23 +5620,14 @@ static int __pyx_pf_4cdec_5_cdec_2NT_3cat_4__del__(struct __pyx_obj_4cdec_5_cdec __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); __Pyx_GOTREF(__pyx_v_self->cat); - __Pyx_DECREF(__pyx_v_self->cat); + __Pyx_DECREF(((PyObject *)__pyx_v_self->cat)); __pyx_v_self->cat = ((PyObject*)Py_None); - /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":10 - * cdef class NT: - * cdef public bytes cat - * cdef public unsigned ref # <<<<<<<<<<<<<< - * def __init__(self, bytes cat, unsigned ref=0): - * """NT(bytes cat, int ref=0) -> Non-terminal from category `cat`.""" - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_2NT_3ref_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_2NT_3ref_1__get__(PyObject *__pyx_v_self) { @@ -6005,12 +5635,18 @@ static PyObject *__pyx_pw_4cdec_5_cdec_2NT_3ref_1__get__(PyObject *__pyx_v_self) __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_2NT_3ref___get__(((struct __pyx_obj_4cdec_5_cdec_NT *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":10 + * cdef class NT: + * cdef public bytes cat + * cdef public unsigned ref # <<<<<<<<<<<<<< + * def __init__(self, bytes cat, unsigned ref=0): + * """NT(bytes cat, int ref=0) -> Non-terminal from category `cat`.""" + */ + static PyObject *__pyx_pf_4cdec_5_cdec_2NT_3ref___get__(struct __pyx_obj_4cdec_5_cdec_NT *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -6020,13 +5656,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_2NT_3ref___get__(struct __pyx_obj_4cdec_5 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->ref); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyLong_FromUnsignedLong(__pyx_v_self->ref); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cdec._cdec.NT.ref.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -6044,8 +5681,6 @@ static int __pyx_pw_4cdec_5_cdec_2NT_3ref_3__set__(PyObject *__pyx_v_self, PyObj __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_2NT_3ref_2__set__(((struct __pyx_obj_4cdec_5_cdec_NT *)__pyx_v_self), ((PyObject *)__pyx_v_value)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -6058,10 +5693,9 @@ static int __pyx_pf_4cdec_5_cdec_2NT_3ref_2__set__(struct __pyx_obj_4cdec_5_cdec const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_AsUnsignedInt(__pyx_v_value); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->ref = __pyx_t_1; - /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; @@ -6072,14 +5706,6 @@ static int __pyx_pf_4cdec_5_cdec_2NT_3ref_2__set__(struct __pyx_obj_4cdec_5_cdec return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":23 - * cdef class NTRef: - * cdef public unsigned ref - * def __init__(self, unsigned ref): # <<<<<<<<<<<<<< - * """NTRef(int ref) -> Non-terminal reference.""" - * self.ref = ref - */ - /* Python wrapper */ static int __pyx_pw_4cdec_5_cdec_5NTRef_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4cdec_5_cdec_5NTRef___init__[] = "NTRef(int ref) -> Non-terminal reference."; @@ -6095,7 +5721,7 @@ static int __pyx_pw_4cdec_5_cdec_5NTRef_1__init__(PyObject *__pyx_v_self, PyObje __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ref,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__ref,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; @@ -6108,7 +5734,7 @@ static int __pyx_pw_4cdec_5_cdec_5NTRef_1__init__(PyObject *__pyx_v_self, PyObje kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ref)) != 0)) kw_args--; + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ref)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { @@ -6119,7 +5745,7 @@ static int __pyx_pw_4cdec_5_cdec_5NTRef_1__init__(PyObject *__pyx_v_self, PyObje } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); } - __pyx_v_ref = __Pyx_PyInt_As_unsigned_int(values[0]); if (unlikely((__pyx_v_ref == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_ref = __Pyx_PyInt_AsUnsignedInt(values[0]); if (unlikely((__pyx_v_ref == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; @@ -6130,18 +5756,24 @@ static int __pyx_pw_4cdec_5_cdec_5NTRef_1__init__(PyObject *__pyx_v_self, PyObje return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4cdec_5_cdec_5NTRef___init__(((struct __pyx_obj_4cdec_5_cdec_NTRef *)__pyx_v_self), __pyx_v_ref); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":23 + * cdef class NTRef: + * cdef public unsigned ref + * def __init__(self, unsigned ref): # <<<<<<<<<<<<<< + * """NTRef(int ref) -> Non-terminal reference.""" + * self.ref = ref + */ + static int __pyx_pf_4cdec_5_cdec_5NTRef___init__(struct __pyx_obj_4cdec_5_cdec_NTRef *__pyx_v_self, unsigned int __pyx_v_ref) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":25 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":25 * def __init__(self, unsigned ref): * """NTRef(int ref) -> Non-terminal reference.""" * self.ref = ref # <<<<<<<<<<<<<< @@ -6150,28 +5782,11 @@ static int __pyx_pf_4cdec_5_cdec_5NTRef___init__(struct __pyx_obj_4cdec_5_cdec_N */ __pyx_v_self->ref = __pyx_v_ref; - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":23 - * cdef class NTRef: - * cdef public unsigned ref - * def __init__(self, unsigned ref): # <<<<<<<<<<<<<< - * """NTRef(int ref) -> Non-terminal reference.""" - * self.ref = ref - */ - - /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":27 - * self.ref = ref - * - * def __str__(self): # <<<<<<<<<<<<<< - * return '[%d]' % self.ref - * - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_5NTRef_3__str__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_5NTRef_3__str__(PyObject *__pyx_v_self) { @@ -6179,12 +5794,18 @@ static PyObject *__pyx_pw_4cdec_5_cdec_5NTRef_3__str__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__str__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_5NTRef_2__str__(((struct __pyx_obj_4cdec_5_cdec_NTRef *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":27 + * self.ref = ref + * + * def __str__(self): # <<<<<<<<<<<<<< + * return '[%d]' % self.ref + * + */ + static PyObject *__pyx_pf_4cdec_5_cdec_5NTRef_2__str__(struct __pyx_obj_4cdec_5_cdec_NTRef *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -6195,7 +5816,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5NTRef_2__str__(struct __pyx_obj_4cdec_5_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__str__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":28 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":28 * * def __str__(self): * return '[%d]' % self.ref # <<<<<<<<<<<<<< @@ -6203,24 +5824,17 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5NTRef_2__str__(struct __pyx_obj_4cdec_5_ * cdef TRule convert_rule(_sa.Rule rule): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->ref); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyLong_FromUnsignedLong(__pyx_v_self->ref); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_d, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_10), __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_r = __pyx_t_2; + __pyx_r = ((PyObject *)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":27 - * self.ref = ref - * - * def __str__(self): # <<<<<<<<<<<<<< - * return '[%d]' % self.ref - * - */ - - /* 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); @@ -6232,14 +5846,6 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5NTRef_2__str__(struct __pyx_obj_4cdec_5_ return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":22 - * - * cdef class NTRef: - * cdef public unsigned ref # <<<<<<<<<<<<<< - * def __init__(self, unsigned ref): - * """NTRef(int ref) -> Non-terminal reference.""" - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_5NTRef_3ref_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_5NTRef_3ref_1__get__(PyObject *__pyx_v_self) { @@ -6247,12 +5853,18 @@ static PyObject *__pyx_pw_4cdec_5_cdec_5NTRef_3ref_1__get__(PyObject *__pyx_v_se __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_5NTRef_3ref___get__(((struct __pyx_obj_4cdec_5_cdec_NTRef *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":22 + * + * cdef class NTRef: + * cdef public unsigned ref # <<<<<<<<<<<<<< + * def __init__(self, unsigned ref): + * """NTRef(int ref) -> Non-terminal reference.""" + */ + static PyObject *__pyx_pf_4cdec_5_cdec_5NTRef_3ref___get__(struct __pyx_obj_4cdec_5_cdec_NTRef *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -6262,13 +5874,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5NTRef_3ref___get__(struct __pyx_obj_4cde int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->ref); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyLong_FromUnsignedLong(__pyx_v_self->ref); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cdec._cdec.NTRef.ref.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -6286,8 +5899,6 @@ static int __pyx_pw_4cdec_5_cdec_5NTRef_3ref_3__set__(PyObject *__pyx_v_self, Py __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_5NTRef_3ref_2__set__(((struct __pyx_obj_4cdec_5_cdec_NTRef *)__pyx_v_self), ((PyObject *)__pyx_v_value)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -6300,10 +5911,9 @@ static int __pyx_pf_4cdec_5_cdec_5NTRef_3ref_2__set__(struct __pyx_obj_4cdec_5_c const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_AsUnsignedInt(__pyx_v_value); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->ref = __pyx_t_1; - /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; @@ -6314,7 +5924,7 @@ static int __pyx_pf_4cdec_5_cdec_5NTRef_3ref_2__set__(struct __pyx_obj_4cdec_5_c return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":30 +/* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":30 * return '[%d]' % self.ref * * cdef TRule convert_rule(_sa.Rule rule): # <<<<<<<<<<<<<< @@ -6345,7 +5955,7 @@ static struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_f_4cdec_5_cdec_convert_rule(st int __pyx_clineno = 0; __Pyx_RefNannySetupContext("convert_rule", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":31 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":31 * * cdef TRule convert_rule(_sa.Rule rule): * lhs = _sa.sym_tocat(rule.lhs) # <<<<<<<<<<<<<< @@ -6354,7 +5964,7 @@ static struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_f_4cdec_5_cdec_convert_rule(st */ __pyx_v_lhs = __pyx_f_4cdec_2sa_3_sa_sym_tocat(__pyx_v_rule->lhs); - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":32 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":32 * cdef TRule convert_rule(_sa.Rule rule): * lhs = _sa.sym_tocat(rule.lhs) * scores = dict(rule.scores) # <<<<<<<<<<<<<< @@ -6366,13 +5976,13 @@ static struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_f_4cdec_5_cdec_convert_rule(st __Pyx_INCREF(((PyObject *)__pyx_v_rule->scores)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_rule->scores)); __Pyx_GIVEREF(((PyObject *)__pyx_v_rule->scores)); - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyDict_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyDict_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_scores = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":33 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":33 * lhs = _sa.sym_tocat(rule.lhs) * scores = dict(rule.scores) * f, e = [], [] # <<<<<<<<<<<<<< @@ -6388,7 +5998,7 @@ static struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_f_4cdec_5_cdec_convert_rule(st __pyx_v_e = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":34 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":34 * scores = dict(rule.scores) * f, e = [], [] * cdef int* fsyms = rule.f.syms # <<<<<<<<<<<<<< @@ -6398,7 +6008,7 @@ static struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_f_4cdec_5_cdec_convert_rule(st __pyx_t_3 = __pyx_v_rule->f->syms; __pyx_v_fsyms = __pyx_t_3; - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":35 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":35 * f, e = [], [] * cdef int* fsyms = rule.f.syms * for i in range(rule.f.n): # <<<<<<<<<<<<<< @@ -6409,7 +6019,7 @@ static struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_f_4cdec_5_cdec_convert_rule(st for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { __pyx_v_i = __pyx_t_5; - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":36 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":36 * cdef int* fsyms = rule.f.syms * for i in range(rule.f.n): * if _sa.sym_isvar(fsyms[i]): # <<<<<<<<<<<<<< @@ -6419,7 +6029,7 @@ static struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_f_4cdec_5_cdec_convert_rule(st __pyx_t_6 = (__pyx_f_4cdec_2sa_3_sa_sym_isvar((__pyx_v_fsyms[__pyx_v_i])) != 0); if (__pyx_t_6) { - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":37 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":37 * for i in range(rule.f.n): * if _sa.sym_isvar(fsyms[i]): * f.append(NT(_sa.sym_tocat(fsyms[i]))) # <<<<<<<<<<<<<< @@ -6427,22 +6037,22 @@ static struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_f_4cdec_5_cdec_convert_rule(st * f.append(_sa.sym_tostring(fsyms[i])) */ __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_f_4cdec_2sa_3_sa_sym_tocat((__pyx_v_fsyms[__pyx_v_i]))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); + __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); - __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_1)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_NT)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_NT)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_f, __pyx_t_1); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L5; } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":39 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":39 * f.append(NT(_sa.sym_tocat(fsyms[i]))) * else: * f.append(_sa.sym_tostring(fsyms[i])) # <<<<<<<<<<<<<< @@ -6450,14 +6060,14 @@ static struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_f_4cdec_5_cdec_convert_rule(st * for i in range(rule.e.n): */ __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_f_4cdec_2sa_3_sa_sym_tostring((__pyx_v_fsyms[__pyx_v_i]))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_f, __pyx_t_1); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_f, ((PyObject *)__pyx_t_1)); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; } __pyx_L5:; } - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":40 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":40 * else: * f.append(_sa.sym_tostring(fsyms[i])) * cdef int* esyms = rule.e.syms # <<<<<<<<<<<<<< @@ -6467,7 +6077,7 @@ static struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_f_4cdec_5_cdec_convert_rule(st __pyx_t_3 = __pyx_v_rule->e->syms; __pyx_v_esyms = __pyx_t_3; - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":41 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":41 * f.append(_sa.sym_tostring(fsyms[i])) * cdef int* esyms = rule.e.syms * for i in range(rule.e.n): # <<<<<<<<<<<<<< @@ -6478,7 +6088,7 @@ static struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_f_4cdec_5_cdec_convert_rule(st for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { __pyx_v_i = __pyx_t_5; - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":42 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":42 * cdef int* esyms = rule.e.syms * for i in range(rule.e.n): * if _sa.sym_isvar(esyms[i]): # <<<<<<<<<<<<<< @@ -6488,30 +6098,30 @@ static struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_f_4cdec_5_cdec_convert_rule(st __pyx_t_6 = (__pyx_f_4cdec_2sa_3_sa_sym_isvar((__pyx_v_esyms[__pyx_v_i])) != 0); if (__pyx_t_6) { - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":43 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":43 * for i in range(rule.e.n): * if _sa.sym_isvar(esyms[i]): * e.append(NTRef(_sa.sym_getindex(esyms[i]))) # <<<<<<<<<<<<<< * else: * e.append(_sa.sym_tostring(esyms[i])) */ - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_f_4cdec_2sa_3_sa_sym_getindex((__pyx_v_esyms[__pyx_v_i]))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyInt_FromLong(__pyx_f_4cdec_2sa_3_sa_sym_getindex((__pyx_v_esyms[__pyx_v_i]))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 43; __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 = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_NTRef)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_NTRef)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_e, __pyx_t_1); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L8; } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":45 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":45 * e.append(NTRef(_sa.sym_getindex(esyms[i]))) * else: * e.append(_sa.sym_tostring(esyms[i])) # <<<<<<<<<<<<<< @@ -6519,23 +6129,23 @@ static struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_f_4cdec_5_cdec_convert_rule(st * return TRule(lhs, f, e, scores, a) */ __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_f_4cdec_2sa_3_sa_sym_tostring((__pyx_v_esyms[__pyx_v_i]))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_e, __pyx_t_1); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_e, ((PyObject *)__pyx_t_1)); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; } __pyx_L8:; } - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":46 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":46 * else: * e.append(_sa.sym_tostring(esyms[i])) * a = list(rule.alignments()) # <<<<<<<<<<<<<< * return TRule(lhs, f, e, scores, a) * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_rule), __pyx_n_s_alignments); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_rule), __pyx_n_s__alignments); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -6543,13 +6153,13 @@ static struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_f_4cdec_5_cdec_convert_rule(st PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyList_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_v_a = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":47 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":47 * e.append(_sa.sym_tostring(esyms[i])) * a = list(rule.alignments()) * return TRule(lhs, f, e, scores, a) # <<<<<<<<<<<<<< @@ -6558,40 +6168,33 @@ static struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_f_4cdec_5_cdec_convert_rule(st */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_lhs); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); + __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); - __Pyx_GIVEREF(__pyx_t_2); - __Pyx_INCREF(__pyx_v_f); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_f); - __Pyx_GIVEREF(__pyx_v_f); - __Pyx_INCREF(__pyx_v_e); - PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_e); - __Pyx_GIVEREF(__pyx_v_e); - __Pyx_INCREF(__pyx_v_scores); - PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_scores); - __Pyx_GIVEREF(__pyx_v_scores); - __Pyx_INCREF(__pyx_v_a); - PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_v_a); - __Pyx_GIVEREF(__pyx_v_a); + PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_2)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); + __Pyx_INCREF(((PyObject *)__pyx_v_f)); + PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_f)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_f)); + __Pyx_INCREF(((PyObject *)__pyx_v_e)); + PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_v_e)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_e)); + __Pyx_INCREF(((PyObject *)__pyx_v_scores)); + PyTuple_SET_ITEM(__pyx_t_1, 3, ((PyObject *)__pyx_v_scores)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_scores)); + __Pyx_INCREF(((PyObject *)__pyx_v_a)); + PyTuple_SET_ITEM(__pyx_t_1, 4, ((PyObject *)__pyx_v_a)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_a)); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_TRule)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_TRule)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_r = ((struct __pyx_obj_4cdec_5_cdec_TRule *)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":30 - * return '[%d]' % self.ref - * - * cdef TRule convert_rule(_sa.Rule rule): # <<<<<<<<<<<<<< - * lhs = _sa.sym_tocat(rule.lhs) - * scores = dict(rule.scores) - */ - - /* function exit code */ + __pyx_r = ((struct __pyx_obj_4cdec_5_cdec_TRule *)Py_None); __Pyx_INCREF(Py_None); + goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); @@ -6607,14 +6210,6 @@ static struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_f_4cdec_5_cdec_convert_rule(st return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":52 - * cdef shared_ptr[grammar.TRule]* rule - * - * def __init__(self, lhs, f, e, scores, a=None, text=None): # <<<<<<<<<<<<<< - * """TRule(lhs, f, e, scores, a=None) -> Translation rule. - * lhs: left hand side non-terminal - */ - /* Python wrapper */ static int __pyx_pw_4cdec_5_cdec_5TRule_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4cdec_5_cdec_5TRule___init__[] = "TRule(lhs, f, e, scores, a=None) -> Translation rule.\n lhs: left hand side non-terminal\n f: source phrase (list of words/NT)\n e: target phrase (list of words/NTRef)\n scores: dictionary of feature scores\n a: optional list of alignment points"; @@ -6635,8 +6230,16 @@ static int __pyx_pw_4cdec_5_cdec_5TRule_1__init__(PyObject *__pyx_v_self, PyObje __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lhs,&__pyx_n_s_f,&__pyx_n_s_e,&__pyx_n_s_scores,&__pyx_n_s_a,&__pyx_n_s_text,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__lhs,&__pyx_n_s__f,&__pyx_n_s__e,&__pyx_n_s__scores,&__pyx_n_s__a,&__pyx_n_s__text,0}; PyObject* values[6] = {0,0,0,0,0,0}; + + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":52 + * cdef shared_ptr[grammar.TRule]* rule + * + * def __init__(self, lhs, f, e, scores, a=None, text=None): # <<<<<<<<<<<<<< + * """TRule(lhs, f, e, scores, a=None) -> Translation rule. + * lhs: left hand side non-terminal + */ values[4] = ((PyObject *)Py_None); values[5] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { @@ -6655,31 +6258,31 @@ static int __pyx_pw_4cdec_5_cdec_5TRule_1__init__(PyObject *__pyx_v_self, PyObje kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_lhs)) != 0)) kw_args--; + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__lhs)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: - if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_f)) != 0)) kw_args--; + if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__f)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 0, 4, 6, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: - if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_e)) != 0)) kw_args--; + if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__e)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 0, 4, 6, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: - if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_scores)) != 0)) kw_args--; + if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__scores)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 0, 4, 6, 3); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 4: if (kw_args > 0) { - PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_a); + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__a); if (value) { values[4] = value; kw_args--; } } case 5: if (kw_args > 0) { - PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_text); + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__text); if (value) { values[5] = value; kw_args--; } } } @@ -6714,8 +6317,6 @@ static int __pyx_pw_4cdec_5_cdec_5TRule_1__init__(PyObject *__pyx_v_self, PyObje return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4cdec_5_cdec_5TRule___init__(((struct __pyx_obj_4cdec_5_cdec_TRule *)__pyx_v_self), __pyx_v_lhs, __pyx_v_f, __pyx_v_e, __pyx_v_scores, __pyx_v_a, __pyx_v_text); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -6731,7 +6332,7 @@ static int __pyx_pf_4cdec_5_cdec_5TRule___init__(struct __pyx_obj_4cdec_5_cdec_T int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":59 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":59 * scores: dictionary of feature scores * a: optional list of alignment points""" * self.rule = new shared_ptr[grammar.TRule](new grammar.TRule()) # <<<<<<<<<<<<<< @@ -6746,7 +6347,7 @@ static int __pyx_pf_4cdec_5_cdec_5TRule___init__(struct __pyx_obj_4cdec_5_cdec_T } __pyx_v_self->rule = new boost::shared_ptr(__pyx_t_1); - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":60 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":60 * a: optional list of alignment points""" * self.rule = new shared_ptr[grammar.TRule](new grammar.TRule()) * if lhs: # <<<<<<<<<<<<<< @@ -6756,19 +6357,19 @@ static int __pyx_pf_4cdec_5_cdec_5TRule___init__(struct __pyx_obj_4cdec_5_cdec_T __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_lhs); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":61 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":61 * self.rule = new shared_ptr[grammar.TRule](new grammar.TRule()) * if lhs: * self.lhs = lhs # <<<<<<<<<<<<<< * if e: * self.e = e */ - if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_lhs, __pyx_v_lhs) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__lhs, __pyx_v_lhs) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L3; } __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":62 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":62 * if lhs: * self.lhs = lhs * if e: # <<<<<<<<<<<<<< @@ -6778,19 +6379,19 @@ static int __pyx_pf_4cdec_5_cdec_5TRule___init__(struct __pyx_obj_4cdec_5_cdec_T __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_e); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":63 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":63 * self.lhs = lhs * if e: * self.e = e # <<<<<<<<<<<<<< * if f: * self.f = f */ - if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_e, __pyx_v_e) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__e, __pyx_v_e) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L4; } __pyx_L4:; - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":64 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":64 * if e: * self.e = e * if f: # <<<<<<<<<<<<<< @@ -6800,19 +6401,19 @@ static int __pyx_pf_4cdec_5_cdec_5TRule___init__(struct __pyx_obj_4cdec_5_cdec_T __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_f); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":65 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":65 * self.e = e * if f: * self.f = f # <<<<<<<<<<<<<< * if scores: * self.scores = scores */ - if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_f, __pyx_v_f) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__f, __pyx_v_f) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L5; } __pyx_L5:; - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":66 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":66 * if f: * self.f = f * if scores: # <<<<<<<<<<<<<< @@ -6822,19 +6423,19 @@ static int __pyx_pf_4cdec_5_cdec_5TRule___init__(struct __pyx_obj_4cdec_5_cdec_T __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_scores); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":67 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":67 * self.f = f * if scores: * self.scores = scores # <<<<<<<<<<<<<< * if a: * self.a = a */ - if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_scores, __pyx_v_scores) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__scores, __pyx_v_scores) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L6; } __pyx_L6:; - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":68 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":68 * if scores: * self.scores = scores * if a: # <<<<<<<<<<<<<< @@ -6844,19 +6445,19 @@ static int __pyx_pf_4cdec_5_cdec_5TRule___init__(struct __pyx_obj_4cdec_5_cdec_T __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_a); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":69 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":69 * self.scores = scores * if a: * self.a = a # <<<<<<<<<<<<<< * if text: * self.rule.get().ReadFromString(text, 0) */ - if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_a, __pyx_v_a) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__a, __pyx_v_a) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} goto __pyx_L7; } __pyx_L7:; - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":70 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":70 * if a: * self.a = a * if text: # <<<<<<<<<<<<<< @@ -6866,7 +6467,7 @@ static int __pyx_pf_4cdec_5_cdec_5TRule___init__(struct __pyx_obj_4cdec_5_cdec_T __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_text); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":71 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":71 * self.a = a * if text: * self.rule.get().ReadFromString(text, 0) # <<<<<<<<<<<<<< @@ -6879,7 +6480,7 @@ static int __pyx_pf_4cdec_5_cdec_5TRule___init__(struct __pyx_obj_4cdec_5_cdec_T } __pyx_L8:; - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":72 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":72 * if text: * self.rule.get().ReadFromString(text, 0) * self.rule.get().ComputeArity() # <<<<<<<<<<<<<< @@ -6888,15 +6489,6 @@ static int __pyx_pf_4cdec_5_cdec_5TRule___init__(struct __pyx_obj_4cdec_5_cdec_T */ __pyx_v_self->rule->get()->ComputeArity(); - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":52 - * cdef shared_ptr[grammar.TRule]* rule - * - * def __init__(self, lhs, f, e, scores, a=None, text=None): # <<<<<<<<<<<<<< - * """TRule(lhs, f, e, scores, a=None) -> Translation rule. - * lhs: left hand side non-terminal - */ - - /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; @@ -6907,30 +6499,28 @@ static int __pyx_pf_4cdec_5_cdec_5TRule___init__(struct __pyx_obj_4cdec_5_cdec_T return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":74 - * self.rule.get().ComputeArity() - * - * def __dealloc__(self): # <<<<<<<<<<<<<< - * del self.rule - * - */ - /* Python wrapper */ static void __pyx_pw_4cdec_5_cdec_5TRule_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_4cdec_5_cdec_5TRule_3__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_4cdec_5_cdec_5TRule_2__dealloc__(((struct __pyx_obj_4cdec_5_cdec_TRule *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); } -static void __pyx_pf_4cdec_5_cdec_5TRule_2__dealloc__(struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self) { +/* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":74 + * self.rule.get().ComputeArity() + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * del self.rule + * + */ + +static void __pyx_pf_4cdec_5_cdec_5TRule_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":75 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":75 * * def __dealloc__(self): * del self.rule # <<<<<<<<<<<<<< @@ -6939,26 +6529,9 @@ static void __pyx_pf_4cdec_5_cdec_5TRule_2__dealloc__(struct __pyx_obj_4cdec_5_c */ delete __pyx_v_self->rule; - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":74 - * self.rule.get().ComputeArity() - * - * def __dealloc__(self): # <<<<<<<<<<<<<< - * del self.rule - * - */ - - /* function exit code */ __Pyx_RefNannyFinishContext(); } -/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":78 - * - * property arity: - * def __get__(self): # <<<<<<<<<<<<<< - * return self.rule.get().arity_ - * - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_5TRule_5arity_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_5TRule_5arity_1__get__(PyObject *__pyx_v_self) { @@ -6966,12 +6539,18 @@ static PyObject *__pyx_pw_4cdec_5_cdec_5TRule_5arity_1__get__(PyObject *__pyx_v_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_5TRule_5arity___get__(((struct __pyx_obj_4cdec_5_cdec_TRule *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":78 + * + * property arity: + * def __get__(self): # <<<<<<<<<<<<<< + * return self.rule.get().arity_ + * + */ + static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_5arity___get__(struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -6981,7 +6560,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_5arity___get__(struct __pyx_obj_4c int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":79 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":79 * property arity: * def __get__(self): * return self.rule.get().arity_ # <<<<<<<<<<<<<< @@ -6989,21 +6568,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_5arity___get__(struct __pyx_obj_4c * property f: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->rule->get()->arity_); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyInt_FromLong(__pyx_v_self->rule->get()->arity_); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":78 - * - * property arity: - * def __get__(self): # <<<<<<<<<<<<<< - * return self.rule.get().arity_ - * - */ - - /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cdec._cdec.TRule.arity.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -7014,14 +6586,6 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_5arity___get__(struct __pyx_obj_4c return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":82 - * - * property f: - * def __get__(self): # <<<<<<<<<<<<<< - * cdef vector[WordID]* f_ = &self.rule.get().f_ - * cdef WordID w - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_5TRule_1f_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_5TRule_1f_1__get__(PyObject *__pyx_v_self) { @@ -7029,12 +6593,18 @@ static PyObject *__pyx_pw_4cdec_5_cdec_5TRule_1f_1__get__(PyObject *__pyx_v_self __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_5TRule_1f___get__(((struct __pyx_obj_4cdec_5_cdec_TRule *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":82 + * + * property f: + * def __get__(self): # <<<<<<<<<<<<<< + * cdef vector[WordID]* f_ = &self.rule.get().f_ + * cdef WordID w + */ + static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_1f___get__(struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self) { std::vector *__pyx_v_f_; WordID __pyx_v_w; @@ -7049,13 +6619,12 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_1f___get__(struct __pyx_obj_4cdec_ int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; - int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":83 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":83 * property f: * def __get__(self): * cdef vector[WordID]* f_ = &self.rule.get().f_ # <<<<<<<<<<<<<< @@ -7064,7 +6633,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_1f___get__(struct __pyx_obj_4cdec_ */ __pyx_v_f_ = (&__pyx_v_self->rule->get()->f_); - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":85 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":85 * cdef vector[WordID]* f_ = &self.rule.get().f_ * cdef WordID w * cdef f = [] # <<<<<<<<<<<<<< @@ -7073,10 +6642,10 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_1f___get__(struct __pyx_obj_4cdec_ */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_v_f = __pyx_t_1; + __pyx_v_f = ((PyObject *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":87 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":87 * cdef f = [] * cdef unsigned i * cdef int idx = 0 # <<<<<<<<<<<<<< @@ -7085,7 +6654,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_1f___get__(struct __pyx_obj_4cdec_ */ __pyx_v_idx = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":88 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":88 * cdef unsigned i * cdef int idx = 0 * for i in range(f_.size()): # <<<<<<<<<<<<<< @@ -7096,7 +6665,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_1f___get__(struct __pyx_obj_4cdec_ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { __pyx_v_i = __pyx_t_3; - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":89 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":89 * cdef int idx = 0 * for i in range(f_.size()): * w = f_[0][i] # <<<<<<<<<<<<<< @@ -7105,7 +6674,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_1f___get__(struct __pyx_obj_4cdec_ */ __pyx_v_w = ((__pyx_v_f_[0])[__pyx_v_i]); - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":90 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":90 * for i in range(f_.size()): * w = f_[0][i] * if w < 0: # <<<<<<<<<<<<<< @@ -7115,7 +6684,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_1f___get__(struct __pyx_obj_4cdec_ __pyx_t_4 = ((__pyx_v_w < 0) != 0); if (__pyx_t_4) { - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":91 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":91 * w = f_[0][i] * if w < 0: * idx += 1 # <<<<<<<<<<<<<< @@ -7124,7 +6693,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_1f___get__(struct __pyx_obj_4cdec_ */ __pyx_v_idx = (__pyx_v_idx + 1); - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":92 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":92 * if w < 0: * idx += 1 * f.append(NT(TDConvert(-w).c_str(), idx)) # <<<<<<<<<<<<<< @@ -7132,54 +6701,58 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_1f___get__(struct __pyx_obj_4cdec_ * f.append(unicode(TDConvert(w).c_str(), encoding='utf8')) */ __pyx_t_1 = __Pyx_PyBytes_FromString(TD::Convert((-__pyx_v_w)).c_str()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_idx); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __pyx_t_5 = PyInt_FromLong(__pyx_v_idx); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); - __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_1)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_1 = 0; __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_NT)), __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_NT)), ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_7 = __Pyx_PyObject_Append(__pyx_v_f, __pyx_t_5); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_f, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L5; } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":94 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":94 * f.append(NT(TDConvert(-w).c_str(), idx)) * else: * f.append(unicode(TDConvert(w).c_str(), encoding='utf8')) # <<<<<<<<<<<<<< * return f * */ - __pyx_t_5 = __Pyx_PyBytes_FromString(TD::Convert(__pyx_v_w).c_str()); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_6); - PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); - __Pyx_GIVEREF(__pyx_t_5); - __pyx_t_5 = 0; - __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyBytes_FromString(TD::Convert(__pyx_v_w).c_str()); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_6)); + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_encoding, __pyx_n_s_utf8) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), __pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_6)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_6)); + __pyx_t_6 = 0; + __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_6)); + if (PyDict_SetItem(__pyx_t_6, ((PyObject *)__pyx_n_s__encoding), ((PyObject *)__pyx_n_s__utf8)) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), ((PyObject *)__pyx_t_5), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 94; __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_5); __pyx_t_5 = 0; - __pyx_t_7 = __Pyx_PyObject_Append(__pyx_v_f, __pyx_t_1); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_f, __pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __pyx_L5:; } - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":95 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":95 * else: * f.append(unicode(TDConvert(w).c_str(), encoding='utf8')) * return f # <<<<<<<<<<<<<< @@ -7191,15 +6764,8 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_1f___get__(struct __pyx_obj_4cdec_ __pyx_r = __pyx_v_f; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":82 - * - * property f: - * def __get__(self): # <<<<<<<<<<<<<< - * cdef vector[WordID]* f_ = &self.rule.get().f_ - * cdef WordID w - */ - - /* 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_5); @@ -7213,14 +6779,6 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_1f___get__(struct __pyx_obj_4cdec_ return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":97 - * return f - * - * def __set__(self, f): # <<<<<<<<<<<<<< - * cdef vector[WordID]* f_ = &self.rule.get().f_ - * f_.resize(len(f)) - */ - /* Python wrapper */ static int __pyx_pw_4cdec_5_cdec_5TRule_1f_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_f); /*proto*/ static int __pyx_pw_4cdec_5_cdec_5TRule_1f_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_f) { @@ -7228,12 +6786,18 @@ static int __pyx_pw_4cdec_5_cdec_5TRule_1f_3__set__(PyObject *__pyx_v_self, PyOb __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_5TRule_1f_2__set__(((struct __pyx_obj_4cdec_5_cdec_TRule *)__pyx_v_self), ((PyObject *)__pyx_v_f)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":97 + * return f + * + * def __set__(self, f): # <<<<<<<<<<<<<< + * cdef vector[WordID]* f_ = &self.rule.get().f_ + * f_.resize(len(f)) + */ + static int __pyx_pf_4cdec_5_cdec_5TRule_1f_2__set__(struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self, PyObject *__pyx_v_f) { std::vector *__pyx_v_f_; unsigned int __pyx_v_i; @@ -7253,7 +6817,7 @@ static int __pyx_pf_4cdec_5_cdec_5TRule_1f_2__set__(struct __pyx_obj_4cdec_5_cde int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":98 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":98 * * def __set__(self, f): * cdef vector[WordID]* f_ = &self.rule.get().f_ # <<<<<<<<<<<<<< @@ -7262,7 +6826,7 @@ static int __pyx_pf_4cdec_5_cdec_5TRule_1f_2__set__(struct __pyx_obj_4cdec_5_cde */ __pyx_v_f_ = (&__pyx_v_self->rule->get()->f_); - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":99 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":99 * def __set__(self, f): * cdef vector[WordID]* f_ = &self.rule.get().f_ * f_.resize(len(f)) # <<<<<<<<<<<<<< @@ -7272,7 +6836,7 @@ static int __pyx_pf_4cdec_5_cdec_5TRule_1f_2__set__(struct __pyx_obj_4cdec_5_cde __pyx_t_1 = PyObject_Length(__pyx_v_f); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_f_->resize(__pyx_t_1); - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":101 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":101 * f_.resize(len(f)) * cdef unsigned i * cdef int idx = 0 # <<<<<<<<<<<<<< @@ -7281,7 +6845,7 @@ static int __pyx_pf_4cdec_5_cdec_5TRule_1f_2__set__(struct __pyx_obj_4cdec_5_cde */ __pyx_v_idx = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":102 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":102 * cdef unsigned i * cdef int idx = 0 * for i in range(len(f)): # <<<<<<<<<<<<<< @@ -7292,73 +6856,65 @@ static int __pyx_pf_4cdec_5_cdec_5TRule_1f_2__set__(struct __pyx_obj_4cdec_5_cde for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":103 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":103 * cdef int idx = 0 * for i in range(len(f)): * if isinstance(f[i], NT): # <<<<<<<<<<<<<< * f_[0][i] = -TDConvert(( f[i]).cat) * else: */ - __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_f, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_f, __pyx_v_i, sizeof(unsigned int)+1, PyLong_FromUnsignedLong, 0, 0, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_TypeCheck(__pyx_t_3, ((PyObject*)__pyx_ptype_4cdec_5_cdec_NT)); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":104 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":104 * for i in range(len(f)): * if isinstance(f[i], NT): * f_[0][i] = -TDConvert(( f[i]).cat) # <<<<<<<<<<<<<< * else: * fi = as_str(f[i]) */ - __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_f, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_f, __pyx_v_i, sizeof(unsigned int)+1, PyLong_FromUnsignedLong, 0, 0, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = __Pyx_PyObject_AsString(((struct __pyx_obj_4cdec_5_cdec_NT *)__pyx_t_3)->cat); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_AsString(((PyObject *)((struct __pyx_obj_4cdec_5_cdec_NT *)__pyx_t_3)->cat)); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; ((__pyx_v_f_[0])[__pyx_v_i]) = (-TD::Convert(__pyx_t_6)); goto __pyx_L5; } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":106 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":106 * f_[0][i] = -TDConvert(( f[i]).cat) * else: * fi = as_str(f[i]) # <<<<<<<<<<<<<< * f_[0][i] = TDConvert(fi) * */ - __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_f, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_f, __pyx_v_i, sizeof(unsigned int)+1, PyLong_FromUnsignedLong, 0, 0, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = __pyx_f_4cdec_5_cdec_as_str(__pyx_t_3, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = ((PyObject *)__pyx_f_4cdec_5_cdec_as_str(__pyx_t_3, NULL)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_XDECREF_SET(__pyx_v_fi, ((PyObject*)__pyx_t_7)); + __Pyx_XDECREF(((PyObject *)__pyx_v_fi)); + __pyx_v_fi = ((PyObject*)__pyx_t_7); __pyx_t_7 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":107 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":107 * else: * fi = as_str(f[i]) * f_[0][i] = TDConvert(fi) # <<<<<<<<<<<<<< * * property e: */ - __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_v_fi); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_AsString(((PyObject *)__pyx_v_fi)); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;} ((__pyx_v_f_[0])[__pyx_v_i]) = TD::Convert(__pyx_t_6); } __pyx_L5:; } - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":97 - * return f - * - * def __set__(self, f): # <<<<<<<<<<<<<< - * cdef vector[WordID]* f_ = &self.rule.get().f_ - * f_.resize(len(f)) - */ - - /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; @@ -7372,14 +6928,6 @@ static int __pyx_pf_4cdec_5_cdec_5TRule_1f_2__set__(struct __pyx_obj_4cdec_5_cde return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":110 - * - * property e: - * def __get__(self): # <<<<<<<<<<<<<< - * cdef vector[WordID]* e_ = &self.rule.get().e_ - * cdef WordID w - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_5TRule_1e_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_5TRule_1e_1__get__(PyObject *__pyx_v_self) { @@ -7387,12 +6935,18 @@ static PyObject *__pyx_pw_4cdec_5_cdec_5TRule_1e_1__get__(PyObject *__pyx_v_self __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_5TRule_1e___get__(((struct __pyx_obj_4cdec_5_cdec_TRule *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":110 + * + * property e: + * def __get__(self): # <<<<<<<<<<<<<< + * cdef vector[WordID]* e_ = &self.rule.get().e_ + * cdef WordID w + */ + static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_1e___get__(struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self) { std::vector *__pyx_v_e_; WordID __pyx_v_w; @@ -7406,14 +6960,13 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_1e___get__(struct __pyx_obj_4cdec_ unsigned int __pyx_t_3; int __pyx_t_4; PyObject *__pyx_t_5 = NULL; - int __pyx_t_6; - PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":111 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":111 * property e: * def __get__(self): * cdef vector[WordID]* e_ = &self.rule.get().e_ # <<<<<<<<<<<<<< @@ -7422,7 +6975,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_1e___get__(struct __pyx_obj_4cdec_ */ __pyx_v_e_ = (&__pyx_v_self->rule->get()->e_); - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":113 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":113 * cdef vector[WordID]* e_ = &self.rule.get().e_ * cdef WordID w * cdef e = [] # <<<<<<<<<<<<<< @@ -7431,10 +6984,10 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_1e___get__(struct __pyx_obj_4cdec_ */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_v_e = __pyx_t_1; + __pyx_v_e = ((PyObject *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":115 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":115 * cdef e = [] * cdef unsigned i * cdef int idx = 0 # <<<<<<<<<<<<<< @@ -7443,7 +6996,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_1e___get__(struct __pyx_obj_4cdec_ */ __pyx_v_idx = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":116 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":116 * cdef unsigned i * cdef int idx = 0 * for i in range(e_.size()): # <<<<<<<<<<<<<< @@ -7454,7 +7007,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_1e___get__(struct __pyx_obj_4cdec_ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { __pyx_v_i = __pyx_t_3; - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":117 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":117 * cdef int idx = 0 * for i in range(e_.size()): * w = e_[0][i] # <<<<<<<<<<<<<< @@ -7463,7 +7016,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_1e___get__(struct __pyx_obj_4cdec_ */ __pyx_v_w = ((__pyx_v_e_[0])[__pyx_v_i]); - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":118 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":118 * for i in range(e_.size()): * w = e_[0][i] * if w < 1: # <<<<<<<<<<<<<< @@ -7473,7 +7026,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_1e___get__(struct __pyx_obj_4cdec_ __pyx_t_4 = ((__pyx_v_w < 1) != 0); if (__pyx_t_4) { - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":119 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":119 * w = e_[0][i] * if w < 1: * idx += 1 # <<<<<<<<<<<<<< @@ -7482,57 +7035,61 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_1e___get__(struct __pyx_obj_4cdec_ */ __pyx_v_idx = (__pyx_v_idx + 1); - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":120 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":120 * if w < 1: * idx += 1 * e.append(NTRef(1-w)) # <<<<<<<<<<<<<< * else: * e.append(unicode(TDConvert(w).c_str(), encoding='utf8')) */ - __pyx_t_1 = __Pyx_PyInt_From_long((1 - __pyx_v_w)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyInt_FromLong((1 - __pyx_v_w)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_NTRef)), __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_NTRef)), ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_e, __pyx_t_1); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Append(__pyx_v_e, __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 120; __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_5); __pyx_t_5 = 0; goto __pyx_L5; } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":122 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":122 * e.append(NTRef(1-w)) * else: * e.append(unicode(TDConvert(w).c_str(), encoding='utf8')) # <<<<<<<<<<<<<< * return e * */ - __pyx_t_1 = __Pyx_PyBytes_FromString(TD::Convert(__pyx_v_w).c_str()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyBytes_FromString(TD::Convert(__pyx_v_w).c_str()); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_5)); + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_5)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_5)); + __pyx_t_5 = 0; + __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_5)); + if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__encoding), ((PyObject *)__pyx_n_s__utf8)) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), ((PyObject *)__pyx_t_1), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Append(__pyx_v_e, __pyx_t_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); - __Pyx_GIVEREF(__pyx_t_1); - __pyx_t_1 = 0; - __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_encoding, __pyx_n_s_utf8) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), __pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_6 = __Pyx_PyObject_Append(__pyx_v_e, __pyx_t_7); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __pyx_L5:; } - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":123 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":123 * else: * e.append(unicode(TDConvert(w).c_str(), encoding='utf8')) * return e # <<<<<<<<<<<<<< @@ -7544,19 +7101,12 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_1e___get__(struct __pyx_obj_4cdec_ __pyx_r = __pyx_v_e; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":110 - * - * property e: - * def __get__(self): # <<<<<<<<<<<<<< - * cdef vector[WordID]* e_ = &self.rule.get().e_ - * cdef WordID w - */ - - /* 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_5); - __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("cdec._cdec.TRule.e.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -7566,14 +7116,6 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_1e___get__(struct __pyx_obj_4cdec_ return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":125 - * return e - * - * def __set__(self, e): # <<<<<<<<<<<<<< - * cdef vector[WordID]* e_ = &self.rule.get().e_ - * e_.resize(len(e)) - */ - /* Python wrapper */ static int __pyx_pw_4cdec_5_cdec_5TRule_1e_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_e); /*proto*/ static int __pyx_pw_4cdec_5_cdec_5TRule_1e_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_e) { @@ -7581,12 +7123,18 @@ static int __pyx_pw_4cdec_5_cdec_5TRule_1e_3__set__(PyObject *__pyx_v_self, PyOb __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_5TRule_1e_2__set__(((struct __pyx_obj_4cdec_5_cdec_TRule *)__pyx_v_self), ((PyObject *)__pyx_v_e)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":125 + * return e + * + * def __set__(self, e): # <<<<<<<<<<<<<< + * cdef vector[WordID]* e_ = &self.rule.get().e_ + * e_.resize(len(e)) + */ + static int __pyx_pf_4cdec_5_cdec_5TRule_1e_2__set__(struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self, PyObject *__pyx_v_e) { std::vector *__pyx_v_e_; unsigned int __pyx_v_i; @@ -7606,7 +7154,7 @@ static int __pyx_pf_4cdec_5_cdec_5TRule_1e_2__set__(struct __pyx_obj_4cdec_5_cde int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":126 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":126 * * def __set__(self, e): * cdef vector[WordID]* e_ = &self.rule.get().e_ # <<<<<<<<<<<<<< @@ -7615,7 +7163,7 @@ static int __pyx_pf_4cdec_5_cdec_5TRule_1e_2__set__(struct __pyx_obj_4cdec_5_cde */ __pyx_v_e_ = (&__pyx_v_self->rule->get()->e_); - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":127 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":127 * def __set__(self, e): * cdef vector[WordID]* e_ = &self.rule.get().e_ * e_.resize(len(e)) # <<<<<<<<<<<<<< @@ -7625,7 +7173,7 @@ static int __pyx_pf_4cdec_5_cdec_5TRule_1e_2__set__(struct __pyx_obj_4cdec_5_cde __pyx_t_1 = PyObject_Length(__pyx_v_e); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_e_->resize(__pyx_t_1); - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":129 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":129 * e_.resize(len(e)) * cdef unsigned i * for i in range(len(e)): # <<<<<<<<<<<<<< @@ -7636,79 +7184,71 @@ static int __pyx_pf_4cdec_5_cdec_5TRule_1e_2__set__(struct __pyx_obj_4cdec_5_cde for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":130 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":130 * cdef unsigned i * for i in range(len(e)): * if isinstance(e[i], NTRef): # <<<<<<<<<<<<<< * e_[0][i] = 1-e[i].ref * else: */ - __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_e, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_e, __pyx_v_i, sizeof(unsigned int)+1, PyLong_FromUnsignedLong, 0, 0, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_TypeCheck(__pyx_t_3, ((PyObject*)__pyx_ptype_4cdec_5_cdec_NTRef)); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":131 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":131 * for i in range(len(e)): * if isinstance(e[i], NTRef): * e_[0][i] = 1-e[i].ref # <<<<<<<<<<<<<< * else: * ei = as_str(e[i]) */ - __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_e, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_e, __pyx_v_i, sizeof(unsigned int)+1, PyLong_FromUnsignedLong, 0, 0, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_ref); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s__ref); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyNumber_Subtract(__pyx_int_1, __pyx_t_6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_7 = __Pyx_PyInt_As_WordID(__pyx_t_3); if (unlikely((__pyx_t_7 == (WordID)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyInt_from_py_WordID(__pyx_t_3); if (unlikely((__pyx_t_7 == (WordID)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; ((__pyx_v_e_[0])[__pyx_v_i]) = __pyx_t_7; goto __pyx_L5; } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":133 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":133 * e_[0][i] = 1-e[i].ref * else: * ei = as_str(e[i]) # <<<<<<<<<<<<<< * e_[0][i] = TDConvert(ei) * */ - __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_e, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_e, __pyx_v_i, sizeof(unsigned int)+1, PyLong_FromUnsignedLong, 0, 0, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = __pyx_f_4cdec_5_cdec_as_str(__pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = ((PyObject *)__pyx_f_4cdec_5_cdec_as_str(__pyx_t_3, NULL)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_XDECREF_SET(__pyx_v_ei, ((PyObject*)__pyx_t_6)); + __Pyx_XDECREF(((PyObject *)__pyx_v_ei)); + __pyx_v_ei = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":134 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":134 * else: * ei = as_str(e[i]) * e_[0][i] = TDConvert(ei) # <<<<<<<<<<<<<< * * property a: */ - __pyx_t_8 = __Pyx_PyObject_AsString(__pyx_v_ei); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_PyObject_AsString(((PyObject *)__pyx_v_ei)); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} ((__pyx_v_e_[0])[__pyx_v_i]) = TD::Convert(__pyx_t_8); } __pyx_L5:; } - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":125 - * return e - * - * def __set__(self, e): # <<<<<<<<<<<<<< - * cdef vector[WordID]* e_ = &self.rule.get().e_ - * e_.resize(len(e)) - */ - - /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; @@ -7723,14 +7263,6 @@ static int __pyx_pf_4cdec_5_cdec_5TRule_1e_2__set__(struct __pyx_obj_4cdec_5_cde } static PyObject *__pyx_gb_4cdec_5_cdec_5TRule_1a_2generator2(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":137 - * - * property a: - * def __get__(self): # <<<<<<<<<<<<<< - * cdef unsigned i - * cdef vector[grammar.AlignmentPoint]* a = &self.rule.get().a_ - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_5TRule_1a_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_5TRule_1a_1__get__(PyObject *__pyx_v_self) { @@ -7738,12 +7270,18 @@ static PyObject *__pyx_pw_4cdec_5_cdec_5TRule_1a_1__get__(PyObject *__pyx_v_self __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_5TRule_1a___get__(((struct __pyx_obj_4cdec_5_cdec_TRule *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":137 + * + * property a: + * def __get__(self): # <<<<<<<<<<<<<< + * cdef unsigned i + * cdef vector[grammar.AlignmentPoint]* a = &self.rule.get().a_ + */ + static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_1a___get__(struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self) { struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__ *__pyx_cur_scope; PyObject *__pyx_r = NULL; @@ -7768,7 +7306,6 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_1a___get__(struct __pyx_obj_4cdec_ return (PyObject *) gen; } - /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; @@ -7805,7 +7342,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_5TRule_1a_2generator2(__pyx_GeneratorObje __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":139 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":139 * def __get__(self): * cdef unsigned i * cdef vector[grammar.AlignmentPoint]* a = &self.rule.get().a_ # <<<<<<<<<<<<<< @@ -7814,7 +7351,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_5TRule_1a_2generator2(__pyx_GeneratorObje */ __pyx_cur_scope->__pyx_v_a = (&__pyx_cur_scope->__pyx_v_self->rule->get()->a_); - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":140 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":140 * cdef unsigned i * cdef vector[grammar.AlignmentPoint]* a = &self.rule.get().a_ * for i in range(a.size()): # <<<<<<<<<<<<<< @@ -7825,16 +7362,16 @@ static PyObject *__pyx_gb_4cdec_5_cdec_5TRule_1a_2generator2(__pyx_GeneratorObje for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_cur_scope->__pyx_v_i = __pyx_t_2; - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":141 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":141 * cdef vector[grammar.AlignmentPoint]* a = &self.rule.get().a_ * for i in range(a.size()): * yield (a[0][i].s_, a[0][i].t_) # <<<<<<<<<<<<<< * * def __set__(self, a): */ - __pyx_t_3 = __Pyx_PyInt_From_short(((__pyx_cur_scope->__pyx_v_a[0])[__pyx_cur_scope->__pyx_v_i]).s_); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyInt_FromLong(((__pyx_cur_scope->__pyx_v_a[0])[__pyx_cur_scope->__pyx_v_i]).s_); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyInt_From_short(((__pyx_cur_scope->__pyx_v_a[0])[__pyx_cur_scope->__pyx_v_i]).t_); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyInt_FromLong(((__pyx_cur_scope->__pyx_v_a[0])[__pyx_cur_scope->__pyx_v_i]).t_); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); @@ -7844,7 +7381,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_5TRule_1a_2generator2(__pyx_GeneratorObje __Pyx_GIVEREF(__pyx_t_4); __pyx_t_3 = 0; __pyx_t_4 = 0; - __pyx_r = __pyx_t_5; + __pyx_r = ((PyObject *)__pyx_t_5); __pyx_t_5 = 0; __pyx_cur_scope->__pyx_t_0 = __pyx_t_1; __pyx_cur_scope->__pyx_t_1 = __pyx_t_2; @@ -7858,16 +7395,6 @@ static PyObject *__pyx_gb_4cdec_5_cdec_5TRule_1a_2generator2(__pyx_GeneratorObje __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":137 - * - * property a: - * def __get__(self): # <<<<<<<<<<<<<< - * cdef unsigned i - * cdef vector[grammar.AlignmentPoint]* a = &self.rule.get().a_ - */ - - /* function exit code */ PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; @@ -7883,14 +7410,6 @@ static PyObject *__pyx_gb_4cdec_5_cdec_5TRule_1a_2generator2(__pyx_GeneratorObje return NULL; } -/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":143 - * yield (a[0][i].s_, a[0][i].t_) - * - * def __set__(self, a): # <<<<<<<<<<<<<< - * cdef vector[grammar.AlignmentPoint]* a_ = &self.rule.get().a_ - * a_.resize(len(a)) - */ - /* Python wrapper */ static int __pyx_pw_4cdec_5_cdec_5TRule_1a_4__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_a); /*proto*/ static int __pyx_pw_4cdec_5_cdec_5TRule_1a_4__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_a) { @@ -7898,12 +7417,18 @@ static int __pyx_pw_4cdec_5_cdec_5TRule_1a_4__set__(PyObject *__pyx_v_self, PyOb __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_5TRule_1a_3__set__(((struct __pyx_obj_4cdec_5_cdec_TRule *)__pyx_v_self), ((PyObject *)__pyx_v_a)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":143 + * yield (a[0][i].s_, a[0][i].t_) + * + * def __set__(self, a): # <<<<<<<<<<<<<< + * cdef vector[grammar.AlignmentPoint]* a_ = &self.rule.get().a_ + * a_.resize(len(a)) + */ + static int __pyx_pf_4cdec_5_cdec_5TRule_1a_3__set__(struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self, PyObject *__pyx_v_a) { std::vector *__pyx_v_a_; unsigned int __pyx_v_i; @@ -7925,7 +7450,7 @@ static int __pyx_pf_4cdec_5_cdec_5TRule_1a_3__set__(struct __pyx_obj_4cdec_5_cde int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":144 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":144 * * def __set__(self, a): * cdef vector[grammar.AlignmentPoint]* a_ = &self.rule.get().a_ # <<<<<<<<<<<<<< @@ -7934,7 +7459,7 @@ static int __pyx_pf_4cdec_5_cdec_5TRule_1a_3__set__(struct __pyx_obj_4cdec_5_cde */ __pyx_v_a_ = (&__pyx_v_self->rule->get()->a_); - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":145 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":145 * def __set__(self, a): * cdef vector[grammar.AlignmentPoint]* a_ = &self.rule.get().a_ * a_.resize(len(a)) # <<<<<<<<<<<<<< @@ -7944,7 +7469,7 @@ static int __pyx_pf_4cdec_5_cdec_5TRule_1a_3__set__(struct __pyx_obj_4cdec_5_cde __pyx_t_1 = PyObject_Length(__pyx_v_a); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_a_->resize(__pyx_t_1); - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":148 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":148 * cdef unsigned i * cdef int s, t * for i in range(len(a)): # <<<<<<<<<<<<<< @@ -7955,14 +7480,14 @@ static int __pyx_pf_4cdec_5_cdec_5TRule_1a_3__set__(struct __pyx_obj_4cdec_5_cde for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_v_i = __pyx_t_2; - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":149 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":149 * cdef int s, t * for i in range(len(a)): * s, t = a[i] # <<<<<<<<<<<<<< * a_[0][i] = grammar.AlignmentPoint(s, t) * */ - __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_a, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_a, __pyx_v_i, sizeof(unsigned int)+1, PyLong_FromUnsignedLong, 0, 0, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) { PyObject* sequence = __pyx_t_3; @@ -7993,7 +7518,8 @@ static int __pyx_pf_4cdec_5_cdec_5TRule_1a_3__set__(struct __pyx_obj_4cdec_5_cde __Pyx_GOTREF(__pyx_t_5); #endif __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } else { + } else + { Py_ssize_t index = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); @@ -8014,14 +7540,14 @@ static int __pyx_pf_4cdec_5_cdec_5TRule_1a_3__set__(struct __pyx_obj_4cdec_5_cde {__pyx_filename = __pyx_f[2]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L6_unpacking_done:; } - __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_PyInt_AsInt(__pyx_t_4); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = __Pyx_PyInt_AsInt(__pyx_t_5); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_s = __pyx_t_8; __pyx_v_t = __pyx_t_9; - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":150 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":150 * for i in range(len(a)): * s, t = a[i] * a_[0][i] = grammar.AlignmentPoint(s, t) # <<<<<<<<<<<<<< @@ -8031,15 +7557,6 @@ static int __pyx_pf_4cdec_5_cdec_5TRule_1a_3__set__(struct __pyx_obj_4cdec_5_cde ((__pyx_v_a_[0])[__pyx_v_i]) = AlignmentPoint(__pyx_v_s, __pyx_v_t); } - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":143 - * yield (a[0][i].s_, a[0][i].t_) - * - * def __set__(self, a): # <<<<<<<<<<<<<< - * cdef vector[grammar.AlignmentPoint]* a_ = &self.rule.get().a_ - * a_.resize(len(a)) - */ - - /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; @@ -8054,14 +7571,6 @@ static int __pyx_pf_4cdec_5_cdec_5TRule_1a_3__set__(struct __pyx_obj_4cdec_5_cde return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":153 - * - * property scores: - * def __get__(self): # <<<<<<<<<<<<<< - * cdef SparseVector scores = SparseVector.__new__(SparseVector) - * scores.vector = new FastSparseVector[double](self.rule.get().scores_) - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_5TRule_6scores_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_5TRule_6scores_1__get__(PyObject *__pyx_v_self) { @@ -8069,12 +7578,18 @@ static PyObject *__pyx_pw_4cdec_5_cdec_5TRule_6scores_1__get__(PyObject *__pyx_v __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_5TRule_6scores___get__(((struct __pyx_obj_4cdec_5_cdec_TRule *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":153 + * + * property scores: + * def __get__(self): # <<<<<<<<<<<<<< + * cdef SparseVector scores = SparseVector.__new__(SparseVector) + * scores.vector = new FastSparseVector[double](self.rule.get().scores_) + */ + static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_6scores___get__(struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self) { struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_scores = 0; PyObject *__pyx_r = NULL; @@ -8085,20 +7600,20 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_6scores___get__(struct __pyx_obj_4 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":154 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":154 * property scores: * def __get__(self): * cdef SparseVector scores = SparseVector.__new__(SparseVector) # <<<<<<<<<<<<<< * scores.vector = new FastSparseVector[double](self.rule.get().scores_) * return scores */ - __pyx_t_1 = __pyx_tp_new_4cdec_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SparseVector)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_tp_new_4cdec_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SparseVector)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4cdec_5_cdec_SparseVector)))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_scores = ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":155 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":155 * def __get__(self): * cdef SparseVector scores = SparseVector.__new__(SparseVector) * scores.vector = new FastSparseVector[double](self.rule.get().scores_) # <<<<<<<<<<<<<< @@ -8107,7 +7622,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_6scores___get__(struct __pyx_obj_4 */ __pyx_v_scores->vector = new FastSparseVector(__pyx_v_self->rule->get()->scores_); - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":156 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":156 * cdef SparseVector scores = SparseVector.__new__(SparseVector) * scores.vector = new FastSparseVector[double](self.rule.get().scores_) * return scores # <<<<<<<<<<<<<< @@ -8119,15 +7634,8 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_6scores___get__(struct __pyx_obj_4 __pyx_r = ((PyObject *)__pyx_v_scores); goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":153 - * - * property scores: - * def __get__(self): # <<<<<<<<<<<<<< - * cdef SparseVector scores = SparseVector.__new__(SparseVector) - * scores.vector = new FastSparseVector[double](self.rule.get().scores_) - */ - - /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cdec._cdec.TRule.scores.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -8139,14 +7647,6 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_6scores___get__(struct __pyx_obj_4 return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":158 - * return scores - * - * def __set__(self, scores): # <<<<<<<<<<<<<< - * cdef FastSparseVector[double]* scores_ = &self.rule.get().scores_ - * scores_.clear() - */ - /* Python wrapper */ static int __pyx_pw_4cdec_5_cdec_5TRule_6scores_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_scores); /*proto*/ static int __pyx_pw_4cdec_5_cdec_5TRule_6scores_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_scores) { @@ -8154,12 +7654,18 @@ static int __pyx_pw_4cdec_5_cdec_5TRule_6scores_3__set__(PyObject *__pyx_v_self, __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_5TRule_6scores_2__set__(((struct __pyx_obj_4cdec_5_cdec_TRule *)__pyx_v_self), ((PyObject *)__pyx_v_scores)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":158 + * return scores + * + * def __set__(self, scores): # <<<<<<<<<<<<<< + * cdef FastSparseVector[double]* scores_ = &self.rule.get().scores_ + * scores_.clear() + */ + static int __pyx_pf_4cdec_5_cdec_5TRule_6scores_2__set__(struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self, PyObject *__pyx_v_scores) { FastSparseVector *__pyx_v_scores_; int __pyx_v_fid; @@ -8184,7 +7690,7 @@ static int __pyx_pf_4cdec_5_cdec_5TRule_6scores_2__set__(struct __pyx_obj_4cdec_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":159 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":159 * * def __set__(self, scores): * cdef FastSparseVector[double]* scores_ = &self.rule.get().scores_ # <<<<<<<<<<<<<< @@ -8193,7 +7699,7 @@ static int __pyx_pf_4cdec_5_cdec_5TRule_6scores_2__set__(struct __pyx_obj_4cdec_ */ __pyx_v_scores_ = (&__pyx_v_self->rule->get()->scores_); - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":160 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":160 * def __set__(self, scores): * cdef FastSparseVector[double]* scores_ = &self.rule.get().scores_ * scores_.clear() # <<<<<<<<<<<<<< @@ -8202,16 +7708,16 @@ static int __pyx_pf_4cdec_5_cdec_5TRule_6scores_2__set__(struct __pyx_obj_4cdec_ */ __pyx_v_scores_->clear(); - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":163 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":163 * cdef int fid * cdef float fval * for fname, fval in scores.items(): # <<<<<<<<<<<<<< * fn = as_str(fname) * fid = FDConvert(fn) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_scores, __pyx_n_s_items); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_scores, __pyx_n_s__items); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) { @@ -8241,9 +7747,8 @@ static int __pyx_pf_4cdec_5_cdec_5TRule_6scores_2__set__(struct __pyx_obj_4cdec_ } else { __pyx_t_2 = __pyx_t_4(__pyx_t_1); if (unlikely(!__pyx_t_2)) { - PyObject* exc_type = PyErr_Occurred(); - if (exc_type) { - if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + if (PyErr_Occurred()) { + if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[2]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; @@ -8279,7 +7784,8 @@ static int __pyx_pf_4cdec_5_cdec_5TRule_6scores_2__set__(struct __pyx_obj_4cdec_ __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - } else { + } else + { Py_ssize_t index = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); @@ -8302,33 +7808,35 @@ static int __pyx_pf_4cdec_5_cdec_5TRule_6scores_2__set__(struct __pyx_obj_4cdec_ } __pyx_t_9 = __pyx_PyFloat_AsFloat(__pyx_t_6); if (unlikely((__pyx_t_9 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_XDECREF_SET(__pyx_v_fname, __pyx_t_5); + __Pyx_XDECREF(__pyx_v_fname); + __pyx_v_fname = __pyx_t_5; __pyx_t_5 = 0; __pyx_v_fval = __pyx_t_9; - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":164 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":164 * cdef float fval * for fname, fval in scores.items(): * fn = as_str(fname) # <<<<<<<<<<<<<< * fid = FDConvert(fn) * if fid < 0: raise KeyError(fname) */ - __pyx_t_2 = __pyx_f_4cdec_5_cdec_as_str(__pyx_v_fname, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = ((PyObject *)__pyx_f_4cdec_5_cdec_as_str(__pyx_v_fname, NULL)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_XDECREF_SET(__pyx_v_fn, ((PyObject*)__pyx_t_2)); + __Pyx_XDECREF(((PyObject *)__pyx_v_fn)); + __pyx_v_fn = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":165 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":165 * for fname, fval in scores.items(): * fn = as_str(fname) * fid = FDConvert(fn) # <<<<<<<<<<<<<< * if fid < 0: raise KeyError(fname) * scores_.set_value(fid, fval) */ - __pyx_t_10 = __Pyx_PyObject_AsString(__pyx_v_fn); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = __Pyx_PyObject_AsString(((PyObject *)__pyx_v_fn)); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fid = FD::Convert(__pyx_t_10); - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":166 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":166 * fn = as_str(fname) * fid = FDConvert(fn) * if fid < 0: raise KeyError(fname) # <<<<<<<<<<<<<< @@ -8342,15 +7850,17 @@ static int __pyx_pf_4cdec_5_cdec_5TRule_6scores_2__set__(struct __pyx_obj_4cdec_ __Pyx_INCREF(__pyx_v_fname); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_fname); __Pyx_GIVEREF(__pyx_v_fname); - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyObject_Call(__pyx_builtin_KeyError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; {__pyx_filename = __pyx_f[2]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L7; } + __pyx_L7:; - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":167 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":167 * fid = FDConvert(fn) * if fid < 0: raise KeyError(fname) * scores_.set_value(fid, fval) # <<<<<<<<<<<<<< @@ -8361,15 +7871,6 @@ static int __pyx_pf_4cdec_5_cdec_5TRule_6scores_2__set__(struct __pyx_obj_4cdec_ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":158 - * return scores - * - * def __set__(self, scores): # <<<<<<<<<<<<<< - * cdef FastSparseVector[double]* scores_ = &self.rule.get().scores_ - * scores_.clear() - */ - - /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; @@ -8387,14 +7888,6 @@ static int __pyx_pf_4cdec_5_cdec_5TRule_6scores_2__set__(struct __pyx_obj_4cdec_ return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":170 - * - * property lhs: - * def __get__(self): # <<<<<<<<<<<<<< - * return NT(TDConvert(-self.rule.get().lhs_).c_str()) - * - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_5TRule_3lhs_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_5TRule_3lhs_1__get__(PyObject *__pyx_v_self) { @@ -8402,12 +7895,18 @@ static PyObject *__pyx_pw_4cdec_5_cdec_5TRule_3lhs_1__get__(PyObject *__pyx_v_se __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_5TRule_3lhs___get__(((struct __pyx_obj_4cdec_5_cdec_TRule *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":170 + * + * property lhs: + * def __get__(self): # <<<<<<<<<<<<<< + * return NT(TDConvert(-self.rule.get().lhs_).c_str()) + * + */ + static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_3lhs___get__(struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -8418,7 +7917,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_3lhs___get__(struct __pyx_obj_4cde int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":171 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":171 * property lhs: * def __get__(self): * return NT(TDConvert(-self.rule.get().lhs_).c_str()) # <<<<<<<<<<<<<< @@ -8427,28 +7926,21 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_3lhs___get__(struct __pyx_obj_4cde */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBytes_FromString(TD::Convert((-__pyx_v_self->rule->get()->lhs_)).c_str()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); + __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); - __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_1)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_NT)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_NT)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":170 - * - * property lhs: - * def __get__(self): # <<<<<<<<<<<<<< - * return NT(TDConvert(-self.rule.get().lhs_).c_str()) - * - */ - - /* 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); @@ -8460,14 +7952,6 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_3lhs___get__(struct __pyx_obj_4cde return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":173 - * return NT(TDConvert(-self.rule.get().lhs_).c_str()) - * - * def __set__(self, lhs): # <<<<<<<<<<<<<< - * if not isinstance(lhs, NT): - * lhs = NT(lhs) - */ - /* Python wrapper */ static int __pyx_pw_4cdec_5_cdec_5TRule_3lhs_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_lhs); /*proto*/ static int __pyx_pw_4cdec_5_cdec_5TRule_3lhs_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_lhs) { @@ -8475,12 +7959,18 @@ static int __pyx_pw_4cdec_5_cdec_5TRule_3lhs_3__set__(PyObject *__pyx_v_self, Py __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_5TRule_3lhs_2__set__(((struct __pyx_obj_4cdec_5_cdec_TRule *)__pyx_v_self), ((PyObject *)__pyx_v_lhs)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":173 + * return NT(TDConvert(-self.rule.get().lhs_).c_str()) + * + * def __set__(self, lhs): # <<<<<<<<<<<<<< + * if not isinstance(lhs, NT): + * lhs = NT(lhs) + */ + static int __pyx_pf_4cdec_5_cdec_5TRule_3lhs_2__set__(struct __pyx_obj_4cdec_5_cdec_TRule *__pyx_v_self, PyObject *__pyx_v_lhs) { int __pyx_r; __Pyx_RefNannyDeclarations @@ -8495,7 +7985,7 @@ static int __pyx_pf_4cdec_5_cdec_5TRule_3lhs_2__set__(struct __pyx_obj_4cdec_5_c __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_lhs); - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":174 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":174 * * def __set__(self, lhs): * if not isinstance(lhs, NT): # <<<<<<<<<<<<<< @@ -8506,7 +7996,7 @@ static int __pyx_pf_4cdec_5_cdec_5TRule_3lhs_2__set__(struct __pyx_obj_4cdec_5_c __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":175 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":175 * def __set__(self, lhs): * if not isinstance(lhs, NT): * lhs = NT(lhs) # <<<<<<<<<<<<<< @@ -8518,34 +8008,26 @@ static int __pyx_pf_4cdec_5_cdec_5TRule_3lhs_2__set__(struct __pyx_obj_4cdec_5_c __Pyx_INCREF(__pyx_v_lhs); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_lhs); __Pyx_GIVEREF(__pyx_v_lhs); - __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_NT)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_NT)), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF_SET(__pyx_v_lhs, __pyx_t_4); + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_v_lhs); + __pyx_v_lhs = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L3; } __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":176 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":176 * if not isinstance(lhs, NT): * lhs = NT(lhs) * self.rule.get().lhs_ = -TDConvert(( lhs).cat) # <<<<<<<<<<<<<< * * def __str__(self): */ - __pyx_t_5 = __Pyx_PyObject_AsString(((struct __pyx_obj_4cdec_5_cdec_NT *)__pyx_v_lhs)->cat); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_AsString(((PyObject *)((struct __pyx_obj_4cdec_5_cdec_NT *)__pyx_v_lhs)->cat)); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->rule->get()->lhs_ = (-TD::Convert(__pyx_t_5)); - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":173 - * return NT(TDConvert(-self.rule.get().lhs_).c_str()) - * - * def __set__(self, lhs): # <<<<<<<<<<<<<< - * if not isinstance(lhs, NT): - * lhs = NT(lhs) - */ - - /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; @@ -8559,14 +8041,6 @@ static int __pyx_pf_4cdec_5_cdec_5TRule_3lhs_2__set__(struct __pyx_obj_4cdec_5_c return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":178 - * self.rule.get().lhs_ = -TDConvert(( lhs).cat) - * - * def __str__(self): # <<<<<<<<<<<<<< - * scores = ' '.join('%s=%s' % feat for feat in self.scores) - * return '%s ||| %s ||| %s ||| %s' % (self.lhs, - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_5TRule_5__str__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_5TRule_5__str__(PyObject *__pyx_v_self) { @@ -8574,14 +8048,12 @@ static PyObject *__pyx_pw_4cdec_5_cdec_5TRule_5__str__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__str__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_5TRule_4__str__(((struct __pyx_obj_4cdec_5_cdec_TRule *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_gb_4cdec_5_cdec_5TRule_7__str___2generator19(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ +static PyObject *__pyx_gb_4cdec_5_cdec_5TRule_7__str___2generator22(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":179 +/* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":179 * * def __str__(self): * scores = ' '.join('%s=%s' % feat for feat in self.scores) # <<<<<<<<<<<<<< @@ -8607,13 +8079,12 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_7__str___genexpr(PyObject *__pyx_s __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); { - __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_5_cdec_5TRule_7__str___2generator19, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_5_cdec_5TRule_7__str___2generator22, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } - /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; @@ -8626,7 +8097,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_7__str___genexpr(PyObject *__pyx_s return __pyx_r; } -static PyObject *__pyx_gb_4cdec_5_cdec_5TRule_7__str___2generator19(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ +static PyObject *__pyx_gb_4cdec_5_cdec_5TRule_7__str___2generator22(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr *__pyx_cur_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr *)__pyx_generator->closure); PyObject *__pyx_r = NULL; @@ -8649,7 +8120,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_5TRule_7__str___2generator19(__pyx_Genera __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self), __pyx_n_s_scores); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self), __pyx_n_s__scores); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (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; @@ -8678,9 +8149,8 @@ static PyObject *__pyx_gb_4cdec_5_cdec_5TRule_7__str___2generator19(__pyx_Genera } 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(); + if (PyErr_Occurred()) { + if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[2]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; @@ -8688,12 +8158,13 @@ static PyObject *__pyx_gb_4cdec_5_cdec_5TRule_7__str___2generator19(__pyx_Genera __Pyx_GOTREF(__pyx_t_1); } __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_feat); - __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_feat, __pyx_t_1); + __Pyx_XDECREF(__pyx_cur_scope->__pyx_v_feat); __Pyx_GIVEREF(__pyx_t_1); + __pyx_cur_scope->__pyx_v_feat = __pyx_t_1; __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_s_s, __pyx_cur_scope->__pyx_v_feat); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; + __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_11), __pyx_cur_scope->__pyx_v_feat); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __pyx_r = ((PyObject *)__pyx_t_1); __pyx_t_1 = 0; __Pyx_XGIVEREF(__pyx_t_2); __pyx_cur_scope->__pyx_t_0 = __pyx_t_2; @@ -8713,8 +8184,6 @@ static PyObject *__pyx_gb_4cdec_5_cdec_5TRule_7__str___2generator19(__pyx_Genera if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* function exit code */ PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; @@ -8729,7 +8198,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_5TRule_7__str___2generator19(__pyx_Genera return NULL; } -/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":178 +/* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":178 * self.rule.get().lhs_ = -TDConvert(( lhs).cat) * * def __str__(self): # <<<<<<<<<<<<<< @@ -8761,22 +8230,30 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_4__str__(struct __pyx_obj_4cdec_5_ __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":179 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":179 * * def __str__(self): * scores = ' '.join('%s=%s' % feat for feat in self.scores) # <<<<<<<<<<<<<< * return '%s ||| %s ||| %s ||| %s' % (self.lhs, * _phrase(self.f), _phrase(self.e), scores) */ - __pyx_t_1 = __pyx_pf_4cdec_5_cdec_5TRule_7__str___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_kp_s_7), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyString_Join(__pyx_kp_s__4, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_pf_4cdec_5_cdec_5TRule_7__str___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_2); + __pyx_t_2 = 0; + __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_v_scores = ((PyObject*)__pyx_t_2); + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __pyx_v_scores = __pyx_t_2; __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":180 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":180 * def __str__(self): * scores = ' '.join('%s=%s' % feat for feat in self.scores) * return '%s ||| %s ||| %s ||| %s' % (self.lhs, # <<<<<<<<<<<<<< @@ -8784,80 +8261,65 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_4__str__(struct __pyx_obj_4cdec_5_ * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_lhs); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s__lhs); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":181 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":181 * scores = ' '.join('%s=%s' % feat for feat in self.scores) * return '%s ||| %s ||| %s ||| %s' % (self.lhs, * _phrase(self.f), _phrase(self.e), scores) # <<<<<<<<<<<<<< * * cdef class MRule(TRule): */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_phrase); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_f); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s___phrase); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s__f); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); - __Pyx_GIVEREF(__pyx_t_3); - __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_phrase); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_e); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s___phrase); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s__e); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 181; __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_5); __pyx_t_5 = 0; - - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":180 - * def __str__(self): - * scores = ' '.join('%s=%s' % feat for feat in self.scores) - * return '%s ||| %s ||| %s ||| %s' % (self.lhs, # <<<<<<<<<<<<<< - * _phrase(self.f), _phrase(self.e), scores) - * - */ + __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3); - __Pyx_GIVEREF(__pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_scores); PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_v_scores); __Pyx_GIVEREF(__pyx_v_scores); __pyx_t_2 = 0; - __pyx_t_3 = 0; - __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_s_s_s_s, __pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_r = __pyx_t_1; __pyx_t_1 = 0; + __pyx_t_3 = 0; + __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_12), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; + __pyx_r = ((PyObject *)__pyx_t_3); + __pyx_t_3 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":178 - * self.rule.get().lhs_ = -TDConvert(( lhs).cat) - * - * def __str__(self): # <<<<<<<<<<<<<< - * scores = ' '.join('%s=%s' % feat for feat in self.scores) - * return '%s ||| %s ||| %s ||| %s' % (self.lhs, - */ - - /* 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); @@ -8874,14 +8336,6 @@ static PyObject *__pyx_pf_4cdec_5_cdec_5TRule_4__str__(struct __pyx_obj_4cdec_5_ return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":184 - * - * cdef class MRule(TRule): - * def __init__(self, lhs, rhs, scores): # <<<<<<<<<<<<<< - * """MRule(lhs, rhs, scores, a=None) -> Monolingual rule. - * lhs: left hand side non-terminal - */ - /* Python wrapper */ static int __pyx_pw_4cdec_5_cdec_5MRule_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4cdec_5_cdec_5MRule___init__[] = "MRule(lhs, rhs, scores, a=None) -> Monolingual rule.\n lhs: left hand side non-terminal\n rhs: right hand side phrase (list of words/NT)\n scores: dictionary of feature scores"; @@ -8899,7 +8353,7 @@ static int __pyx_pw_4cdec_5_cdec_5MRule_1__init__(PyObject *__pyx_v_self, PyObje __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lhs,&__pyx_n_s_rhs,&__pyx_n_s_scores,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__lhs,&__pyx_n_s__rhs,&__pyx_n_s__scores,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; @@ -8914,15 +8368,15 @@ static int __pyx_pw_4cdec_5_cdec_5MRule_1__init__(PyObject *__pyx_v_self, PyObje kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_lhs)) != 0)) kw_args--; + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__lhs)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: - if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_rhs)) != 0)) kw_args--; + if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__rhs)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: - if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_scores)) != 0)) kw_args--; + if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__scores)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } @@ -8950,12 +8404,18 @@ static int __pyx_pw_4cdec_5_cdec_5MRule_1__init__(PyObject *__pyx_v_self, PyObje return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4cdec_5_cdec_5MRule___init__(((struct __pyx_obj_4cdec_5_cdec_MRule *)__pyx_v_self), __pyx_v_lhs, __pyx_v_rhs, __pyx_v_scores); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":184 + * + * cdef class MRule(TRule): + * def __init__(self, lhs, rhs, scores): # <<<<<<<<<<<<<< + * """MRule(lhs, rhs, scores, a=None) -> Monolingual rule. + * lhs: left hand side non-terminal + */ + static int __pyx_pf_4cdec_5_cdec_5MRule___init__(struct __pyx_obj_4cdec_5_cdec_MRule *__pyx_v_self, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs, PyObject *__pyx_v_scores) { unsigned int __pyx_v_i; PyObject *__pyx_v_e = NULL; @@ -8975,7 +8435,7 @@ static int __pyx_pf_4cdec_5_cdec_5MRule___init__(struct __pyx_obj_4cdec_5_cdec_M int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":189 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":189 * rhs: right hand side phrase (list of words/NT) * scores: dictionary of feature scores""" * cdef unsigned i = 1 # <<<<<<<<<<<<<< @@ -8984,7 +8444,7 @@ static int __pyx_pf_4cdec_5_cdec_5MRule___init__(struct __pyx_obj_4cdec_5_cdec_M */ __pyx_v_i = 1; - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":190 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":190 * scores: dictionary of feature scores""" * cdef unsigned i = 1 * e = [] # <<<<<<<<<<<<<< @@ -8996,7 +8456,7 @@ static int __pyx_pf_4cdec_5_cdec_5MRule___init__(struct __pyx_obj_4cdec_5_cdec_M __pyx_v_e = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":191 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":191 * cdef unsigned i = 1 * e = [] * for s in rhs: # <<<<<<<<<<<<<< @@ -9029,19 +8489,19 @@ static int __pyx_pf_4cdec_5_cdec_5MRule___init__(struct __pyx_obj_4cdec_5_cdec_M } else { __pyx_t_4 = __pyx_t_3(__pyx_t_1); if (unlikely(!__pyx_t_4)) { - PyObject* exc_type = PyErr_Occurred(); - if (exc_type) { - if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + if (PyErr_Occurred()) { + if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[2]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_4); } - __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_4); + __Pyx_XDECREF(__pyx_v_s); + __pyx_v_s = __pyx_t_4; __pyx_t_4 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":192 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":192 * e = [] * for s in rhs: * if isinstance(s, NT): # <<<<<<<<<<<<<< @@ -9052,27 +8512,27 @@ static int __pyx_pf_4cdec_5_cdec_5MRule___init__(struct __pyx_obj_4cdec_5_cdec_M __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":193 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":193 * for s in rhs: * if isinstance(s, NT): * e.append(NTRef(i)) # <<<<<<<<<<<<<< * i += 1 * else: */ - __pyx_t_4 = __Pyx_PyInt_From_unsigned_int(__pyx_v_i); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyLong_FromUnsignedLong(__pyx_v_i); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_NTRef)), __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_NTRef)), ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_e, __pyx_t_4); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":194 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":194 * if isinstance(s, NT): * e.append(NTRef(i)) * i += 1 # <<<<<<<<<<<<<< @@ -9084,7 +8544,7 @@ static int __pyx_pf_4cdec_5_cdec_5MRule___init__(struct __pyx_obj_4cdec_5_cdec_M } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":196 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":196 * i += 1 * else: * e.append(s) # <<<<<<<<<<<<<< @@ -9097,7 +8557,7 @@ static int __pyx_pf_4cdec_5_cdec_5MRule___init__(struct __pyx_obj_4cdec_5_cdec_M } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":197 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":197 * else: * e.append(s) * super(MRule, self).__init__(lhs, rhs, e, scores, None) # <<<<<<<<<<<<<< @@ -9112,10 +8572,10 @@ static int __pyx_pf_4cdec_5_cdec_5MRule___init__(struct __pyx_obj_4cdec_5_cdec_M __Pyx_INCREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyObject_Call(__pyx_builtin_super, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_init); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s____init__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -9126,30 +8586,21 @@ static int __pyx_pf_4cdec_5_cdec_5MRule___init__(struct __pyx_obj_4cdec_5_cdec_M __Pyx_INCREF(__pyx_v_rhs); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_rhs); __Pyx_GIVEREF(__pyx_v_rhs); - __Pyx_INCREF(__pyx_v_e); - PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_e); - __Pyx_GIVEREF(__pyx_v_e); + __Pyx_INCREF(((PyObject *)__pyx_v_e)); + PyTuple_SET_ITEM(__pyx_t_4, 2, ((PyObject *)__pyx_v_e)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_e)); __Pyx_INCREF(__pyx_v_scores); PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_v_scores); __Pyx_GIVEREF(__pyx_v_scores); __Pyx_INCREF(Py_None); PyTuple_SET_ITEM(__pyx_t_4, 4, Py_None); __Pyx_GIVEREF(Py_None); - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":184 - * - * cdef class MRule(TRule): - * def __init__(self, lhs, rhs, scores): # <<<<<<<<<<<<<< - * """MRule(lhs, rhs, scores, a=None) -> Monolingual rule. - * lhs: left hand side non-terminal - */ - - /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; @@ -9165,30 +8616,28 @@ static int __pyx_pf_4cdec_5_cdec_5MRule___init__(struct __pyx_obj_4cdec_5_cdec_M return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":202 - * cdef shared_ptr[grammar.Grammar]* grammar - * - * def __dealloc__(self): # <<<<<<<<<<<<<< - * del self.grammar - * - */ - /* Python wrapper */ static void __pyx_pw_4cdec_5_cdec_7Grammar_1__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_4cdec_5_cdec_7Grammar_1__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_4cdec_5_cdec_7Grammar___dealloc__(((struct __pyx_obj_4cdec_5_cdec_Grammar *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); } -static void __pyx_pf_4cdec_5_cdec_7Grammar___dealloc__(struct __pyx_obj_4cdec_5_cdec_Grammar *__pyx_v_self) { +/* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":202 + * cdef shared_ptr[grammar.Grammar]* grammar + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * del self.grammar + * + */ + +static void __pyx_pf_4cdec_5_cdec_7Grammar___dealloc__(CYTHON_UNUSED struct __pyx_obj_4cdec_5_cdec_Grammar *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":203 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":203 * * def __dealloc__(self): * del self.grammar # <<<<<<<<<<<<<< @@ -9197,27 +8646,10 @@ static void __pyx_pf_4cdec_5_cdec_7Grammar___dealloc__(struct __pyx_obj_4cdec_5_ */ delete __pyx_v_self->grammar; - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":202 - * cdef shared_ptr[grammar.Grammar]* grammar - * - * def __dealloc__(self): # <<<<<<<<<<<<<< - * del self.grammar - * - */ - - /* function exit code */ __Pyx_RefNannyFinishContext(); } static PyObject *__pyx_gb_4cdec_5_cdec_7Grammar_4generator3(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":205 - * del self.grammar - * - * def __iter__(self): # <<<<<<<<<<<<<< - * cdef grammar.const_GrammarIter* root = self.grammar.get().GetRoot() - * cdef grammar.const_RuleBin* rbin = root.GetRules() - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_7Grammar_3__iter__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_7Grammar_3__iter__(PyObject *__pyx_v_self) { @@ -9225,12 +8657,18 @@ static PyObject *__pyx_pw_4cdec_5_cdec_7Grammar_3__iter__(PyObject *__pyx_v_self __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_7Grammar_2__iter__(((struct __pyx_obj_4cdec_5_cdec_Grammar *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":205 + * del self.grammar + * + * def __iter__(self): # <<<<<<<<<<<<<< + * cdef grammar.const_GrammarIter* root = self.grammar.get().GetRoot() + * cdef grammar.const_RuleBin* rbin = root.GetRules() + */ + static PyObject *__pyx_pf_4cdec_5_cdec_7Grammar_2__iter__(struct __pyx_obj_4cdec_5_cdec_Grammar *__pyx_v_self) { struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__ *__pyx_cur_scope; PyObject *__pyx_r = NULL; @@ -9255,7 +8693,6 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Grammar_2__iter__(struct __pyx_obj_4cdec return (PyObject *) gen; } - /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; @@ -9290,7 +8727,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7Grammar_4generator3(__pyx_GeneratorObjec __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":206 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":206 * * def __iter__(self): * cdef grammar.const_GrammarIter* root = self.grammar.get().GetRoot() # <<<<<<<<<<<<<< @@ -9299,7 +8736,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7Grammar_4generator3(__pyx_GeneratorObjec */ __pyx_cur_scope->__pyx_v_root = __pyx_cur_scope->__pyx_v_self->grammar->get()->GetRoot(); - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":207 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":207 * def __iter__(self): * cdef grammar.const_GrammarIter* root = self.grammar.get().GetRoot() * cdef grammar.const_RuleBin* rbin = root.GetRules() # <<<<<<<<<<<<<< @@ -9308,7 +8745,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7Grammar_4generator3(__pyx_GeneratorObjec */ __pyx_cur_scope->__pyx_v_rbin = __pyx_cur_scope->__pyx_v_root->GetRules(); - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":210 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":210 * cdef TRule trule * cdef unsigned i * for i in range(rbin.GetNumRules()): # <<<<<<<<<<<<<< @@ -9319,22 +8756,23 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7Grammar_4generator3(__pyx_GeneratorObjec for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_cur_scope->__pyx_v_i = __pyx_t_2; - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":211 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":211 * cdef unsigned i * for i in range(rbin.GetNumRules()): * trule = TRule.__new__(TRule) # <<<<<<<<<<<<<< * trule.rule = new shared_ptr[grammar.TRule](rbin.GetIthRule(i)) * yield trule */ - __pyx_t_3 = __pyx_tp_new_4cdec_5_cdec_TRule(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_TRule)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __pyx_tp_new_4cdec_5_cdec_TRule(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_TRule)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); if (!(likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_4cdec_5_cdec_TRule)))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_trule)); - __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_trule, ((struct __pyx_obj_4cdec_5_cdec_TRule *)__pyx_t_3)); + __Pyx_XDECREF(((PyObject *)__pyx_cur_scope->__pyx_v_trule)); __Pyx_GIVEREF(__pyx_t_3); + __pyx_cur_scope->__pyx_v_trule = ((struct __pyx_obj_4cdec_5_cdec_TRule *)__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":212 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":212 * for i in range(rbin.GetNumRules()): * trule = TRule.__new__(TRule) * trule.rule = new shared_ptr[grammar.TRule](rbin.GetIthRule(i)) # <<<<<<<<<<<<<< @@ -9343,7 +8781,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7Grammar_4generator3(__pyx_GeneratorObjec */ __pyx_cur_scope->__pyx_v_trule->rule = new boost::shared_ptr(__pyx_cur_scope->__pyx_v_rbin->GetIthRule(__pyx_cur_scope->__pyx_v_i)); - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":213 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":213 * trule = TRule.__new__(TRule) * trule.rule = new shared_ptr[grammar.TRule](rbin.GetIthRule(i)) * yield trule # <<<<<<<<<<<<<< @@ -9364,16 +8802,6 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7Grammar_4generator3(__pyx_GeneratorObjec __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":205 - * del self.grammar - * - * def __iter__(self): # <<<<<<<<<<<<<< - * cdef grammar.const_GrammarIter* root = self.grammar.get().GetRoot() - * cdef grammar.const_RuleBin* rbin = root.GetRules() - */ - - /* function exit code */ PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; @@ -9387,14 +8815,6 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7Grammar_4generator3(__pyx_GeneratorObjec return NULL; } -/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":216 - * - * property name: - * def __get__(self): # <<<<<<<<<<<<<< - * str(self.grammar.get().GetGrammarName().c_str()) - * - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_7Grammar_4name_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_7Grammar_4name_1__get__(PyObject *__pyx_v_self) { @@ -9402,12 +8822,18 @@ static PyObject *__pyx_pw_4cdec_5_cdec_7Grammar_4name_1__get__(PyObject *__pyx_v __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_7Grammar_4name___get__(((struct __pyx_obj_4cdec_5_cdec_Grammar *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":216 + * + * property name: + * def __get__(self): # <<<<<<<<<<<<<< + * str(self.grammar.get().GetGrammarName().c_str()) + * + */ + static PyObject *__pyx_pf_4cdec_5_cdec_7Grammar_4name___get__(struct __pyx_obj_4cdec_5_cdec_Grammar *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -9418,7 +8844,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Grammar_4name___get__(struct __pyx_obj_4 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":217 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":217 * property name: * def __get__(self): * str(self.grammar.get().GetGrammarName().c_str()) # <<<<<<<<<<<<<< @@ -9426,26 +8852,17 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Grammar_4name___get__(struct __pyx_obj_4 * def __set__(self, name): */ __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->grammar->get()->GetGrammarName().c_str()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); + __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); - __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_1)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":216 - * - * property name: - * def __get__(self): # <<<<<<<<<<<<<< - * str(self.grammar.get().GetGrammarName().c_str()) - * - */ - - /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; @@ -9459,14 +8876,6 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Grammar_4name___get__(struct __pyx_obj_4 return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":219 - * str(self.grammar.get().GetGrammarName().c_str()) - * - * def __set__(self, name): # <<<<<<<<<<<<<< - * name = as_str(name) - * self.grammar.get().SetGrammarName(name) - */ - /* Python wrapper */ static int __pyx_pw_4cdec_5_cdec_7Grammar_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/ static int __pyx_pw_4cdec_5_cdec_7Grammar_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_name) { @@ -9474,12 +8883,18 @@ static int __pyx_pw_4cdec_5_cdec_7Grammar_4name_3__set__(PyObject *__pyx_v_self, __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_7Grammar_4name_2__set__(((struct __pyx_obj_4cdec_5_cdec_Grammar *)__pyx_v_self), ((PyObject *)__pyx_v_name)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":219 + * str(self.grammar.get().GetGrammarName().c_str()) + * + * def __set__(self, name): # <<<<<<<<<<<<<< + * name = as_str(name) + * self.grammar.get().SetGrammarName(name) + */ + static int __pyx_pf_4cdec_5_cdec_7Grammar_4name_2__set__(struct __pyx_obj_4cdec_5_cdec_Grammar *__pyx_v_self, PyObject *__pyx_v_name) { int __pyx_r; __Pyx_RefNannyDeclarations @@ -9491,19 +8906,20 @@ static int __pyx_pf_4cdec_5_cdec_7Grammar_4name_2__set__(struct __pyx_obj_4cdec_ __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_name); - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":220 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":220 * * def __set__(self, name): * name = as_str(name) # <<<<<<<<<<<<<< * self.grammar.get().SetGrammarName(name) * */ - __pyx_t_1 = __pyx_f_4cdec_5_cdec_as_str(__pyx_v_name, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = ((PyObject *)__pyx_f_4cdec_5_cdec_as_str(__pyx_v_name, NULL)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_1); + __Pyx_DECREF(__pyx_v_name); + __pyx_v_name = __pyx_t_1; __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":221 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":221 * def __set__(self, name): * name = as_str(name) * self.grammar.get().SetGrammarName(name) # <<<<<<<<<<<<<< @@ -9513,15 +8929,6 @@ static int __pyx_pf_4cdec_5_cdec_7Grammar_4name_2__set__(struct __pyx_obj_4cdec_ __pyx_t_2 = __pyx_convert_string_from_py_(__pyx_v_name); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->grammar->get()->SetGrammarName(__pyx_t_2); - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":219 - * str(self.grammar.get().GetGrammarName().c_str()) - * - * def __set__(self, name): # <<<<<<<<<<<<<< - * name = as_str(name) - * self.grammar.get().SetGrammarName(name) - */ - - /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; @@ -9534,14 +8941,6 @@ static int __pyx_pf_4cdec_5_cdec_7Grammar_4name_2__set__(struct __pyx_obj_4cdec_ return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":224 - * - * cdef class TextGrammar(Grammar): - * def __init__(self, rules): # <<<<<<<<<<<<<< - * """TextGrammar(rules) -> SCFG Grammar containing the rules.""" - * self.grammar = new shared_ptr[grammar.Grammar](new grammar.TextGrammar()) - */ - /* Python wrapper */ static int __pyx_pw_4cdec_5_cdec_11TextGrammar_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4cdec_5_cdec_11TextGrammar___init__[] = "TextGrammar(rules) -> SCFG Grammar containing the rules."; @@ -9557,7 +8956,7 @@ static int __pyx_pw_4cdec_5_cdec_11TextGrammar_1__init__(PyObject *__pyx_v_self, __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_rules,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__rules,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; @@ -9570,7 +8969,7 @@ static int __pyx_pw_4cdec_5_cdec_11TextGrammar_1__init__(PyObject *__pyx_v_self, kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_rules)) != 0)) kw_args--; + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__rules)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { @@ -9592,12 +8991,18 @@ static int __pyx_pw_4cdec_5_cdec_11TextGrammar_1__init__(PyObject *__pyx_v_self, return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4cdec_5_cdec_11TextGrammar___init__(((struct __pyx_obj_4cdec_5_cdec_TextGrammar *)__pyx_v_self), __pyx_v_rules); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":224 + * + * cdef class TextGrammar(Grammar): + * def __init__(self, rules): # <<<<<<<<<<<<<< + * """TextGrammar(rules) -> SCFG Grammar containing the rules.""" + * self.grammar = new shared_ptr[grammar.Grammar](new grammar.TextGrammar()) + */ + static int __pyx_pf_4cdec_5_cdec_11TextGrammar___init__(struct __pyx_obj_4cdec_5_cdec_TextGrammar *__pyx_v_self, PyObject *__pyx_v_rules) { TextGrammar *__pyx_v__g; PyObject *__pyx_v_trule = NULL; @@ -9614,7 +9019,7 @@ static int __pyx_pf_4cdec_5_cdec_11TextGrammar___init__(struct __pyx_obj_4cdec_5 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":226 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":226 * def __init__(self, rules): * """TextGrammar(rules) -> SCFG Grammar containing the rules.""" * self.grammar = new shared_ptr[grammar.Grammar](new grammar.TextGrammar()) # <<<<<<<<<<<<<< @@ -9623,7 +9028,7 @@ static int __pyx_pf_4cdec_5_cdec_11TextGrammar___init__(struct __pyx_obj_4cdec_5 */ __pyx_v_self->__pyx_base.grammar = new boost::shared_ptr(new TextGrammar()); - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":227 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":227 * """TextGrammar(rules) -> SCFG Grammar containing the rules.""" * self.grammar = new shared_ptr[grammar.Grammar](new grammar.TextGrammar()) * cdef grammar.TextGrammar* _g = self.grammar.get() # <<<<<<<<<<<<<< @@ -9632,7 +9037,7 @@ static int __pyx_pf_4cdec_5_cdec_11TextGrammar___init__(struct __pyx_obj_4cdec_5 */ __pyx_v__g = ((TextGrammar *)__pyx_v_self->__pyx_base.grammar->get()); - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":228 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":228 * self.grammar = new shared_ptr[grammar.Grammar](new grammar.TextGrammar()) * cdef grammar.TextGrammar* _g = self.grammar.get() * for trule in rules: # <<<<<<<<<<<<<< @@ -9665,19 +9070,19 @@ static int __pyx_pf_4cdec_5_cdec_11TextGrammar___init__(struct __pyx_obj_4cdec_5 } else { __pyx_t_4 = __pyx_t_3(__pyx_t_1); if (unlikely(!__pyx_t_4)) { - PyObject* exc_type = PyErr_Occurred(); - if (exc_type) { - if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + if (PyErr_Occurred()) { + if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[2]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_4); } - __Pyx_XDECREF_SET(__pyx_v_trule, __pyx_t_4); + __Pyx_XDECREF(__pyx_v_trule); + __pyx_v_trule = __pyx_t_4; __pyx_t_4 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":229 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":229 * cdef grammar.TextGrammar* _g = self.grammar.get() * for trule in rules: * if isinstance(trule, _sa.Rule): # <<<<<<<<<<<<<< @@ -9688,7 +9093,7 @@ static int __pyx_pf_4cdec_5_cdec_11TextGrammar___init__(struct __pyx_obj_4cdec_5 __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":230 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":230 * for trule in rules: * if isinstance(trule, _sa.Rule): * trule = convert_rule(trule) # <<<<<<<<<<<<<< @@ -9698,12 +9103,13 @@ static int __pyx_pf_4cdec_5_cdec_11TextGrammar___init__(struct __pyx_obj_4cdec_5 if (!(likely(((__pyx_v_trule) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_trule, __pyx_ptype_4cdec_2sa_3_sa_Rule))))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_4 = ((PyObject *)__pyx_f_4cdec_5_cdec_convert_rule(((struct __pyx_obj_4cdec_2sa_3_sa_Rule *)__pyx_v_trule))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF_SET(__pyx_v_trule, __pyx_t_4); + __Pyx_DECREF(__pyx_v_trule); + __pyx_v_trule = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L5; } - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":231 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":231 * if isinstance(trule, _sa.Rule): * trule = convert_rule(trule) * elif not isinstance(trule, TRule): # <<<<<<<<<<<<<< @@ -9714,21 +9120,22 @@ static int __pyx_pf_4cdec_5_cdec_11TextGrammar___init__(struct __pyx_obj_4cdec_5 __pyx_t_5 = ((!(__pyx_t_6 != 0)) != 0); if (__pyx_t_5) { - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":232 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":232 * trule = convert_rule(trule) * elif not isinstance(trule, TRule): * raise ValueError('the grammar should contain TRule objects') # <<<<<<<<<<<<<< * _g.AddRule(( trule).rule[0]) */ - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_14), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 232; __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[2]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L5; } __pyx_L5:; - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":233 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":233 * elif not isinstance(trule, TRule): * raise ValueError('the grammar should contain TRule objects') * _g.AddRule(( trule).rule[0]) # <<<<<<<<<<<<<< @@ -9737,15 +9144,6 @@ static int __pyx_pf_4cdec_5_cdec_11TextGrammar___init__(struct __pyx_obj_4cdec_5 } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":224 - * - * cdef class TextGrammar(Grammar): - * def __init__(self, rules): # <<<<<<<<<<<<<< - * """TextGrammar(rules) -> SCFG Grammar containing the rules.""" - * self.grammar = new shared_ptr[grammar.Grammar](new grammar.TextGrammar()) - */ - - /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; @@ -9759,31 +9157,29 @@ static int __pyx_pf_4cdec_5_cdec_11TextGrammar___init__(struct __pyx_obj_4cdec_5 return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":8 - * cdef MT19937* rng - * - * def __dealloc__(self): # <<<<<<<<<<<<<< - * del self.hg - * if self.rng != NULL: - */ - /* Python wrapper */ static void __pyx_pw_4cdec_5_cdec_10Hypergraph_1__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_4cdec_5_cdec_10Hypergraph_1__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_4cdec_5_cdec_10Hypergraph___dealloc__(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); } +/* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":8 + * cdef MT19937* rng + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * del self.hg + * if self.rng != NULL: + */ + static void __pyx_pf_4cdec_5_cdec_10Hypergraph___dealloc__(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self) { __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":9 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":9 * * def __dealloc__(self): * del self.hg # <<<<<<<<<<<<<< @@ -9792,7 +9188,7 @@ static void __pyx_pf_4cdec_5_cdec_10Hypergraph___dealloc__(struct __pyx_obj_4cde */ delete __pyx_v_self->hg; - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":10 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":10 * def __dealloc__(self): * del self.hg * if self.rng != NULL: # <<<<<<<<<<<<<< @@ -9802,7 +9198,7 @@ static void __pyx_pf_4cdec_5_cdec_10Hypergraph___dealloc__(struct __pyx_obj_4cde __pyx_t_1 = ((__pyx_v_self->rng != NULL) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":11 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":11 * del self.hg * if self.rng != NULL: * del self.rng # <<<<<<<<<<<<<< @@ -9814,19 +9210,10 @@ static void __pyx_pf_4cdec_5_cdec_10Hypergraph___dealloc__(struct __pyx_obj_4cde } __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":8 - * cdef MT19937* rng - * - * def __dealloc__(self): # <<<<<<<<<<<<<< - * del self.hg - * if self.rng != NULL: - */ - - /* function exit code */ __Pyx_RefNannyFinishContext(); } -/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":13 +/* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":13 * del self.rng * * cdef MT19937* _rng(self): # <<<<<<<<<<<<<< @@ -9844,7 +9231,7 @@ static MT19937 *__pyx_f_4cdec_5_cdec_10Hypergraph__rng(struct __pyx_obj_4cdec_5_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_rng", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":14 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":14 * * cdef MT19937* _rng(self): * if self.rng == NULL: # <<<<<<<<<<<<<< @@ -9854,7 +9241,7 @@ static MT19937 *__pyx_f_4cdec_5_cdec_10Hypergraph__rng(struct __pyx_obj_4cdec_5_ __pyx_t_1 = ((__pyx_v_self->rng == NULL) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":15 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":15 * cdef MT19937* _rng(self): * if self.rng == NULL: * self.rng = new MT19937() # <<<<<<<<<<<<<< @@ -9872,7 +9259,7 @@ static MT19937 *__pyx_f_4cdec_5_cdec_10Hypergraph__rng(struct __pyx_obj_4cdec_5_ } __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":16 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":16 * if self.rng == NULL: * self.rng = new MT19937() * return self.rng # <<<<<<<<<<<<<< @@ -9882,31 +9269,16 @@ static MT19937 *__pyx_f_4cdec_5_cdec_10Hypergraph__rng(struct __pyx_obj_4cdec_5_ __pyx_r = __pyx_v_self->rng; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":13 - * del self.rng - * - * cdef MT19937* _rng(self): # <<<<<<<<<<<<<< - * if self.rng == NULL: - * self.rng = new MT19937() - */ - - /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; __pyx_L1_error:; - __Pyx_WriteUnraisable("cdec._cdec.Hypergraph._rng", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); + __Pyx_WriteUnraisable("cdec._cdec.Hypergraph._rng", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":18 - * return self.rng - * - * def viterbi(self): # <<<<<<<<<<<<<< - * """hg.viterbi() -> String for the best hypothesis in the hypergraph.""" - * cdef vector[WordID] trans - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_3viterbi(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_4cdec_5_cdec_10Hypergraph_2viterbi[] = "hg.viterbi() -> String for the best hypothesis in the hypergraph."; @@ -9915,12 +9287,18 @@ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_3viterbi(PyObject *__pyx_v_s __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("viterbi (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_2viterbi(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":18 + * return self.rng + * + * def viterbi(self): # <<<<<<<<<<<<<< + * """hg.viterbi() -> String for the best hypothesis in the hypergraph.""" + * cdef vector[WordID] trans + */ + static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_2viterbi(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self) { std::vector __pyx_v_trans; PyObject *__pyx_r = NULL; @@ -9932,7 +9310,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_2viterbi(struct __pyx_obj_4c int __pyx_clineno = 0; __Pyx_RefNannySetupContext("viterbi", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":21 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":21 * """hg.viterbi() -> String for the best hypothesis in the hypergraph.""" * cdef vector[WordID] trans * hypergraph.ViterbiESentence(self.hg[0], &trans) # <<<<<<<<<<<<<< @@ -9941,7 +9319,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_2viterbi(struct __pyx_obj_4c */ ViterbiESentence((__pyx_v_self->hg[0]), (&__pyx_v_trans)); - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":22 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":22 * cdef vector[WordID] trans * hypergraph.ViterbiESentence(self.hg[0], &trans) * return unicode(GetString(trans).c_str(), 'utf8') # <<<<<<<<<<<<<< @@ -9950,31 +9328,24 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_2viterbi(struct __pyx_obj_4c */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBytes_FromString(TD::GetString(__pyx_v_trans).c_str()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); + __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); - __Pyx_GIVEREF(__pyx_t_1); - __Pyx_INCREF(__pyx_n_s_utf8); - PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_utf8); - __Pyx_GIVEREF(__pyx_n_s_utf8); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_1)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); + __Pyx_INCREF(((PyObject *)__pyx_n_s__utf8)); + PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_n_s__utf8)); + __Pyx_GIVEREF(((PyObject *)__pyx_n_s__utf8)); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":18 - * return self.rng - * - * def viterbi(self): # <<<<<<<<<<<<<< - * """hg.viterbi() -> String for the best hypothesis in the hypergraph.""" - * cdef vector[WordID] trans - */ - - /* 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); @@ -9986,14 +9357,6 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_2viterbi(struct __pyx_obj_4c return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":24 - * return unicode(GetString(trans).c_str(), 'utf8') - * - * def viterbi_trees(self): # <<<<<<<<<<<<<< - * """hg.viterbi_trees() -> (f_tree, e_tree) - * f_tree: Source tree for the best hypothesis in the hypergraph. - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_5viterbi_trees(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_4cdec_5_cdec_10Hypergraph_4viterbi_trees[] = "hg.viterbi_trees() -> (f_tree, e_tree)\n f_tree: Source tree for the best hypothesis in the hypergraph.\n e_tree: Target tree for the best hypothesis in the hypergraph.\n "; @@ -10002,12 +9365,18 @@ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_5viterbi_trees(PyObject *__p __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("viterbi_trees (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_4viterbi_trees(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":24 + * return unicode(GetString(trans).c_str(), 'utf8') + * + * def viterbi_trees(self): # <<<<<<<<<<<<<< + * """hg.viterbi_trees() -> (f_tree, e_tree) + * f_tree: Source tree for the best hypothesis in the hypergraph. + */ + static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_4viterbi_trees(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self) { PyObject *__pyx_v_f_tree = NULL; PyObject *__pyx_v_e_tree = NULL; @@ -10020,7 +9389,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_4viterbi_trees(struct __pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("viterbi_trees", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":29 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":29 * e_tree: Target tree for the best hypothesis in the hypergraph. * """ * f_tree = unicode(hypergraph.ViterbiFTree(self.hg[0]).c_str(), 'utf8') # <<<<<<<<<<<<<< @@ -10028,22 +9397,22 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_4viterbi_trees(struct __pyx_ * return (f_tree, e_tree) */ __pyx_t_1 = __Pyx_PyBytes_FromString(ViterbiFTree((__pyx_v_self->hg[0])).c_str()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); + __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); - __Pyx_GIVEREF(__pyx_t_1); - __Pyx_INCREF(__pyx_n_s_utf8); - PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_utf8); - __Pyx_GIVEREF(__pyx_n_s_utf8); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_1)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); + __Pyx_INCREF(((PyObject *)__pyx_n_s__utf8)); + PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_n_s__utf8)); + __Pyx_GIVEREF(((PyObject *)__pyx_n_s__utf8)); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_v_f_tree = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":30 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":30 * """ * f_tree = unicode(hypergraph.ViterbiFTree(self.hg[0]).c_str(), 'utf8') * e_tree = unicode(hypergraph.ViterbiETree(self.hg[0]).c_str(), 'utf8') # <<<<<<<<<<<<<< @@ -10051,22 +9420,22 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_4viterbi_trees(struct __pyx_ * */ __pyx_t_1 = __Pyx_PyBytes_FromString(ViterbiETree((__pyx_v_self->hg[0])).c_str()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); + __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); - __Pyx_GIVEREF(__pyx_t_1); - __Pyx_INCREF(__pyx_n_s_utf8); - PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_utf8); - __Pyx_GIVEREF(__pyx_n_s_utf8); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_1)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); + __Pyx_INCREF(((PyObject *)__pyx_n_s__utf8)); + PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_n_s__utf8)); + __Pyx_GIVEREF(((PyObject *)__pyx_n_s__utf8)); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_v_e_tree = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":31 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":31 * f_tree = unicode(hypergraph.ViterbiFTree(self.hg[0]).c_str(), 'utf8') * e_tree = unicode(hypergraph.ViterbiETree(self.hg[0]).c_str(), 'utf8') * return (f_tree, e_tree) # <<<<<<<<<<<<<< @@ -10076,25 +9445,18 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_4viterbi_trees(struct __pyx_ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 31; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_INCREF(__pyx_v_f_tree); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_f_tree); - __Pyx_GIVEREF(__pyx_v_f_tree); - __Pyx_INCREF(__pyx_v_e_tree); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_e_tree); - __Pyx_GIVEREF(__pyx_v_e_tree); - __pyx_r = __pyx_t_1; + __Pyx_INCREF(((PyObject *)__pyx_v_f_tree)); + PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_f_tree)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_f_tree)); + __Pyx_INCREF(((PyObject *)__pyx_v_e_tree)); + PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_e_tree)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_e_tree)); + __pyx_r = ((PyObject *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":24 - * return unicode(GetString(trans).c_str(), 'utf8') - * - * def viterbi_trees(self): # <<<<<<<<<<<<<< - * """hg.viterbi_trees() -> (f_tree, e_tree) - * f_tree: Source tree for the best hypothesis in the hypergraph. - */ - - /* 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); @@ -10108,14 +9470,6 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_4viterbi_trees(struct __pyx_ return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":33 - * return (f_tree, e_tree) - * - * def viterbi_features(self): # <<<<<<<<<<<<<< - * """hg.viterbi_features() -> SparseVector with the features corresponding - * to the best derivation in the hypergraph.""" - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_7viterbi_features(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_4cdec_5_cdec_10Hypergraph_6viterbi_features[] = "hg.viterbi_features() -> SparseVector with the features corresponding\n to the best derivation in the hypergraph."; @@ -10124,12 +9478,18 @@ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_7viterbi_features(PyObject * __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("viterbi_features (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_6viterbi_features(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":33 + * return (f_tree, e_tree) + * + * def viterbi_features(self): # <<<<<<<<<<<<<< + * """hg.viterbi_features() -> SparseVector with the features corresponding + * to the best derivation in the hypergraph.""" + */ + static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_6viterbi_features(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self) { struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_fmap = 0; PyObject *__pyx_r = NULL; @@ -10140,20 +9500,20 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_6viterbi_features(struct __p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("viterbi_features", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":36 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":36 * """hg.viterbi_features() -> SparseVector with the features corresponding * to the best derivation in the hypergraph.""" * cdef SparseVector fmap = SparseVector.__new__(SparseVector) # <<<<<<<<<<<<<< * fmap.vector = new FastSparseVector[weight_t](hypergraph.ViterbiFeatures(self.hg[0])) * return fmap */ - __pyx_t_1 = __pyx_tp_new_4cdec_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SparseVector)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_tp_new_4cdec_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SparseVector)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4cdec_5_cdec_SparseVector)))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fmap = ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":37 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":37 * to the best derivation in the hypergraph.""" * cdef SparseVector fmap = SparseVector.__new__(SparseVector) * fmap.vector = new FastSparseVector[weight_t](hypergraph.ViterbiFeatures(self.hg[0])) # <<<<<<<<<<<<<< @@ -10162,7 +9522,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_6viterbi_features(struct __p */ __pyx_v_fmap->vector = new FastSparseVector(ViterbiFeatures((__pyx_v_self->hg[0]))); - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":38 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":38 * cdef SparseVector fmap = SparseVector.__new__(SparseVector) * fmap.vector = new FastSparseVector[weight_t](hypergraph.ViterbiFeatures(self.hg[0])) * return fmap # <<<<<<<<<<<<<< @@ -10174,15 +9534,8 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_6viterbi_features(struct __p __pyx_r = ((PyObject *)__pyx_v_fmap); goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":33 - * return (f_tree, e_tree) - * - * def viterbi_features(self): # <<<<<<<<<<<<<< - * """hg.viterbi_features() -> SparseVector with the features corresponding - * to the best derivation in the hypergraph.""" - */ - - /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cdec._cdec.Hypergraph.viterbi_features", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -10194,14 +9547,6 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_6viterbi_features(struct __p return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":40 - * return fmap - * - * def viterbi_forest(self): # <<<<<<<<<<<<<< - * cdef Hypergraph hg = Hypergraph() - * hg.hg = new hypergraph.Hypergraph(self.hg[0].CreateViterbiHypergraph(NULL).get()[0]) - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_9viterbi_forest(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_9viterbi_forest(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { @@ -10209,12 +9554,18 @@ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_9viterbi_forest(PyObject *__ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("viterbi_forest (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_8viterbi_forest(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":40 + * return fmap + * + * def viterbi_forest(self): # <<<<<<<<<<<<<< + * cdef Hypergraph hg = Hypergraph() + * hg.hg = new hypergraph.Hypergraph(self.hg[0].CreateViterbiHypergraph(NULL).get()[0]) + */ + static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_8viterbi_forest(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self) { struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_hg = 0; PyObject *__pyx_r = NULL; @@ -10225,19 +9576,19 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_8viterbi_forest(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("viterbi_forest", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":41 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":41 * * def viterbi_forest(self): * cdef Hypergraph hg = Hypergraph() # <<<<<<<<<<<<<< * hg.hg = new hypergraph.Hypergraph(self.hg[0].CreateViterbiHypergraph(NULL).get()[0]) * return hg */ - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_Hypergraph)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_Hypergraph)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_hg = ((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":42 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":42 * def viterbi_forest(self): * cdef Hypergraph hg = Hypergraph() * hg.hg = new hypergraph.Hypergraph(self.hg[0].CreateViterbiHypergraph(NULL).get()[0]) # <<<<<<<<<<<<<< @@ -10246,7 +9597,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_8viterbi_forest(struct __pyx */ __pyx_v_hg->hg = new Hypergraph(((__pyx_v_self->hg[0]).CreateViterbiHypergraph(NULL).get()[0])); - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":43 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":43 * cdef Hypergraph hg = Hypergraph() * hg.hg = new hypergraph.Hypergraph(self.hg[0].CreateViterbiHypergraph(NULL).get()[0]) * return hg # <<<<<<<<<<<<<< @@ -10258,15 +9609,8 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_8viterbi_forest(struct __pyx __pyx_r = ((PyObject *)__pyx_v_hg); goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":40 - * return fmap - * - * def viterbi_forest(self): # <<<<<<<<<<<<<< - * cdef Hypergraph hg = Hypergraph() - * hg.hg = new hypergraph.Hypergraph(self.hg[0].CreateViterbiHypergraph(NULL).get()[0]) - */ - - /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cdec._cdec.Hypergraph.viterbi_forest", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -10278,14 +9622,6 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_8viterbi_forest(struct __pyx return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":45 - * return hg - * - * def viterbi_joshua(self): # <<<<<<<<<<<<<< - * """hg.viterbi_joshua() -> Joshua representation of the best derivation.""" - * return unicode(hypergraph.JoshuaVisualizationString(self.hg[0]).c_str(), 'utf8') - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_11viterbi_joshua(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_4cdec_5_cdec_10Hypergraph_10viterbi_joshua[] = "hg.viterbi_joshua() -> Joshua representation of the best derivation."; @@ -10294,12 +9630,18 @@ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_11viterbi_joshua(PyObject *_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("viterbi_joshua (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_10viterbi_joshua(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":45 + * return hg + * + * def viterbi_joshua(self): # <<<<<<<<<<<<<< + * """hg.viterbi_joshua() -> Joshua representation of the best derivation.""" + * return unicode(hypergraph.JoshuaVisualizationString(self.hg[0]).c_str(), 'utf8') + */ + static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_10viterbi_joshua(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -10310,7 +9652,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_10viterbi_joshua(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("viterbi_joshua", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":47 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":47 * def viterbi_joshua(self): * """hg.viterbi_joshua() -> Joshua representation of the best derivation.""" * return unicode(hypergraph.JoshuaVisualizationString(self.hg[0]).c_str(), 'utf8') # <<<<<<<<<<<<<< @@ -10319,31 +9661,24 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_10viterbi_joshua(struct __py */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBytes_FromString(JoshuaVisualizationString((__pyx_v_self->hg[0])).c_str()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); + __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); - __Pyx_GIVEREF(__pyx_t_1); - __Pyx_INCREF(__pyx_n_s_utf8); - PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_utf8); - __Pyx_GIVEREF(__pyx_n_s_utf8); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_1)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); + __Pyx_INCREF(((PyObject *)__pyx_n_s__utf8)); + PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_n_s__utf8)); + __Pyx_GIVEREF(((PyObject *)__pyx_n_s__utf8)); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":45 - * return hg - * - * def viterbi_joshua(self): # <<<<<<<<<<<<<< - * """hg.viterbi_joshua() -> Joshua representation of the best derivation.""" - * return unicode(hypergraph.JoshuaVisualizationString(self.hg[0]).c_str(), 'utf8') - */ - - /* 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); @@ -10356,14 +9691,6 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_10viterbi_joshua(struct __py } static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_14generator4(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":49 - * return unicode(hypergraph.JoshuaVisualizationString(self.hg[0]).c_str(), 'utf8') - * - * def kbest(self, size): # <<<<<<<<<<<<<< - * """hg.kbest(size) -> List of k-best hypotheses in the hypergraph.""" - * cdef kbest.KBestDerivations[vector[WordID], kbest.ESentenceTraversal]* derivations = new kbest.KBestDerivations[vector[WordID], kbest.ESentenceTraversal](self.hg[0], size) - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_13kbest(PyObject *__pyx_v_self, PyObject *__pyx_v_size); /*proto*/ static char __pyx_doc_4cdec_5_cdec_10Hypergraph_12kbest[] = "hg.kbest(size) -> List of k-best hypotheses in the hypergraph."; @@ -10372,12 +9699,18 @@ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_13kbest(PyObject *__pyx_v_se __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("kbest (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_12kbest(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self), ((PyObject *)__pyx_v_size)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":49 + * return unicode(hypergraph.JoshuaVisualizationString(self.hg[0]).c_str(), 'utf8') + * + * def kbest(self, size): # <<<<<<<<<<<<<< + * """hg.kbest(size) -> List of k-best hypotheses in the hypergraph.""" + * cdef kbest.KBestDerivations[vector[WordID], kbest.ESentenceTraversal, kbest.NoFilter[vector[int]]]* derivations = new kbest.KBestDerivations[vector[WordID], kbest.ESentenceTraversal, kbest.NoFilter[vector[int]]](self.hg[0], size) + */ + static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_12kbest(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self, PyObject *__pyx_v_size) { struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest *__pyx_cur_scope; PyObject *__pyx_r = NULL; @@ -10405,7 +9738,6 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_12kbest(struct __pyx_obj_4cd return (PyObject *) gen; } - /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; @@ -10427,15 +9759,6 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_14generator4(__pyx_Generator int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; - int __pyx_t_6; - int __pyx_t_7; - char const *__pyx_t_8; - PyObject *__pyx_t_9 = NULL; - PyObject *__pyx_t_10 = NULL; - PyObject *__pyx_t_11 = NULL; - PyObject *__pyx_t_12 = NULL; - PyObject *__pyx_t_13 = NULL; - PyObject *__pyx_t_14 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -10451,18 +9774,18 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_14generator4(__pyx_Generator __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":51 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":51 * def kbest(self, size): * """hg.kbest(size) -> List of k-best hypotheses in the hypergraph.""" - * cdef kbest.KBestDerivations[vector[WordID], kbest.ESentenceTraversal]* derivations = new kbest.KBestDerivations[vector[WordID], kbest.ESentenceTraversal](self.hg[0], size) # <<<<<<<<<<<<<< - * cdef kbest.KBestDerivations[vector[WordID], kbest.ESentenceTraversal].Derivation* derivation + * cdef kbest.KBestDerivations[vector[WordID], kbest.ESentenceTraversal, kbest.NoFilter[vector[int]]]* derivations = new kbest.KBestDerivations[vector[WordID], kbest.ESentenceTraversal, kbest.NoFilter[vector[int]]](self.hg[0], size) # <<<<<<<<<<<<<< + * cdef kbest.KBestDerivations[vector[WordID], kbest.ESentenceTraversal, kbest.NoFilter[vector[int]]].Derivation* derivation * cdef unsigned k */ - __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_cur_scope->__pyx_v_size); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_cur_scope->__pyx_v_derivations = new KBest::KBestDerivations,ESentenceTraversal>((__pyx_cur_scope->__pyx_v_self->hg[0]), __pyx_t_1); + __pyx_t_1 = __Pyx_PyInt_AsUnsignedInt(__pyx_cur_scope->__pyx_v_size); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_cur_scope->__pyx_v_derivations = new KBest::KBestDerivations,ESentenceTraversal,KBest::NoFilter > >((__pyx_cur_scope->__pyx_v_self->hg[0]), __pyx_t_1); - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":54 - * cdef kbest.KBestDerivations[vector[WordID], kbest.ESentenceTraversal].Derivation* derivation + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":54 + * cdef kbest.KBestDerivations[vector[WordID], kbest.ESentenceTraversal, kbest.NoFilter[vector[int]]].Derivation* derivation * cdef unsigned k * try: # <<<<<<<<<<<<<< * for k in range(size): @@ -10470,18 +9793,18 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_14generator4(__pyx_Generator */ /*try:*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":55 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":55 * cdef unsigned k * try: * for k in range(size): # <<<<<<<<<<<<<< * derivation = derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) * if not derivation: break */ - __pyx_t_2 = __Pyx_PyInt_As_long(__pyx_cur_scope->__pyx_v_size); if (unlikely((__pyx_t_2 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + __pyx_t_2 = __Pyx_PyInt_AsLong(__pyx_cur_scope->__pyx_v_size); if (unlikely((__pyx_t_2 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L5;} for (__pyx_t_1 = 0; __pyx_t_1 < __pyx_t_2; __pyx_t_1+=1) { __pyx_cur_scope->__pyx_v_k = __pyx_t_1; - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":56 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":56 * try: * for k in range(size): * derivation = derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) # <<<<<<<<<<<<<< @@ -10490,7 +9813,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_14generator4(__pyx_Generator */ __pyx_cur_scope->__pyx_v_derivation = __pyx_cur_scope->__pyx_v_derivations->LazyKthBest((__pyx_cur_scope->__pyx_v_self->hg->nodes_.size() - 1), __pyx_cur_scope->__pyx_v_k); - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":57 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":57 * for k in range(size): * derivation = derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) * if not derivation: break # <<<<<<<<<<<<<< @@ -10500,28 +9823,30 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_14generator4(__pyx_Generator __pyx_t_3 = ((!(__pyx_cur_scope->__pyx_v_derivation != 0)) != 0); if (__pyx_t_3) { goto __pyx_L8_break; + goto __pyx_L9; } + __pyx_L9:; - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":58 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":58 * derivation = derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) * if not derivation: break * yield unicode(GetString(derivation._yield).c_str(), 'utf8') # <<<<<<<<<<<<<< * finally: * del derivations */ - __pyx_t_4 = __Pyx_PyBytes_FromString(TD::GetString(__pyx_cur_scope->__pyx_v_derivation->yield).c_str()); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L5_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + __pyx_t_4 = __Pyx_PyBytes_FromString(TD::GetString(__pyx_cur_scope->__pyx_v_derivation->yield).c_str()); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L5;} + __Pyx_GOTREF(((PyObject *)__pyx_t_4)); + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L5;} __Pyx_GOTREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); - __Pyx_GIVEREF(__pyx_t_4); - __Pyx_INCREF(__pyx_n_s_utf8); - PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_n_s_utf8); - __Pyx_GIVEREF(__pyx_n_s_utf8); + PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_4)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_4)); + __Pyx_INCREF(((PyObject *)__pyx_n_s__utf8)); + PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_n_s__utf8)); + __Pyx_GIVEREF(((PyObject *)__pyx_n_s__utf8)); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L5;} __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; __pyx_cur_scope->__pyx_t_0 = __pyx_t_1; @@ -10534,12 +9859,12 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_14generator4(__pyx_Generator __pyx_L10_resume_from_yield:; __pyx_t_1 = __pyx_cur_scope->__pyx_t_0; __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L5;} } __pyx_L8_break:; } - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":60 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":60 * yield unicode(GetString(derivation._yield).c_str(), 'utf8') * finally: * del derivations # <<<<<<<<<<<<<< @@ -10547,53 +9872,32 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_14generator4(__pyx_Generator * def kbest_trees(self, size): */ /*finally:*/ { - /*normal exit:*/{ - delete __pyx_cur_scope->__pyx_v_derivations; - goto __pyx_L6; - } - /*exception exit:*/{ - __pyx_L5_error:; - __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; + int __pyx_why; + PyObject *__pyx_exc_type, *__pyx_exc_value, *__pyx_exc_tb; + int __pyx_exc_lineno; + __pyx_exc_type = 0; __pyx_exc_value = 0; __pyx_exc_tb = 0; __pyx_exc_lineno = 0; + __pyx_why = 0; goto __pyx_L6; + __pyx_L5: { + __pyx_why = 4; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); - if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11) < 0)) __Pyx_ErrFetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); - __Pyx_XGOTREF(__pyx_t_9); - __Pyx_XGOTREF(__pyx_t_10); - __Pyx_XGOTREF(__pyx_t_11); - __Pyx_XGOTREF(__pyx_t_12); - __Pyx_XGOTREF(__pyx_t_13); - __Pyx_XGOTREF(__pyx_t_14); - __pyx_t_6 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_8 = __pyx_filename; - { - delete __pyx_cur_scope->__pyx_v_derivations; - } - if (PY_MAJOR_VERSION >= 3) { - __Pyx_XGIVEREF(__pyx_t_12); - __Pyx_XGIVEREF(__pyx_t_13); - __Pyx_XGIVEREF(__pyx_t_14); - __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); - } - __Pyx_XGIVEREF(__pyx_t_9); - __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_XGIVEREF(__pyx_t_11); - __Pyx_ErrRestore(__pyx_t_9, __pyx_t_10, __pyx_t_11); - __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; - __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_8; - goto __pyx_L1_error; + __Pyx_ErrFetch(&__pyx_exc_type, &__pyx_exc_value, &__pyx_exc_tb); + __pyx_exc_lineno = __pyx_lineno; + goto __pyx_L6; } __pyx_L6:; + delete __pyx_cur_scope->__pyx_v_derivations; + switch (__pyx_why) { + case 4: { + __Pyx_ErrRestore(__pyx_exc_type, __pyx_exc_value, __pyx_exc_tb); + __pyx_lineno = __pyx_exc_lineno; + __pyx_exc_type = 0; + __pyx_exc_value = 0; + __pyx_exc_tb = 0; + goto __pyx_L1_error; + } + } } - - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":49 - * return unicode(hypergraph.JoshuaVisualizationString(self.hg[0]).c_str(), 'utf8') - * - * def kbest(self, size): # <<<<<<<<<<<<<< - * """hg.kbest(size) -> List of k-best hypotheses in the hypergraph.""" - * cdef kbest.KBestDerivations[vector[WordID], kbest.ESentenceTraversal]* derivations = new kbest.KBestDerivations[vector[WordID], kbest.ESentenceTraversal](self.hg[0], size) - */ - - /* function exit code */ PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; @@ -10609,28 +9913,26 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_14generator4(__pyx_Generator } static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_17generator5(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":62 - * del derivations - * - * def kbest_trees(self, size): # <<<<<<<<<<<<<< - * """hg.kbest_trees(size) -> List of k-best trees in the hypergraph.""" - * cdef kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal]* f_derivations = new kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal](self.hg[0], size) - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_16kbest_trees(PyObject *__pyx_v_self, PyObject *__pyx_v_size); /*proto*/ -static char __pyx_doc_4cdec_5_cdec_10Hypergraph_15kbest_trees[] = "hg.kbest_trees(size) -> List of k-best trees in the hypergraph."; +static char __pyx_doc_4cdec_5_cdec_10Hypergraph_15kbest_trees[] = "hg.kbest_trees(size) -> List of k-best trees in the hypergrapt.NoFilter."; static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_16kbest_trees(PyObject *__pyx_v_self, PyObject *__pyx_v_size) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("kbest_trees (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_15kbest_trees(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self), ((PyObject *)__pyx_v_size)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":62 + * del derivations + * + * def kbest_trees(self, size): # <<<<<<<<<<<<<< + * """hg.kbest_trees(size) -> List of k-best trees in the hypergrapt.NoFilter.""" + * cdef kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal, kbest.NoFilter[vector[int]]]* f_derivations = new kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal, kbest.NoFilter[vector[int]]](self.hg[0], size) + */ + static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_15kbest_trees(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self, PyObject *__pyx_v_size) { struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees *__pyx_cur_scope; PyObject *__pyx_r = NULL; @@ -10658,7 +9960,6 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_15kbest_trees(struct __pyx_o return (PyObject *) gen; } - /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; @@ -10682,15 +9983,6 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_17generator5(__pyx_Generator int __pyx_t_5; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; - int __pyx_t_8; - int __pyx_t_9; - char const *__pyx_t_10; - PyObject *__pyx_t_11 = NULL; - PyObject *__pyx_t_12 = NULL; - PyObject *__pyx_t_13 = NULL; - PyObject *__pyx_t_14 = NULL; - PyObject *__pyx_t_15 = NULL; - PyObject *__pyx_t_16 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -10706,28 +9998,28 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_17generator5(__pyx_Generator __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":64 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":64 * def kbest_trees(self, size): - * """hg.kbest_trees(size) -> List of k-best trees in the hypergraph.""" - * cdef kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal]* f_derivations = new kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal](self.hg[0], size) # <<<<<<<<<<<<<< - * cdef kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal].Derivation* f_derivation - * cdef kbest.KBestDerivations[vector[WordID], kbest.ETreeTraversal]* e_derivations = new kbest.KBestDerivations[vector[WordID], kbest.ETreeTraversal](self.hg[0], size) - */ - __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_cur_scope->__pyx_v_size); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_cur_scope->__pyx_v_f_derivations = new KBest::KBestDerivations,FTreeTraversal>((__pyx_cur_scope->__pyx_v_self->hg[0]), __pyx_t_1); - - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":66 - * cdef kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal]* f_derivations = new kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal](self.hg[0], size) - * cdef kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal].Derivation* f_derivation - * cdef kbest.KBestDerivations[vector[WordID], kbest.ETreeTraversal]* e_derivations = new kbest.KBestDerivations[vector[WordID], kbest.ETreeTraversal](self.hg[0], size) # <<<<<<<<<<<<<< - * cdef kbest.KBestDerivations[vector[WordID], kbest.ETreeTraversal].Derivation* e_derivation + * """hg.kbest_trees(size) -> List of k-best trees in the hypergrapt.NoFilter.""" + * cdef kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal, kbest.NoFilter[vector[int]]]* f_derivations = new kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal, kbest.NoFilter[vector[int]]](self.hg[0], size) # <<<<<<<<<<<<<< + * cdef kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal, kbest.NoFilter[vector[int]]].Derivation* f_derivation + * cdef kbest.KBestDerivations[vector[WordID], kbest.ETreeTraversal, kbest.NoFilter[vector[int]]]* e_derivations = new kbest.KBestDerivations[vector[WordID], kbest.ETreeTraversal, kbest.NoFilter[vector[int]]](self.hg[0], size) + */ + __pyx_t_1 = __Pyx_PyInt_AsUnsignedInt(__pyx_cur_scope->__pyx_v_size); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_cur_scope->__pyx_v_f_derivations = new KBest::KBestDerivations,FTreeTraversal,KBest::NoFilter > >((__pyx_cur_scope->__pyx_v_self->hg[0]), __pyx_t_1); + + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":66 + * cdef kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal, kbest.NoFilter[vector[int]]]* f_derivations = new kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal, kbest.NoFilter[vector[int]]](self.hg[0], size) + * cdef kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal, kbest.NoFilter[vector[int]]].Derivation* f_derivation + * cdef kbest.KBestDerivations[vector[WordID], kbest.ETreeTraversal, kbest.NoFilter[vector[int]]]* e_derivations = new kbest.KBestDerivations[vector[WordID], kbest.ETreeTraversal, kbest.NoFilter[vector[int]]](self.hg[0], size) # <<<<<<<<<<<<<< + * cdef kbest.KBestDerivations[vector[WordID], kbest.ETreeTraversal, kbest.NoFilter[vector[int]]].Derivation* e_derivation * cdef unsigned k */ - __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_cur_scope->__pyx_v_size); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_cur_scope->__pyx_v_e_derivations = new KBest::KBestDerivations,ETreeTraversal>((__pyx_cur_scope->__pyx_v_self->hg[0]), __pyx_t_1); + __pyx_t_1 = __Pyx_PyInt_AsUnsignedInt(__pyx_cur_scope->__pyx_v_size); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_cur_scope->__pyx_v_e_derivations = new KBest::KBestDerivations,ETreeTraversal,KBest::NoFilter > >((__pyx_cur_scope->__pyx_v_self->hg[0]), __pyx_t_1); - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":69 - * cdef kbest.KBestDerivations[vector[WordID], kbest.ETreeTraversal].Derivation* e_derivation + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":69 + * cdef kbest.KBestDerivations[vector[WordID], kbest.ETreeTraversal, kbest.NoFilter[vector[int]]].Derivation* e_derivation * cdef unsigned k * try: # <<<<<<<<<<<<<< * for k in range(size): @@ -10735,18 +10027,18 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_17generator5(__pyx_Generator */ /*try:*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":70 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":70 * cdef unsigned k * try: * for k in range(size): # <<<<<<<<<<<<<< * f_derivation = f_derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) * e_derivation = e_derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) */ - __pyx_t_2 = __Pyx_PyInt_As_long(__pyx_cur_scope->__pyx_v_size); if (unlikely((__pyx_t_2 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + __pyx_t_2 = __Pyx_PyInt_AsLong(__pyx_cur_scope->__pyx_v_size); if (unlikely((__pyx_t_2 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L5;} for (__pyx_t_1 = 0; __pyx_t_1 < __pyx_t_2; __pyx_t_1+=1) { __pyx_cur_scope->__pyx_v_k = __pyx_t_1; - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":71 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":71 * try: * for k in range(size): * f_derivation = f_derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) # <<<<<<<<<<<<<< @@ -10755,7 +10047,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_17generator5(__pyx_Generator */ __pyx_cur_scope->__pyx_v_f_derivation = __pyx_cur_scope->__pyx_v_f_derivations->LazyKthBest((__pyx_cur_scope->__pyx_v_self->hg->nodes_.size() - 1), __pyx_cur_scope->__pyx_v_k); - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":72 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":72 * for k in range(size): * f_derivation = f_derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) * e_derivation = e_derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) # <<<<<<<<<<<<<< @@ -10764,7 +10056,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_17generator5(__pyx_Generator */ __pyx_cur_scope->__pyx_v_e_derivation = __pyx_cur_scope->__pyx_v_e_derivations->LazyKthBest((__pyx_cur_scope->__pyx_v_self->hg->nodes_.size() - 1), __pyx_cur_scope->__pyx_v_k); - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":73 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":73 * f_derivation = f_derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) * e_derivation = e_derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) * if not f_derivation or not e_derivation: break # <<<<<<<<<<<<<< @@ -10780,74 +10072,78 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_17generator5(__pyx_Generator } if (__pyx_t_5) { goto __pyx_L8_break; + goto __pyx_L9; } + __pyx_L9:; - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":74 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":74 * e_derivation = e_derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) * if not f_derivation or not e_derivation: break * f_tree = unicode(GetString(f_derivation._yield).c_str(), 'utf8') # <<<<<<<<<<<<<< * e_tree = unicode(GetString(e_derivation._yield).c_str(), 'utf8') * yield (f_tree, e_tree) */ - __pyx_t_6 = __Pyx_PyBytes_FromString(TD::GetString(__pyx_cur_scope->__pyx_v_f_derivation->yield).c_str()); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L5_error;} - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + __pyx_t_6 = __Pyx_PyBytes_FromString(TD::GetString(__pyx_cur_scope->__pyx_v_f_derivation->yield).c_str()); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L5;} + __Pyx_GOTREF(((PyObject *)__pyx_t_6)); + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L5;} __Pyx_GOTREF(__pyx_t_7); - PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); - __Pyx_GIVEREF(__pyx_t_6); - __Pyx_INCREF(__pyx_n_s_utf8); - PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_n_s_utf8); - __Pyx_GIVEREF(__pyx_n_s_utf8); + PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_t_6)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_6)); + __Pyx_INCREF(((PyObject *)__pyx_n_s__utf8)); + PyTuple_SET_ITEM(__pyx_t_7, 1, ((PyObject *)__pyx_n_s__utf8)); + __Pyx_GIVEREF(((PyObject *)__pyx_n_s__utf8)); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L5;} __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_f_tree); - __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_f_tree, ((PyObject*)__pyx_t_6)); + __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; + __Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_f_tree)); + __Pyx_XDECREF(((PyObject *)__pyx_cur_scope->__pyx_v_f_tree)); __Pyx_GIVEREF(__pyx_t_6); + __pyx_cur_scope->__pyx_v_f_tree = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":75 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":75 * if not f_derivation or not e_derivation: break * f_tree = unicode(GetString(f_derivation._yield).c_str(), 'utf8') * e_tree = unicode(GetString(e_derivation._yield).c_str(), 'utf8') # <<<<<<<<<<<<<< * yield (f_tree, e_tree) * finally: */ - __pyx_t_6 = __Pyx_PyBytes_FromString(TD::GetString(__pyx_cur_scope->__pyx_v_e_derivation->yield).c_str()); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L5_error;} - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + __pyx_t_6 = __Pyx_PyBytes_FromString(TD::GetString(__pyx_cur_scope->__pyx_v_e_derivation->yield).c_str()); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L5;} + __Pyx_GOTREF(((PyObject *)__pyx_t_6)); + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L5;} __Pyx_GOTREF(__pyx_t_7); - PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); - __Pyx_GIVEREF(__pyx_t_6); - __Pyx_INCREF(__pyx_n_s_utf8); - PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_n_s_utf8); - __Pyx_GIVEREF(__pyx_n_s_utf8); + PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_t_6)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_6)); + __Pyx_INCREF(((PyObject *)__pyx_n_s__utf8)); + PyTuple_SET_ITEM(__pyx_t_7, 1, ((PyObject *)__pyx_n_s__utf8)); + __Pyx_GIVEREF(((PyObject *)__pyx_n_s__utf8)); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L5;} __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_e_tree); - __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_e_tree, ((PyObject*)__pyx_t_6)); + __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; + __Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_e_tree)); + __Pyx_XDECREF(((PyObject *)__pyx_cur_scope->__pyx_v_e_tree)); __Pyx_GIVEREF(__pyx_t_6); + __pyx_cur_scope->__pyx_v_e_tree = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":76 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":76 * f_tree = unicode(GetString(f_derivation._yield).c_str(), 'utf8') * e_tree = unicode(GetString(e_derivation._yield).c_str(), 'utf8') * yield (f_tree, e_tree) # <<<<<<<<<<<<<< * finally: * del f_derivations */ - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L5;} __Pyx_GOTREF(__pyx_t_6); - __Pyx_INCREF(__pyx_cur_scope->__pyx_v_f_tree); - PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_cur_scope->__pyx_v_f_tree); - __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_f_tree); - __Pyx_INCREF(__pyx_cur_scope->__pyx_v_e_tree); - PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_cur_scope->__pyx_v_e_tree); - __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_e_tree); - __pyx_r = __pyx_t_6; + __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_f_tree)); + PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_cur_scope->__pyx_v_f_tree)); + __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_f_tree)); + __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_e_tree)); + PyTuple_SET_ITEM(__pyx_t_6, 1, ((PyObject *)__pyx_cur_scope->__pyx_v_e_tree)); + __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_e_tree)); + __pyx_r = ((PyObject *)__pyx_t_6); __pyx_t_6 = 0; __pyx_cur_scope->__pyx_t_0 = __pyx_t_1; __pyx_cur_scope->__pyx_t_1 = __pyx_t_2; @@ -10859,12 +10155,12 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_17generator5(__pyx_Generator __pyx_L10_resume_from_yield:; __pyx_t_1 = __pyx_cur_scope->__pyx_t_0; __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L5;} } __pyx_L8_break:; } - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":78 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":78 * yield (f_tree, e_tree) * finally: * del f_derivations # <<<<<<<<<<<<<< @@ -10872,79 +10168,41 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_17generator5(__pyx_Generator * */ /*finally:*/ { - /*normal exit:*/{ - delete __pyx_cur_scope->__pyx_v_f_derivations; - - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":79 - * finally: - * del f_derivations - * del e_derivations # <<<<<<<<<<<<<< - * - * def kbest_features(self, size): - */ - delete __pyx_cur_scope->__pyx_v_e_derivations; - goto __pyx_L6; - } - /*exception exit:*/{ - __pyx_L5_error:; - __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; + int __pyx_why; + PyObject *__pyx_exc_type, *__pyx_exc_value, *__pyx_exc_tb; + int __pyx_exc_lineno; + __pyx_exc_type = 0; __pyx_exc_value = 0; __pyx_exc_tb = 0; __pyx_exc_lineno = 0; + __pyx_why = 0; goto __pyx_L6; + __pyx_L5: { + __pyx_why = 4; __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16); - if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13) < 0)) __Pyx_ErrFetch(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13); - __Pyx_XGOTREF(__pyx_t_11); - __Pyx_XGOTREF(__pyx_t_12); - __Pyx_XGOTREF(__pyx_t_13); - __Pyx_XGOTREF(__pyx_t_14); - __Pyx_XGOTREF(__pyx_t_15); - __Pyx_XGOTREF(__pyx_t_16); - __pyx_t_8 = __pyx_lineno; __pyx_t_9 = __pyx_clineno; __pyx_t_10 = __pyx_filename; - { - - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":78 - * yield (f_tree, e_tree) - * finally: - * del f_derivations # <<<<<<<<<<<<<< - * del e_derivations - * - */ - delete __pyx_cur_scope->__pyx_v_f_derivations; + __Pyx_ErrFetch(&__pyx_exc_type, &__pyx_exc_value, &__pyx_exc_tb); + __pyx_exc_lineno = __pyx_lineno; + goto __pyx_L6; + } + __pyx_L6:; + delete __pyx_cur_scope->__pyx_v_f_derivations; - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":79 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":79 * finally: * del f_derivations * del e_derivations # <<<<<<<<<<<<<< * * def kbest_features(self, size): */ - delete __pyx_cur_scope->__pyx_v_e_derivations; - } - if (PY_MAJOR_VERSION >= 3) { - __Pyx_XGIVEREF(__pyx_t_14); - __Pyx_XGIVEREF(__pyx_t_15); - __Pyx_XGIVEREF(__pyx_t_16); - __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16); + delete __pyx_cur_scope->__pyx_v_e_derivations; + switch (__pyx_why) { + case 4: { + __Pyx_ErrRestore(__pyx_exc_type, __pyx_exc_value, __pyx_exc_tb); + __pyx_lineno = __pyx_exc_lineno; + __pyx_exc_type = 0; + __pyx_exc_value = 0; + __pyx_exc_tb = 0; + goto __pyx_L1_error; } - __Pyx_XGIVEREF(__pyx_t_11); - __Pyx_XGIVEREF(__pyx_t_12); - __Pyx_XGIVEREF(__pyx_t_13); - __Pyx_ErrRestore(__pyx_t_11, __pyx_t_12, __pyx_t_13); - __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_16 = 0; - __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_9; __pyx_filename = __pyx_t_10; - goto __pyx_L1_error; } - __pyx_L6:; } - - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":62 - * del derivations - * - * def kbest_trees(self, size): # <<<<<<<<<<<<<< - * """hg.kbest_trees(size) -> List of k-best trees in the hypergraph.""" - * cdef kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal]* f_derivations = new kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal](self.hg[0], size) - */ - - /* function exit code */ PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; @@ -10960,14 +10218,6 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_17generator5(__pyx_Generator } static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_20generator6(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":81 - * del e_derivations - * - * def kbest_features(self, size): # <<<<<<<<<<<<<< - * """hg.kbest_trees(size) -> List of k-best feature vectors in the hypergraph.""" - * cdef kbest.KBestDerivations[FastSparseVector[weight_t], kbest.FeatureVectorTraversal]* derivations = new kbest.KBestDerivations[FastSparseVector[weight_t], kbest.FeatureVectorTraversal](self.hg[0], size) - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_19kbest_features(PyObject *__pyx_v_self, PyObject *__pyx_v_size); /*proto*/ static char __pyx_doc_4cdec_5_cdec_10Hypergraph_18kbest_features[] = "hg.kbest_trees(size) -> List of k-best feature vectors in the hypergraph."; @@ -10976,12 +10226,18 @@ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_19kbest_features(PyObject *_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("kbest_features (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_18kbest_features(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self), ((PyObject *)__pyx_v_size)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":81 + * del e_derivations + * + * def kbest_features(self, size): # <<<<<<<<<<<<<< + * """hg.kbest_trees(size) -> List of k-best feature vectors in the hypergraph.""" + * cdef kbest.KBestDerivations[FastSparseVector[weight_t], kbest.FeatureVectorTraversal, kbest.NoFilter[FastSparseVector[double]]]* derivations = new kbest.KBestDerivations[FastSparseVector[weight_t], kbest.FeatureVectorTraversal, kbest.NoFilter[FastSparseVector[double]]](self.hg[0], size) + */ + static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_18kbest_features(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self, PyObject *__pyx_v_size) { struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features *__pyx_cur_scope; PyObject *__pyx_r = NULL; @@ -11009,7 +10265,6 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_18kbest_features(struct __py return (PyObject *) gen; } - /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; @@ -11030,15 +10285,6 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_20generator6(__pyx_Generator long __pyx_t_2; int __pyx_t_3; PyObject *__pyx_t_4 = NULL; - int __pyx_t_5; - int __pyx_t_6; - char const *__pyx_t_7; - PyObject *__pyx_t_8 = NULL; - PyObject *__pyx_t_9 = NULL; - PyObject *__pyx_t_10 = NULL; - PyObject *__pyx_t_11 = NULL; - PyObject *__pyx_t_12 = NULL; - PyObject *__pyx_t_13 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -11054,17 +10300,17 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_20generator6(__pyx_Generator __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":83 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":83 * def kbest_features(self, size): * """hg.kbest_trees(size) -> List of k-best feature vectors in the hypergraph.""" - * cdef kbest.KBestDerivations[FastSparseVector[weight_t], kbest.FeatureVectorTraversal]* derivations = new kbest.KBestDerivations[FastSparseVector[weight_t], kbest.FeatureVectorTraversal](self.hg[0], size) # <<<<<<<<<<<<<< - * cdef kbest.KBestDerivations[FastSparseVector[weight_t], kbest.FeatureVectorTraversal].Derivation* derivation + * cdef kbest.KBestDerivations[FastSparseVector[weight_t], kbest.FeatureVectorTraversal, kbest.NoFilter[FastSparseVector[double]]]* derivations = new kbest.KBestDerivations[FastSparseVector[weight_t], kbest.FeatureVectorTraversal, kbest.NoFilter[FastSparseVector[double]]](self.hg[0], size) # <<<<<<<<<<<<<< + * cdef kbest.KBestDerivations[FastSparseVector[weight_t], kbest.FeatureVectorTraversal, kbest.NoFilter[FastSparseVector[double]]].Derivation* derivation * cdef SparseVector fmap */ - __pyx_t_1 = __Pyx_PyInt_As_unsigned_int(__pyx_cur_scope->__pyx_v_size); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_cur_scope->__pyx_v_derivations = new KBest::KBestDerivations,FeatureVectorTraversal>((__pyx_cur_scope->__pyx_v_self->hg[0]), __pyx_t_1); + __pyx_t_1 = __Pyx_PyInt_AsUnsignedInt(__pyx_cur_scope->__pyx_v_size); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_cur_scope->__pyx_v_derivations = new KBest::KBestDerivations,FeatureVectorTraversal,KBest::NoFilter > >((__pyx_cur_scope->__pyx_v_self->hg[0]), __pyx_t_1); - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":87 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":87 * cdef SparseVector fmap * cdef unsigned k * try: # <<<<<<<<<<<<<< @@ -11073,18 +10319,18 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_20generator6(__pyx_Generator */ /*try:*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":88 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":88 * cdef unsigned k * try: * for k in range(size): # <<<<<<<<<<<<<< * derivation = derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) * if not derivation: break */ - __pyx_t_2 = __Pyx_PyInt_As_long(__pyx_cur_scope->__pyx_v_size); if (unlikely((__pyx_t_2 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + __pyx_t_2 = __Pyx_PyInt_AsLong(__pyx_cur_scope->__pyx_v_size); if (unlikely((__pyx_t_2 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L5;} for (__pyx_t_1 = 0; __pyx_t_1 < __pyx_t_2; __pyx_t_1+=1) { __pyx_cur_scope->__pyx_v_k = __pyx_t_1; - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":89 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":89 * try: * for k in range(size): * derivation = derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) # <<<<<<<<<<<<<< @@ -11093,7 +10339,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_20generator6(__pyx_Generator */ __pyx_cur_scope->__pyx_v_derivation = __pyx_cur_scope->__pyx_v_derivations->LazyKthBest((__pyx_cur_scope->__pyx_v_self->hg->nodes_.size() - 1), __pyx_cur_scope->__pyx_v_k); - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":90 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":90 * for k in range(size): * derivation = derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) * if not derivation: break # <<<<<<<<<<<<<< @@ -11103,24 +10349,27 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_20generator6(__pyx_Generator __pyx_t_3 = ((!(__pyx_cur_scope->__pyx_v_derivation != 0)) != 0); if (__pyx_t_3) { goto __pyx_L8_break; + goto __pyx_L9; } + __pyx_L9:; - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":91 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":91 * derivation = derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) * if not derivation: break * fmap = SparseVector.__new__(SparseVector) # <<<<<<<<<<<<<< * fmap.vector = new FastSparseVector[weight_t](derivation._yield) * yield fmap */ - __pyx_t_4 = __pyx_tp_new_4cdec_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SparseVector)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + __pyx_t_4 = __pyx_tp_new_4cdec_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SparseVector)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L5;} __Pyx_GOTREF(__pyx_t_4); - if (!(likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_4cdec_5_cdec_SparseVector)))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + if (!(likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_4cdec_5_cdec_SparseVector)))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L5;} __Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_fmap)); - __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_fmap, ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_t_4)); + __Pyx_XDECREF(((PyObject *)__pyx_cur_scope->__pyx_v_fmap)); __Pyx_GIVEREF(__pyx_t_4); + __pyx_cur_scope->__pyx_v_fmap = ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":92 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":92 * if not derivation: break * fmap = SparseVector.__new__(SparseVector) * fmap.vector = new FastSparseVector[weight_t](derivation._yield) # <<<<<<<<<<<<<< @@ -11129,7 +10378,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_20generator6(__pyx_Generator */ __pyx_cur_scope->__pyx_v_fmap->vector = new FastSparseVector(__pyx_cur_scope->__pyx_v_derivation->yield); - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":93 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":93 * fmap = SparseVector.__new__(SparseVector) * fmap.vector = new FastSparseVector[weight_t](derivation._yield) * yield fmap # <<<<<<<<<<<<<< @@ -11148,65 +10397,44 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_20generator6(__pyx_Generator __pyx_L10_resume_from_yield:; __pyx_t_1 = __pyx_cur_scope->__pyx_t_0; __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L5;} } __pyx_L8_break:; } - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":95 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":95 * yield fmap * finally: * del derivations # <<<<<<<<<<<<<< * - * def sample(self, unsigned n): + * def unique_kbest(self, size): */ /*finally:*/ { - /*normal exit:*/{ - delete __pyx_cur_scope->__pyx_v_derivations; + int __pyx_why; + PyObject *__pyx_exc_type, *__pyx_exc_value, *__pyx_exc_tb; + int __pyx_exc_lineno; + __pyx_exc_type = 0; __pyx_exc_value = 0; __pyx_exc_tb = 0; __pyx_exc_lineno = 0; + __pyx_why = 0; goto __pyx_L6; + __pyx_L5: { + __pyx_why = 4; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_ErrFetch(&__pyx_exc_type, &__pyx_exc_value, &__pyx_exc_tb); + __pyx_exc_lineno = __pyx_lineno; goto __pyx_L6; } - /*exception exit:*/{ - __pyx_L5_error:; - __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13); - if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10) < 0)) __Pyx_ErrFetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); - __Pyx_XGOTREF(__pyx_t_8); - __Pyx_XGOTREF(__pyx_t_9); - __Pyx_XGOTREF(__pyx_t_10); - __Pyx_XGOTREF(__pyx_t_11); - __Pyx_XGOTREF(__pyx_t_12); - __Pyx_XGOTREF(__pyx_t_13); - __pyx_t_5 = __pyx_lineno; __pyx_t_6 = __pyx_clineno; __pyx_t_7 = __pyx_filename; - { - delete __pyx_cur_scope->__pyx_v_derivations; - } - if (PY_MAJOR_VERSION >= 3) { - __Pyx_XGIVEREF(__pyx_t_11); - __Pyx_XGIVEREF(__pyx_t_12); - __Pyx_XGIVEREF(__pyx_t_13); - __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13); + __pyx_L6:; + delete __pyx_cur_scope->__pyx_v_derivations; + switch (__pyx_why) { + case 4: { + __Pyx_ErrRestore(__pyx_exc_type, __pyx_exc_value, __pyx_exc_tb); + __pyx_lineno = __pyx_exc_lineno; + __pyx_exc_type = 0; + __pyx_exc_value = 0; + __pyx_exc_tb = 0; + goto __pyx_L1_error; } - __Pyx_XGIVEREF(__pyx_t_8); - __Pyx_XGIVEREF(__pyx_t_9); - __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_ErrRestore(__pyx_t_8, __pyx_t_9, __pyx_t_10); - __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; - __pyx_lineno = __pyx_t_5; __pyx_clineno = __pyx_t_6; __pyx_filename = __pyx_t_7; - goto __pyx_L1_error; } - __pyx_L6:; } - - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":81 - * del e_derivations - * - * def kbest_features(self, size): # <<<<<<<<<<<<<< - * """hg.kbest_trees(size) -> List of k-best feature vectors in the hypergraph.""" - * cdef kbest.KBestDerivations[FastSparseVector[weight_t], kbest.FeatureVectorTraversal]* derivations = new kbest.KBestDerivations[FastSparseVector[weight_t], kbest.FeatureVectorTraversal](self.hg[0], size) - */ - - /* function exit code */ PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; @@ -11221,50 +10449,35 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_20generator6(__pyx_Generator } static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_23generator7(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":97 - * del derivations - * - * def sample(self, unsigned n): # <<<<<<<<<<<<<< - * """hg.sample(n) -> Sample of n hypotheses from the hypergraph.""" - * cdef vector[hypergraph.Hypothesis]* hypos = new vector[hypergraph.Hypothesis]() - */ - /* Python wrapper */ -static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_22sample(PyObject *__pyx_v_self, PyObject *__pyx_arg_n); /*proto*/ -static char __pyx_doc_4cdec_5_cdec_10Hypergraph_21sample[] = "hg.sample(n) -> Sample of n hypotheses from the hypergraph."; -static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_22sample(PyObject *__pyx_v_self, PyObject *__pyx_arg_n) { - unsigned int __pyx_v_n; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; +static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_22unique_kbest(PyObject *__pyx_v_self, PyObject *__pyx_v_size); /*proto*/ +static char __pyx_doc_4cdec_5_cdec_10Hypergraph_21unique_kbest[] = "hg.kbest(size) -> List of unique k-best hypotheses in the hypergraph."; +static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_22unique_kbest(PyObject *__pyx_v_self, PyObject *__pyx_v_size) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("sample (wrapper)", 0); - assert(__pyx_arg_n); { - __pyx_v_n = __Pyx_PyInt_As_unsigned_int(__pyx_arg_n); if (unlikely((__pyx_v_n == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - } - goto __pyx_L4_argument_unpacking_done; - __pyx_L3_error:; - __Pyx_AddTraceback("cdec._cdec.Hypergraph.sample", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return NULL; - __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_21sample(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self), ((unsigned int)__pyx_v_n)); - - /* function exit code */ + __Pyx_RefNannySetupContext("unique_kbest (wrapper)", 0); + __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_21unique_kbest(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self), ((PyObject *)__pyx_v_size)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_21sample(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self, unsigned int __pyx_v_n) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample *__pyx_cur_scope; +/* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":97 + * del derivations + * + * def unique_kbest(self, size): # <<<<<<<<<<<<<< + * """hg.kbest(size) -> List of unique k-best hypotheses in the hypergraph.""" + * cdef kbest.KBestDerivations[vector[WordID], kbest.ESentenceTraversal, kbest.FilterUnique]* derivations = new kbest.KBestDerivations[vector[WordID], kbest.ESentenceTraversal, kbest.FilterUnique](self.hg[0], size) + */ + +static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_21unique_kbest(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self, PyObject *__pyx_v_size) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_unique_kbest *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("sample", 0); - __pyx_cur_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample *)__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_11_sample(__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_11_sample, __pyx_empty_tuple, NULL); + __Pyx_RefNannySetupContext("unique_kbest", 0); + __pyx_cur_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_unique_kbest *)__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_11_unique_kbest(__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_11_unique_kbest, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; @@ -11273,7 +10486,9 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_21sample(struct __pyx_obj_4c __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_n = __pyx_v_n; + __pyx_cur_scope->__pyx_v_size = __pyx_v_size; + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_size); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_size); { __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_5_cdec_10Hypergraph_23generator7, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); @@ -11281,11 +10496,10 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_21sample(struct __pyx_obj_4c return (PyObject *) gen; } - /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - __Pyx_AddTraceback("cdec._cdec.Hypergraph.sample", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.Hypergraph.unique_kbest", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); @@ -11296,22 +10510,13 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_21sample(struct __pyx_obj_4c static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_23generator7(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample *__pyx_cur_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample *)__pyx_generator->closure); + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_unique_kbest *__pyx_cur_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_unique_kbest *)__pyx_generator->closure); PyObject *__pyx_r = NULL; - std::vector *__pyx_t_1; - size_t __pyx_t_2; - unsigned int __pyx_t_3; + unsigned int __pyx_t_1; + long __pyx_t_2; + int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; - int __pyx_t_6; - int __pyx_t_7; - char const *__pyx_t_8; - PyObject *__pyx_t_9 = NULL; - PyObject *__pyx_t_10 = NULL; - PyObject *__pyx_t_11 = NULL; - PyObject *__pyx_t_12 = NULL; - PyObject *__pyx_t_13 = NULL; - PyObject *__pyx_t_14 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -11319,7 +10524,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_23generator7(__pyx_Generator __Pyx_RefNannySetupContext("None", 0); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; - case 1: goto __pyx_L9_resume_from_yield; + case 1: goto __pyx_L10_resume_from_yield; default: /* CPython raises the right error here */ __Pyx_RefNannyFinishContext(); return NULL; @@ -11327,147 +10532,136 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_23generator7(__pyx_Generator __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":99 - * def sample(self, unsigned n): - * """hg.sample(n) -> Sample of n hypotheses from the hypergraph.""" - * cdef vector[hypergraph.Hypothesis]* hypos = new vector[hypergraph.Hypothesis]() # <<<<<<<<<<<<<< - * hypergraph.sample_hypotheses(self.hg[0], n, self._rng(), hypos) - * cdef unsigned k - */ - try { - __pyx_t_1 = new std::vector(); - } catch(...) { - __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[3]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - } - __pyx_cur_scope->__pyx_v_hypos = __pyx_t_1; - - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":100 - * """hg.sample(n) -> Sample of n hypotheses from the hypergraph.""" - * cdef vector[hypergraph.Hypothesis]* hypos = new vector[hypergraph.Hypothesis]() - * hypergraph.sample_hypotheses(self.hg[0], n, self._rng(), hypos) # <<<<<<<<<<<<<< + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":99 + * def unique_kbest(self, size): + * """hg.kbest(size) -> List of unique k-best hypotheses in the hypergraph.""" + * cdef kbest.KBestDerivations[vector[WordID], kbest.ESentenceTraversal, kbest.FilterUnique]* derivations = new kbest.KBestDerivations[vector[WordID], kbest.ESentenceTraversal, kbest.FilterUnique](self.hg[0], size) # <<<<<<<<<<<<<< + * cdef kbest.KBestDerivations[vector[WordID], kbest.ESentenceTraversal, kbest.FilterUnique].Derivation* derivation * cdef unsigned k - * try: */ - HypergraphSampler::sample_hypotheses((__pyx_cur_scope->__pyx_v_self->hg[0]), __pyx_cur_scope->__pyx_v_n, ((struct __pyx_vtabstruct_4cdec_5_cdec_Hypergraph *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_rng(__pyx_cur_scope->__pyx_v_self), __pyx_cur_scope->__pyx_v_hypos); + __pyx_t_1 = __Pyx_PyInt_AsUnsignedInt(__pyx_cur_scope->__pyx_v_size); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_cur_scope->__pyx_v_derivations = new KBest::KBestDerivations,ESentenceTraversal,KBest::FilterUnique>((__pyx_cur_scope->__pyx_v_self->hg[0]), __pyx_t_1); - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":102 - * hypergraph.sample_hypotheses(self.hg[0], n, self._rng(), hypos) + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":102 + * cdef kbest.KBestDerivations[vector[WordID], kbest.ESentenceTraversal, kbest.FilterUnique].Derivation* derivation * cdef unsigned k * try: # <<<<<<<<<<<<<< - * for k in range(hypos.size()): - * yield unicode(GetString(hypos[0][k].words).c_str(), 'utf8') + * for k in range(size): + * derivation = derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) */ /*try:*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":103 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":103 * cdef unsigned k * try: - * for k in range(hypos.size()): # <<<<<<<<<<<<<< - * yield unicode(GetString(hypos[0][k].words).c_str(), 'utf8') - * finally: + * for k in range(size): # <<<<<<<<<<<<<< + * derivation = derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) + * if not derivation: break */ - __pyx_t_2 = __pyx_cur_scope->__pyx_v_hypos->size(); - for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { - __pyx_cur_scope->__pyx_v_k = __pyx_t_3; + __pyx_t_2 = __Pyx_PyInt_AsLong(__pyx_cur_scope->__pyx_v_size); if (unlikely((__pyx_t_2 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L5;} + for (__pyx_t_1 = 0; __pyx_t_1 < __pyx_t_2; __pyx_t_1+=1) { + __pyx_cur_scope->__pyx_v_k = __pyx_t_1; - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":104 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":104 * try: - * for k in range(hypos.size()): - * yield unicode(GetString(hypos[0][k].words).c_str(), 'utf8') # <<<<<<<<<<<<<< + * for k in range(size): + * derivation = derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) # <<<<<<<<<<<<<< + * if not derivation: break + * yield unicode(GetString(derivation._yield).c_str(), 'utf8') + */ + __pyx_cur_scope->__pyx_v_derivation = __pyx_cur_scope->__pyx_v_derivations->LazyKthBest((__pyx_cur_scope->__pyx_v_self->hg->nodes_.size() - 1), __pyx_cur_scope->__pyx_v_k); + + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":105 + * for k in range(size): + * derivation = derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) + * if not derivation: break # <<<<<<<<<<<<<< + * yield unicode(GetString(derivation._yield).c_str(), 'utf8') * finally: - * del hypos */ - __pyx_t_4 = __Pyx_PyBytes_FromString(TD::GetString(((__pyx_cur_scope->__pyx_v_hypos[0])[__pyx_cur_scope->__pyx_v_k]).words).c_str()); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L5_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + __pyx_t_3 = ((!(__pyx_cur_scope->__pyx_v_derivation != 0)) != 0); + if (__pyx_t_3) { + goto __pyx_L8_break; + goto __pyx_L9; + } + __pyx_L9:; + + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":106 + * derivation = derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) + * if not derivation: break + * yield unicode(GetString(derivation._yield).c_str(), 'utf8') # <<<<<<<<<<<<<< + * finally: + * del derivations + */ + __pyx_t_4 = __Pyx_PyBytes_FromString(TD::GetString(__pyx_cur_scope->__pyx_v_derivation->yield).c_str()); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L5;} + __Pyx_GOTREF(((PyObject *)__pyx_t_4)); + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L5;} __Pyx_GOTREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); - __Pyx_GIVEREF(__pyx_t_4); - __Pyx_INCREF(__pyx_n_s_utf8); - PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_n_s_utf8); - __Pyx_GIVEREF(__pyx_n_s_utf8); + PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_4)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_4)); + __Pyx_INCREF(((PyObject *)__pyx_n_s__utf8)); + PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_n_s__utf8)); + __Pyx_GIVEREF(((PyObject *)__pyx_n_s__utf8)); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L5;} __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; - __pyx_cur_scope->__pyx_t_0 = __pyx_t_2; - __pyx_cur_scope->__pyx_t_1 = __pyx_t_3; + __pyx_cur_scope->__pyx_t_0 = __pyx_t_1; + __pyx_cur_scope->__pyx_t_1 = __pyx_t_2; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); /* return from generator, yielding value */ __pyx_generator->resume_label = 1; return __pyx_r; - __pyx_L9_resume_from_yield:; - __pyx_t_2 = __pyx_cur_scope->__pyx_t_0; - __pyx_t_3 = __pyx_cur_scope->__pyx_t_1; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + __pyx_L10_resume_from_yield:; + __pyx_t_1 = __pyx_cur_scope->__pyx_t_0; + __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L5;} } + __pyx_L8_break:; } - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":106 - * yield unicode(GetString(hypos[0][k].words).c_str(), 'utf8') + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":108 + * yield unicode(GetString(derivation._yield).c_str(), 'utf8') * finally: - * del hypos # <<<<<<<<<<<<<< + * del derivations # <<<<<<<<<<<<<< * - * def sample_trees(self, unsigned n): + * def unique_kbest_trees(self, size): */ /*finally:*/ { - /*normal exit:*/{ - delete __pyx_cur_scope->__pyx_v_hypos; - goto __pyx_L6; - } - /*exception exit:*/{ - __pyx_L5_error:; - __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; + int __pyx_why; + PyObject *__pyx_exc_type, *__pyx_exc_value, *__pyx_exc_tb; + int __pyx_exc_lineno; + __pyx_exc_type = 0; __pyx_exc_value = 0; __pyx_exc_tb = 0; __pyx_exc_lineno = 0; + __pyx_why = 0; goto __pyx_L6; + __pyx_L5: { + __pyx_why = 4; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); - if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11) < 0)) __Pyx_ErrFetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); - __Pyx_XGOTREF(__pyx_t_9); - __Pyx_XGOTREF(__pyx_t_10); - __Pyx_XGOTREF(__pyx_t_11); - __Pyx_XGOTREF(__pyx_t_12); - __Pyx_XGOTREF(__pyx_t_13); - __Pyx_XGOTREF(__pyx_t_14); - __pyx_t_6 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_8 = __pyx_filename; - { - delete __pyx_cur_scope->__pyx_v_hypos; - } - if (PY_MAJOR_VERSION >= 3) { - __Pyx_XGIVEREF(__pyx_t_12); - __Pyx_XGIVEREF(__pyx_t_13); - __Pyx_XGIVEREF(__pyx_t_14); - __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); - } - __Pyx_XGIVEREF(__pyx_t_9); - __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_XGIVEREF(__pyx_t_11); - __Pyx_ErrRestore(__pyx_t_9, __pyx_t_10, __pyx_t_11); - __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; - __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_8; - goto __pyx_L1_error; + __Pyx_ErrFetch(&__pyx_exc_type, &__pyx_exc_value, &__pyx_exc_tb); + __pyx_exc_lineno = __pyx_lineno; + goto __pyx_L6; } __pyx_L6:; + delete __pyx_cur_scope->__pyx_v_derivations; + switch (__pyx_why) { + case 4: { + __Pyx_ErrRestore(__pyx_exc_type, __pyx_exc_value, __pyx_exc_tb); + __pyx_lineno = __pyx_exc_lineno; + __pyx_exc_type = 0; + __pyx_exc_value = 0; + __pyx_exc_tb = 0; + goto __pyx_L1_error; + } + } } - - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":97 - * del derivations - * - * def sample(self, unsigned n): # <<<<<<<<<<<<<< - * """hg.sample(n) -> Sample of n hypotheses from the hypergraph.""" - * cdef vector[hypergraph.Hypothesis]* hypos = new vector[hypergraph.Hypothesis]() - */ - - /* function exit code */ PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); - __Pyx_AddTraceback("sample", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("unique_kbest", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); __pyx_generator->resume_label = -1; @@ -11477,50 +10671,35 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_23generator7(__pyx_Generator } static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_26generator8(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ -/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":108 - * del hypos - * - * def sample_trees(self, unsigned n): # <<<<<<<<<<<<<< - * """hg.sample_trees(n) -> Sample of n trees from the hypergraph.""" - * cdef vector[string]* trees = new vector[string]() - */ - /* Python wrapper */ -static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_25sample_trees(PyObject *__pyx_v_self, PyObject *__pyx_arg_n); /*proto*/ -static char __pyx_doc_4cdec_5_cdec_10Hypergraph_24sample_trees[] = "hg.sample_trees(n) -> Sample of n trees from the hypergraph."; -static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_25sample_trees(PyObject *__pyx_v_self, PyObject *__pyx_arg_n) { - unsigned int __pyx_v_n; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; +static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_25unique_kbest_trees(PyObject *__pyx_v_self, PyObject *__pyx_v_size); /*proto*/ +static char __pyx_doc_4cdec_5_cdec_10Hypergraph_24unique_kbest_trees[] = "hg.kbest_trees(size) -> List of unique k-best trees in the hypergraph."; +static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_25unique_kbest_trees(PyObject *__pyx_v_self, PyObject *__pyx_v_size) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("sample_trees (wrapper)", 0); - assert(__pyx_arg_n); { - __pyx_v_n = __Pyx_PyInt_As_unsigned_int(__pyx_arg_n); if (unlikely((__pyx_v_n == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - } - goto __pyx_L4_argument_unpacking_done; - __pyx_L3_error:; - __Pyx_AddTraceback("cdec._cdec.Hypergraph.sample_trees", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return NULL; - __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_24sample_trees(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self), ((unsigned int)__pyx_v_n)); - - /* function exit code */ + __Pyx_RefNannySetupContext("unique_kbest_trees (wrapper)", 0); + __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_24unique_kbest_trees(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self), ((PyObject *)__pyx_v_size)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_24sample_trees(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self, unsigned int __pyx_v_n) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees *__pyx_cur_scope; +/* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":110 + * del derivations + * + * def unique_kbest_trees(self, size): # <<<<<<<<<<<<<< + * """hg.kbest_trees(size) -> List of unique k-best trees in the hypergraph.""" + * cdef kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal, kbest.FilterUnique]* f_derivations = new kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal, kbest.FilterUnique](self.hg[0], size) + */ + +static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_24unique_kbest_trees(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self, PyObject *__pyx_v_size) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_unique_kbest_trees *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("sample_trees", 0); - __pyx_cur_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees *)__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_12_sample_trees(__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_12_sample_trees, __pyx_empty_tuple, NULL); + __Pyx_RefNannySetupContext("unique_kbest_trees", 0); + __pyx_cur_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_unique_kbest_trees *)__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_12_unique_kbest_trees(__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_12_unique_kbest_trees, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; @@ -11529,19 +10708,20 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_24sample_trees(struct __pyx_ __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_n = __pyx_v_n; + __pyx_cur_scope->__pyx_v_size = __pyx_v_size; + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_size); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_size); { - __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_5_cdec_10Hypergraph_26generator8, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_5_cdec_10Hypergraph_26generator8, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } - /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; - __Pyx_AddTraceback("cdec._cdec.Hypergraph.sample_trees", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("cdec._cdec.Hypergraph.unique_kbest_trees", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); @@ -11552,22 +10732,15 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_24sample_trees(struct __pyx_ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_26generator8(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees *__pyx_cur_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees *)__pyx_generator->closure); + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_unique_kbest_trees *__pyx_cur_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_unique_kbest_trees *)__pyx_generator->closure); PyObject *__pyx_r = NULL; - std::vector *__pyx_t_1; - size_t __pyx_t_2; - unsigned int __pyx_t_3; - PyObject *__pyx_t_4 = NULL; - PyObject *__pyx_t_5 = NULL; - int __pyx_t_6; - int __pyx_t_7; - char const *__pyx_t_8; - PyObject *__pyx_t_9 = NULL; - PyObject *__pyx_t_10 = NULL; - PyObject *__pyx_t_11 = NULL; - PyObject *__pyx_t_12 = NULL; - PyObject *__pyx_t_13 = NULL; - PyObject *__pyx_t_14 = NULL; + unsigned int __pyx_t_1; + long __pyx_t_2; + int __pyx_t_3; + int __pyx_t_4; + int __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -11575,49 +10748,817 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_26generator8(__pyx_Generator __Pyx_RefNannySetupContext("None", 0); switch (__pyx_generator->resume_label) { case 0: goto __pyx_L3_first_run; - case 1: goto __pyx_L9_resume_from_yield; + case 1: goto __pyx_L10_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[3]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":110 - * def sample_trees(self, unsigned n): - * """hg.sample_trees(n) -> Sample of n trees from the hypergraph.""" - * cdef vector[string]* trees = new vector[string]() # <<<<<<<<<<<<<< - * hypergraph.sample_trees(self.hg[0], n, self._rng(), trees) - * cdef unsigned k - */ - try { - __pyx_t_1 = new std::vector(); - } catch(...) { - __Pyx_CppExn2PyErr(); - {__pyx_filename = __pyx_f[3]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - } - __pyx_cur_scope->__pyx_v_trees = __pyx_t_1; - - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":111 - * """hg.sample_trees(n) -> Sample of n trees from the hypergraph.""" - * cdef vector[string]* trees = new vector[string]() - * hypergraph.sample_trees(self.hg[0], n, self._rng(), trees) # <<<<<<<<<<<<<< - * cdef unsigned k - * try: + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":112 + * def unique_kbest_trees(self, size): + * """hg.kbest_trees(size) -> List of unique k-best trees in the hypergraph.""" + * cdef kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal, kbest.FilterUnique]* f_derivations = new kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal, kbest.FilterUnique](self.hg[0], size) # <<<<<<<<<<<<<< + * cdef kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal, kbest.FilterUnique].Derivation* f_derivation + * cdef kbest.KBestDerivations[vector[WordID], kbest.ETreeTraversal, kbest.FilterUnique]* e_derivations = new kbest.KBestDerivations[vector[WordID], kbest.ETreeTraversal, kbest.FilterUnique](self.hg[0], size) + */ + __pyx_t_1 = __Pyx_PyInt_AsUnsignedInt(__pyx_cur_scope->__pyx_v_size); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_cur_scope->__pyx_v_f_derivations = new KBest::KBestDerivations,FTreeTraversal,KBest::FilterUnique>((__pyx_cur_scope->__pyx_v_self->hg[0]), __pyx_t_1); + + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":114 + * cdef kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal, kbest.FilterUnique]* f_derivations = new kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal, kbest.FilterUnique](self.hg[0], size) + * cdef kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal, kbest.FilterUnique].Derivation* f_derivation + * cdef kbest.KBestDerivations[vector[WordID], kbest.ETreeTraversal, kbest.FilterUnique]* e_derivations = new kbest.KBestDerivations[vector[WordID], kbest.ETreeTraversal, kbest.FilterUnique](self.hg[0], size) # <<<<<<<<<<<<<< + * cdef kbest.KBestDerivations[vector[WordID], kbest.ETreeTraversal, kbest.FilterUnique].Derivation* e_derivation + * cdef unsigned k */ - HypergraphSampler::sample_trees((__pyx_cur_scope->__pyx_v_self->hg[0]), __pyx_cur_scope->__pyx_v_n, ((struct __pyx_vtabstruct_4cdec_5_cdec_Hypergraph *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_rng(__pyx_cur_scope->__pyx_v_self), __pyx_cur_scope->__pyx_v_trees); + __pyx_t_1 = __Pyx_PyInt_AsUnsignedInt(__pyx_cur_scope->__pyx_v_size); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_cur_scope->__pyx_v_e_derivations = new KBest::KBestDerivations,ETreeTraversal,KBest::FilterUnique>((__pyx_cur_scope->__pyx_v_self->hg[0]), __pyx_t_1); - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":113 - * hypergraph.sample_trees(self.hg[0], n, self._rng(), trees) - * cdef unsigned k - * try: # <<<<<<<<<<<<<< - * for k in range(trees.size()): - * yield unicode(trees[0][k].c_str(), 'utf8') + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":117 + * cdef kbest.KBestDerivations[vector[WordID], kbest.ETreeTraversal, kbest.FilterUnique].Derivation* e_derivation + * cdef unsigned k + * try: # <<<<<<<<<<<<<< + * for k in range(size): + * f_derivation = f_derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) */ /*try:*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":114 - * cdef unsigned k + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":118 + * cdef unsigned k + * try: + * for k in range(size): # <<<<<<<<<<<<<< + * f_derivation = f_derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) + * e_derivation = e_derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) + */ + __pyx_t_2 = __Pyx_PyInt_AsLong(__pyx_cur_scope->__pyx_v_size); if (unlikely((__pyx_t_2 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L5;} + for (__pyx_t_1 = 0; __pyx_t_1 < __pyx_t_2; __pyx_t_1+=1) { + __pyx_cur_scope->__pyx_v_k = __pyx_t_1; + + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":119 + * try: + * for k in range(size): + * f_derivation = f_derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) # <<<<<<<<<<<<<< + * e_derivation = e_derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) + * if not f_derivation or not e_derivation: break + */ + __pyx_cur_scope->__pyx_v_f_derivation = __pyx_cur_scope->__pyx_v_f_derivations->LazyKthBest((__pyx_cur_scope->__pyx_v_self->hg->nodes_.size() - 1), __pyx_cur_scope->__pyx_v_k); + + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":120 + * for k in range(size): + * f_derivation = f_derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) + * e_derivation = e_derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) # <<<<<<<<<<<<<< + * if not f_derivation or not e_derivation: break + * f_tree = unicode(GetString(f_derivation._yield).c_str(), 'utf8') + */ + __pyx_cur_scope->__pyx_v_e_derivation = __pyx_cur_scope->__pyx_v_e_derivations->LazyKthBest((__pyx_cur_scope->__pyx_v_self->hg->nodes_.size() - 1), __pyx_cur_scope->__pyx_v_k); + + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":121 + * f_derivation = f_derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) + * e_derivation = e_derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) + * if not f_derivation or not e_derivation: break # <<<<<<<<<<<<<< + * f_tree = unicode(GetString(f_derivation._yield).c_str(), 'utf8') + * e_tree = unicode(GetString(e_derivation._yield).c_str(), 'utf8') + */ + __pyx_t_3 = ((!(__pyx_cur_scope->__pyx_v_f_derivation != 0)) != 0); + if (!__pyx_t_3) { + __pyx_t_4 = ((!(__pyx_cur_scope->__pyx_v_e_derivation != 0)) != 0); + __pyx_t_5 = __pyx_t_4; + } else { + __pyx_t_5 = __pyx_t_3; + } + if (__pyx_t_5) { + goto __pyx_L8_break; + goto __pyx_L9; + } + __pyx_L9:; + + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":122 + * e_derivation = e_derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) + * if not f_derivation or not e_derivation: break + * f_tree = unicode(GetString(f_derivation._yield).c_str(), 'utf8') # <<<<<<<<<<<<<< + * e_tree = unicode(GetString(e_derivation._yield).c_str(), 'utf8') + * yield (f_tree, e_tree) + */ + __pyx_t_6 = __Pyx_PyBytes_FromString(TD::GetString(__pyx_cur_scope->__pyx_v_f_derivation->yield).c_str()); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L5;} + __Pyx_GOTREF(((PyObject *)__pyx_t_6)); + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L5;} + __Pyx_GOTREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_t_6)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_6)); + __Pyx_INCREF(((PyObject *)__pyx_n_s__utf8)); + PyTuple_SET_ITEM(__pyx_t_7, 1, ((PyObject *)__pyx_n_s__utf8)); + __Pyx_GIVEREF(((PyObject *)__pyx_n_s__utf8)); + __pyx_t_6 = 0; + __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L5;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; + __Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_f_tree)); + __Pyx_XDECREF(((PyObject *)__pyx_cur_scope->__pyx_v_f_tree)); + __Pyx_GIVEREF(__pyx_t_6); + __pyx_cur_scope->__pyx_v_f_tree = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":123 + * if not f_derivation or not e_derivation: break + * f_tree = unicode(GetString(f_derivation._yield).c_str(), 'utf8') + * e_tree = unicode(GetString(e_derivation._yield).c_str(), 'utf8') # <<<<<<<<<<<<<< + * yield (f_tree, e_tree) + * finally: + */ + __pyx_t_6 = __Pyx_PyBytes_FromString(TD::GetString(__pyx_cur_scope->__pyx_v_e_derivation->yield).c_str()); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L5;} + __Pyx_GOTREF(((PyObject *)__pyx_t_6)); + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L5;} + __Pyx_GOTREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_t_6)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_6)); + __Pyx_INCREF(((PyObject *)__pyx_n_s__utf8)); + PyTuple_SET_ITEM(__pyx_t_7, 1, ((PyObject *)__pyx_n_s__utf8)); + __Pyx_GIVEREF(((PyObject *)__pyx_n_s__utf8)); + __pyx_t_6 = 0; + __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L5;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; + __Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_e_tree)); + __Pyx_XDECREF(((PyObject *)__pyx_cur_scope->__pyx_v_e_tree)); + __Pyx_GIVEREF(__pyx_t_6); + __pyx_cur_scope->__pyx_v_e_tree = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":124 + * f_tree = unicode(GetString(f_derivation._yield).c_str(), 'utf8') + * e_tree = unicode(GetString(e_derivation._yield).c_str(), 'utf8') + * yield (f_tree, e_tree) # <<<<<<<<<<<<<< + * finally: + * del f_derivations + */ + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L5;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_f_tree)); + PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_cur_scope->__pyx_v_f_tree)); + __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_f_tree)); + __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_e_tree)); + PyTuple_SET_ITEM(__pyx_t_6, 1, ((PyObject *)__pyx_cur_scope->__pyx_v_e_tree)); + __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_e_tree)); + __pyx_r = ((PyObject *)__pyx_t_6); + __pyx_t_6 = 0; + __pyx_cur_scope->__pyx_t_0 = __pyx_t_1; + __pyx_cur_scope->__pyx_t_1 = __pyx_t_2; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + /* return from generator, yielding value */ + __pyx_generator->resume_label = 1; + return __pyx_r; + __pyx_L10_resume_from_yield:; + __pyx_t_1 = __pyx_cur_scope->__pyx_t_0; + __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L5;} + } + __pyx_L8_break:; + } + + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":126 + * yield (f_tree, e_tree) + * finally: + * del f_derivations # <<<<<<<<<<<<<< + * del e_derivations + * + */ + /*finally:*/ { + int __pyx_why; + PyObject *__pyx_exc_type, *__pyx_exc_value, *__pyx_exc_tb; + int __pyx_exc_lineno; + __pyx_exc_type = 0; __pyx_exc_value = 0; __pyx_exc_tb = 0; __pyx_exc_lineno = 0; + __pyx_why = 0; goto __pyx_L6; + __pyx_L5: { + __pyx_why = 4; + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_ErrFetch(&__pyx_exc_type, &__pyx_exc_value, &__pyx_exc_tb); + __pyx_exc_lineno = __pyx_lineno; + goto __pyx_L6; + } + __pyx_L6:; + delete __pyx_cur_scope->__pyx_v_f_derivations; + + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":127 + * finally: + * del f_derivations + * del e_derivations # <<<<<<<<<<<<<< + * + * def unique_kbest_features(self, size): + */ + delete __pyx_cur_scope->__pyx_v_e_derivations; + switch (__pyx_why) { + case 4: { + __Pyx_ErrRestore(__pyx_exc_type, __pyx_exc_value, __pyx_exc_tb); + __pyx_lineno = __pyx_exc_lineno; + __pyx_exc_type = 0; + __pyx_exc_value = 0; + __pyx_exc_tb = 0; + goto __pyx_L1_error; + } + } + } + PyErr_SetNone(PyExc_StopIteration); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("unique_kbest_trees", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_L0:; + __Pyx_XDECREF(__pyx_r); + __pyx_generator->resume_label = -1; + __Pyx_Generator_clear((PyObject*)__pyx_generator); + __Pyx_RefNannyFinishContext(); + return NULL; +} +static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_29generator9(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_28unique_kbest_features(PyObject *__pyx_v_self, PyObject *__pyx_v_size); /*proto*/ +static char __pyx_doc_4cdec_5_cdec_10Hypergraph_27unique_kbest_features[] = "hg.kbest_trees(size) -> List of unique k-best feature vectors in the hypergraph."; +static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_28unique_kbest_features(PyObject *__pyx_v_self, PyObject *__pyx_v_size) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("unique_kbest_features (wrapper)", 0); + __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_27unique_kbest_features(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self), ((PyObject *)__pyx_v_size)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":129 + * del e_derivations + * + * def unique_kbest_features(self, size): # <<<<<<<<<<<<<< + * """hg.kbest_trees(size) -> List of unique k-best feature vectors in the hypergraph.""" + * cdef kbest.KBestDerivations[FastSparseVector[weight_t], kbest.FeatureVectorTraversal, kbest.NoFilter[FastSparseVector[double]]]* derivations = new kbest.KBestDerivations[FastSparseVector[weight_t], kbest.FeatureVectorTraversal, kbest.NoFilter[FastSparseVector[double]]](self.hg[0], size) + */ + +static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_27unique_kbest_features(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self, PyObject *__pyx_v_size) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13_unique_kbest_features *__pyx_cur_scope; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("unique_kbest_features", 0); + __pyx_cur_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13_unique_kbest_features *)__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_13_unique_kbest_features(__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_13_unique_kbest_features, __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_size = __pyx_v_size; + __Pyx_INCREF(__pyx_cur_scope->__pyx_v_size); + __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_size); + { + __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_5_cdec_10Hypergraph_29generator9, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_cur_scope); + __Pyx_RefNannyFinishContext(); + return (PyObject *) gen; + } + + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cdec._cdec.Hypergraph.unique_kbest_features", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_29generator9(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ +{ + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13_unique_kbest_features *__pyx_cur_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13_unique_kbest_features *)__pyx_generator->closure); + PyObject *__pyx_r = NULL; + unsigned int __pyx_t_1; + long __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_RefNannyDeclarations + __Pyx_RefNannySetupContext("None", 0); + switch (__pyx_generator->resume_label) { + case 0: goto __pyx_L3_first_run; + case 1: goto __pyx_L10_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[3]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":131 + * def unique_kbest_features(self, size): + * """hg.kbest_trees(size) -> List of unique k-best feature vectors in the hypergraph.""" + * cdef kbest.KBestDerivations[FastSparseVector[weight_t], kbest.FeatureVectorTraversal, kbest.NoFilter[FastSparseVector[double]]]* derivations = new kbest.KBestDerivations[FastSparseVector[weight_t], kbest.FeatureVectorTraversal, kbest.NoFilter[FastSparseVector[double]]](self.hg[0], size) # <<<<<<<<<<<<<< + * cdef kbest.KBestDerivations[FastSparseVector[weight_t], kbest.FeatureVectorTraversal, kbest.NoFilter[FastSparseVector[double]]].Derivation* derivation + * cdef SparseVector fmap + */ + __pyx_t_1 = __Pyx_PyInt_AsUnsignedInt(__pyx_cur_scope->__pyx_v_size); if (unlikely((__pyx_t_1 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_cur_scope->__pyx_v_derivations = new KBest::KBestDerivations,FeatureVectorTraversal,KBest::NoFilter > >((__pyx_cur_scope->__pyx_v_self->hg[0]), __pyx_t_1); + + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":135 + * cdef SparseVector fmap + * cdef unsigned k + * try: # <<<<<<<<<<<<<< + * for k in range(size): + * derivation = derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) + */ + /*try:*/ { + + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":136 + * cdef unsigned k + * try: + * for k in range(size): # <<<<<<<<<<<<<< + * derivation = derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) + * if not derivation: break + */ + __pyx_t_2 = __Pyx_PyInt_AsLong(__pyx_cur_scope->__pyx_v_size); if (unlikely((__pyx_t_2 == (long)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L5;} + for (__pyx_t_1 = 0; __pyx_t_1 < __pyx_t_2; __pyx_t_1+=1) { + __pyx_cur_scope->__pyx_v_k = __pyx_t_1; + + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":137 + * try: + * for k in range(size): + * derivation = derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) # <<<<<<<<<<<<<< + * if not derivation: break + * fmap = SparseVector.__new__(SparseVector) + */ + __pyx_cur_scope->__pyx_v_derivation = __pyx_cur_scope->__pyx_v_derivations->LazyKthBest((__pyx_cur_scope->__pyx_v_self->hg->nodes_.size() - 1), __pyx_cur_scope->__pyx_v_k); + + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":138 + * for k in range(size): + * derivation = derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) + * if not derivation: break # <<<<<<<<<<<<<< + * fmap = SparseVector.__new__(SparseVector) + * fmap.vector = new FastSparseVector[weight_t](derivation._yield) + */ + __pyx_t_3 = ((!(__pyx_cur_scope->__pyx_v_derivation != 0)) != 0); + if (__pyx_t_3) { + goto __pyx_L8_break; + goto __pyx_L9; + } + __pyx_L9:; + + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":139 + * derivation = derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) + * if not derivation: break + * fmap = SparseVector.__new__(SparseVector) # <<<<<<<<<<<<<< + * fmap.vector = new FastSparseVector[weight_t](derivation._yield) + * yield fmap + */ + __pyx_t_4 = __pyx_tp_new_4cdec_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SparseVector)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L5;} + __Pyx_GOTREF(__pyx_t_4); + if (!(likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_4cdec_5_cdec_SparseVector)))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L5;} + __Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_fmap)); + __Pyx_XDECREF(((PyObject *)__pyx_cur_scope->__pyx_v_fmap)); + __Pyx_GIVEREF(__pyx_t_4); + __pyx_cur_scope->__pyx_v_fmap = ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_t_4); + __pyx_t_4 = 0; + + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":140 + * if not derivation: break + * fmap = SparseVector.__new__(SparseVector) + * fmap.vector = new FastSparseVector[weight_t](derivation._yield) # <<<<<<<<<<<<<< + * yield fmap + * finally: + */ + __pyx_cur_scope->__pyx_v_fmap->vector = new FastSparseVector(__pyx_cur_scope->__pyx_v_derivation->yield); + + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":141 + * fmap = SparseVector.__new__(SparseVector) + * fmap.vector = new FastSparseVector[weight_t](derivation._yield) + * yield fmap # <<<<<<<<<<<<<< + * finally: + * del derivations + */ + __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_fmap)); + __pyx_r = ((PyObject *)__pyx_cur_scope->__pyx_v_fmap); + __pyx_cur_scope->__pyx_t_0 = __pyx_t_1; + __pyx_cur_scope->__pyx_t_1 = __pyx_t_2; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + /* return from generator, yielding value */ + __pyx_generator->resume_label = 1; + return __pyx_r; + __pyx_L10_resume_from_yield:; + __pyx_t_1 = __pyx_cur_scope->__pyx_t_0; + __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L5;} + } + __pyx_L8_break:; + } + + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":143 + * yield fmap + * finally: + * del derivations # <<<<<<<<<<<<<< + * + * def sample(self, unsigned n): + */ + /*finally:*/ { + int __pyx_why; + PyObject *__pyx_exc_type, *__pyx_exc_value, *__pyx_exc_tb; + int __pyx_exc_lineno; + __pyx_exc_type = 0; __pyx_exc_value = 0; __pyx_exc_tb = 0; __pyx_exc_lineno = 0; + __pyx_why = 0; goto __pyx_L6; + __pyx_L5: { + __pyx_why = 4; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_ErrFetch(&__pyx_exc_type, &__pyx_exc_value, &__pyx_exc_tb); + __pyx_exc_lineno = __pyx_lineno; + goto __pyx_L6; + } + __pyx_L6:; + delete __pyx_cur_scope->__pyx_v_derivations; + switch (__pyx_why) { + case 4: { + __Pyx_ErrRestore(__pyx_exc_type, __pyx_exc_value, __pyx_exc_tb); + __pyx_lineno = __pyx_exc_lineno; + __pyx_exc_type = 0; + __pyx_exc_value = 0; + __pyx_exc_tb = 0; + goto __pyx_L1_error; + } + } + } + PyErr_SetNone(PyExc_StopIteration); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_4); + __Pyx_AddTraceback("unique_kbest_features", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_L0:; + __Pyx_XDECREF(__pyx_r); + __pyx_generator->resume_label = -1; + __Pyx_Generator_clear((PyObject*)__pyx_generator); + __Pyx_RefNannyFinishContext(); + return NULL; +} +static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_32generator10(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_31sample(PyObject *__pyx_v_self, PyObject *__pyx_arg_n); /*proto*/ +static char __pyx_doc_4cdec_5_cdec_10Hypergraph_30sample[] = "hg.sample(n) -> Sample of n hypotheses from the hypergraph."; +static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_31sample(PyObject *__pyx_v_self, PyObject *__pyx_arg_n) { + unsigned int __pyx_v_n; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("sample (wrapper)", 0); + assert(__pyx_arg_n); { + __pyx_v_n = __Pyx_PyInt_AsUnsignedInt(__pyx_arg_n); if (unlikely((__pyx_v_n == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("cdec._cdec.Hypergraph.sample", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_30sample(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self), ((unsigned int)__pyx_v_n)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":145 + * del derivations + * + * def sample(self, unsigned n): # <<<<<<<<<<<<<< + * """hg.sample(n) -> Sample of n hypotheses from the hypergraph.""" + * cdef vector[hypergraph.Hypothesis]* hypos = new vector[hypergraph.Hypothesis]() + */ + +static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_30sample(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self, unsigned int __pyx_v_n) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14_sample *__pyx_cur_scope; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("sample", 0); + __pyx_cur_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14_sample *)__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_14_sample(__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_14_sample, __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_n = __pyx_v_n; + { + __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_5_cdec_10Hypergraph_32generator10, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_cur_scope); + __Pyx_RefNannyFinishContext(); + return (PyObject *) gen; + } + + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cdec._cdec.Hypergraph.sample", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_32generator10(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ +{ + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14_sample *__pyx_cur_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14_sample *)__pyx_generator->closure); + PyObject *__pyx_r = NULL; + std::vector *__pyx_t_1; + size_t __pyx_t_2; + unsigned int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = 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_L9_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[3]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":147 + * def sample(self, unsigned n): + * """hg.sample(n) -> Sample of n hypotheses from the hypergraph.""" + * cdef vector[hypergraph.Hypothesis]* hypos = new vector[hypergraph.Hypothesis]() # <<<<<<<<<<<<<< + * hypergraph.sample_hypotheses(self.hg[0], n, self._rng(), hypos) + * cdef unsigned k + */ + try { + __pyx_t_1 = new std::vector(); + } catch(...) { + __Pyx_CppExn2PyErr(); + {__pyx_filename = __pyx_f[3]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_cur_scope->__pyx_v_hypos = __pyx_t_1; + + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":148 + * """hg.sample(n) -> Sample of n hypotheses from the hypergraph.""" + * cdef vector[hypergraph.Hypothesis]* hypos = new vector[hypergraph.Hypothesis]() + * hypergraph.sample_hypotheses(self.hg[0], n, self._rng(), hypos) # <<<<<<<<<<<<<< + * cdef unsigned k + * try: + */ + HypergraphSampler::sample_hypotheses((__pyx_cur_scope->__pyx_v_self->hg[0]), __pyx_cur_scope->__pyx_v_n, ((struct __pyx_vtabstruct_4cdec_5_cdec_Hypergraph *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_rng(__pyx_cur_scope->__pyx_v_self), __pyx_cur_scope->__pyx_v_hypos); + + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":150 + * hypergraph.sample_hypotheses(self.hg[0], n, self._rng(), hypos) + * cdef unsigned k + * try: # <<<<<<<<<<<<<< + * for k in range(hypos.size()): + * yield unicode(GetString(hypos[0][k].words).c_str(), 'utf8') + */ + /*try:*/ { + + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":151 + * cdef unsigned k + * try: + * for k in range(hypos.size()): # <<<<<<<<<<<<<< + * yield unicode(GetString(hypos[0][k].words).c_str(), 'utf8') + * finally: + */ + __pyx_t_2 = __pyx_cur_scope->__pyx_v_hypos->size(); + for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { + __pyx_cur_scope->__pyx_v_k = __pyx_t_3; + + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":152 + * try: + * for k in range(hypos.size()): + * yield unicode(GetString(hypos[0][k].words).c_str(), 'utf8') # <<<<<<<<<<<<<< + * finally: + * del hypos + */ + __pyx_t_4 = __Pyx_PyBytes_FromString(TD::GetString(((__pyx_cur_scope->__pyx_v_hypos[0])[__pyx_cur_scope->__pyx_v_k]).words).c_str()); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L5;} + __Pyx_GOTREF(((PyObject *)__pyx_t_4)); + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L5;} + __Pyx_GOTREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_4)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_4)); + __Pyx_INCREF(((PyObject *)__pyx_n_s__utf8)); + PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_n_s__utf8)); + __Pyx_GIVEREF(((PyObject *)__pyx_n_s__utf8)); + __pyx_t_4 = 0; + __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L5;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; + __pyx_cur_scope->__pyx_t_0 = __pyx_t_2; + __pyx_cur_scope->__pyx_t_1 = __pyx_t_3; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + /* return from generator, yielding value */ + __pyx_generator->resume_label = 1; + return __pyx_r; + __pyx_L9_resume_from_yield:; + __pyx_t_2 = __pyx_cur_scope->__pyx_t_0; + __pyx_t_3 = __pyx_cur_scope->__pyx_t_1; + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L5;} + } + } + + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":154 + * yield unicode(GetString(hypos[0][k].words).c_str(), 'utf8') + * finally: + * del hypos # <<<<<<<<<<<<<< + * + * def sample_trees(self, unsigned n): + */ + /*finally:*/ { + int __pyx_why; + PyObject *__pyx_exc_type, *__pyx_exc_value, *__pyx_exc_tb; + int __pyx_exc_lineno; + __pyx_exc_type = 0; __pyx_exc_value = 0; __pyx_exc_tb = 0; __pyx_exc_lineno = 0; + __pyx_why = 0; goto __pyx_L6; + __pyx_L5: { + __pyx_why = 4; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_ErrFetch(&__pyx_exc_type, &__pyx_exc_value, &__pyx_exc_tb); + __pyx_exc_lineno = __pyx_lineno; + goto __pyx_L6; + } + __pyx_L6:; + delete __pyx_cur_scope->__pyx_v_hypos; + switch (__pyx_why) { + case 4: { + __Pyx_ErrRestore(__pyx_exc_type, __pyx_exc_value, __pyx_exc_tb); + __pyx_lineno = __pyx_exc_lineno; + __pyx_exc_type = 0; + __pyx_exc_value = 0; + __pyx_exc_tb = 0; + goto __pyx_L1_error; + } + } + } + PyErr_SetNone(PyExc_StopIteration); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("sample", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_L0:; + __Pyx_XDECREF(__pyx_r); + __pyx_generator->resume_label = -1; + __Pyx_Generator_clear((PyObject*)__pyx_generator); + __Pyx_RefNannyFinishContext(); + return NULL; +} +static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_35generator11(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ + +/* Python wrapper */ +static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_34sample_trees(PyObject *__pyx_v_self, PyObject *__pyx_arg_n); /*proto*/ +static char __pyx_doc_4cdec_5_cdec_10Hypergraph_33sample_trees[] = "hg.sample_trees(n) -> Sample of n trees from the hypergraph."; +static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_34sample_trees(PyObject *__pyx_v_self, PyObject *__pyx_arg_n) { + unsigned int __pyx_v_n; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("sample_trees (wrapper)", 0); + assert(__pyx_arg_n); { + __pyx_v_n = __Pyx_PyInt_AsUnsignedInt(__pyx_arg_n); if (unlikely((__pyx_v_n == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L3_error:; + __Pyx_AddTraceback("cdec._cdec.Hypergraph.sample_trees", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_33sample_trees(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self), ((unsigned int)__pyx_v_n)); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":156 + * del hypos + * + * def sample_trees(self, unsigned n): # <<<<<<<<<<<<<< + * """hg.sample_trees(n) -> Sample of n trees from the hypergraph.""" + * cdef vector[string]* trees = new vector[string]() + */ + +static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_33sample_trees(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self, unsigned int __pyx_v_n) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15_sample_trees *__pyx_cur_scope; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("sample_trees", 0); + __pyx_cur_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15_sample_trees *)__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_15_sample_trees(__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_15_sample_trees, __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_n = __pyx_v_n; + { + __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_5_cdec_10Hypergraph_35generator11, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_cur_scope); + __Pyx_RefNannyFinishContext(); + return (PyObject *) gen; + } + + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_AddTraceback("cdec._cdec.Hypergraph.sample_trees", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_35generator11(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ +{ + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15_sample_trees *__pyx_cur_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15_sample_trees *)__pyx_generator->closure); + PyObject *__pyx_r = NULL; + std::vector *__pyx_t_1; + size_t __pyx_t_2; + unsigned int __pyx_t_3; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = 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_L9_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[3]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":158 + * def sample_trees(self, unsigned n): + * """hg.sample_trees(n) -> Sample of n trees from the hypergraph.""" + * cdef vector[string]* trees = new vector[string]() # <<<<<<<<<<<<<< + * hypergraph.sample_trees(self.hg[0], n, self._rng(), trees) + * cdef unsigned k + */ + try { + __pyx_t_1 = new std::vector(); + } catch(...) { + __Pyx_CppExn2PyErr(); + {__pyx_filename = __pyx_f[3]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_cur_scope->__pyx_v_trees = __pyx_t_1; + + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":159 + * """hg.sample_trees(n) -> Sample of n trees from the hypergraph.""" + * cdef vector[string]* trees = new vector[string]() + * hypergraph.sample_trees(self.hg[0], n, self._rng(), trees) # <<<<<<<<<<<<<< + * cdef unsigned k + * try: + */ + HypergraphSampler::sample_trees((__pyx_cur_scope->__pyx_v_self->hg[0]), __pyx_cur_scope->__pyx_v_n, ((struct __pyx_vtabstruct_4cdec_5_cdec_Hypergraph *)__pyx_cur_scope->__pyx_v_self->__pyx_vtab)->_rng(__pyx_cur_scope->__pyx_v_self), __pyx_cur_scope->__pyx_v_trees); + + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":161 + * hypergraph.sample_trees(self.hg[0], n, self._rng(), trees) + * cdef unsigned k + * try: # <<<<<<<<<<<<<< + * for k in range(trees.size()): + * yield unicode(trees[0][k].c_str(), 'utf8') + */ + /*try:*/ { + + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":162 + * cdef unsigned k * try: * for k in range(trees.size()): # <<<<<<<<<<<<<< * yield unicode(trees[0][k].c_str(), 'utf8') @@ -11627,26 +11568,26 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_26generator8(__pyx_Generator for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { __pyx_cur_scope->__pyx_v_k = __pyx_t_3; - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":115 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":163 * try: * for k in range(trees.size()): * yield unicode(trees[0][k].c_str(), 'utf8') # <<<<<<<<<<<<<< * finally: * del trees */ - __pyx_t_4 = __Pyx_PyBytes_FromString(((__pyx_cur_scope->__pyx_v_trees[0])[__pyx_cur_scope->__pyx_v_k]).c_str()); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L5_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + __pyx_t_4 = __Pyx_PyBytes_FromString(((__pyx_cur_scope->__pyx_v_trees[0])[__pyx_cur_scope->__pyx_v_k]).c_str()); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L5;} + __Pyx_GOTREF(((PyObject *)__pyx_t_4)); + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L5;} __Pyx_GOTREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); - __Pyx_GIVEREF(__pyx_t_4); - __Pyx_INCREF(__pyx_n_s_utf8); - PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_n_s_utf8); - __Pyx_GIVEREF(__pyx_n_s_utf8); + PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_4)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_4)); + __Pyx_INCREF(((PyObject *)__pyx_n_s__utf8)); + PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_n_s__utf8)); + __Pyx_GIVEREF(((PyObject *)__pyx_n_s__utf8)); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L5;} __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; __pyx_cur_scope->__pyx_t_0 = __pyx_t_2; @@ -11659,11 +11600,11 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_26generator8(__pyx_Generator __pyx_L9_resume_from_yield:; __pyx_t_2 = __pyx_cur_scope->__pyx_t_0; __pyx_t_3 = __pyx_cur_scope->__pyx_t_1; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L5_error;} + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L5;} } } - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":117 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":165 * yield unicode(trees[0][k].c_str(), 'utf8') * finally: * del trees # <<<<<<<<<<<<<< @@ -11671,53 +11612,32 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_26generator8(__pyx_Generator * def intersect(self, inp): */ /*finally:*/ { - /*normal exit:*/{ - delete __pyx_cur_scope->__pyx_v_trees; - goto __pyx_L6; - } - /*exception exit:*/{ - __pyx_L5_error:; - __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; + int __pyx_why; + PyObject *__pyx_exc_type, *__pyx_exc_value, *__pyx_exc_tb; + int __pyx_exc_lineno; + __pyx_exc_type = 0; __pyx_exc_value = 0; __pyx_exc_tb = 0; __pyx_exc_lineno = 0; + __pyx_why = 0; goto __pyx_L6; + __pyx_L5: { + __pyx_why = 4; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14); - if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11) < 0)) __Pyx_ErrFetch(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); - __Pyx_XGOTREF(__pyx_t_9); - __Pyx_XGOTREF(__pyx_t_10); - __Pyx_XGOTREF(__pyx_t_11); - __Pyx_XGOTREF(__pyx_t_12); - __Pyx_XGOTREF(__pyx_t_13); - __Pyx_XGOTREF(__pyx_t_14); - __pyx_t_6 = __pyx_lineno; __pyx_t_7 = __pyx_clineno; __pyx_t_8 = __pyx_filename; - { - delete __pyx_cur_scope->__pyx_v_trees; - } - if (PY_MAJOR_VERSION >= 3) { - __Pyx_XGIVEREF(__pyx_t_12); - __Pyx_XGIVEREF(__pyx_t_13); - __Pyx_XGIVEREF(__pyx_t_14); - __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14); - } - __Pyx_XGIVEREF(__pyx_t_9); - __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_XGIVEREF(__pyx_t_11); - __Pyx_ErrRestore(__pyx_t_9, __pyx_t_10, __pyx_t_11); - __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_14 = 0; - __pyx_lineno = __pyx_t_6; __pyx_clineno = __pyx_t_7; __pyx_filename = __pyx_t_8; - goto __pyx_L1_error; + __Pyx_ErrFetch(&__pyx_exc_type, &__pyx_exc_value, &__pyx_exc_tb); + __pyx_exc_lineno = __pyx_lineno; + goto __pyx_L6; } __pyx_L6:; + delete __pyx_cur_scope->__pyx_v_trees; + switch (__pyx_why) { + case 4: { + __Pyx_ErrRestore(__pyx_exc_type, __pyx_exc_value, __pyx_exc_tb); + __pyx_lineno = __pyx_exc_lineno; + __pyx_exc_type = 0; + __pyx_exc_value = 0; + __pyx_exc_tb = 0; + goto __pyx_L1_error; + } + } } - - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":108 - * del hypos - * - * def sample_trees(self, unsigned n): # <<<<<<<<<<<<<< - * """hg.sample_trees(n) -> Sample of n trees from the hypergraph.""" - * cdef vector[string]* trees = new vector[string]() - */ - - /* function exit code */ PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; @@ -11732,29 +11652,27 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_26generator8(__pyx_Generator return NULL; } -/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":119 - * del trees - * - * def intersect(self, inp): # <<<<<<<<<<<<<< - * """hg.intersect(Lattice/string): Intersect the hypergraph with the provided reference.""" - * cdef Lattice lat - */ - /* Python wrapper */ -static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_28intersect(PyObject *__pyx_v_self, PyObject *__pyx_v_inp); /*proto*/ -static char __pyx_doc_4cdec_5_cdec_10Hypergraph_27intersect[] = "hg.intersect(Lattice/string): Intersect the hypergraph with the provided reference."; -static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_28intersect(PyObject *__pyx_v_self, PyObject *__pyx_v_inp) { +static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_37intersect(PyObject *__pyx_v_self, PyObject *__pyx_v_inp); /*proto*/ +static char __pyx_doc_4cdec_5_cdec_10Hypergraph_36intersect[] = "hg.intersect(Lattice/string): Intersect the hypergraph with the provided reference."; +static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_37intersect(PyObject *__pyx_v_self, PyObject *__pyx_v_inp) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("intersect (wrapper)", 0); - __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_27intersect(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self), ((PyObject *)__pyx_v_inp)); - - /* function exit code */ + __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_36intersect(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self), ((PyObject *)__pyx_v_inp)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_27intersect(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self, PyObject *__pyx_v_inp) { +/* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":167 + * del trees + * + * def intersect(self, inp): # <<<<<<<<<<<<<< + * """hg.intersect(Lattice/string): Intersect the hypergraph with the provided reference.""" + * cdef Lattice lat + */ + +static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_36intersect(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self, PyObject *__pyx_v_inp) { struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_lat = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -11767,7 +11685,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_27intersect(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("intersect", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":122 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":170 * """hg.intersect(Lattice/string): Intersect the hypergraph with the provided reference.""" * cdef Lattice lat * if isinstance(inp, Lattice): # <<<<<<<<<<<<<< @@ -11778,21 +11696,19 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_27intersect(struct __pyx_obj __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":123 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":171 * cdef Lattice lat * if isinstance(inp, Lattice): * lat = inp # <<<<<<<<<<<<<< * elif isinstance(inp, basestring): * lat = Lattice(inp) */ - __pyx_t_3 = __pyx_v_inp; - __Pyx_INCREF(__pyx_t_3); - __pyx_v_lat = ((struct __pyx_obj_4cdec_5_cdec_Lattice *)__pyx_t_3); - __pyx_t_3 = 0; + __Pyx_INCREF(((PyObject *)((struct __pyx_obj_4cdec_5_cdec_Lattice *)__pyx_v_inp))); + __pyx_v_lat = ((struct __pyx_obj_4cdec_5_cdec_Lattice *)__pyx_v_inp); goto __pyx_L3; } - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":124 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":172 * if isinstance(inp, Lattice): * lat = inp * elif isinstance(inp, basestring): # <<<<<<<<<<<<<< @@ -11803,51 +11719,51 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_27intersect(struct __pyx_obj __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":125 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":173 * lat = inp * elif isinstance(inp, basestring): * lat = Lattice(inp) # <<<<<<<<<<<<<< * else: * raise TypeError('cannot intersect hypergraph with %s' % type(inp)) */ - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_inp); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_inp); __Pyx_GIVEREF(__pyx_v_inp); - __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_Lattice)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_Lattice)), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_v_lat = ((struct __pyx_obj_4cdec_5_cdec_Lattice *)__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L3; } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":127 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":175 * lat = Lattice(inp) * else: * raise TypeError('cannot intersect hypergraph with %s' % type(inp)) # <<<<<<<<<<<<<< * return hypergraph.Intersect(lat.lattice[0], self.hg) * */ - __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_cannot_intersect_hypergraph_with, ((PyObject *)Py_TYPE(__pyx_v_inp))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 127; __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[3]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_15), ((PyObject *)Py_TYPE(__pyx_v_inp))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_4)); + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); - __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_4)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - {__pyx_filename = __pyx_f[3]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[3]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":128 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":176 * else: * raise TypeError('cannot intersect hypergraph with %s' % type(inp)) * return hypergraph.Intersect(lat.lattice[0], self.hg) # <<<<<<<<<<<<<< @@ -11855,21 +11771,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_27intersect(struct __pyx_obj * def prune(self, beam_alpha=0, density=0, **kwargs): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __Pyx_PyBool_FromLong(HG::Intersect((__pyx_v_lat->lattice[0]), __pyx_v_self->hg)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyBool_FromLong(HG::Intersect((__pyx_v_lat->lattice[0]), __pyx_v_self->hg)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":119 - * del trees - * - * def intersect(self, inp): # <<<<<<<<<<<<<< - * """hg.intersect(Lattice/string): Intersect the hypergraph with the provided reference.""" - * cdef Lattice lat - */ - - /* 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); @@ -11882,18 +11791,10 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_27intersect(struct __pyx_obj return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":130 - * return hypergraph.Intersect(lat.lattice[0], self.hg) - * - * def prune(self, beam_alpha=0, density=0, **kwargs): # <<<<<<<<<<<<<< - * """hg.prune(beam_alpha=0, density=0): Prune the hypergraph. - * beam_alpha: use beam pruning - */ - /* Python wrapper */ -static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_30prune(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static char __pyx_doc_4cdec_5_cdec_10Hypergraph_29prune[] = "hg.prune(beam_alpha=0, density=0): Prune the hypergraph.\n beam_alpha: use beam pruning\n density: use density pruning"; -static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_30prune(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { +static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_39prune(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_4cdec_5_cdec_10Hypergraph_38prune[] = "hg.prune(beam_alpha=0, density=0): Prune the hypergraph.\n beam_alpha: use beam pruning\n density: use density pruning"; +static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_39prune(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_beam_alpha = 0; PyObject *__pyx_v_density = 0; PyObject *__pyx_v_kwargs = 0; @@ -11906,7 +11807,7 @@ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_30prune(PyObject *__pyx_v_se __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return NULL; __Pyx_GOTREF(__pyx_v_kwargs); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_beam_alpha,&__pyx_n_s_density,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__beam_alpha,&__pyx_n_s__density,0}; PyObject* values[2] = {0,0}; values[0] = ((PyObject *)__pyx_int_0); values[1] = ((PyObject *)__pyx_int_0); @@ -11923,17 +11824,17 @@ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_30prune(PyObject *__pyx_v_se switch (pos_args) { case 0: if (kw_args > 0) { - PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_beam_alpha); + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__beam_alpha); if (value) { values[0] = value; kw_args--; } } case 1: if (kw_args > 0) { - PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_density); + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__density); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "prune") < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, pos_args, "prune") < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -11948,22 +11849,28 @@ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_30prune(PyObject *__pyx_v_se } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("prune", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("prune", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[3]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; __Pyx_AddTraceback("cdec._cdec.Hypergraph.prune", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_29prune(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self), __pyx_v_beam_alpha, __pyx_v_density, __pyx_v_kwargs); - - /* function exit code */ + __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_38prune(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self), __pyx_v_beam_alpha, __pyx_v_density, __pyx_v_kwargs); __Pyx_XDECREF(__pyx_v_kwargs); __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_29prune(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self, PyObject *__pyx_v_beam_alpha, PyObject *__pyx_v_density, PyObject *__pyx_v_kwargs) { +/* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":178 + * return hypergraph.Intersect(lat.lattice[0], self.hg) + * + * def prune(self, beam_alpha=0, density=0, **kwargs): # <<<<<<<<<<<<<< + * """hg.prune(beam_alpha=0, density=0): Prune the hypergraph. + * beam_alpha: use beam pruning + */ + +static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_38prune(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self, PyObject *__pyx_v_beam_alpha, PyObject *__pyx_v_density, PyObject *__pyx_v_kwargs) { std::vector *__pyx_v_preserve_mask; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -11976,7 +11883,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_29prune(struct __pyx_obj_4cd int __pyx_clineno = 0; __Pyx_RefNannySetupContext("prune", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":134 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":182 * beam_alpha: use beam pruning * density: use density pruning""" * cdef hypergraph.EdgeMask* preserve_mask = NULL # <<<<<<<<<<<<<< @@ -11985,18 +11892,18 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_29prune(struct __pyx_obj_4cd */ __pyx_v_preserve_mask = NULL; - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":135 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":183 * density: use density pruning""" * cdef hypergraph.EdgeMask* preserve_mask = NULL * if 'csplit_preserve_full_word' in kwargs: # <<<<<<<<<<<<<< * preserve_mask = new hypergraph.EdgeMask(self.hg.edges_.size()) * preserve_mask[0][hypergraph.GetFullWordEdgeIndex(self.hg[0])] = True */ - __pyx_t_1 = (__Pyx_PyDict_Contains(__pyx_n_s_csplit_preserve_full_word, __pyx_v_kwargs, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = (__Pyx_PyDict_Contains(((PyObject *)__pyx_n_s_16), ((PyObject *)__pyx_v_kwargs), Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":136 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":184 * cdef hypergraph.EdgeMask* preserve_mask = NULL * if 'csplit_preserve_full_word' in kwargs: * preserve_mask = new hypergraph.EdgeMask(self.hg.edges_.size()) # <<<<<<<<<<<<<< @@ -12005,7 +11912,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_29prune(struct __pyx_obj_4cd */ __pyx_v_preserve_mask = new std::vector(__pyx_v_self->hg->edges_.size()); - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":137 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":185 * if 'csplit_preserve_full_word' in kwargs: * preserve_mask = new hypergraph.EdgeMask(self.hg.edges_.size()) * preserve_mask[0][hypergraph.GetFullWordEdgeIndex(self.hg[0])] = True # <<<<<<<<<<<<<< @@ -12017,18 +11924,18 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_29prune(struct __pyx_obj_4cd } __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":138 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":186 * preserve_mask = new hypergraph.EdgeMask(self.hg.edges_.size()) * preserve_mask[0][hypergraph.GetFullWordEdgeIndex(self.hg[0])] = True * self.hg.PruneInsideOutside(beam_alpha, density, preserve_mask, False, 1, False) # <<<<<<<<<<<<<< * if preserve_mask: * del preserve_mask */ - __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_v_beam_alpha); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_v_density); if (unlikely((__pyx_t_4 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __pyx_PyFloat_AsDouble(__pyx_v_beam_alpha); if (unlikely((__pyx_t_3 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_v_density); if (unlikely((__pyx_t_4 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->hg->PruneInsideOutside(__pyx_t_3, __pyx_t_4, __pyx_v_preserve_mask, 0, 1.0, 0); - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":139 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":187 * preserve_mask[0][hypergraph.GetFullWordEdgeIndex(self.hg[0])] = True * self.hg.PruneInsideOutside(beam_alpha, density, preserve_mask, False, 1, False) * if preserve_mask: # <<<<<<<<<<<<<< @@ -12038,7 +11945,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_29prune(struct __pyx_obj_4cd __pyx_t_2 = (__pyx_v_preserve_mask != 0); if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":140 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":188 * self.hg.PruneInsideOutside(beam_alpha, density, preserve_mask, False, 1, False) * if preserve_mask: * del preserve_mask # <<<<<<<<<<<<<< @@ -12050,15 +11957,6 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_29prune(struct __pyx_obj_4cd } __pyx_L4:; - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":130 - * return hypergraph.Intersect(lat.lattice[0], self.hg) - * - * def prune(self, beam_alpha=0, density=0, **kwargs): # <<<<<<<<<<<<<< - * """hg.prune(beam_alpha=0, density=0): Prune the hypergraph. - * beam_alpha: use beam pruning - */ - - /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; @@ -12070,29 +11968,27 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_29prune(struct __pyx_obj_4cd return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":142 - * del preserve_mask - * - * def lattice(self): # TODO direct hg -> lattice conversion in cdec # <<<<<<<<<<<<<< - * """hg.lattice() -> Lattice corresponding to the hypergraph.""" - * cdef bytes plf = hypergraph.AsPLF(self.hg[0], True).c_str() - */ - /* Python wrapper */ -static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_32lattice(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_4cdec_5_cdec_10Hypergraph_31lattice[] = "hg.lattice() -> Lattice corresponding to the hypergraph."; -static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_32lattice(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_41lattice(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_4cdec_5_cdec_10Hypergraph_40lattice[] = "hg.lattice() -> Lattice corresponding to the hypergraph."; +static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_41lattice(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("lattice (wrapper)", 0); - __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_31lattice(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self)); - - /* function exit code */ + __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_40lattice(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_31lattice(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self) { +/* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":190 + * del preserve_mask + * + * def lattice(self): # TODO direct hg -> lattice conversion in cdec # <<<<<<<<<<<<<< + * """hg.lattice() -> Lattice corresponding to the hypergraph.""" + * cdef bytes plf = hypergraph.AsPLF(self.hg[0], True).c_str() + */ + +static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_40lattice(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self) { PyObject *__pyx_v_plf = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -12104,19 +12000,19 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_31lattice(struct __pyx_obj_4 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("lattice", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":144 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":192 * def lattice(self): # TODO direct hg -> lattice conversion in cdec * """hg.lattice() -> Lattice corresponding to the hypergraph.""" * cdef bytes plf = hypergraph.AsPLF(self.hg[0], True).c_str() # <<<<<<<<<<<<<< * return Lattice(eval(plf)) * */ - __pyx_t_1 = __Pyx_PyBytes_FromString(HypergraphIO::AsPLF((__pyx_v_self->hg[0]), 1).c_str()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); + __pyx_t_1 = __Pyx_PyBytes_FromString(HypergraphIO::AsPLF((__pyx_v_self->hg[0]), 1).c_str()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_v_plf = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":145 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":193 * """hg.lattice() -> Lattice corresponding to the hypergraph.""" * cdef bytes plf = hypergraph.AsPLF(self.hg[0], True).c_str() * return Lattice(eval(plf)) # <<<<<<<<<<<<<< @@ -12124,51 +12020,44 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_31lattice(struct __pyx_obj_4 * def plf(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_Globals(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_Globals(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - if (__pyx_v_plf) { - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_plf, __pyx_v_plf) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + if (((PyObject *)__pyx_v_plf)) { + if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__plf), ((PyObject *)__pyx_v_plf)) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } if (((PyObject *)__pyx_v_self)) { - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_self, ((PyObject *)__pyx_v_self)) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_2, ((PyObject *)__pyx_n_s__self), ((PyObject *)__pyx_v_self)) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __Pyx_INCREF(__pyx_v_plf); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_plf); - __Pyx_GIVEREF(__pyx_v_plf); - PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1); - __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2); - __Pyx_GIVEREF(__pyx_t_2); + __Pyx_INCREF(((PyObject *)__pyx_v_plf)); + PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_plf)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_plf)); + PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_t_1)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); + PyTuple_SET_ITEM(__pyx_t_3, 2, ((PyObject *)__pyx_t_2)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); __pyx_t_1 = 0; __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_eval, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_Call(__pyx_builtin_eval, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_Lattice)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_Lattice)), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":142 - * del preserve_mask - * - * def lattice(self): # TODO direct hg -> lattice conversion in cdec # <<<<<<<<<<<<<< - * """hg.lattice() -> Lattice corresponding to the hypergraph.""" - * cdef bytes plf = hypergraph.AsPLF(self.hg[0], True).c_str() - */ - - /* 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); @@ -12182,29 +12071,27 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_31lattice(struct __pyx_obj_4 return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":147 - * return Lattice(eval(plf)) - * - * def plf(self): # <<<<<<<<<<<<<< - * """hg.plf() -> Lattice PLF representation corresponding to the hypergraph.""" - * return bytes(hypergraph.AsPLF(self.hg[0], True).c_str()) - */ - /* Python wrapper */ -static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_34plf(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_4cdec_5_cdec_10Hypergraph_33plf[] = "hg.plf() -> Lattice PLF representation corresponding to the hypergraph."; -static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_34plf(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_43plf(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_4cdec_5_cdec_10Hypergraph_42plf[] = "hg.plf() -> Lattice PLF representation corresponding to the hypergraph."; +static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_43plf(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("plf (wrapper)", 0); - __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_33plf(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self)); - - /* function exit code */ + __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_42plf(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_33plf(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self) { +/* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":195 + * return Lattice(eval(plf)) + * + * def plf(self): # <<<<<<<<<<<<<< + * """hg.plf() -> Lattice PLF representation corresponding to the hypergraph.""" + * return bytes(hypergraph.AsPLF(self.hg[0], True).c_str()) + */ + +static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_42plf(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -12214,7 +12101,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_33plf(struct __pyx_obj_4cdec int __pyx_clineno = 0; __Pyx_RefNannySetupContext("plf", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":149 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":197 * def plf(self): * """hg.plf() -> Lattice PLF representation corresponding to the hypergraph.""" * return bytes(hypergraph.AsPLF(self.hg[0], True).c_str()) # <<<<<<<<<<<<<< @@ -12222,29 +12109,22 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_33plf(struct __pyx_obj_4cdec * def reweight(self, weights): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBytes_FromString(HypergraphIO::AsPLF((__pyx_v_self->hg[0]), 1).c_str()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 149; __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[3]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyBytes_FromString(HypergraphIO::AsPLF((__pyx_v_self->hg[0]), 1).c_str()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); - __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_1)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyBytes_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyBytes_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":147 - * return Lattice(eval(plf)) - * - * def plf(self): # <<<<<<<<<<<<<< - * """hg.plf() -> Lattice PLF representation corresponding to the hypergraph.""" - * return bytes(hypergraph.AsPLF(self.hg[0], True).c_str()) - */ - - /* 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); @@ -12256,29 +12136,27 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_33plf(struct __pyx_obj_4cdec return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":151 - * return bytes(hypergraph.AsPLF(self.hg[0], True).c_str()) - * - * def reweight(self, weights): # <<<<<<<<<<<<<< - * """hg.reweight(SparseVector/DenseVector): Reweight the hypergraph with a new vector.""" - * if isinstance(weights, SparseVector): - */ - /* Python wrapper */ -static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_36reweight(PyObject *__pyx_v_self, PyObject *__pyx_v_weights); /*proto*/ -static char __pyx_doc_4cdec_5_cdec_10Hypergraph_35reweight[] = "hg.reweight(SparseVector/DenseVector): Reweight the hypergraph with a new vector."; -static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_36reweight(PyObject *__pyx_v_self, PyObject *__pyx_v_weights) { +static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_45reweight(PyObject *__pyx_v_self, PyObject *__pyx_v_weights); /*proto*/ +static char __pyx_doc_4cdec_5_cdec_10Hypergraph_44reweight[] = "hg.reweight(SparseVector/DenseVector): Reweight the hypergraph with a new vector."; +static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_45reweight(PyObject *__pyx_v_self, PyObject *__pyx_v_weights) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("reweight (wrapper)", 0); - __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_35reweight(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self), ((PyObject *)__pyx_v_weights)); - - /* function exit code */ + __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_44reweight(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self), ((PyObject *)__pyx_v_weights)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_35reweight(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self, PyObject *__pyx_v_weights) { +/* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":199 + * return bytes(hypergraph.AsPLF(self.hg[0], True).c_str()) + * + * def reweight(self, weights): # <<<<<<<<<<<<<< + * """hg.reweight(SparseVector/DenseVector): Reweight the hypergraph with a new vector.""" + * if isinstance(weights, SparseVector): + */ + +static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_44reweight(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self, PyObject *__pyx_v_weights) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; @@ -12290,7 +12168,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_35reweight(struct __pyx_obj_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("reweight", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":153 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":201 * def reweight(self, weights): * """hg.reweight(SparseVector/DenseVector): Reweight the hypergraph with a new vector.""" * if isinstance(weights, SparseVector): # <<<<<<<<<<<<<< @@ -12301,7 +12179,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_35reweight(struct __pyx_obj_ __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":154 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":202 * """hg.reweight(SparseVector/DenseVector): Reweight the hypergraph with a new vector.""" * if isinstance(weights, SparseVector): * self.hg.Reweight(( weights).vector[0]) # <<<<<<<<<<<<<< @@ -12312,7 +12190,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_35reweight(struct __pyx_obj_ goto __pyx_L3; } - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":155 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":203 * if isinstance(weights, SparseVector): * self.hg.Reweight(( weights).vector[0]) * elif isinstance(weights, DenseVector): # <<<<<<<<<<<<<< @@ -12323,7 +12201,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_35reweight(struct __pyx_obj_ __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":156 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":204 * self.hg.Reweight(( weights).vector[0]) * elif isinstance(weights, DenseVector): * self.hg.Reweight(( weights).vector[0]) # <<<<<<<<<<<<<< @@ -12335,38 +12213,29 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_35reweight(struct __pyx_obj_ } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":158 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":206 * self.hg.Reweight(( weights).vector[0]) * else: * raise TypeError('cannot reweight hypergraph with %s' % type(weights)) # <<<<<<<<<<<<<< * * property edges: */ - __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_cannot_reweight_hypergraph_with, ((PyObject *)Py_TYPE(__pyx_v_weights))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 158; __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[3]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_17), ((PyObject *)Py_TYPE(__pyx_v_weights))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); - __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_3)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(((PyObject *)__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[3]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[3]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":151 - * return bytes(hypergraph.AsPLF(self.hg[0], True).c_str()) - * - * def reweight(self, weights): # <<<<<<<<<<<<<< - * """hg.reweight(SparseVector/DenseVector): Reweight the hypergraph with a new vector.""" - * if isinstance(weights, SparseVector): - */ - - /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; @@ -12379,15 +12248,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_35reweight(struct __pyx_obj_ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_5edges_2generator9(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ - -/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":161 - * - * property edges: - * def __get__(self): # <<<<<<<<<<<<<< - * cdef unsigned i - * for i in range(self.hg.edges_.size()): - */ +static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_5edges_2generator12(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_5edges_1__get__(PyObject *__pyx_v_self); /*proto*/ @@ -12396,21 +12257,27 @@ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_5edges_1__get__(PyObject *__ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_5edges___get__(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":209 + * + * property edges: + * def __get__(self): # <<<<<<<<<<<<<< + * cdef unsigned i + * for i in range(self.hg.edges_.size()): + */ + static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_5edges___get__(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__ *__pyx_cur_scope; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__ *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - __pyx_cur_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__ *)__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_13___get__(__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_13___get__, __pyx_empty_tuple, NULL); + __pyx_cur_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__ *)__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_16___get__(__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_16___get__, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; @@ -12420,13 +12287,12 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_5edges___get__(struct __pyx_ __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); { - __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_5_cdec_10Hypergraph_5edges_2generator9, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_5_cdec_10Hypergraph_5edges_2generator12, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } - /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; @@ -12439,9 +12305,9 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_5edges___get__(struct __pyx_ return __pyx_r; } -static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_5edges_2generator9(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ +static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_5edges_2generator12(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__ *__pyx_cur_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__ *)__pyx_generator->closure); + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__ *__pyx_cur_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__ *)__pyx_generator->closure); PyObject *__pyx_r = NULL; size_t __pyx_t_1; unsigned int __pyx_t_2; @@ -12460,9 +12326,9 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_5edges_2generator9(__pyx_Gen return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":163 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":211 * def __get__(self): * cdef unsigned i * for i in range(self.hg.edges_.size()): # <<<<<<<<<<<<<< @@ -12473,16 +12339,16 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_5edges_2generator9(__pyx_Gen for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_cur_scope->__pyx_v_i = __pyx_t_2; - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":164 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":212 * cdef unsigned i * for i in range(self.hg.edges_.size()): * yield HypergraphEdge().init(self.hg, i) # <<<<<<<<<<<<<< * * property nodes: */ - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_HypergraphEdge)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_HypergraphEdge)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = ((struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphEdge *)((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)__pyx_t_3)->__pyx_vtab)->init(((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)__pyx_t_3), __pyx_cur_scope->__pyx_v_self->hg, __pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = ((struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphEdge *)((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)__pyx_t_3)->__pyx_vtab)->init(((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)__pyx_t_3), __pyx_cur_scope->__pyx_v_self->hg, __pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_4; @@ -12497,18 +12363,8 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_5edges_2generator9(__pyx_Gen __pyx_L6_resume_from_yield:; __pyx_t_1 = __pyx_cur_scope->__pyx_t_0; __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":161 - * - * property edges: - * def __get__(self): # <<<<<<<<<<<<<< - * cdef unsigned i - * for i in range(self.hg.edges_.size()): - */ - - /* function exit code */ PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; @@ -12522,15 +12378,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_5edges_2generator9(__pyx_Gen __Pyx_RefNannyFinishContext(); return NULL; } -static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_5nodes_2generator10(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ - -/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":167 - * - * property nodes: - * def __get__(self): # <<<<<<<<<<<<<< - * cdef unsigned i - * for i in range(self.hg.nodes_.size()): - */ +static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_5nodes_2generator13(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_5nodes_1__get__(PyObject *__pyx_v_self); /*proto*/ @@ -12539,21 +12387,27 @@ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_5nodes_1__get__(PyObject *__ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_5nodes___get__(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":215 + * + * property nodes: + * def __get__(self): # <<<<<<<<<<<<<< + * cdef unsigned i + * for i in range(self.hg.nodes_.size()): + */ + static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_5nodes___get__(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__ *__pyx_cur_scope; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__ *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - __pyx_cur_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__ *)__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_14___get__(__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_14___get__, __pyx_empty_tuple, NULL); + __pyx_cur_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__ *)__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_17___get__(__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_17___get__, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; @@ -12563,13 +12417,12 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_5nodes___get__(struct __pyx_ __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); { - __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_5_cdec_10Hypergraph_5nodes_2generator10, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_5_cdec_10Hypergraph_5nodes_2generator13, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } - /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; @@ -12582,9 +12435,9 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_5nodes___get__(struct __pyx_ return __pyx_r; } -static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_5nodes_2generator10(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ +static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_5nodes_2generator13(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__ *__pyx_cur_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__ *)__pyx_generator->closure); + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__ *__pyx_cur_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__ *)__pyx_generator->closure); PyObject *__pyx_r = NULL; size_t __pyx_t_1; unsigned int __pyx_t_2; @@ -12603,9 +12456,9 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_5nodes_2generator10(__pyx_Ge return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":169 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":217 * def __get__(self): * cdef unsigned i * for i in range(self.hg.nodes_.size()): # <<<<<<<<<<<<<< @@ -12616,16 +12469,16 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_5nodes_2generator10(__pyx_Ge for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_cur_scope->__pyx_v_i = __pyx_t_2; - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":170 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":218 * cdef unsigned i * for i in range(self.hg.nodes_.size()): * yield HypergraphNode().init(self.hg, i) # <<<<<<<<<<<<<< * * property goal: */ - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_HypergraphNode)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_HypergraphNode)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = ((struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphNode *)((struct __pyx_obj_4cdec_5_cdec_HypergraphNode *)__pyx_t_3)->__pyx_vtab)->init(((struct __pyx_obj_4cdec_5_cdec_HypergraphNode *)__pyx_t_3), __pyx_cur_scope->__pyx_v_self->hg, __pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = ((struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphNode *)((struct __pyx_obj_4cdec_5_cdec_HypergraphNode *)__pyx_t_3)->__pyx_vtab)->init(((struct __pyx_obj_4cdec_5_cdec_HypergraphNode *)__pyx_t_3), __pyx_cur_scope->__pyx_v_self->hg, __pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_4; @@ -12640,18 +12493,8 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_5nodes_2generator10(__pyx_Ge __pyx_L6_resume_from_yield:; __pyx_t_1 = __pyx_cur_scope->__pyx_t_0; __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":167 - * - * property nodes: - * def __get__(self): # <<<<<<<<<<<<<< - * cdef unsigned i - * for i in range(self.hg.nodes_.size()): - */ - - /* function exit code */ PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; @@ -12666,14 +12509,6 @@ static PyObject *__pyx_gb_4cdec_5_cdec_10Hypergraph_5nodes_2generator10(__pyx_Ge return NULL; } -/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":173 - * - * property goal: - * def __get__(self): # <<<<<<<<<<<<<< - * return HypergraphNode().init(self.hg, self.hg.GoalNode()) - * - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_4goal_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_4goal_1__get__(PyObject *__pyx_v_self) { @@ -12681,12 +12516,18 @@ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_4goal_1__get__(PyObject *__p __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_4goal___get__(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":221 + * + * property goal: + * def __get__(self): # <<<<<<<<<<<<<< + * return HypergraphNode().init(self.hg, self.hg.GoalNode()) + * + */ + static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_4goal___get__(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -12697,7 +12538,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_4goal___get__(struct __pyx_o int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":174 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":222 * property goal: * def __get__(self): * return HypergraphNode().init(self.hg, self.hg.GoalNode()) # <<<<<<<<<<<<<< @@ -12705,24 +12546,17 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_4goal___get__(struct __pyx_o * property npaths: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_HypergraphNode)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_HypergraphNode)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = ((struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphNode *)((struct __pyx_obj_4cdec_5_cdec_HypergraphNode *)__pyx_t_1)->__pyx_vtab)->init(((struct __pyx_obj_4cdec_5_cdec_HypergraphNode *)__pyx_t_1), __pyx_v_self->hg, __pyx_v_self->hg->GoalNode()); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = ((struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphNode *)((struct __pyx_obj_4cdec_5_cdec_HypergraphNode *)__pyx_t_1)->__pyx_vtab)->init(((struct __pyx_obj_4cdec_5_cdec_HypergraphNode *)__pyx_t_1), __pyx_v_self->hg, __pyx_v_self->hg->GoalNode()); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __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; - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":173 - * - * property goal: - * def __get__(self): # <<<<<<<<<<<<<< - * return HypergraphNode().init(self.hg, self.hg.GoalNode()) - * - */ - - /* 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); @@ -12734,14 +12568,6 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_4goal___get__(struct __pyx_o return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":177 - * - * property npaths: - * def __get__(self): # <<<<<<<<<<<<<< - * return self.hg.NumberOfPaths() - * - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_6npaths_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_6npaths_1__get__(PyObject *__pyx_v_self) { @@ -12749,12 +12575,18 @@ static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_6npaths_1__get__(PyObject *_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_6npaths___get__(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":225 + * + * property npaths: + * def __get__(self): # <<<<<<<<<<<<<< + * return self.hg.NumberOfPaths() + * + */ + static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_6npaths___get__(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -12764,7 +12596,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_6npaths___get__(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":178 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":226 * property npaths: * def __get__(self): * return self.hg.NumberOfPaths() # <<<<<<<<<<<<<< @@ -12772,21 +12604,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_6npaths___get__(struct __pyx * def inside_outside(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->hg->NumberOfPaths()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->hg->NumberOfPaths()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":177 - * - * property npaths: - * def __get__(self): # <<<<<<<<<<<<<< - * return self.hg.NumberOfPaths() - * - */ - - /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cdec._cdec.Hypergraph.npaths.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -12797,29 +12622,27 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_6npaths___get__(struct __pyx return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":180 - * return self.hg.NumberOfPaths() - * - * def inside_outside(self): # <<<<<<<<<<<<<< - * """hg.inside_outside() -> SparseVector with inside-outside scores for each feature.""" - * cdef FastSparseVector[prob_t]* result = new FastSparseVector[prob_t]() - */ - /* Python wrapper */ -static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_38inside_outside(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static char __pyx_doc_4cdec_5_cdec_10Hypergraph_37inside_outside[] = "hg.inside_outside() -> SparseVector with inside-outside scores for each feature."; -static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_38inside_outside(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_47inside_outside(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static char __pyx_doc_4cdec_5_cdec_10Hypergraph_46inside_outside[] = "hg.inside_outside() -> SparseVector with inside-outside scores for each feature."; +static PyObject *__pyx_pw_4cdec_5_cdec_10Hypergraph_47inside_outside(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("inside_outside (wrapper)", 0); - __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_37inside_outside(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self)); - - /* function exit code */ + __pyx_r = __pyx_pf_4cdec_5_cdec_10Hypergraph_46inside_outside(((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_v_self)); __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_37inside_outside(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self) { +/* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":228 + * return self.hg.NumberOfPaths() + * + * def inside_outside(self): # <<<<<<<<<<<<<< + * """hg.inside_outside() -> SparseVector with inside-outside scores for each feature.""" + * cdef FastSparseVector[prob_t]* result = new FastSparseVector[prob_t]() + */ + +static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_46inside_outside(struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_self) { FastSparseVector *__pyx_v_result; prob_t __pyx_v_z; struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_vector = 0; @@ -12835,7 +12658,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_37inside_outside(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("inside_outside", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":182 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":230 * def inside_outside(self): * """hg.inside_outside() -> SparseVector with inside-outside scores for each feature.""" * cdef FastSparseVector[prob_t]* result = new FastSparseVector[prob_t]() # <<<<<<<<<<<<<< @@ -12844,7 +12667,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_37inside_outside(struct __py */ __pyx_v_result = new FastSparseVector(); - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":183 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":231 * """hg.inside_outside() -> SparseVector with inside-outside scores for each feature.""" * cdef FastSparseVector[prob_t]* result = new FastSparseVector[prob_t]() * cdef prob_t z = hypergraph.InsideOutside(self.hg[0], result) # <<<<<<<<<<<<<< @@ -12853,7 +12676,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_37inside_outside(struct __py */ __pyx_v_z = InsideOutside, EdgeFeaturesAndProbWeightFunction>((__pyx_v_self->hg[0]), __pyx_v_result); - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":184 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":232 * cdef FastSparseVector[prob_t]* result = new FastSparseVector[prob_t]() * cdef prob_t z = hypergraph.InsideOutside(self.hg[0], result) * result[0] /= z # <<<<<<<<<<<<<< @@ -12862,20 +12685,20 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_37inside_outside(struct __py */ (__pyx_v_result[0]) /= __pyx_v_z; - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":185 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":233 * cdef prob_t z = hypergraph.InsideOutside(self.hg[0], result) * result[0] /= z * cdef SparseVector vector = SparseVector.__new__(SparseVector) # <<<<<<<<<<<<<< * vector.vector = new FastSparseVector[double]() * cdef FastSparseVector[prob_t].const_iterator* it = new FastSparseVector[prob_t].const_iterator(result[0], False) */ - __pyx_t_1 = __pyx_tp_new_4cdec_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SparseVector)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_tp_new_4cdec_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SparseVector)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4cdec_5_cdec_SparseVector)))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 185; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4cdec_5_cdec_SparseVector)))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_vector = ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":186 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":234 * result[0] /= z * cdef SparseVector vector = SparseVector.__new__(SparseVector) * vector.vector = new FastSparseVector[double]() # <<<<<<<<<<<<<< @@ -12884,7 +12707,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_37inside_outside(struct __py */ __pyx_v_vector->vector = new FastSparseVector(); - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":187 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":235 * cdef SparseVector vector = SparseVector.__new__(SparseVector) * vector.vector = new FastSparseVector[double]() * cdef FastSparseVector[prob_t].const_iterator* it = new FastSparseVector[prob_t].const_iterator(result[0], False) # <<<<<<<<<<<<<< @@ -12893,7 +12716,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_37inside_outside(struct __py */ __pyx_v_it = new FastSparseVector::const_iterator((__pyx_v_result[0]), 0); - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":189 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":237 * cdef FastSparseVector[prob_t].const_iterator* it = new FastSparseVector[prob_t].const_iterator(result[0], False) * cdef unsigned i * for i in range(result.size()): # <<<<<<<<<<<<<< @@ -12904,7 +12727,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_37inside_outside(struct __py for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { __pyx_v_i = __pyx_t_3; - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":190 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":238 * cdef unsigned i * for i in range(result.size()): * vector.vector.set_value(it[0].ptr().first, log(it[0].ptr().second)) # <<<<<<<<<<<<<< @@ -12913,7 +12736,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_37inside_outside(struct __py */ __pyx_v_vector->vector->set_value((__pyx_v_it[0]).operator->()->first, log((__pyx_v_it[0]).operator->()->second)); - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":191 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":239 * for i in range(result.size()): * vector.vector.set_value(it[0].ptr().first, log(it[0].ptr().second)) * pinc(it[0]) # ++it # <<<<<<<<<<<<<< @@ -12923,7 +12746,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_37inside_outside(struct __py (++(__pyx_v_it[0])); } - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":192 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":240 * vector.vector.set_value(it[0].ptr().first, log(it[0].ptr().second)) * pinc(it[0]) # ++it * del it # <<<<<<<<<<<<<< @@ -12932,7 +12755,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_37inside_outside(struct __py */ delete __pyx_v_it; - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":193 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":241 * pinc(it[0]) # ++it * del it * del result # <<<<<<<<<<<<<< @@ -12941,7 +12764,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_37inside_outside(struct __py */ delete __pyx_v_result; - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":194 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":242 * del it * del result * return vector # <<<<<<<<<<<<<< @@ -12953,15 +12776,8 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_37inside_outside(struct __py __pyx_r = ((PyObject *)__pyx_v_vector); goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":180 - * return self.hg.NumberOfPaths() - * - * def inside_outside(self): # <<<<<<<<<<<<<< - * """hg.inside_outside() -> SparseVector with inside-outside scores for each feature.""" - * cdef FastSparseVector[prob_t]* result = new FastSparseVector[prob_t]() - */ - - /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cdec._cdec.Hypergraph.inside_outside", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -12973,7 +12789,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_10Hypergraph_37inside_outside(struct __py return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":201 +/* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":249 * cdef public TRule trule * * cdef init(self, hypergraph.Hypergraph* hg, unsigned i): # <<<<<<<<<<<<<< @@ -12990,7 +12806,7 @@ static PyObject *__pyx_f_4cdec_5_cdec_14HypergraphEdge_init(struct __pyx_obj_4cd int __pyx_clineno = 0; __Pyx_RefNannySetupContext("init", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":202 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":250 * * cdef init(self, hypergraph.Hypergraph* hg, unsigned i): * self.hg = hg # <<<<<<<<<<<<<< @@ -12999,7 +12815,7 @@ static PyObject *__pyx_f_4cdec_5_cdec_14HypergraphEdge_init(struct __pyx_obj_4cd */ __pyx_v_self->hg = __pyx_v_hg; - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":203 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":251 * cdef init(self, hypergraph.Hypergraph* hg, unsigned i): * self.hg = hg * self.edge = &hg.edges_[i] # <<<<<<<<<<<<<< @@ -13008,23 +12824,23 @@ static PyObject *__pyx_f_4cdec_5_cdec_14HypergraphEdge_init(struct __pyx_obj_4cd */ __pyx_v_self->edge = (&(__pyx_v_hg->edges_[__pyx_v_i])); - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":204 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":252 * self.hg = hg * self.edge = &hg.edges_[i] * self.trule = TRule.__new__(TRule) # <<<<<<<<<<<<<< * self.trule.rule = new shared_ptr[grammar.TRule](self.edge.rule_) * return self */ - __pyx_t_1 = __pyx_tp_new_4cdec_5_cdec_TRule(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_TRule)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_tp_new_4cdec_5_cdec_TRule(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_TRule)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4cdec_5_cdec_TRule)))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4cdec_5_cdec_TRule)))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 252; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->trule); __Pyx_DECREF(((PyObject *)__pyx_v_self->trule)); __pyx_v_self->trule = ((struct __pyx_obj_4cdec_5_cdec_TRule *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":205 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":253 * self.edge = &hg.edges_[i] * self.trule = TRule.__new__(TRule) * self.trule.rule = new shared_ptr[grammar.TRule](self.edge.rule_) # <<<<<<<<<<<<<< @@ -13033,7 +12849,7 @@ static PyObject *__pyx_f_4cdec_5_cdec_14HypergraphEdge_init(struct __pyx_obj_4cd */ __pyx_v_self->trule->rule = new boost::shared_ptr(__pyx_v_self->edge->rule_); - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":206 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":254 * self.trule = TRule.__new__(TRule) * self.trule.rule = new shared_ptr[grammar.TRule](self.edge.rule_) * return self # <<<<<<<<<<<<<< @@ -13045,15 +12861,8 @@ static PyObject *__pyx_f_4cdec_5_cdec_14HypergraphEdge_init(struct __pyx_obj_4cd __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":201 - * cdef public TRule trule - * - * cdef init(self, hypergraph.Hypergraph* hg, unsigned i): # <<<<<<<<<<<<<< - * self.hg = hg - * self.edge = &hg.edges_[i] - */ - - /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cdec._cdec.HypergraphEdge.init", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -13064,14 +12873,6 @@ static PyObject *__pyx_f_4cdec_5_cdec_14HypergraphEdge_init(struct __pyx_obj_4cd return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":208 - * return self - * - * def __len__(self): # <<<<<<<<<<<<<< - * return self.edge.tail_nodes_.size() - * - */ - /* Python wrapper */ static Py_ssize_t __pyx_pw_4cdec_5_cdec_14HypergraphEdge_1__len__(PyObject *__pyx_v_self); /*proto*/ static Py_ssize_t __pyx_pw_4cdec_5_cdec_14HypergraphEdge_1__len__(PyObject *__pyx_v_self) { @@ -13079,18 +12880,24 @@ static Py_ssize_t __pyx_pw_4cdec_5_cdec_14HypergraphEdge_1__len__(PyObject *__py __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_14HypergraphEdge___len__(((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":256 + * return self + * + * def __len__(self): # <<<<<<<<<<<<<< + * return self.edge.tail_nodes_.size() + * + */ + static Py_ssize_t __pyx_pf_4cdec_5_cdec_14HypergraphEdge___len__(struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *__pyx_v_self) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":209 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":257 * * def __len__(self): * return self.edge.tail_nodes_.size() # <<<<<<<<<<<<<< @@ -13100,28 +12907,12 @@ static Py_ssize_t __pyx_pf_4cdec_5_cdec_14HypergraphEdge___len__(struct __pyx_ob __pyx_r = __pyx_v_self->edge->tail_nodes_.size(); goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":208 - * return self - * - * def __len__(self): # <<<<<<<<<<<<<< - * return self.edge.tail_nodes_.size() - * - */ - - /* function exit code */ + __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":212 - * - * property head_node: - * def __get__(self): # <<<<<<<<<<<<<< - * return HypergraphNode().init(self.hg, self.edge.head_node_) - * - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphEdge_9head_node_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphEdge_9head_node_1__get__(PyObject *__pyx_v_self) { @@ -13129,12 +12920,18 @@ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphEdge_9head_node_1__get__(PyOb __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_14HypergraphEdge_9head_node___get__(((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":260 + * + * property head_node: + * def __get__(self): # <<<<<<<<<<<<<< + * return HypergraphNode().init(self.hg, self.edge.head_node_) + * + */ + static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_9head_node___get__(struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -13145,7 +12942,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_9head_node___get__(struc int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":213 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":261 * property head_node: * def __get__(self): * return HypergraphNode().init(self.hg, self.edge.head_node_) # <<<<<<<<<<<<<< @@ -13153,24 +12950,17 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_9head_node___get__(struc * property tail_nodes: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_HypergraphNode)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_HypergraphNode)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = ((struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphNode *)((struct __pyx_obj_4cdec_5_cdec_HypergraphNode *)__pyx_t_1)->__pyx_vtab)->init(((struct __pyx_obj_4cdec_5_cdec_HypergraphNode *)__pyx_t_1), __pyx_v_self->hg, __pyx_v_self->edge->head_node_); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = ((struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphNode *)((struct __pyx_obj_4cdec_5_cdec_HypergraphNode *)__pyx_t_1)->__pyx_vtab)->init(((struct __pyx_obj_4cdec_5_cdec_HypergraphNode *)__pyx_t_1), __pyx_v_self->hg, __pyx_v_self->edge->head_node_); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 261; __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; - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":212 - * - * property head_node: - * def __get__(self): # <<<<<<<<<<<<<< - * return HypergraphNode().init(self.hg, self.edge.head_node_) - * - */ - - /* 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); @@ -13181,15 +12971,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_9head_node___get__(struc __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_gb_4cdec_5_cdec_14HypergraphEdge_10tail_nodes_2generator11(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ - -/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":216 - * - * property tail_nodes: - * def __get__(self): # <<<<<<<<<<<<<< - * cdef unsigned i - * for i in range(self.edge.tail_nodes_.size()): - */ +static PyObject *__pyx_gb_4cdec_5_cdec_14HypergraphEdge_10tail_nodes_2generator14(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphEdge_10tail_nodes_1__get__(PyObject *__pyx_v_self); /*proto*/ @@ -13198,21 +12980,27 @@ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphEdge_10tail_nodes_1__get__(Py __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_14HypergraphEdge_10tail_nodes___get__(((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":264 + * + * property tail_nodes: + * def __get__(self): # <<<<<<<<<<<<<< + * cdef unsigned i + * for i in range(self.edge.tail_nodes_.size()): + */ + static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_10tail_nodes___get__(struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *__pyx_v_self) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__ *__pyx_cur_scope; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___get__ *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - __pyx_cur_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__ *)__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_15___get__(__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_15___get__, __pyx_empty_tuple, NULL); + __pyx_cur_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___get__ *)__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_18___get__(__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_18___get__, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; @@ -13222,13 +13010,12 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_10tail_nodes___get__(str __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); { - __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_5_cdec_14HypergraphEdge_10tail_nodes_2generator11, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_5_cdec_14HypergraphEdge_10tail_nodes_2generator14, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } - /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; @@ -13241,9 +13028,9 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_10tail_nodes___get__(str return __pyx_r; } -static PyObject *__pyx_gb_4cdec_5_cdec_14HypergraphEdge_10tail_nodes_2generator11(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ +static PyObject *__pyx_gb_4cdec_5_cdec_14HypergraphEdge_10tail_nodes_2generator14(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__ *__pyx_cur_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__ *)__pyx_generator->closure); + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___get__ *__pyx_cur_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___get__ *)__pyx_generator->closure); PyObject *__pyx_r = NULL; unsigned int __pyx_t_1; unsigned int __pyx_t_2; @@ -13262,9 +13049,9 @@ static PyObject *__pyx_gb_4cdec_5_cdec_14HypergraphEdge_10tail_nodes_2generator1 return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":218 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":266 * def __get__(self): * cdef unsigned i * for i in range(self.edge.tail_nodes_.size()): # <<<<<<<<<<<<<< @@ -13275,16 +13062,16 @@ static PyObject *__pyx_gb_4cdec_5_cdec_14HypergraphEdge_10tail_nodes_2generator1 for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_cur_scope->__pyx_v_i = __pyx_t_2; - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":219 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":267 * cdef unsigned i * for i in range(self.edge.tail_nodes_.size()): * yield HypergraphNode().init(self.hg, self.edge.tail_nodes_[i]) # <<<<<<<<<<<<<< * * property span: */ - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_HypergraphNode)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_HypergraphNode)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = ((struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphNode *)((struct __pyx_obj_4cdec_5_cdec_HypergraphNode *)__pyx_t_3)->__pyx_vtab)->init(((struct __pyx_obj_4cdec_5_cdec_HypergraphNode *)__pyx_t_3), __pyx_cur_scope->__pyx_v_self->hg, (__pyx_cur_scope->__pyx_v_self->edge->tail_nodes_[__pyx_cur_scope->__pyx_v_i])); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = ((struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphNode *)((struct __pyx_obj_4cdec_5_cdec_HypergraphNode *)__pyx_t_3)->__pyx_vtab)->init(((struct __pyx_obj_4cdec_5_cdec_HypergraphNode *)__pyx_t_3), __pyx_cur_scope->__pyx_v_self->hg, (__pyx_cur_scope->__pyx_v_self->edge->tail_nodes_[__pyx_cur_scope->__pyx_v_i])); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_4; @@ -13299,18 +13086,8 @@ static PyObject *__pyx_gb_4cdec_5_cdec_14HypergraphEdge_10tail_nodes_2generator1 __pyx_L6_resume_from_yield:; __pyx_t_1 = __pyx_cur_scope->__pyx_t_0; __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":216 - * - * property tail_nodes: - * def __get__(self): # <<<<<<<<<<<<<< - * cdef unsigned i - * for i in range(self.edge.tail_nodes_.size()): - */ - - /* function exit code */ PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; @@ -13325,14 +13102,6 @@ static PyObject *__pyx_gb_4cdec_5_cdec_14HypergraphEdge_10tail_nodes_2generator1 return NULL; } -/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":222 - * - * property span: - * def __get__(self): # <<<<<<<<<<<<<< - * return (self.edge.i_, self.edge.j_) - * - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphEdge_4span_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphEdge_4span_1__get__(PyObject *__pyx_v_self) { @@ -13340,12 +13109,18 @@ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphEdge_4span_1__get__(PyObject __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_14HypergraphEdge_4span___get__(((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":270 + * + * property span: + * def __get__(self): # <<<<<<<<<<<<<< + * return (self.edge.i_, self.edge.j_) + * + */ + static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_4span___get__(struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -13357,7 +13132,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_4span___get__(struct __p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":223 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":271 * property span: * def __get__(self): * return (self.edge.i_, self.edge.j_) # <<<<<<<<<<<<<< @@ -13365,11 +13140,11 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_4span___get__(struct __p * property src_span: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_short(__pyx_v_self->edge->i_); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyInt_FromLong(__pyx_v_self->edge->i_); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyInt_From_short(__pyx_v_self->edge->j_); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyInt_FromLong(__pyx_v_self->edge->j_); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -13377,19 +13152,12 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_4span___get__(struct __p __Pyx_GIVEREF(__pyx_t_2); __pyx_t_1 = 0; __pyx_t_2 = 0; - __pyx_r = __pyx_t_3; + __pyx_r = ((PyObject *)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":222 - * - * property span: - * def __get__(self): # <<<<<<<<<<<<<< - * return (self.edge.i_, self.edge.j_) - * - */ - - /* 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); @@ -13402,14 +13170,6 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_4span___get__(struct __p return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":226 - * - * property src_span: - * def __get__(self): # <<<<<<<<<<<<<< - * return (self.edge.prev_i_, self.edge.prev_j_) - * - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphEdge_8src_span_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphEdge_8src_span_1__get__(PyObject *__pyx_v_self) { @@ -13417,12 +13177,18 @@ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphEdge_8src_span_1__get__(PyObj __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_14HypergraphEdge_8src_span___get__(((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":274 + * + * property src_span: + * def __get__(self): # <<<<<<<<<<<<<< + * return (self.edge.prev_i_, self.edge.prev_j_) + * + */ + static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_8src_span___get__(struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -13434,7 +13200,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_8src_span___get__(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":227 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":275 * property src_span: * def __get__(self): * return (self.edge.prev_i_, self.edge.prev_j_) # <<<<<<<<<<<<<< @@ -13442,11 +13208,11 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_8src_span___get__(struct * property feature_values: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_short(__pyx_v_self->edge->prev_i_); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyInt_FromLong(__pyx_v_self->edge->prev_i_); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyInt_From_short(__pyx_v_self->edge->prev_j_); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyInt_FromLong(__pyx_v_self->edge->prev_j_); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -13454,19 +13220,12 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_8src_span___get__(struct __Pyx_GIVEREF(__pyx_t_2); __pyx_t_1 = 0; __pyx_t_2 = 0; - __pyx_r = __pyx_t_3; + __pyx_r = ((PyObject *)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":226 - * - * property src_span: - * def __get__(self): # <<<<<<<<<<<<<< - * return (self.edge.prev_i_, self.edge.prev_j_) - * - */ - - /* 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); @@ -13479,14 +13238,6 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_8src_span___get__(struct return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":230 - * - * property feature_values: - * def __get__(self): # <<<<<<<<<<<<<< - * cdef SparseVector vector = SparseVector.__new__(SparseVector) - * vector.vector = new FastSparseVector[double](self.edge.feature_values_) - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphEdge_14feature_values_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphEdge_14feature_values_1__get__(PyObject *__pyx_v_self) { @@ -13494,12 +13245,18 @@ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphEdge_14feature_values_1__get_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_14HypergraphEdge_14feature_values___get__(((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":278 + * + * property feature_values: + * def __get__(self): # <<<<<<<<<<<<<< + * cdef SparseVector vector = SparseVector.__new__(SparseVector) + * vector.vector = new FastSparseVector[double](self.edge.feature_values_) + */ + static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_14feature_values___get__(struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *__pyx_v_self) { struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_vector = 0; PyObject *__pyx_r = NULL; @@ -13510,20 +13267,20 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_14feature_values___get__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":231 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":279 * property feature_values: * def __get__(self): * cdef SparseVector vector = SparseVector.__new__(SparseVector) # <<<<<<<<<<<<<< * vector.vector = new FastSparseVector[double](self.edge.feature_values_) * return vector */ - __pyx_t_1 = __pyx_tp_new_4cdec_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SparseVector)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_tp_new_4cdec_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SparseVector)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4cdec_5_cdec_SparseVector)))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4cdec_5_cdec_SparseVector)))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 279; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_vector = ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":232 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":280 * def __get__(self): * cdef SparseVector vector = SparseVector.__new__(SparseVector) * vector.vector = new FastSparseVector[double](self.edge.feature_values_) # <<<<<<<<<<<<<< @@ -13532,7 +13289,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_14feature_values___get__ */ __pyx_v_vector->vector = new FastSparseVector(__pyx_v_self->edge->feature_values_); - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":233 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":281 * cdef SparseVector vector = SparseVector.__new__(SparseVector) * vector.vector = new FastSparseVector[double](self.edge.feature_values_) * return vector # <<<<<<<<<<<<<< @@ -13544,15 +13301,8 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_14feature_values___get__ __pyx_r = ((PyObject *)__pyx_v_vector); goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":230 - * - * property feature_values: - * def __get__(self): # <<<<<<<<<<<<<< - * cdef SparseVector vector = SparseVector.__new__(SparseVector) - * vector.vector = new FastSparseVector[double](self.edge.feature_values_) - */ - - /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cdec._cdec.HypergraphEdge.feature_values.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -13564,14 +13314,6 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_14feature_values___get__ return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":236 - * - * property prob: - * def __get__(self): # <<<<<<<<<<<<<< - * return self.edge.edge_prob_.as_float() - * - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphEdge_4prob_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphEdge_4prob_1__get__(PyObject *__pyx_v_self) { @@ -13579,12 +13321,18 @@ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphEdge_4prob_1__get__(PyObject __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_14HypergraphEdge_4prob___get__(((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":284 + * + * property prob: + * def __get__(self): # <<<<<<<<<<<<<< + * return self.edge.edge_prob_.as_float() + * + */ + static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_4prob___get__(struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -13594,7 +13342,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_4prob___get__(struct __p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":237 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":285 * property prob: * def __get__(self): * return self.edge.edge_prob_.as_float() # <<<<<<<<<<<<<< @@ -13602,21 +13350,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_4prob___get__(struct __p * def __richcmp__(HypergraphEdge x, HypergraphEdge y, int op): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->edge->edge_prob_.as_float()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->edge->edge_prob_.as_float()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":236 - * - * property prob: - * def __get__(self): # <<<<<<<<<<<<<< - * return self.edge.edge_prob_.as_float() - * - */ - - /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cdec._cdec.HypergraphEdge.prob.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -13627,14 +13368,6 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_4prob___get__(struct __p return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":239 - * return self.edge.edge_prob_.as_float() - * - * def __richcmp__(HypergraphEdge x, HypergraphEdge y, int op): # <<<<<<<<<<<<<< - * if op == 2: # == - * return x.edge == y.edge - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphEdge_3__richcmp__(PyObject *__pyx_v_x, PyObject *__pyx_v_y, int __pyx_v_op); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphEdge_3__richcmp__(PyObject *__pyx_v_x, PyObject *__pyx_v_y, int __pyx_v_op) { @@ -13644,11 +13377,9 @@ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphEdge_3__richcmp__(PyObject *_ PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_4cdec_5_cdec_HypergraphEdge, 1, "x", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_4cdec_5_cdec_HypergraphEdge, 1, "y", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_4cdec_5_cdec_HypergraphEdge, 1, "x", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_4cdec_5_cdec_HypergraphEdge, 1, "y", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 287; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_4cdec_5_cdec_14HypergraphEdge_2__richcmp__(((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)__pyx_v_x), ((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)__pyx_v_y), ((int)__pyx_v_op)); - - /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; @@ -13657,6 +13388,14 @@ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphEdge_3__richcmp__(PyObject *_ return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":287 + * return self.edge.edge_prob_.as_float() + * + * def __richcmp__(HypergraphEdge x, HypergraphEdge y, int op): # <<<<<<<<<<<<<< + * if op == 2: # == + * return x.edge == y.edge + */ + static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_2__richcmp__(struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *__pyx_v_x, struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *__pyx_v_y, int __pyx_v_op) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -13667,7 +13406,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_2__richcmp__(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__richcmp__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":242 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":290 * if op == 2: # == * return x.edge == y.edge * elif op == 3: # != # <<<<<<<<<<<<<< @@ -13676,7 +13415,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_2__richcmp__(struct __py */ switch (__pyx_v_op) { - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":240 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":288 * * def __richcmp__(HypergraphEdge x, HypergraphEdge y, int op): * if op == 2: # == # <<<<<<<<<<<<<< @@ -13685,7 +13424,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_2__richcmp__(struct __py */ case 2: - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":241 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":289 * def __richcmp__(HypergraphEdge x, HypergraphEdge y, int op): * if op == 2: # == * return x.edge == y.edge # <<<<<<<<<<<<<< @@ -13693,14 +13432,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_2__richcmp__(struct __py * return not (x == y) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_x->edge == __pyx_v_y->edge)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_x->edge == __pyx_v_y->edge)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 289; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; break; - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":242 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":290 * if op == 2: # == * return x.edge == y.edge * elif op == 3: # != # <<<<<<<<<<<<<< @@ -13709,7 +13448,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_2__richcmp__(struct __py */ case 3: - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":243 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":291 * return x.edge == y.edge * elif op == 3: # != * return not (x == y) # <<<<<<<<<<<<<< @@ -13717,40 +13456,32 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_2__richcmp__(struct __py * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_x), ((PyObject *)__pyx_v_y), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_x), ((PyObject *)__pyx_v_y), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyBool_FromLong((!__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyBool_FromLong((!__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 291; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; break; - default: break; } - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":244 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":292 * elif op == 3: # != * return not (x == y) * raise NotImplemented('comparison not implemented for HypergraphEdge') # <<<<<<<<<<<<<< * * cdef class HypergraphNode: */ - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_NotImplemented, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(__pyx_builtin_NotImplemented, ((PyObject *)__pyx_k_tuple_19), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - {__pyx_filename = __pyx_f[3]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":239 - * return self.edge.edge_prob_.as_float() - * - * def __richcmp__(HypergraphEdge x, HypergraphEdge y, int op): # <<<<<<<<<<<<<< - * if op == 2: # == - * return x.edge == y.edge - */ + {__pyx_filename = __pyx_f[3]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cdec._cdec.HypergraphEdge.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -13761,14 +13492,6 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_2__richcmp__(struct __py return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":199 - * cdef hypergraph.Hypergraph* hg - * cdef hypergraph.HypergraphEdge* edge - * cdef public TRule trule # <<<<<<<<<<<<<< - * - * cdef init(self, hypergraph.Hypergraph* hg, unsigned i): - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphEdge_5trule_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphEdge_5trule_1__get__(PyObject *__pyx_v_self) { @@ -13776,12 +13499,18 @@ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphEdge_5trule_1__get__(PyObject __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_14HypergraphEdge_5trule___get__(((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":247 + * cdef hypergraph.Hypergraph* hg + * cdef hypergraph.HypergraphEdge* edge + * cdef public TRule trule # <<<<<<<<<<<<<< + * + * cdef init(self, hypergraph.Hypergraph* hg, unsigned i): + */ + static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_5trule___get__(struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -13791,7 +13520,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphEdge_5trule___get__(struct __ __pyx_r = ((PyObject *)__pyx_v_self->trule); goto __pyx_L0; - /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); @@ -13805,8 +13534,6 @@ static int __pyx_pw_4cdec_5_cdec_14HypergraphEdge_5trule_3__set__(PyObject *__py __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_14HypergraphEdge_5trule_2__set__(((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)__pyx_v_self), ((PyObject *)__pyx_v_value)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -13814,25 +13541,20 @@ static int __pyx_pw_4cdec_5_cdec_14HypergraphEdge_5trule_3__set__(PyObject *__py static int __pyx_pf_4cdec_5_cdec_14HypergraphEdge_5trule_2__set__(struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *__pyx_v_self, PyObject *__pyx_v_value) { int __pyx_r; __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_4cdec_5_cdec_TRule))))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_1 = __pyx_v_value; - __Pyx_INCREF(__pyx_t_1); - __Pyx_GIVEREF(__pyx_t_1); + if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_4cdec_5_cdec_TRule))))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_INCREF(__pyx_v_value); + __Pyx_GIVEREF(__pyx_v_value); __Pyx_GOTREF(__pyx_v_self->trule); __Pyx_DECREF(((PyObject *)__pyx_v_self->trule)); - __pyx_v_self->trule = ((struct __pyx_obj_4cdec_5_cdec_TRule *)__pyx_t_1); - __pyx_t_1 = 0; + __pyx_v_self->trule = ((struct __pyx_obj_4cdec_5_cdec_TRule *)__pyx_v_value); - /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cdec._cdec.HypergraphEdge.trule.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; @@ -13847,8 +13569,6 @@ static int __pyx_pw_4cdec_5_cdec_14HypergraphEdge_5trule_5__del__(PyObject *__py __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__del__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_14HypergraphEdge_5trule_4__del__(((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -13863,13 +13583,12 @@ static int __pyx_pf_4cdec_5_cdec_14HypergraphEdge_5trule_4__del__(struct __pyx_o __Pyx_DECREF(((PyObject *)__pyx_v_self->trule)); __pyx_v_self->trule = ((struct __pyx_obj_4cdec_5_cdec_TRule *)Py_None); - /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":250 +/* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":298 * cdef hypergraph.HypergraphNode* node * * cdef init(self, hypergraph.Hypergraph* hg, unsigned i): # <<<<<<<<<<<<<< @@ -13882,7 +13601,7 @@ static PyObject *__pyx_f_4cdec_5_cdec_14HypergraphNode_init(struct __pyx_obj_4cd __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("init", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":251 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":299 * * cdef init(self, hypergraph.Hypergraph* hg, unsigned i): * self.hg = hg # <<<<<<<<<<<<<< @@ -13891,7 +13610,7 @@ static PyObject *__pyx_f_4cdec_5_cdec_14HypergraphNode_init(struct __pyx_obj_4cd */ __pyx_v_self->hg = __pyx_v_hg; - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":252 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":300 * cdef init(self, hypergraph.Hypergraph* hg, unsigned i): * self.hg = hg * self.node = &hg.nodes_[i] # <<<<<<<<<<<<<< @@ -13900,7 +13619,7 @@ static PyObject *__pyx_f_4cdec_5_cdec_14HypergraphNode_init(struct __pyx_obj_4cd */ __pyx_v_self->node = (&(__pyx_v_hg->nodes_[__pyx_v_i])); - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":253 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":301 * self.hg = hg * self.node = &hg.nodes_[i] * return self # <<<<<<<<<<<<<< @@ -13912,29 +13631,13 @@ static PyObject *__pyx_f_4cdec_5_cdec_14HypergraphNode_init(struct __pyx_obj_4cd __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":250 - * cdef hypergraph.HypergraphNode* node - * - * cdef init(self, hypergraph.Hypergraph* hg, unsigned i): # <<<<<<<<<<<<<< - * self.hg = hg - * self.node = &hg.nodes_[i] - */ - - /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":256 - * - * property id: - * def __get__(self): # <<<<<<<<<<<<<< - * return self.node.id_ - * - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphNode_2id_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphNode_2id_1__get__(PyObject *__pyx_v_self) { @@ -13942,12 +13645,18 @@ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphNode_2id_1__get__(PyObject *_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_14HypergraphNode_2id___get__(((struct __pyx_obj_4cdec_5_cdec_HypergraphNode *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":304 + * + * property id: + * def __get__(self): # <<<<<<<<<<<<<< + * return self.node.id_ + * + */ + static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphNode_2id___get__(struct __pyx_obj_4cdec_5_cdec_HypergraphNode *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -13957,7 +13666,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphNode_2id___get__(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":257 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":305 * property id: * def __get__(self): * return self.node.id_ # <<<<<<<<<<<<<< @@ -13965,21 +13674,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphNode_2id___get__(struct __pyx * property in_edges: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->node->id_); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyInt_FromLong(__pyx_v_self->node->id_); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":256 - * - * property id: - * def __get__(self): # <<<<<<<<<<<<<< - * return self.node.id_ - * - */ - - /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cdec._cdec.HypergraphNode.id.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -13989,15 +13691,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphNode_2id___get__(struct __pyx __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_gb_4cdec_5_cdec_14HypergraphNode_8in_edges_2generator12(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ - -/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":260 - * - * property in_edges: - * def __get__(self): # <<<<<<<<<<<<<< - * cdef unsigned i - * for i in range(self.node.in_edges_.size()): - */ +static PyObject *__pyx_gb_4cdec_5_cdec_14HypergraphNode_8in_edges_2generator15(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphNode_8in_edges_1__get__(PyObject *__pyx_v_self); /*proto*/ @@ -14006,21 +13700,27 @@ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphNode_8in_edges_1__get__(PyObj __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_14HypergraphNode_8in_edges___get__(((struct __pyx_obj_4cdec_5_cdec_HypergraphNode *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":308 + * + * property in_edges: + * def __get__(self): # <<<<<<<<<<<<<< + * cdef unsigned i + * for i in range(self.node.in_edges_.size()): + */ + static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphNode_8in_edges___get__(struct __pyx_obj_4cdec_5_cdec_HypergraphNode *__pyx_v_self) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__ *__pyx_cur_scope; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19___get__ *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - __pyx_cur_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__ *)__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_16___get__(__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_16___get__, __pyx_empty_tuple, NULL); + __pyx_cur_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19___get__ *)__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_19___get__(__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_19___get__, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; @@ -14030,13 +13730,12 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphNode_8in_edges___get__(struct __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); { - __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_5_cdec_14HypergraphNode_8in_edges_2generator12, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_5_cdec_14HypergraphNode_8in_edges_2generator15, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } - /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; @@ -14049,9 +13748,9 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphNode_8in_edges___get__(struct return __pyx_r; } -static PyObject *__pyx_gb_4cdec_5_cdec_14HypergraphNode_8in_edges_2generator12(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ +static PyObject *__pyx_gb_4cdec_5_cdec_14HypergraphNode_8in_edges_2generator15(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__ *__pyx_cur_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__ *)__pyx_generator->closure); + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19___get__ *__pyx_cur_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19___get__ *)__pyx_generator->closure); PyObject *__pyx_r = NULL; size_t __pyx_t_1; unsigned int __pyx_t_2; @@ -14070,9 +13769,9 @@ static PyObject *__pyx_gb_4cdec_5_cdec_14HypergraphNode_8in_edges_2generator12(_ return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":262 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":310 * def __get__(self): * cdef unsigned i * for i in range(self.node.in_edges_.size()): # <<<<<<<<<<<<<< @@ -14083,16 +13782,16 @@ static PyObject *__pyx_gb_4cdec_5_cdec_14HypergraphNode_8in_edges_2generator12(_ for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_cur_scope->__pyx_v_i = __pyx_t_2; - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":263 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":311 * cdef unsigned i * for i in range(self.node.in_edges_.size()): * yield HypergraphEdge().init(self.hg, self.node.in_edges_[i]) # <<<<<<<<<<<<<< * * property out_edges: */ - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_HypergraphEdge)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_HypergraphEdge)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = ((struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphEdge *)((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)__pyx_t_3)->__pyx_vtab)->init(((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)__pyx_t_3), __pyx_cur_scope->__pyx_v_self->hg, (__pyx_cur_scope->__pyx_v_self->node->in_edges_[__pyx_cur_scope->__pyx_v_i])); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = ((struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphEdge *)((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)__pyx_t_3)->__pyx_vtab)->init(((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)__pyx_t_3), __pyx_cur_scope->__pyx_v_self->hg, (__pyx_cur_scope->__pyx_v_self->node->in_edges_[__pyx_cur_scope->__pyx_v_i])); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_4; @@ -14107,18 +13806,8 @@ static PyObject *__pyx_gb_4cdec_5_cdec_14HypergraphNode_8in_edges_2generator12(_ __pyx_L6_resume_from_yield:; __pyx_t_1 = __pyx_cur_scope->__pyx_t_0; __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 263; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":260 - * - * property in_edges: - * def __get__(self): # <<<<<<<<<<<<<< - * cdef unsigned i - * for i in range(self.node.in_edges_.size()): - */ - - /* function exit code */ PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; @@ -14132,15 +13821,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_14HypergraphNode_8in_edges_2generator12(_ __Pyx_RefNannyFinishContext(); return NULL; } -static PyObject *__pyx_gb_4cdec_5_cdec_14HypergraphNode_9out_edges_2generator13(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ - -/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":266 - * - * property out_edges: - * def __get__(self): # <<<<<<<<<<<<<< - * cdef unsigned i - * for i in range(self.node.out_edges_.size()): - */ +static PyObject *__pyx_gb_4cdec_5_cdec_14HypergraphNode_9out_edges_2generator16(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphNode_9out_edges_1__get__(PyObject *__pyx_v_self); /*proto*/ @@ -14149,21 +13830,27 @@ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphNode_9out_edges_1__get__(PyOb __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_14HypergraphNode_9out_edges___get__(((struct __pyx_obj_4cdec_5_cdec_HypergraphNode *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":314 + * + * property out_edges: + * def __get__(self): # <<<<<<<<<<<<<< + * cdef unsigned i + * for i in range(self.node.out_edges_.size()): + */ + static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphNode_9out_edges___get__(struct __pyx_obj_4cdec_5_cdec_HypergraphNode *__pyx_v_self) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__ *__pyx_cur_scope; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20___get__ *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - __pyx_cur_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__ *)__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_17___get__(__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_17___get__, __pyx_empty_tuple, NULL); + __pyx_cur_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20___get__ *)__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_20___get__(__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_20___get__, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; @@ -14173,13 +13860,12 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphNode_9out_edges___get__(struc __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); { - __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_5_cdec_14HypergraphNode_9out_edges_2generator13, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_5_cdec_14HypergraphNode_9out_edges_2generator16, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } - /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; @@ -14192,9 +13878,9 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphNode_9out_edges___get__(struc return __pyx_r; } -static PyObject *__pyx_gb_4cdec_5_cdec_14HypergraphNode_9out_edges_2generator13(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ +static PyObject *__pyx_gb_4cdec_5_cdec_14HypergraphNode_9out_edges_2generator16(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__ *__pyx_cur_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__ *)__pyx_generator->closure); + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20___get__ *__pyx_cur_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20___get__ *)__pyx_generator->closure); PyObject *__pyx_r = NULL; size_t __pyx_t_1; unsigned int __pyx_t_2; @@ -14213,9 +13899,9 @@ static PyObject *__pyx_gb_4cdec_5_cdec_14HypergraphNode_9out_edges_2generator13( return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":268 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":316 * def __get__(self): * cdef unsigned i * for i in range(self.node.out_edges_.size()): # <<<<<<<<<<<<<< @@ -14226,16 +13912,16 @@ static PyObject *__pyx_gb_4cdec_5_cdec_14HypergraphNode_9out_edges_2generator13( for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_cur_scope->__pyx_v_i = __pyx_t_2; - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":269 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":317 * cdef unsigned i * for i in range(self.node.out_edges_.size()): * yield HypergraphEdge().init(self.hg, self.node.out_edges_[i]) # <<<<<<<<<<<<<< * * property span: */ - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_HypergraphEdge)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_HypergraphEdge)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = ((struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphEdge *)((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)__pyx_t_3)->__pyx_vtab)->init(((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)__pyx_t_3), __pyx_cur_scope->__pyx_v_self->hg, (__pyx_cur_scope->__pyx_v_self->node->out_edges_[__pyx_cur_scope->__pyx_v_i])); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = ((struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphEdge *)((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)__pyx_t_3)->__pyx_vtab)->init(((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)__pyx_t_3), __pyx_cur_scope->__pyx_v_self->hg, (__pyx_cur_scope->__pyx_v_self->node->out_edges_[__pyx_cur_scope->__pyx_v_i])); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_4; @@ -14250,18 +13936,8 @@ static PyObject *__pyx_gb_4cdec_5_cdec_14HypergraphNode_9out_edges_2generator13( __pyx_L6_resume_from_yield:; __pyx_t_1 = __pyx_cur_scope->__pyx_t_0; __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; - if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 317; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":266 - * - * property out_edges: - * def __get__(self): # <<<<<<<<<<<<<< - * cdef unsigned i - * for i in range(self.node.out_edges_.size()): - */ - - /* function exit code */ PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; @@ -14276,14 +13952,6 @@ static PyObject *__pyx_gb_4cdec_5_cdec_14HypergraphNode_9out_edges_2generator13( return NULL; } -/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":272 - * - * property span: - * def __get__(self): # <<<<<<<<<<<<<< - * return next(self.in_edges).span - * - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphNode_4span_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphNode_4span_1__get__(PyObject *__pyx_v_self) { @@ -14291,12 +13959,18 @@ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphNode_4span_1__get__(PyObject __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_14HypergraphNode_4span___get__(((struct __pyx_obj_4cdec_5_cdec_HypergraphNode *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":320 + * + * property span: + * def __get__(self): # <<<<<<<<<<<<<< + * return next(self.in_edges).span + * + */ + static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphNode_4span___get__(struct __pyx_obj_4cdec_5_cdec_HypergraphNode *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -14307,7 +13981,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphNode_4span___get__(struct __p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":273 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":321 * property span: * def __get__(self): * return next(self.in_edges).span # <<<<<<<<<<<<<< @@ -14315,27 +13989,20 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphNode_4span___get__(struct __p * property cat: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_in_edges); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s__in_edges); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyIter_Next(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyIter_Next(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_span); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__span); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 321; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":272 - * - * property span: - * def __get__(self): # <<<<<<<<<<<<<< - * return next(self.in_edges).span - * - */ - - /* 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); @@ -14347,14 +14014,6 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphNode_4span___get__(struct __p return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":276 - * - * property cat: - * def __get__(self): # <<<<<<<<<<<<<< - * if self.node.cat_: - * return str(TDConvert(-self.node.cat_).c_str()) - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphNode_3cat_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphNode_3cat_1__get__(PyObject *__pyx_v_self) { @@ -14362,12 +14021,18 @@ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphNode_3cat_1__get__(PyObject * __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_14HypergraphNode_3cat___get__(((struct __pyx_obj_4cdec_5_cdec_HypergraphNode *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":324 + * + * property cat: + * def __get__(self): # <<<<<<<<<<<<<< + * if self.node.cat_: + * return str(TDConvert(-self.node.cat_).c_str()) + */ + static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphNode_3cat___get__(struct __pyx_obj_4cdec_5_cdec_HypergraphNode *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -14379,7 +14044,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphNode_3cat___get__(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":277 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":325 * property cat: * def __get__(self): * if self.node.cat_: # <<<<<<<<<<<<<< @@ -14389,7 +14054,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphNode_3cat___get__(struct __py __pyx_t_1 = (__pyx_v_self->node->cat_ != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":278 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":326 * def __get__(self): * if self.node.cat_: * return str(TDConvert(-self.node.cat_).c_str()) # <<<<<<<<<<<<<< @@ -14397,30 +14062,23 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphNode_3cat___get__(struct __py * def __richcmp__(HypergraphNode x, HypergraphNode y, int op): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyBytes_FromString(TD::Convert((-__pyx_v_self->node->cat_)).c_str()); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyBytes_FromString(TD::Convert((-__pyx_v_self->node->cat_)).c_str()); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_2)); + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); - __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_2)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; + goto __pyx_L3; } + __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":276 - * - * property cat: - * def __get__(self): # <<<<<<<<<<<<<< - * if self.node.cat_: - * return str(TDConvert(-self.node.cat_).c_str()) - */ - - /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; @@ -14434,14 +14092,6 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphNode_3cat___get__(struct __py return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":280 - * return str(TDConvert(-self.node.cat_).c_str()) - * - * def __richcmp__(HypergraphNode x, HypergraphNode y, int op): # <<<<<<<<<<<<<< - * if op == 2: # == - * return x.node == y.node - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphNode_1__richcmp__(PyObject *__pyx_v_x, PyObject *__pyx_v_y, int __pyx_v_op); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphNode_1__richcmp__(PyObject *__pyx_v_x, PyObject *__pyx_v_y, int __pyx_v_op) { @@ -14451,11 +14101,9 @@ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphNode_1__richcmp__(PyObject *_ PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_4cdec_5_cdec_HypergraphNode, 1, "x", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_4cdec_5_cdec_HypergraphNode, 1, "y", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_4cdec_5_cdec_HypergraphNode, 1, "x", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), __pyx_ptype_4cdec_5_cdec_HypergraphNode, 1, "y", 0))) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 328; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_4cdec_5_cdec_14HypergraphNode___richcmp__(((struct __pyx_obj_4cdec_5_cdec_HypergraphNode *)__pyx_v_x), ((struct __pyx_obj_4cdec_5_cdec_HypergraphNode *)__pyx_v_y), ((int)__pyx_v_op)); - - /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; @@ -14464,6 +14112,14 @@ static PyObject *__pyx_pw_4cdec_5_cdec_14HypergraphNode_1__richcmp__(PyObject *_ return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":328 + * return str(TDConvert(-self.node.cat_).c_str()) + * + * def __richcmp__(HypergraphNode x, HypergraphNode y, int op): # <<<<<<<<<<<<<< + * if op == 2: # == + * return x.node == y.node + */ + static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphNode___richcmp__(struct __pyx_obj_4cdec_5_cdec_HypergraphNode *__pyx_v_x, struct __pyx_obj_4cdec_5_cdec_HypergraphNode *__pyx_v_y, int __pyx_v_op) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -14474,7 +14130,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphNode___richcmp__(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__richcmp__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":283 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":331 * if op == 2: # == * return x.node == y.node * elif op == 3: # != # <<<<<<<<<<<<<< @@ -14483,7 +14139,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphNode___richcmp__(struct __pyx */ switch (__pyx_v_op) { - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":281 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":329 * * def __richcmp__(HypergraphNode x, HypergraphNode y, int op): * if op == 2: # == # <<<<<<<<<<<<<< @@ -14492,7 +14148,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphNode___richcmp__(struct __pyx */ case 2: - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":282 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":330 * def __richcmp__(HypergraphNode x, HypergraphNode y, int op): * if op == 2: # == * return x.node == y.node # <<<<<<<<<<<<<< @@ -14500,14 +14156,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphNode___richcmp__(struct __pyx * return not (x == y) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_x->node == __pyx_v_y->node)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 282; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_x->node == __pyx_v_y->node)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 330; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; break; - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":283 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":331 * if op == 2: # == * return x.node == y.node * elif op == 3: # != # <<<<<<<<<<<<<< @@ -14516,45 +14172,37 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphNode___richcmp__(struct __pyx */ case 3: - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":284 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":332 * return x.node == y.node * elif op == 3: # != * return not (x == y) # <<<<<<<<<<<<<< * raise NotImplemented('comparison not implemented for HypergraphNode') */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_x), ((PyObject *)__pyx_v_y), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_x), ((PyObject *)__pyx_v_y), Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyBool_FromLong((!__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyBool_FromLong((!__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 332; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; break; - default: break; } - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":285 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":333 * elif op == 3: # != * return not (x == y) * raise NotImplemented('comparison not implemented for HypergraphNode') # <<<<<<<<<<<<<< */ - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_NotImplemented, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(__pyx_builtin_NotImplemented, ((PyObject *)__pyx_k_tuple_21), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - {__pyx_filename = __pyx_f[3]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":280 - * return str(TDConvert(-self.node.cat_).c_str()) - * - * def __richcmp__(HypergraphNode x, HypergraphNode y, int op): # <<<<<<<<<<<<<< - * if op == 2: # == - * return x.node == y.node - */ + {__pyx_filename = __pyx_f[3]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cdec._cdec.HypergraphNode.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -14565,14 +14213,6 @@ static PyObject *__pyx_pf_4cdec_5_cdec_14HypergraphNode___richcmp__(struct __pyx return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":6 - * cdef lattice.Lattice* lattice - * - * def __cinit__(self): # <<<<<<<<<<<<<< - * self.lattice = new lattice.Lattice() - * - */ - /* Python wrapper */ static int __pyx_pw_4cdec_5_cdec_7Lattice_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_4cdec_5_cdec_7Lattice_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { @@ -14583,18 +14223,24 @@ static int __pyx_pw_4cdec_5_cdec_7Lattice_1__cinit__(PyObject *__pyx_v_self, PyO __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; __pyx_r = __pyx_pf_4cdec_5_cdec_7Lattice___cinit__(((struct __pyx_obj_4cdec_5_cdec_Lattice *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi":6 + * cdef lattice.Lattice* lattice + * + * def __cinit__(self): # <<<<<<<<<<<<<< + * self.lattice = new lattice.Lattice() + * + */ + static int __pyx_pf_4cdec_5_cdec_7Lattice___cinit__(struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":7 + /* "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi":7 * * def __cinit__(self): * self.lattice = new lattice.Lattice() # <<<<<<<<<<<<<< @@ -14603,28 +14249,11 @@ static int __pyx_pf_4cdec_5_cdec_7Lattice___cinit__(struct __pyx_obj_4cdec_5_cde */ __pyx_v_self->lattice = new Lattice(); - /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":6 - * cdef lattice.Lattice* lattice - * - * def __cinit__(self): # <<<<<<<<<<<<<< - * self.lattice = new lattice.Lattice() - * - */ - - /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":9 - * self.lattice = new lattice.Lattice() - * - * def __init__(self, inp): # <<<<<<<<<<<<<< - * """Lattice(tuple) -> Lattice from node list. - * Lattice(string) -> Lattice from PLF representation.""" - */ - /* Python wrapper */ static int __pyx_pw_4cdec_5_cdec_7Lattice_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4cdec_5_cdec_7Lattice_2__init__[] = "Lattice(tuple) -> Lattice from node list.\n Lattice(string) -> Lattice from PLF representation."; @@ -14640,7 +14269,7 @@ static int __pyx_pw_4cdec_5_cdec_7Lattice_3__init__(PyObject *__pyx_v_self, PyOb __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_inp,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__inp,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; @@ -14653,7 +14282,7 @@ static int __pyx_pw_4cdec_5_cdec_7Lattice_3__init__(PyObject *__pyx_v_self, PyOb kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_inp)) != 0)) kw_args--; + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__inp)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { @@ -14675,12 +14304,18 @@ static int __pyx_pw_4cdec_5_cdec_7Lattice_3__init__(PyObject *__pyx_v_self, PyOb return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4cdec_5_cdec_7Lattice_2__init__(((struct __pyx_obj_4cdec_5_cdec_Lattice *)__pyx_v_self), __pyx_v_inp); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi":9 + * self.lattice = new lattice.Lattice() + * + * def __init__(self, inp): # <<<<<<<<<<<<<< + * """Lattice(tuple) -> Lattice from node list. + * Lattice(string) -> Lattice from PLF representation.""" + */ + static int __pyx_pf_4cdec_5_cdec_7Lattice_2__init__(struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self, PyObject *__pyx_v_inp) { PyObject *__pyx_v_i = NULL; PyObject *__pyx_v_arcs = NULL; @@ -14699,7 +14334,7 @@ static int __pyx_pf_4cdec_5_cdec_7Lattice_2__init__(struct __pyx_obj_4cdec_5_cde int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":12 + /* "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi":12 * """Lattice(tuple) -> Lattice from node list. * Lattice(string) -> Lattice from PLF representation.""" * if isinstance(inp, tuple): # <<<<<<<<<<<<<< @@ -14710,7 +14345,7 @@ static int __pyx_pf_4cdec_5_cdec_7Lattice_2__init__(struct __pyx_obj_4cdec_5_cde __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":13 + /* "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi":13 * Lattice(string) -> Lattice from PLF representation.""" * if isinstance(inp, tuple): * self.lattice.resize(len(inp)) # <<<<<<<<<<<<<< @@ -14720,7 +14355,7 @@ static int __pyx_pf_4cdec_5_cdec_7Lattice_2__init__(struct __pyx_obj_4cdec_5_cde __pyx_t_3 = PyObject_Length(__pyx_v_inp); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->lattice->resize(__pyx_t_3); - /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":14 + /* "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi":14 * if isinstance(inp, tuple): * self.lattice.resize(len(inp)) * for i, arcs in enumerate(inp): # <<<<<<<<<<<<<< @@ -14755,40 +14390,41 @@ static int __pyx_pf_4cdec_5_cdec_7Lattice_2__init__(struct __pyx_obj_4cdec_5_cde } else { __pyx_t_7 = __pyx_t_6(__pyx_t_5); if (unlikely(!__pyx_t_7)) { - PyObject* exc_type = PyErr_Occurred(); - if (exc_type) { - if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + if (PyErr_Occurred()) { + if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[4]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_7); } - __Pyx_XDECREF_SET(__pyx_v_arcs, __pyx_t_7); + __Pyx_XDECREF(__pyx_v_arcs); + __pyx_v_arcs = __pyx_t_7; __pyx_t_7 = 0; __Pyx_INCREF(__pyx_t_4); - __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_4); + __Pyx_XDECREF(__pyx_v_i); + __pyx_v_i = __pyx_t_4; __pyx_t_7 = PyNumber_Add(__pyx_t_4, __pyx_int_1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = __pyx_t_7; __pyx_t_7 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":15 + /* "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi":15 * self.lattice.resize(len(inp)) * for i, arcs in enumerate(inp): * self[i] = arcs # <<<<<<<<<<<<<< * elif isinstance(inp, basestring): * lattice.ConvertTextOrPLF(as_str(inp), self.lattice) */ - if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_self), __pyx_v_i, __pyx_v_arcs) < 0)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyObject_SetItem(((PyObject *)__pyx_v_self), __pyx_v_i, __pyx_v_arcs) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L3; } - /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":16 + /* "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi":16 * for i, arcs in enumerate(inp): * self[i] = arcs * elif isinstance(inp, basestring): # <<<<<<<<<<<<<< @@ -14799,14 +14435,14 @@ static int __pyx_pf_4cdec_5_cdec_7Lattice_2__init__(struct __pyx_obj_4cdec_5_cde __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":17 + /* "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi":17 * self[i] = arcs * elif isinstance(inp, basestring): * lattice.ConvertTextOrPLF(as_str(inp), self.lattice) # <<<<<<<<<<<<<< * else: * raise TypeError('cannot create lattice from %s' % type(inp)) */ - __pyx_t_4 = __pyx_f_4cdec_5_cdec_as_str(__pyx_v_inp, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = ((PyObject *)__pyx_f_4cdec_5_cdec_as_str(__pyx_v_inp, NULL)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = __pyx_convert_string_from_py_(__pyx_t_4); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -14815,38 +14451,29 @@ static int __pyx_pf_4cdec_5_cdec_7Lattice_2__init__(struct __pyx_obj_4cdec_5_cde } /*else*/ { - /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":19 + /* "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi":19 * lattice.ConvertTextOrPLF(as_str(inp), self.lattice) * else: * raise TypeError('cannot create lattice from %s' % type(inp)) # <<<<<<<<<<<<<< * * def __dealloc__(self): */ - __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_cannot_create_lattice_from_s, ((PyObject *)Py_TYPE(__pyx_v_inp))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_22), ((PyObject *)Py_TYPE(__pyx_v_inp))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); - __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_4)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; {__pyx_filename = __pyx_f[4]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":9 - * self.lattice = new lattice.Lattice() - * - * def __init__(self, inp): # <<<<<<<<<<<<<< - * """Lattice(tuple) -> Lattice from node list. - * Lattice(string) -> Lattice from PLF representation.""" - */ - - /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; @@ -14862,30 +14489,28 @@ static int __pyx_pf_4cdec_5_cdec_7Lattice_2__init__(struct __pyx_obj_4cdec_5_cde return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":21 - * raise TypeError('cannot create lattice from %s' % type(inp)) - * - * def __dealloc__(self): # <<<<<<<<<<<<<< - * del self.lattice - * - */ - /* Python wrapper */ static void __pyx_pw_4cdec_5_cdec_7Lattice_5__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_4cdec_5_cdec_7Lattice_5__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_4cdec_5_cdec_7Lattice_4__dealloc__(((struct __pyx_obj_4cdec_5_cdec_Lattice *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); } -static void __pyx_pf_4cdec_5_cdec_7Lattice_4__dealloc__(struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self) { +/* "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi":21 + * raise TypeError('cannot create lattice from %s' % type(inp)) + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * del self.lattice + * + */ + +static void __pyx_pf_4cdec_5_cdec_7Lattice_4__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":22 + /* "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi":22 * * def __dealloc__(self): * del self.lattice # <<<<<<<<<<<<<< @@ -14894,26 +14519,9 @@ static void __pyx_pf_4cdec_5_cdec_7Lattice_4__dealloc__(struct __pyx_obj_4cdec_5 */ delete __pyx_v_self->lattice; - /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":21 - * raise TypeError('cannot create lattice from %s' % type(inp)) - * - * def __dealloc__(self): # <<<<<<<<<<<<<< - * del self.lattice - * - */ - - /* function exit code */ __Pyx_RefNannyFinishContext(); } -/* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":24 - * del self.lattice - * - * def __getitem__(self, int index): # <<<<<<<<<<<<<< - * if not 0 <= index < len(self): - * raise IndexError('lattice index out of range') - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_7Lattice_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_index); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_7Lattice_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_index) { @@ -14925,7 +14533,7 @@ static PyObject *__pyx_pw_4cdec_5_cdec_7Lattice_7__getitem__(PyObject *__pyx_v_s __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0); assert(__pyx_arg_index); { - __pyx_v_index = __Pyx_PyInt_As_int(__pyx_arg_index); if (unlikely((__pyx_v_index == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_index = __Pyx_PyInt_AsInt(__pyx_arg_index); if (unlikely((__pyx_v_index == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -14934,12 +14542,18 @@ static PyObject *__pyx_pw_4cdec_5_cdec_7Lattice_7__getitem__(PyObject *__pyx_v_s return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4cdec_5_cdec_7Lattice_6__getitem__(((struct __pyx_obj_4cdec_5_cdec_Lattice *)__pyx_v_self), ((int)__pyx_v_index)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi":24 + * del self.lattice + * + * def __getitem__(self, int index): # <<<<<<<<<<<<<< + * if not 0 <= index < len(self): + * raise IndexError('lattice index out of range') + */ + static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_6__getitem__(struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self, int __pyx_v_index) { PyObject *__pyx_v_arcs = NULL; std::vector __pyx_v_arc_vector; @@ -14962,7 +14576,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_6__getitem__(struct __pyx_obj_4c int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getitem__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":25 + /* "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi":25 * * def __getitem__(self, int index): * if not 0 <= index < len(self): # <<<<<<<<<<<<<< @@ -14977,21 +14591,23 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_6__getitem__(struct __pyx_obj_4c __pyx_t_3 = ((!(__pyx_t_1 != 0)) != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":26 + /* "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi":26 * def __getitem__(self, int index): * if not 0 <= index < len(self): * raise IndexError('lattice index out of range') # <<<<<<<<<<<<<< * arcs = [] * cdef vector[lattice.LatticeArc] arc_vector = self.lattice[0][index] */ - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyObject_Call(__pyx_builtin_IndexError, ((PyObject *)__pyx_k_tuple_24), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 26; __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[4]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L3; } + __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":27 + /* "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi":27 * if not 0 <= index < len(self): * raise IndexError('lattice index out of range') * arcs = [] # <<<<<<<<<<<<<< @@ -15003,7 +14619,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_6__getitem__(struct __pyx_obj_4c __pyx_v_arcs = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":28 + /* "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi":28 * raise IndexError('lattice index out of range') * arcs = [] * cdef vector[lattice.LatticeArc] arc_vector = self.lattice[0][index] # <<<<<<<<<<<<<< @@ -15012,7 +14628,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_6__getitem__(struct __pyx_obj_4c */ __pyx_v_arc_vector = ((__pyx_v_self->lattice[0])[__pyx_v_index]); - /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":31 + /* "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi":31 * cdef lattice.LatticeArc* arc * cdef unsigned i * for i in range(arc_vector.size()): # <<<<<<<<<<<<<< @@ -15023,7 +14639,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_6__getitem__(struct __pyx_obj_4c for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; - /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":32 + /* "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi":32 * cdef unsigned i * for i in range(arc_vector.size()): * arc = &arc_vector[i] # <<<<<<<<<<<<<< @@ -15032,7 +14648,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_6__getitem__(struct __pyx_obj_4c */ __pyx_v_arc = (&(__pyx_v_arc_vector[__pyx_v_i])); - /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":33 + /* "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi":33 * for i in range(arc_vector.size()): * arc = &arc_vector[i] * label = unicode(TDConvert(arc.label).c_str(), 'utf8') # <<<<<<<<<<<<<< @@ -15040,22 +14656,23 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_6__getitem__(struct __pyx_obj_4c * return tuple(arcs) */ __pyx_t_4 = __Pyx_PyBytes_FromString(TD::Convert(__pyx_v_arc->label).c_str()); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); + __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); - PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); - __Pyx_GIVEREF(__pyx_t_4); - __Pyx_INCREF(__pyx_n_s_utf8); - PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_n_s_utf8); - __Pyx_GIVEREF(__pyx_n_s_utf8); + PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_t_4)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_4)); + __Pyx_INCREF(((PyObject *)__pyx_n_s__utf8)); + PyTuple_SET_ITEM(__pyx_t_7, 1, ((PyObject *)__pyx_n_s__utf8)); + __Pyx_GIVEREF(((PyObject *)__pyx_n_s__utf8)); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_XDECREF_SET(__pyx_v_label, ((PyObject*)__pyx_t_4)); + __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; + __Pyx_XDECREF(((PyObject *)__pyx_v_label)); + __pyx_v_label = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":34 + /* "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi":34 * arc = &arc_vector[i] * label = unicode(TDConvert(arc.label).c_str(), 'utf8') * arcs.append((label, arc.cost, arc.dist2next)) # <<<<<<<<<<<<<< @@ -15064,24 +14681,24 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_6__getitem__(struct __pyx_obj_4c */ __pyx_t_4 = PyFloat_FromDouble(__pyx_v_arc->cost); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_arc->dist2next); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = PyInt_FromLong(__pyx_v_arc->dist2next); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); - __Pyx_INCREF(__pyx_v_label); - PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_label); - __Pyx_GIVEREF(__pyx_v_label); + __Pyx_INCREF(((PyObject *)__pyx_v_label)); + PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_v_label)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_label)); PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_4 = 0; __pyx_t_7 = 0; - __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_arcs, __pyx_t_8); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_arcs, ((PyObject *)__pyx_t_8)); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; } - /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":35 + /* "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi":35 * label = unicode(TDConvert(arc.label).c_str(), 'utf8') * arcs.append((label, arc.cost, arc.dist2next)) * return tuple(arcs) # <<<<<<<<<<<<<< @@ -15089,21 +14706,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_6__getitem__(struct __pyx_obj_4c * def __setitem__(self, int index, tuple arcs): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_8 = PyList_AsTuple(__pyx_v_arcs); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_8); - __pyx_r = __pyx_t_8; + __pyx_t_8 = ((PyObject *)PyList_AsTuple(__pyx_v_arcs)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_8)); + __pyx_r = ((PyObject *)__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":24 - * del self.lattice - * - * def __getitem__(self, int index): # <<<<<<<<<<<<<< - * if not 0 <= index < len(self): - * raise IndexError('lattice index out of range') - */ - - /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_7); @@ -15118,14 +14728,6 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_6__getitem__(struct __pyx_obj_4c return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":37 - * return tuple(arcs) - * - * def __setitem__(self, int index, tuple arcs): # <<<<<<<<<<<<<< - * if not 0 <= index < len(self): - * raise IndexError('lattice index out of range') - */ - /* Python wrapper */ static int __pyx_pw_4cdec_5_cdec_7Lattice_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_index, PyObject *__pyx_v_arcs); /*proto*/ static int __pyx_pw_4cdec_5_cdec_7Lattice_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_index, PyObject *__pyx_v_arcs) { @@ -15137,7 +14739,7 @@ static int __pyx_pw_4cdec_5_cdec_7Lattice_9__setitem__(PyObject *__pyx_v_self, P __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0); assert(__pyx_arg_index); { - __pyx_v_index = __Pyx_PyInt_As_int(__pyx_arg_index); if (unlikely((__pyx_v_index == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_index = __Pyx_PyInt_AsInt(__pyx_arg_index); if (unlikely((__pyx_v_index == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -15147,8 +14749,6 @@ static int __pyx_pw_4cdec_5_cdec_7Lattice_9__setitem__(PyObject *__pyx_v_self, P __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arcs), (&PyTuple_Type), 1, "arcs", 1))) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 37; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_4cdec_5_cdec_7Lattice_8__setitem__(((struct __pyx_obj_4cdec_5_cdec_Lattice *)__pyx_v_self), ((int)__pyx_v_index), ((PyObject*)__pyx_v_arcs)); - - /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = -1; @@ -15157,6 +14757,14 @@ static int __pyx_pw_4cdec_5_cdec_7Lattice_9__setitem__(PyObject *__pyx_v_self, P return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi":37 + * return tuple(arcs) + * + * def __setitem__(self, int index, tuple arcs): # <<<<<<<<<<<<<< + * if not 0 <= index < len(self): + * raise IndexError('lattice index out of range') + */ + static int __pyx_pf_4cdec_5_cdec_7Lattice_8__setitem__(struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self, int __pyx_v_index, PyObject *__pyx_v_arcs) { LatticeArc *__pyx_v_arc; PyObject *__pyx_v_label = NULL; @@ -15183,7 +14791,7 @@ static int __pyx_pf_4cdec_5_cdec_7Lattice_8__setitem__(struct __pyx_obj_4cdec_5_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__setitem__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":38 + /* "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi":38 * * def __setitem__(self, int index, tuple arcs): * if not 0 <= index < len(self): # <<<<<<<<<<<<<< @@ -15198,32 +14806,34 @@ static int __pyx_pf_4cdec_5_cdec_7Lattice_8__setitem__(struct __pyx_obj_4cdec_5_ __pyx_t_3 = ((!(__pyx_t_1 != 0)) != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":39 + /* "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi":39 * def __setitem__(self, int index, tuple arcs): * if not 0 <= index < len(self): * raise IndexError('lattice index out of range') # <<<<<<<<<<<<<< * cdef lattice.LatticeArc* arc * for (label, cost, dist2next) in arcs: */ - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyObject_Call(__pyx_builtin_IndexError, ((PyObject *)__pyx_k_tuple_25), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 39; __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[4]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L3; } + __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":41 + /* "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi":41 * raise IndexError('lattice index out of range') * cdef lattice.LatticeArc* arc * for (label, cost, dist2next) in arcs: # <<<<<<<<<<<<<< * label_str = as_str(label) * arc = new lattice.LatticeArc(TDConvert(label_str), cost, dist2next) */ - if (unlikely(__pyx_v_arcs == Py_None)) { + if (unlikely(((PyObject *)__pyx_v_arcs) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[4]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_4 = __pyx_v_arcs; __Pyx_INCREF(__pyx_t_4); __pyx_t_2 = 0; + __pyx_t_4 = ((PyObject *)__pyx_v_arcs); __Pyx_INCREF(__pyx_t_4); __pyx_t_2 = 0; for (;;) { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_4)) break; #if CYTHON_COMPILING_IN_CPYTHON @@ -15265,7 +14875,8 @@ static int __pyx_pf_4cdec_5_cdec_7Lattice_8__setitem__(struct __pyx_obj_4cdec_5_ __Pyx_GOTREF(__pyx_t_8); #endif __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } else { + } else + { Py_ssize_t index = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); @@ -15288,38 +14899,42 @@ static int __pyx_pf_4cdec_5_cdec_7Lattice_8__setitem__(struct __pyx_obj_4cdec_5_ {__pyx_filename = __pyx_f[4]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L7_unpacking_done:; } - __Pyx_XDECREF_SET(__pyx_v_label, __pyx_t_6); + __Pyx_XDECREF(__pyx_v_label); + __pyx_v_label = __pyx_t_6; __pyx_t_6 = 0; - __Pyx_XDECREF_SET(__pyx_v_cost, __pyx_t_7); + __Pyx_XDECREF(__pyx_v_cost); + __pyx_v_cost = __pyx_t_7; __pyx_t_7 = 0; - __Pyx_XDECREF_SET(__pyx_v_dist2next, __pyx_t_8); + __Pyx_XDECREF(__pyx_v_dist2next); + __pyx_v_dist2next = __pyx_t_8; __pyx_t_8 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":42 + /* "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi":42 * cdef lattice.LatticeArc* arc * for (label, cost, dist2next) in arcs: * label_str = as_str(label) # <<<<<<<<<<<<<< * arc = new lattice.LatticeArc(TDConvert(label_str), cost, dist2next) * self.lattice[0][index].push_back(arc[0]) */ - __pyx_t_5 = __pyx_f_4cdec_5_cdec_as_str(__pyx_v_label, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = ((PyObject *)__pyx_f_4cdec_5_cdec_as_str(__pyx_v_label, NULL)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_XDECREF_SET(__pyx_v_label_str, ((PyObject*)__pyx_t_5)); + __Pyx_XDECREF(((PyObject *)__pyx_v_label_str)); + __pyx_v_label_str = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":43 + /* "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi":43 * for (label, cost, dist2next) in arcs: * label_str = as_str(label) * arc = new lattice.LatticeArc(TDConvert(label_str), cost, dist2next) # <<<<<<<<<<<<<< * self.lattice[0][index].push_back(arc[0]) * del arc */ - __pyx_t_11 = __Pyx_PyObject_AsString(__pyx_v_label_str); if (unlikely((!__pyx_t_11) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = __Pyx_PyObject_AsString(((PyObject *)__pyx_v_label_str)); if (unlikely((!__pyx_t_11) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_12 = __pyx_PyFloat_AsDouble(__pyx_v_cost); if (unlikely((__pyx_t_12 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_v_dist2next); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_13 = __Pyx_PyInt_AsInt(__pyx_v_dist2next); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_arc = new LatticeArc(TD::Convert(__pyx_t_11), __pyx_t_12, __pyx_t_13); - /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":44 + /* "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi":44 * label_str = as_str(label) * arc = new lattice.LatticeArc(TDConvert(label_str), cost, dist2next) * self.lattice[0][index].push_back(arc[0]) # <<<<<<<<<<<<<< @@ -15328,7 +14943,7 @@ static int __pyx_pf_4cdec_5_cdec_7Lattice_8__setitem__(struct __pyx_obj_4cdec_5_ */ ((__pyx_v_self->lattice[0])[__pyx_v_index]).push_back((__pyx_v_arc[0])); - /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":45 + /* "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi":45 * arc = new lattice.LatticeArc(TDConvert(label_str), cost, dist2next) * self.lattice[0][index].push_back(arc[0]) * del arc # <<<<<<<<<<<<<< @@ -15339,15 +14954,6 @@ static int __pyx_pf_4cdec_5_cdec_7Lattice_8__setitem__(struct __pyx_obj_4cdec_5_ } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":37 - * return tuple(arcs) - * - * def __setitem__(self, int index, tuple arcs): # <<<<<<<<<<<<<< - * if not 0 <= index < len(self): - * raise IndexError('lattice index out of range') - */ - - /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; @@ -15368,14 +14974,6 @@ static int __pyx_pf_4cdec_5_cdec_7Lattice_8__setitem__(struct __pyx_obj_4cdec_5_ return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":47 - * del arc - * - * def __len__(self): # <<<<<<<<<<<<<< - * return self.lattice.size() - * - */ - /* Python wrapper */ static Py_ssize_t __pyx_pw_4cdec_5_cdec_7Lattice_11__len__(PyObject *__pyx_v_self); /*proto*/ static Py_ssize_t __pyx_pw_4cdec_5_cdec_7Lattice_11__len__(PyObject *__pyx_v_self) { @@ -15383,18 +14981,24 @@ static Py_ssize_t __pyx_pw_4cdec_5_cdec_7Lattice_11__len__(PyObject *__pyx_v_sel __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_7Lattice_10__len__(((struct __pyx_obj_4cdec_5_cdec_Lattice *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi":47 + * del arc + * + * def __len__(self): # <<<<<<<<<<<<<< + * return self.lattice.size() + * + */ + static Py_ssize_t __pyx_pf_4cdec_5_cdec_7Lattice_10__len__(struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":48 + /* "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi":48 * * def __len__(self): * return self.lattice.size() # <<<<<<<<<<<<<< @@ -15404,28 +15008,12 @@ static Py_ssize_t __pyx_pf_4cdec_5_cdec_7Lattice_10__len__(struct __pyx_obj_4cde __pyx_r = __pyx_v_self->lattice->size(); goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":47 - * del arc - * - * def __len__(self): # <<<<<<<<<<<<<< - * return self.lattice.size() - * - */ - - /* function exit code */ + __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":50 - * return self.lattice.size() - * - * def __str__(self): # <<<<<<<<<<<<<< - * return str(hypergraph.AsPLF(self.lattice[0], True).c_str()) - * - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_7Lattice_13__str__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_7Lattice_13__str__(PyObject *__pyx_v_self) { @@ -15433,12 +15021,18 @@ static PyObject *__pyx_pw_4cdec_5_cdec_7Lattice_13__str__(PyObject *__pyx_v_self __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__str__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_7Lattice_12__str__(((struct __pyx_obj_4cdec_5_cdec_Lattice *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi":50 + * return self.lattice.size() + * + * def __str__(self): # <<<<<<<<<<<<<< + * return str(hypergraph.AsPLF(self.lattice[0], True).c_str()) + * + */ + static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_12__str__(struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -15449,7 +15043,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_12__str__(struct __pyx_obj_4cdec int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__str__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":51 + /* "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi":51 * * def __str__(self): * return str(hypergraph.AsPLF(self.lattice[0], True).c_str()) # <<<<<<<<<<<<<< @@ -15458,28 +15052,21 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_12__str__(struct __pyx_obj_4cdec */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBytes_FromString(HypergraphIO::AsPLF((__pyx_v_self->lattice[0]), 1).c_str()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); + __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); - __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_1)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":50 - * return self.lattice.size() - * - * def __str__(self): # <<<<<<<<<<<<<< - * return str(hypergraph.AsPLF(self.lattice[0], True).c_str()) - * - */ - - /* 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); @@ -15491,14 +15078,6 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_12__str__(struct __pyx_obj_4cdec return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":53 - * return str(hypergraph.AsPLF(self.lattice[0], True).c_str()) - * - * def __unicode__(self): # <<<<<<<<<<<<<< - * return unicode(str(self), 'utf8') - * - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_7Lattice_15__unicode__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_7Lattice_15__unicode__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { @@ -15506,12 +15085,18 @@ static PyObject *__pyx_pw_4cdec_5_cdec_7Lattice_15__unicode__(PyObject *__pyx_v_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__unicode__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_7Lattice_14__unicode__(((struct __pyx_obj_4cdec_5_cdec_Lattice *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi":53 + * return str(hypergraph.AsPLF(self.lattice[0], True).c_str()) + * + * def __unicode__(self): # <<<<<<<<<<<<<< + * return unicode(str(self), 'utf8') + * + */ + static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_14__unicode__(struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -15522,7 +15107,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_14__unicode__(struct __pyx_obj_4 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__unicode__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":54 + /* "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi":54 * * def __unicode__(self): * return unicode(str(self), 'utf8') # <<<<<<<<<<<<<< @@ -15535,33 +15120,26 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_14__unicode__(struct __pyx_obj_4 __Pyx_INCREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); - __Pyx_INCREF(__pyx_n_s_utf8); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_utf8); - __Pyx_GIVEREF(__pyx_n_s_utf8); + __Pyx_INCREF(((PyObject *)__pyx_n_s__utf8)); + PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_n_s__utf8)); + __Pyx_GIVEREF(((PyObject *)__pyx_n_s__utf8)); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 54; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":53 - * return str(hypergraph.AsPLF(self.lattice[0], True).c_str()) - * - * def __unicode__(self): # <<<<<<<<<<<<<< - * return unicode(str(self), 'utf8') - * - */ - - /* 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); @@ -15572,15 +15150,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_14__unicode__(struct __pyx_obj_4 __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_gb_4cdec_5_cdec_7Lattice_18generator14(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ - -/* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":56 - * return unicode(str(self), 'utf8') - * - * def __iter__(self): # <<<<<<<<<<<<<< - * cdef unsigned i - * for i in range(len(self)): - */ +static PyObject *__pyx_gb_4cdec_5_cdec_7Lattice_18generator17(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_7Lattice_17__iter__(PyObject *__pyx_v_self); /*proto*/ @@ -15589,21 +15159,27 @@ static PyObject *__pyx_pw_4cdec_5_cdec_7Lattice_17__iter__(PyObject *__pyx_v_sel __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_7Lattice_16__iter__(((struct __pyx_obj_4cdec_5_cdec_Lattice *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi":56 + * return unicode(str(self), 'utf8') + * + * def __iter__(self): # <<<<<<<<<<<<<< + * cdef unsigned i + * for i in range(len(self)): + */ + static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_16__iter__(struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__ *__pyx_cur_scope; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__ *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__iter__", 0); - __pyx_cur_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__ *)__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_18___iter__(__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_18___iter__, __pyx_empty_tuple, NULL); + __pyx_cur_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__ *)__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_21___iter__(__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_21___iter__, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; @@ -15613,13 +15189,12 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_16__iter__(struct __pyx_obj_4cde __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); { - __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_5_cdec_7Lattice_18generator14, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_5_cdec_7Lattice_18generator17, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } - /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; @@ -15632,9 +15207,9 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_16__iter__(struct __pyx_obj_4cde return __pyx_r; } -static PyObject *__pyx_gb_4cdec_5_cdec_7Lattice_18generator14(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ +static PyObject *__pyx_gb_4cdec_5_cdec_7Lattice_18generator17(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__ *__pyx_cur_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__ *)__pyx_generator->closure); + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__ *__pyx_cur_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__ *)__pyx_generator->closure); PyObject *__pyx_r = NULL; Py_ssize_t __pyx_t_1; unsigned int __pyx_t_2; @@ -15654,7 +15229,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7Lattice_18generator14(__pyx_GeneratorObj __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":58 + /* "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi":58 * def __iter__(self): * cdef unsigned i * for i in range(len(self)): # <<<<<<<<<<<<<< @@ -15665,14 +15240,14 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7Lattice_18generator14(__pyx_GeneratorObj for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_cur_scope->__pyx_v_i = __pyx_t_2; - /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":59 + /* "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi":59 * cdef unsigned i * for i in range(len(self)): * yield self[i] # <<<<<<<<<<<<<< * * def todot(self): */ - __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_cur_scope->__pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_cur_scope->__pyx_v_i, sizeof(unsigned int)+1, PyLong_FromUnsignedLong, 0, 0, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; @@ -15688,16 +15263,6 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7Lattice_18generator14(__pyx_GeneratorObj __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - - /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":56 - * return unicode(str(self), 'utf8') - * - * def __iter__(self): # <<<<<<<<<<<<<< - * cdef unsigned i - * for i in range(len(self)): - */ - - /* function exit code */ PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; @@ -15711,14 +15276,6 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7Lattice_18generator14(__pyx_GeneratorObj return NULL; } -/* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":61 - * yield self[i] - * - * def todot(self): # <<<<<<<<<<<<<< - * """lattice.todot() -> Representation of the lattice in GraphViz dot format.""" - * def lines(): - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_7Lattice_20todot(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_4cdec_5_cdec_7Lattice_19todot[] = "lattice.todot() -> Representation of the lattice in GraphViz dot format."; @@ -15727,20 +15284,10 @@ static PyObject *__pyx_pw_4cdec_5_cdec_7Lattice_20todot(PyObject *__pyx_v_self, __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("todot (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_7Lattice_19todot(((struct __pyx_obj_4cdec_5_cdec_Lattice *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_gb_4cdec_5_cdec_7Lattice_5todot_2generator20(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ - -/* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":63 - * def todot(self): - * """lattice.todot() -> Representation of the lattice in GraphViz dot format.""" - * def lines(): # <<<<<<<<<<<<<< - * yield 'digraph lattice {' - * yield 'rankdir = LR;' - */ +static PyObject *__pyx_gb_4cdec_5_cdec_7Lattice_5todot_2generator23(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_7Lattice_5todot_1lines(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/ @@ -15750,37 +15297,42 @@ static PyObject *__pyx_pw_4cdec_5_cdec_7Lattice_5todot_1lines(PyObject *__pyx_se __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("lines (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_7Lattice_5todot_lines(__pyx_self); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi":63 + * def todot(self): + * """lattice.todot() -> Representation of the lattice in GraphViz dot format.""" + * def lines(): # <<<<<<<<<<<<<< + * yield 'digraph lattice {' + * yield 'rankdir = LR;' + */ + static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_5todot_lines(PyObject *__pyx_self) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines *__pyx_cur_scope; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23_lines *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("lines", 0); - __pyx_cur_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines *)__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_20_lines(__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_20_lines, __pyx_empty_tuple, NULL); + __pyx_cur_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23_lines *)__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_23_lines(__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_23_lines, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; } __Pyx_GOTREF(__pyx_cur_scope); - __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot *) __Pyx_CyFunction_GetClosure(__pyx_self); + __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22_todot *) __Pyx_CyFunction_GetClosure(__pyx_self); __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); { - __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_5_cdec_7Lattice_5todot_2generator20, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_5_cdec_7Lattice_5todot_2generator23, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } - /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; @@ -15793,9 +15345,9 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_5todot_lines(PyObject *__pyx_sel return __pyx_r; } -static PyObject *__pyx_gb_4cdec_5_cdec_7Lattice_5todot_2generator20(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ +static PyObject *__pyx_gb_4cdec_5_cdec_7Lattice_5todot_2generator23(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines *__pyx_cur_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines *)__pyx_generator->closure); + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23_lines *__pyx_cur_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23_lines *)__pyx_generator->closure); PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; @@ -15829,15 +15381,15 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7Lattice_5todot_2generator20(__pyx_Genera __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":64 + /* "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi":64 * """lattice.todot() -> Representation of the lattice in GraphViz dot format.""" * def lines(): * yield 'digraph lattice {' # <<<<<<<<<<<<<< * yield 'rankdir = LR;' * yield 'node [shape=circle];' */ - __Pyx_INCREF(__pyx_kp_s_digraph_lattice); - __pyx_r = __pyx_kp_s_digraph_lattice; + __Pyx_INCREF(((PyObject *)__pyx_kp_s_26)); + __pyx_r = ((PyObject *)__pyx_kp_s_26); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); /* return from generator, yielding value */ @@ -15846,15 +15398,15 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7Lattice_5todot_2generator20(__pyx_Genera __pyx_L4_resume_from_yield:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":65 + /* "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi":65 * def lines(): * yield 'digraph lattice {' * yield 'rankdir = LR;' # <<<<<<<<<<<<<< * yield 'node [shape=circle];' * for i in range(len(self)): */ - __Pyx_INCREF(__pyx_kp_s_rankdir_LR); - __pyx_r = __pyx_kp_s_rankdir_LR; + __Pyx_INCREF(((PyObject *)__pyx_kp_s_27)); + __pyx_r = ((PyObject *)__pyx_kp_s_27); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); /* return from generator, yielding value */ @@ -15863,15 +15415,15 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7Lattice_5todot_2generator20(__pyx_Genera __pyx_L5_resume_from_yield:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":66 + /* "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi":66 * yield 'digraph lattice {' * yield 'rankdir = LR;' * yield 'node [shape=circle];' # <<<<<<<<<<<<<< * for i in range(len(self)): * for label, weight, delta in self[i]: */ - __Pyx_INCREF(__pyx_kp_s_node_shape_circle); - __pyx_r = __pyx_kp_s_node_shape_circle; + __Pyx_INCREF(((PyObject *)__pyx_kp_s_28)); + __pyx_r = ((PyObject *)__pyx_kp_s_28); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); /* return from generator, yielding value */ @@ -15880,7 +15432,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7Lattice_5todot_2generator20(__pyx_Genera __pyx_L6_resume_from_yield:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":67 + /* "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi":67 * yield 'rankdir = LR;' * yield 'node [shape=circle];' * for i in range(len(self)): # <<<<<<<<<<<<<< @@ -15899,9 +15451,9 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7Lattice_5todot_2generator20(__pyx_Genera PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(__pyx_builtin_range, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; if (PyList_CheckExact(__pyx_t_1) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = 0; __pyx_t_4 = NULL; @@ -15929,9 +15481,8 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7Lattice_5todot_2generator20(__pyx_Genera } else { __pyx_t_1 = __pyx_t_4(__pyx_t_3); 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(); + if (PyErr_Occurred()) { + if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[4]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; @@ -15939,19 +15490,19 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7Lattice_5todot_2generator20(__pyx_Genera __Pyx_GOTREF(__pyx_t_1); } __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_i); - __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_i, __pyx_t_1); + __Pyx_XDECREF(__pyx_cur_scope->__pyx_v_i); __Pyx_GIVEREF(__pyx_t_1); + __pyx_cur_scope->__pyx_v_i = __pyx_t_1; __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":68 + /* "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi":68 * yield 'node [shape=circle];' * for i in range(len(self)): * for label, weight, delta in self[i]: # <<<<<<<<<<<<<< * yield '%d -> %d [label="%s"];' % (i, i+delta, label.replace('"', '\\"')) * yield '%d [shape=doublecircle]' % len(self) */ - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[4]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_1 = PyObject_GetItem(((PyObject *)__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self), __pyx_cur_scope->__pyx_v_i); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_1 = PyObject_GetItem(((PyObject *)__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self), __pyx_cur_scope->__pyx_v_i); if (!__pyx_t_1) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyList_CheckExact(__pyx_t_1) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_5 = __pyx_t_1; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0; @@ -15980,9 +15531,8 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7Lattice_5todot_2generator20(__pyx_Genera } else { __pyx_t_1 = __pyx_t_7(__pyx_t_5); 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(); + if (PyErr_Occurred()) { + if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[4]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; @@ -16023,7 +15573,8 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7Lattice_5todot_2generator20(__pyx_Genera __Pyx_GOTREF(__pyx_t_10); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - } else { + } else + { Py_ssize_t index = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); @@ -16047,19 +15598,22 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7Lattice_5todot_2generator20(__pyx_Genera __pyx_L12_unpacking_done:; } __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_label); - __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_label, __pyx_t_8); + __Pyx_XDECREF(__pyx_cur_scope->__pyx_v_label); __Pyx_GIVEREF(__pyx_t_8); + __pyx_cur_scope->__pyx_v_label = __pyx_t_8; __pyx_t_8 = 0; __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_weight); - __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_weight, __pyx_t_9); + __Pyx_XDECREF(__pyx_cur_scope->__pyx_v_weight); __Pyx_GIVEREF(__pyx_t_9); + __pyx_cur_scope->__pyx_v_weight = __pyx_t_9; __pyx_t_9 = 0; __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_delta); - __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_delta, __pyx_t_10); + __Pyx_XDECREF(__pyx_cur_scope->__pyx_v_delta); __Pyx_GIVEREF(__pyx_t_10); + __pyx_cur_scope->__pyx_v_delta = __pyx_t_10; __pyx_t_10 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":69 + /* "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi":69 * for i in range(len(self)): * for label, weight, delta in self[i]: * yield '%d -> %d [label="%s"];' % (i, i+delta, label.replace('"', '\\"')) # <<<<<<<<<<<<<< @@ -16068,9 +15622,9 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7Lattice_5todot_2generator20(__pyx_Genera */ __pyx_t_1 = PyNumber_Add(__pyx_cur_scope->__pyx_v_i, __pyx_cur_scope->__pyx_v_delta); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_label, __pyx_n_s_replace); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_label, __pyx_n_s__replace); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); - __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_k_tuple_32), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -16084,10 +15638,10 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7Lattice_5todot_2generator20(__pyx_Genera __Pyx_GIVEREF(__pyx_t_9); __pyx_t_1 = 0; __pyx_t_9 = 0; - __pyx_t_9 = __Pyx_PyString_Format(__pyx_kp_s_d_d_label_s, __pyx_t_10); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_9); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_r = __pyx_t_9; + __pyx_t_9 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_29), ((PyObject *)__pyx_t_10)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_9)); + __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0; + __pyx_r = ((PyObject *)__pyx_t_9); __pyx_t_9 = 0; __pyx_cur_scope->__pyx_t_0 = __pyx_t_2; __Pyx_XGIVEREF(__pyx_t_3); @@ -16119,24 +15673,23 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7Lattice_5todot_2generator20(__pyx_Genera } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":70 + /* "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi":70 * for label, weight, delta in self[i]: * yield '%d -> %d [label="%s"];' % (i, i+delta, label.replace('"', '\\"')) * yield '%d [shape=doublecircle]' % len(self) # <<<<<<<<<<<<<< * yield '}' * return '\n'.join(lines()).encode('utf8') */ - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); {__pyx_filename = __pyx_f[4]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_3 = ((PyObject *)__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self); __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_d_shape_doublecircle, __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_5); + __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_33), __pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_5)); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_r = __pyx_t_5; + __pyx_r = ((PyObject *)__pyx_t_5); __pyx_t_5 = 0; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); @@ -16146,15 +15699,15 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7Lattice_5todot_2generator20(__pyx_Genera __pyx_L14_resume_from_yield:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":71 + /* "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi":71 * yield '%d -> %d [label="%s"];' % (i, i+delta, label.replace('"', '\\"')) * yield '%d [shape=doublecircle]' % len(self) * yield '}' # <<<<<<<<<<<<<< * return '\n'.join(lines()).encode('utf8') * */ - __Pyx_INCREF(__pyx_kp_s__13); - __pyx_r = __pyx_kp_s__13; + __Pyx_INCREF(((PyObject *)__pyx_kp_s_34)); + __pyx_r = ((PyObject *)__pyx_kp_s_34); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); /* return from generator, yielding value */ @@ -16162,16 +15715,6 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7Lattice_5todot_2generator20(__pyx_Genera return __pyx_r; __pyx_L15_resume_from_yield:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - - /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":63 - * def todot(self): - * """lattice.todot() -> Representation of the lattice in GraphViz dot format.""" - * def lines(): # <<<<<<<<<<<<<< - * yield 'digraph lattice {' - * yield 'rankdir = LR;' - */ - - /* function exit code */ PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; @@ -16191,7 +15734,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7Lattice_5todot_2generator20(__pyx_Genera return NULL; } -/* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":61 +/* "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi":61 * yield self[i] * * def todot(self): # <<<<<<<<<<<<<< @@ -16200,17 +15743,18 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7Lattice_5todot_2generator20(__pyx_Genera */ static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_19todot(struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot *__pyx_cur_scope; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22_todot *__pyx_cur_scope; PyObject *__pyx_v_lines = 0; 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("todot", 0); - __pyx_cur_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot *)__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_19_todot(__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_19_todot, __pyx_empty_tuple, NULL); + __pyx_cur_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22_todot *)__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_22_todot(__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_22_todot, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; @@ -16220,19 +15764,19 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_19todot(struct __pyx_obj_4cdec_5 __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); - /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":63 + /* "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi":63 * def todot(self): * """lattice.todot() -> Representation of the lattice in GraphViz dot format.""" * def lines(): # <<<<<<<<<<<<<< * yield 'digraph lattice {' * yield 'rankdir = LR;' */ - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cdec_5_cdec_7Lattice_5todot_1lines, 0, __pyx_n_s_todot_locals_lines, ((PyObject*)__pyx_cur_scope), __pyx_n_s_cdec__cdec, PyModule_GetDict(__pyx_m), ((PyObject *)__pyx_codeobj__15)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4cdec_5_cdec_7Lattice_5todot_1lines, 0, __pyx_n_s_38, ((PyObject*)__pyx_cur_scope), __pyx_n_s_39, ((PyObject *)__pyx_k_codeobj_36)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_lines = __pyx_t_1; __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":72 + /* "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi":72 * yield '%d [shape=doublecircle]' % len(self) * yield '}' * return '\n'.join(lines()).encode('utf8') # <<<<<<<<<<<<<< @@ -16240,33 +15784,35 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_19todot(struct __pyx_obj_4cdec_5 * def as_hypergraph(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_pf_4cdec_5_cdec_7Lattice_5todot_lines(__pyx_v_lines); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_kp_s_40), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyString_Join(__pyx_kp_s__16, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_pf_4cdec_5_cdec_7Lattice_5todot_lines(__pyx_v_lines); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_2); + __pyx_t_2 = 0; + __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_encode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s__encode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_41), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":61 - * yield self[i] - * - * def todot(self): # <<<<<<<<<<<<<< - * """lattice.todot() -> Representation of the lattice in GraphViz dot format.""" - * def lines(): - */ - - /* 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("cdec._cdec.Lattice.todot", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -16277,14 +15823,6 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_19todot(struct __pyx_obj_4cdec_5 return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":74 - * return '\n'.join(lines()).encode('utf8') - * - * def as_hypergraph(self): # <<<<<<<<<<<<<< - * """lattice.as_hypergraph() -> Hypergraph representation of the lattice.""" - * cdef Hypergraph result = Hypergraph.__new__(Hypergraph) - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_7Lattice_22as_hypergraph(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_4cdec_5_cdec_7Lattice_21as_hypergraph[] = "lattice.as_hypergraph() -> Hypergraph representation of the lattice."; @@ -16293,12 +15831,18 @@ static PyObject *__pyx_pw_4cdec_5_cdec_7Lattice_22as_hypergraph(PyObject *__pyx_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("as_hypergraph (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_7Lattice_21as_hypergraph(((struct __pyx_obj_4cdec_5_cdec_Lattice *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi":74 + * return '\n'.join(lines()).encode('utf8') + * + * def as_hypergraph(self): # <<<<<<<<<<<<<< + * """lattice.as_hypergraph() -> Hypergraph representation of the lattice.""" + * cdef Hypergraph result = Hypergraph.__new__(Hypergraph) + */ + static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_21as_hypergraph(struct __pyx_obj_4cdec_5_cdec_Lattice *__pyx_v_self) { struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_result = 0; PyObject *__pyx_v_plf = 0; @@ -16312,20 +15856,20 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_21as_hypergraph(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("as_hypergraph", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":76 + /* "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi":76 * def as_hypergraph(self): * """lattice.as_hypergraph() -> Hypergraph representation of the lattice.""" * cdef Hypergraph result = Hypergraph.__new__(Hypergraph) # <<<<<<<<<<<<<< * result.hg = new hypergraph.Hypergraph() * cdef bytes plf = str(self) */ - __pyx_t_1 = __pyx_tp_new_4cdec_5_cdec_Hypergraph(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_Hypergraph)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_tp_new_4cdec_5_cdec_Hypergraph(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_Hypergraph)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4cdec_5_cdec_Hypergraph)))) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_result = ((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":77 + /* "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi":77 * """lattice.as_hypergraph() -> Hypergraph representation of the lattice.""" * cdef Hypergraph result = Hypergraph.__new__(Hypergraph) * result.hg = new hypergraph.Hypergraph() # <<<<<<<<<<<<<< @@ -16334,7 +15878,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_21as_hypergraph(struct __pyx_obj */ __pyx_v_result->hg = new Hypergraph(); - /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":78 + /* "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi":78 * cdef Hypergraph result = Hypergraph.__new__(Hypergraph) * result.hg = new hypergraph.Hypergraph() * cdef bytes plf = str(self) # <<<<<<<<<<<<<< @@ -16346,23 +15890,23 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_21as_hypergraph(struct __pyx_obj __Pyx_INCREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_plf = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":79 + /* "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi":79 * result.hg = new hypergraph.Hypergraph() * cdef bytes plf = str(self) * hypergraph.ReadFromPLF(plf, result.hg) # <<<<<<<<<<<<<< * return result */ - __pyx_t_3 = __pyx_convert_string_from_py_(__pyx_v_plf); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __pyx_convert_string_from_py_(((PyObject *)__pyx_v_plf)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} HypergraphIO::ReadFromPLF(__pyx_t_3, __pyx_v_result->hg); - /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":80 + /* "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi":80 * cdef bytes plf = str(self) * hypergraph.ReadFromPLF(plf, result.hg) * return result # <<<<<<<<<<<<<< @@ -16372,15 +15916,8 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_21as_hypergraph(struct __pyx_obj __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":74 - * return '\n'.join(lines()).encode('utf8') - * - * def as_hypergraph(self): # <<<<<<<<<<<<<< - * """lattice.as_hypergraph() -> Hypergraph representation of the lattice.""" - * cdef Hypergraph result = Hypergraph.__new__(Hypergraph) - */ - - /* 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); @@ -16394,7 +15931,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Lattice_21as_hypergraph(struct __pyx_obj return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":3 +/* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":3 * cimport mteval * * cdef SufficientStats as_stats(x, y): # <<<<<<<<<<<<<< @@ -16416,7 +15953,7 @@ static struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_f_4cdec_5_cdec_as_st int __pyx_clineno = 0; __Pyx_RefNannySetupContext("as_stats", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":4 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":4 * * cdef SufficientStats as_stats(x, y): * if isinstance(x, SufficientStats): # <<<<<<<<<<<<<< @@ -16427,7 +15964,7 @@ static struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_f_4cdec_5_cdec_as_st __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":5 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":5 * cdef SufficientStats as_stats(x, y): * if isinstance(x, SufficientStats): * return x # <<<<<<<<<<<<<< @@ -16439,9 +15976,10 @@ static struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_f_4cdec_5_cdec_as_st __Pyx_INCREF(__pyx_v_x); __pyx_r = ((struct __pyx_obj_4cdec_5_cdec_SufficientStats *)__pyx_v_x); goto __pyx_L0; + goto __pyx_L3; } - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":6 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":6 * if isinstance(x, SufficientStats): * return x * elif x == 0 and isinstance(y, SufficientStats): # <<<<<<<<<<<<<< @@ -16459,19 +15997,19 @@ static struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_f_4cdec_5_cdec_as_st } if (__pyx_t_4) { - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":7 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":7 * return x * elif x == 0 and isinstance(y, SufficientStats): * stats = SufficientStats() # <<<<<<<<<<<<<< * stats.stats = new mteval.SufficientStats() * stats.metric = ( y).metric */ - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SufficientStats)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SufficientStats)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_v_stats = ((struct __pyx_obj_4cdec_5_cdec_SufficientStats *)__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":8 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":8 * elif x == 0 and isinstance(y, SufficientStats): * stats = SufficientStats() * stats.stats = new mteval.SufficientStats() # <<<<<<<<<<<<<< @@ -16480,7 +16018,7 @@ static struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_f_4cdec_5_cdec_as_st */ __pyx_v_stats->stats = new SufficientStats(); - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":9 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":9 * stats = SufficientStats() * stats.stats = new mteval.SufficientStats() * stats.metric = ( y).metric # <<<<<<<<<<<<<< @@ -16490,7 +16028,7 @@ static struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_f_4cdec_5_cdec_as_st __pyx_t_5 = ((struct __pyx_obj_4cdec_5_cdec_SufficientStats *)__pyx_v_y)->metric; __pyx_v_stats->metric = __pyx_t_5; - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":10 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":10 * stats.stats = new mteval.SufficientStats() * stats.metric = ( y).metric * return stats # <<<<<<<<<<<<<< @@ -16501,17 +16039,10 @@ static struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_f_4cdec_5_cdec_as_st __Pyx_INCREF(((PyObject *)__pyx_v_stats)); __pyx_r = __pyx_v_stats; goto __pyx_L0; + goto __pyx_L3; } + __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":3 - * cimport mteval - * - * cdef SufficientStats as_stats(x, y): # <<<<<<<<<<<<<< - * if isinstance(x, SufficientStats): - * return x - */ - - /* function exit code */ __pyx_r = ((struct __pyx_obj_4cdec_5_cdec_SufficientStats *)Py_None); __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; @@ -16525,14 +16056,6 @@ static struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_f_4cdec_5_cdec_as_st return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":17 - * - * property words: - * def __get__(self): # <<<<<<<<<<<<<< - * return unicode(GetString(self.candidate.ewords).c_str(), encoding='utf8') - * - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_9Candidate_5words_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_9Candidate_5words_1__get__(PyObject *__pyx_v_self) { @@ -16540,12 +16063,18 @@ static PyObject *__pyx_pw_4cdec_5_cdec_9Candidate_5words_1__get__(PyObject *__py __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_9Candidate_5words___get__(((struct __pyx_obj_4cdec_5_cdec_Candidate *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":17 + * + * property words: + * def __get__(self): # <<<<<<<<<<<<<< + * return unicode(GetString(self.candidate.ewords).c_str(), encoding='utf8') + * + */ + static PyObject *__pyx_pf_4cdec_5_cdec_9Candidate_5words___get__(struct __pyx_obj_4cdec_5_cdec_Candidate *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -16557,7 +16086,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_9Candidate_5words___get__(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":18 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":18 * property words: * def __get__(self): * return unicode(GetString(self.candidate.ewords).c_str(), encoding='utf8') # <<<<<<<<<<<<<< @@ -16566,32 +16095,25 @@ static PyObject *__pyx_pf_4cdec_5_cdec_9Candidate_5words___get__(struct __pyx_ob */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBytes_FromString(TD::GetString(__pyx_v_self->candidate->ewords).c_str()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); + __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); - __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_1)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_encoding, __pyx_n_s_utf8) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__encoding), ((PyObject *)__pyx_n_s__utf8)) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyUnicode_Type))), ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":17 - * - * property words: - * def __get__(self): # <<<<<<<<<<<<<< - * return unicode(GetString(self.candidate.ewords).c_str(), encoding='utf8') - * - */ - - /* 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); @@ -16604,14 +16126,6 @@ static PyObject *__pyx_pf_4cdec_5_cdec_9Candidate_5words___get__(struct __pyx_ob return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":21 - * - * property fmap: - * def __get__(self): # <<<<<<<<<<<<<< - * cdef SparseVector fmap = SparseVector.__new__(SparseVector) - * fmap.vector = new FastSparseVector[weight_t](self.candidate.fmap) - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_9Candidate_4fmap_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_9Candidate_4fmap_1__get__(PyObject *__pyx_v_self) { @@ -16619,12 +16133,18 @@ static PyObject *__pyx_pw_4cdec_5_cdec_9Candidate_4fmap_1__get__(PyObject *__pyx __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_9Candidate_4fmap___get__(((struct __pyx_obj_4cdec_5_cdec_Candidate *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":21 + * + * property fmap: + * def __get__(self): # <<<<<<<<<<<<<< + * cdef SparseVector fmap = SparseVector.__new__(SparseVector) + * fmap.vector = new FastSparseVector[weight_t](self.candidate.fmap) + */ + static PyObject *__pyx_pf_4cdec_5_cdec_9Candidate_4fmap___get__(struct __pyx_obj_4cdec_5_cdec_Candidate *__pyx_v_self) { struct __pyx_obj_4cdec_5_cdec_SparseVector *__pyx_v_fmap = 0; PyObject *__pyx_r = NULL; @@ -16635,20 +16155,20 @@ static PyObject *__pyx_pf_4cdec_5_cdec_9Candidate_4fmap___get__(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":22 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":22 * property fmap: * def __get__(self): * cdef SparseVector fmap = SparseVector.__new__(SparseVector) # <<<<<<<<<<<<<< * fmap.vector = new FastSparseVector[weight_t](self.candidate.fmap) * return fmap */ - __pyx_t_1 = __pyx_tp_new_4cdec_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SparseVector)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_tp_new_4cdec_5_cdec_SparseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SparseVector)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4cdec_5_cdec_SparseVector)))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_fmap = ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":23 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":23 * def __get__(self): * cdef SparseVector fmap = SparseVector.__new__(SparseVector) * fmap.vector = new FastSparseVector[weight_t](self.candidate.fmap) # <<<<<<<<<<<<<< @@ -16657,7 +16177,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_9Candidate_4fmap___get__(struct __pyx_obj */ __pyx_v_fmap->vector = new FastSparseVector(__pyx_v_self->candidate->fmap); - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":24 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":24 * cdef SparseVector fmap = SparseVector.__new__(SparseVector) * fmap.vector = new FastSparseVector[weight_t](self.candidate.fmap) * return fmap # <<<<<<<<<<<<<< @@ -16669,15 +16189,8 @@ static PyObject *__pyx_pf_4cdec_5_cdec_9Candidate_4fmap___get__(struct __pyx_obj __pyx_r = ((PyObject *)__pyx_v_fmap); goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":21 - * - * property fmap: - * def __get__(self): # <<<<<<<<<<<<<< - * cdef SparseVector fmap = SparseVector.__new__(SparseVector) - * fmap.vector = new FastSparseVector[weight_t](self.candidate.fmap) - */ - - /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cdec._cdec.Candidate.fmap.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -16689,14 +16202,6 @@ static PyObject *__pyx_pf_4cdec_5_cdec_9Candidate_4fmap___get__(struct __pyx_obj return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":14 - * cdef class Candidate: - * cdef mteval.const_Candidate* candidate - * cdef public float score # <<<<<<<<<<<<<< - * - * property words: - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_9Candidate_5score_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_9Candidate_5score_1__get__(PyObject *__pyx_v_self) { @@ -16704,12 +16209,18 @@ static PyObject *__pyx_pw_4cdec_5_cdec_9Candidate_5score_1__get__(PyObject *__py __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_9Candidate_5score___get__(((struct __pyx_obj_4cdec_5_cdec_Candidate *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":14 + * cdef class Candidate: + * cdef mteval.const_Candidate* candidate + * cdef public float score # <<<<<<<<<<<<<< + * + * property words: + */ + static PyObject *__pyx_pf_4cdec_5_cdec_9Candidate_5score___get__(struct __pyx_obj_4cdec_5_cdec_Candidate *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -16725,7 +16236,8 @@ static PyObject *__pyx_pf_4cdec_5_cdec_9Candidate_5score___get__(struct __pyx_ob __pyx_t_1 = 0; goto __pyx_L0; - /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cdec._cdec.Candidate.score.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -16743,8 +16255,6 @@ static int __pyx_pw_4cdec_5_cdec_9Candidate_5score_3__set__(PyObject *__pyx_v_se __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_9Candidate_5score_2__set__(((struct __pyx_obj_4cdec_5_cdec_Candidate *)__pyx_v_self), ((PyObject *)__pyx_v_value)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -16760,7 +16270,6 @@ static int __pyx_pf_4cdec_5_cdec_9Candidate_5score_2__set__(struct __pyx_obj_4cd __pyx_t_1 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_1 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->score = __pyx_t_1; - /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; @@ -16771,30 +16280,28 @@ static int __pyx_pf_4cdec_5_cdec_9Candidate_5score_2__set__(struct __pyx_obj_4cd return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":30 - * cdef mteval.EvaluationMetric* metric - * - * def __dealloc__(self): # <<<<<<<<<<<<<< - * del self.stats - * - */ - /* Python wrapper */ static void __pyx_pw_4cdec_5_cdec_15SufficientStats_1__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_4cdec_5_cdec_15SufficientStats_1__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_4cdec_5_cdec_15SufficientStats___dealloc__(((struct __pyx_obj_4cdec_5_cdec_SufficientStats *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); } -static void __pyx_pf_4cdec_5_cdec_15SufficientStats___dealloc__(struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_v_self) { +/* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":30 + * cdef mteval.EvaluationMetric* metric + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * del self.stats + * + */ + +static void __pyx_pf_4cdec_5_cdec_15SufficientStats___dealloc__(CYTHON_UNUSED struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":31 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":31 * * def __dealloc__(self): * del self.stats # <<<<<<<<<<<<<< @@ -16803,26 +16310,9 @@ static void __pyx_pf_4cdec_5_cdec_15SufficientStats___dealloc__(struct __pyx_obj */ delete __pyx_v_self->stats; - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":30 - * cdef mteval.EvaluationMetric* metric - * - * def __dealloc__(self): # <<<<<<<<<<<<<< - * del self.stats - * - */ - - /* function exit code */ __Pyx_RefNannyFinishContext(); } -/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":34 - * - * property score: - * def __get__(self): # <<<<<<<<<<<<<< - * return self.metric.ComputeScore(self.stats[0]) - * - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_15SufficientStats_5score_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_15SufficientStats_5score_1__get__(PyObject *__pyx_v_self) { @@ -16830,12 +16320,18 @@ static PyObject *__pyx_pw_4cdec_5_cdec_15SufficientStats_5score_1__get__(PyObjec __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_15SufficientStats_5score___get__(((struct __pyx_obj_4cdec_5_cdec_SufficientStats *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":34 + * + * property score: + * def __get__(self): # <<<<<<<<<<<<<< + * return self.metric.ComputeScore(self.stats[0]) + * + */ + static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_5score___get__(struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -16845,7 +16341,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_5score___get__(struct _ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":35 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":35 * property score: * def __get__(self): * return self.metric.ComputeScore(self.stats[0]) # <<<<<<<<<<<<<< @@ -16859,15 +16355,8 @@ static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_5score___get__(struct _ __pyx_t_1 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":34 - * - * property score: - * def __get__(self): # <<<<<<<<<<<<<< - * return self.metric.ComputeScore(self.stats[0]) - * - */ - - /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cdec._cdec.SufficientStats.score.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -16878,14 +16367,6 @@ static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_5score___get__(struct _ return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":38 - * - * property detail: - * def __get__(self): # <<<<<<<<<<<<<< - * return str(self.metric.DetailedScore(self.stats[0]).c_str()) - * - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_15SufficientStats_6detail_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_15SufficientStats_6detail_1__get__(PyObject *__pyx_v_self) { @@ -16893,12 +16374,18 @@ static PyObject *__pyx_pw_4cdec_5_cdec_15SufficientStats_6detail_1__get__(PyObje __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_15SufficientStats_6detail___get__(((struct __pyx_obj_4cdec_5_cdec_SufficientStats *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":38 + * + * property detail: + * def __get__(self): # <<<<<<<<<<<<<< + * return str(self.metric.DetailedScore(self.stats[0]).c_str()) + * + */ + static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_6detail___get__(struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -16909,7 +16396,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_6detail___get__(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":39 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":39 * property detail: * def __get__(self): * return str(self.metric.DetailedScore(self.stats[0]).c_str()) # <<<<<<<<<<<<<< @@ -16918,28 +16405,21 @@ static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_6detail___get__(struct */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->metric->DetailedScore((__pyx_v_self->stats[0])).c_str()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); + __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); - __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_1)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":38 - * - * property detail: - * def __get__(self): # <<<<<<<<<<<<<< - * return str(self.metric.DetailedScore(self.stats[0]).c_str()) - * - */ - - /* 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); @@ -16951,14 +16431,6 @@ static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_6detail___get__(struct return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":41 - * return str(self.metric.DetailedScore(self.stats[0]).c_str()) - * - * def __len__(self): # <<<<<<<<<<<<<< - * return self.stats.size() - * - */ - /* Python wrapper */ static Py_ssize_t __pyx_pw_4cdec_5_cdec_15SufficientStats_3__len__(PyObject *__pyx_v_self); /*proto*/ static Py_ssize_t __pyx_pw_4cdec_5_cdec_15SufficientStats_3__len__(PyObject *__pyx_v_self) { @@ -16966,18 +16438,24 @@ static Py_ssize_t __pyx_pw_4cdec_5_cdec_15SufficientStats_3__len__(PyObject *__p __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_15SufficientStats_2__len__(((struct __pyx_obj_4cdec_5_cdec_SufficientStats *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":41 + * return str(self.metric.DetailedScore(self.stats[0]).c_str()) + * + * def __len__(self): # <<<<<<<<<<<<<< + * return self.stats.size() + * + */ + static Py_ssize_t __pyx_pf_4cdec_5_cdec_15SufficientStats_2__len__(struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_v_self) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":42 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":42 * * def __len__(self): * return self.stats.size() # <<<<<<<<<<<<<< @@ -16987,28 +16465,12 @@ static Py_ssize_t __pyx_pf_4cdec_5_cdec_15SufficientStats_2__len__(struct __pyx_ __pyx_r = __pyx_v_self->stats->size(); goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":41 - * return str(self.metric.DetailedScore(self.stats[0]).c_str()) - * - * def __len__(self): # <<<<<<<<<<<<<< - * return self.stats.size() - * - */ - - /* function exit code */ + __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_gb_4cdec_5_cdec_15SufficientStats_6generator15(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ - -/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":44 - * return self.stats.size() - * - * def __iter__(self): # <<<<<<<<<<<<<< - * for i in range(len(self)): - * yield self[i] - */ +static PyObject *__pyx_gb_4cdec_5_cdec_15SufficientStats_6generator18(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_15SufficientStats_5__iter__(PyObject *__pyx_v_self); /*proto*/ @@ -17017,21 +16479,27 @@ static PyObject *__pyx_pw_4cdec_5_cdec_15SufficientStats_5__iter__(PyObject *__p __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_15SufficientStats_4__iter__(((struct __pyx_obj_4cdec_5_cdec_SufficientStats *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":44 + * return self.stats.size() + * + * def __iter__(self): # <<<<<<<<<<<<<< + * for i in range(len(self)): + * yield self[i] + */ + static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_4__iter__(struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_v_self) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__ *__pyx_cur_scope; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___iter__ *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__iter__", 0); - __pyx_cur_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__ *)__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_21___iter__(__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_21___iter__, __pyx_empty_tuple, NULL); + __pyx_cur_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___iter__ *)__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_24___iter__(__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_24___iter__, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; @@ -17041,13 +16509,12 @@ static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_4__iter__(struct __pyx_ __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); { - __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_5_cdec_15SufficientStats_6generator15, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_5_cdec_15SufficientStats_6generator18, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } - /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; @@ -17060,13 +16527,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_4__iter__(struct __pyx_ return __pyx_r; } -static PyObject *__pyx_gb_4cdec_5_cdec_15SufficientStats_6generator15(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ +static PyObject *__pyx_gb_4cdec_5_cdec_15SufficientStats_6generator18(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__ *__pyx_cur_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__ *)__pyx_generator->closure); + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___iter__ *__pyx_cur_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___iter__ *)__pyx_generator->closure); PyObject *__pyx_r = NULL; Py_ssize_t __pyx_t_1; - Py_ssize_t __pyx_t_2; + PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; + PyObject *(*__pyx_t_4)(PyObject *); int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -17082,7 +16550,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_15SufficientStats_6generator15(__pyx_Gene __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":45 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":45 * * def __iter__(self): * for i in range(len(self)): # <<<<<<<<<<<<<< @@ -17090,22 +16558,72 @@ static PyObject *__pyx_gb_4cdec_5_cdec_15SufficientStats_6generator15(__pyx_Gene * */ __pyx_t_1 = PyObject_Length(((PyObject *)__pyx_cur_scope->__pyx_v_self)); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { + __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_2); + __pyx_t_2 = 0; + __pyx_t_2 = PyObject_Call(__pyx_builtin_range, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) { + __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = 0; + __pyx_t_4 = NULL; + } else { + __pyx_t_1 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = Py_TYPE(__pyx_t_3)->tp_iternext; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + for (;;) { + if (!__pyx_t_4 && PyList_CheckExact(__pyx_t_3)) { + if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_2); __pyx_t_1++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif + } else if (!__pyx_t_4 && PyTuple_CheckExact(__pyx_t_3)) { + if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_2); __pyx_t_1++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif + } else { + __pyx_t_2 = __pyx_t_4(__pyx_t_3); + if (unlikely(!__pyx_t_2)) { + if (PyErr_Occurred()) { + if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); + else {__pyx_filename = __pyx_f[5]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + break; + } + __Pyx_GOTREF(__pyx_t_2); + } + __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_i); + __Pyx_XDECREF(__pyx_cur_scope->__pyx_v_i); + __Pyx_GIVEREF(__pyx_t_2); __pyx_cur_scope->__pyx_v_i = __pyx_t_2; + __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":46 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":46 * def __iter__(self): * for i in range(len(self)): * yield self[i] # <<<<<<<<<<<<<< * * def __getitem__(self, int index): */ - __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_cur_scope->__pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; - __Pyx_GOTREF(__pyx_t_3); - __pyx_r = __pyx_t_3; - __pyx_t_3 = 0; + __pyx_t_2 = PyObject_GetItem(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_cur_scope->__pyx_v_i); if (!__pyx_t_2) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; __pyx_cur_scope->__pyx_t_0 = __pyx_t_1; - __pyx_cur_scope->__pyx_t_1 = __pyx_t_2; + __Pyx_XGIVEREF(__pyx_t_3); + __pyx_cur_scope->__pyx_t_1 = __pyx_t_3; + __pyx_cur_scope->__pyx_t_2 = __pyx_t_4; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); /* return from generator, yielding value */ @@ -17113,22 +16631,17 @@ static PyObject *__pyx_gb_4cdec_5_cdec_15SufficientStats_6generator15(__pyx_Gene return __pyx_r; __pyx_L6_resume_from_yield:; __pyx_t_1 = __pyx_cur_scope->__pyx_t_0; - __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; + __pyx_t_3 = __pyx_cur_scope->__pyx_t_1; + __pyx_cur_scope->__pyx_t_1 = 0; + __Pyx_XGOTREF(__pyx_t_3); + __pyx_t_4 = __pyx_cur_scope->__pyx_t_2; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":44 - * return self.stats.size() - * - * def __iter__(self): # <<<<<<<<<<<<<< - * for i in range(len(self)): - * yield self[i] - */ - - /* function exit code */ + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; @@ -17139,14 +16652,6 @@ static PyObject *__pyx_gb_4cdec_5_cdec_15SufficientStats_6generator15(__pyx_Gene return NULL; } -/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":48 - * yield self[i] - * - * def __getitem__(self, int index): # <<<<<<<<<<<<<< - * if not 0 <= index < len(self): - * raise IndexError('sufficient stats vector index out of range') - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_15SufficientStats_8__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_index); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_15SufficientStats_8__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_index) { @@ -17158,7 +16663,7 @@ static PyObject *__pyx_pw_4cdec_5_cdec_15SufficientStats_8__getitem__(PyObject * __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0); assert(__pyx_arg_index); { - __pyx_v_index = __Pyx_PyInt_As_int(__pyx_arg_index); if (unlikely((__pyx_v_index == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_index = __Pyx_PyInt_AsInt(__pyx_arg_index); if (unlikely((__pyx_v_index == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -17167,12 +16672,18 @@ static PyObject *__pyx_pw_4cdec_5_cdec_15SufficientStats_8__getitem__(PyObject * return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4cdec_5_cdec_15SufficientStats_7__getitem__(((struct __pyx_obj_4cdec_5_cdec_SufficientStats *)__pyx_v_self), ((int)__pyx_v_index)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":48 + * yield self[i] + * + * def __getitem__(self, int index): # <<<<<<<<<<<<<< + * if not 0 <= index < len(self): + * raise IndexError('sufficient stats vector index out of range') + */ + static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_7__getitem__(struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_v_self, int __pyx_v_index) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -17185,7 +16696,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_7__getitem__(struct __p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getitem__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":49 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":49 * * def __getitem__(self, int index): * if not 0 <= index < len(self): # <<<<<<<<<<<<<< @@ -17200,21 +16711,23 @@ static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_7__getitem__(struct __p __pyx_t_3 = ((!(__pyx_t_1 != 0)) != 0); if (__pyx_t_3) { - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":50 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":50 * def __getitem__(self, int index): * if not 0 <= index < len(self): * raise IndexError('sufficient stats vector index out of range') # <<<<<<<<<<<<<< * return self.stats[0][index] * */ - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyObject_Call(__pyx_builtin_IndexError, ((PyObject *)__pyx_k_tuple_43), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 50; __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[5]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L3; } + __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":51 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":51 * if not 0 <= index < len(self): * raise IndexError('sufficient stats vector index out of range') * return self.stats[0][index] # <<<<<<<<<<<<<< @@ -17228,15 +16741,8 @@ static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_7__getitem__(struct __p __pyx_t_4 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":48 - * yield self[i] - * - * def __getitem__(self, int index): # <<<<<<<<<<<<<< - * if not 0 <= index < len(self): - * raise IndexError('sufficient stats vector index out of range') - */ - - /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("cdec._cdec.SufficientStats.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -17247,14 +16753,6 @@ static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_7__getitem__(struct __p return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":53 - * return self.stats[0][index] - * - * def __iadd__(SufficientStats self, SufficientStats other): # <<<<<<<<<<<<<< - * self.stats[0] += other.stats[0] - * return self - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_15SufficientStats_10__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_15SufficientStats_10__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) { @@ -17266,8 +16764,6 @@ static PyObject *__pyx_pw_4cdec_5_cdec_15SufficientStats_10__iadd__(PyObject *__ __Pyx_RefNannySetupContext("__iadd__ (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_4cdec_5_cdec_SufficientStats, 1, "other", 0))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_4cdec_5_cdec_15SufficientStats_9__iadd__(((struct __pyx_obj_4cdec_5_cdec_SufficientStats *)__pyx_v_self), ((struct __pyx_obj_4cdec_5_cdec_SufficientStats *)__pyx_v_other)); - - /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; @@ -17276,12 +16772,20 @@ static PyObject *__pyx_pw_4cdec_5_cdec_15SufficientStats_10__iadd__(PyObject *__ return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":53 + * return self.stats[0][index] + * + * def __iadd__(SufficientStats self, SufficientStats other): # <<<<<<<<<<<<<< + * self.stats[0] += other.stats[0] + * return self + */ + static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_9__iadd__(struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_v_self, struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_v_other) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__iadd__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":54 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":54 * * def __iadd__(SufficientStats self, SufficientStats other): * self.stats[0] += other.stats[0] # <<<<<<<<<<<<<< @@ -17290,7 +16794,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_9__iadd__(struct __pyx_ */ (__pyx_v_self->stats[0]) += (__pyx_v_other->stats[0]); - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":55 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":55 * def __iadd__(SufficientStats self, SufficientStats other): * self.stats[0] += other.stats[0] * return self # <<<<<<<<<<<<<< @@ -17302,29 +16806,13 @@ static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_9__iadd__(struct __pyx_ __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":53 - * return self.stats[0][index] - * - * def __iadd__(SufficientStats self, SufficientStats other): # <<<<<<<<<<<<<< - * self.stats[0] += other.stats[0] - * return self - */ - - /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":57 - * return self - * - * def __add__(x, y): # <<<<<<<<<<<<<< - * cdef SufficientStats sx = as_stats(x, y) - * cdef SufficientStats sy = as_stats(y, x) - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_15SufficientStats_12__add__(PyObject *__pyx_v_x, PyObject *__pyx_v_y); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_15SufficientStats_12__add__(PyObject *__pyx_v_x, PyObject *__pyx_v_y) { @@ -17332,12 +16820,18 @@ static PyObject *__pyx_pw_4cdec_5_cdec_15SufficientStats_12__add__(PyObject *__p __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__add__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_15SufficientStats_11__add__(((PyObject *)__pyx_v_x), ((PyObject *)__pyx_v_y)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":57 + * return self + * + * def __add__(x, y): # <<<<<<<<<<<<<< + * cdef SufficientStats sx = as_stats(x, y) + * cdef SufficientStats sy = as_stats(y, x) + */ + static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_11__add__(PyObject *__pyx_v_x, PyObject *__pyx_v_y) { struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_v_sx = 0; struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_v_sy = 0; @@ -17351,7 +16845,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_11__add__(PyObject *__p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__add__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":58 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":58 * * def __add__(x, y): * cdef SufficientStats sx = as_stats(x, y) # <<<<<<<<<<<<<< @@ -17363,7 +16857,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_11__add__(PyObject *__p __pyx_v_sx = ((struct __pyx_obj_4cdec_5_cdec_SufficientStats *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":59 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":59 * def __add__(x, y): * cdef SufficientStats sx = as_stats(x, y) * cdef SufficientStats sy = as_stats(y, x) # <<<<<<<<<<<<<< @@ -17375,19 +16869,19 @@ static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_11__add__(PyObject *__p __pyx_v_sy = ((struct __pyx_obj_4cdec_5_cdec_SufficientStats *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":60 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":60 * cdef SufficientStats sx = as_stats(x, y) * cdef SufficientStats sy = as_stats(y, x) * cdef SufficientStats result = SufficientStats() # <<<<<<<<<<<<<< * result.stats = new mteval.SufficientStats(mteval.add(sx.stats[0], sy.stats[0])) * result.metric = sx.metric */ - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SufficientStats)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SufficientStats)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_result = ((struct __pyx_obj_4cdec_5_cdec_SufficientStats *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":61 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":61 * cdef SufficientStats sy = as_stats(y, x) * cdef SufficientStats result = SufficientStats() * result.stats = new mteval.SufficientStats(mteval.add(sx.stats[0], sy.stats[0])) # <<<<<<<<<<<<<< @@ -17396,7 +16890,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_11__add__(PyObject *__p */ __pyx_v_result->stats = new SufficientStats(operator+((__pyx_v_sx->stats[0]), (__pyx_v_sy->stats[0]))); - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":62 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":62 * cdef SufficientStats result = SufficientStats() * result.stats = new mteval.SufficientStats(mteval.add(sx.stats[0], sy.stats[0])) * result.metric = sx.metric # <<<<<<<<<<<<<< @@ -17406,7 +16900,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_11__add__(PyObject *__p __pyx_t_2 = __pyx_v_sx->metric; __pyx_v_result->metric = __pyx_t_2; - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":63 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":63 * result.stats = new mteval.SufficientStats(mteval.add(sx.stats[0], sy.stats[0])) * result.metric = sx.metric * return result # <<<<<<<<<<<<<< @@ -17418,15 +16912,8 @@ static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_11__add__(PyObject *__p __pyx_r = ((PyObject *)__pyx_v_result); goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":57 - * return self - * - * def __add__(x, y): # <<<<<<<<<<<<<< - * cdef SufficientStats sx = as_stats(x, y) - * cdef SufficientStats sy = as_stats(y, x) - */ - - /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cdec._cdec.SufficientStats.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -17440,14 +16927,6 @@ static PyObject *__pyx_pf_4cdec_5_cdec_15SufficientStats_11__add__(PyObject *__p return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":70 - * cdef mteval.CandidateSet* cs - * - * def __cinit__(self, SegmentEvaluator evaluator): # <<<<<<<<<<<<<< - * self.scorer = new shared_ptr[mteval.SegmentEvaluator](evaluator.scorer[0]) - * self.metric = evaluator.metric - */ - /* Python wrapper */ static int __pyx_pw_4cdec_5_cdec_12CandidateSet_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_4cdec_5_cdec_12CandidateSet_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { @@ -17459,7 +16938,7 @@ static int __pyx_pw_4cdec_5_cdec_12CandidateSet_1__cinit__(PyObject *__pyx_v_sel __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_evaluator,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__evaluator,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; @@ -17472,7 +16951,7 @@ static int __pyx_pw_4cdec_5_cdec_12CandidateSet_1__cinit__(PyObject *__pyx_v_sel kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_evaluator)) != 0)) kw_args--; + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__evaluator)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { @@ -17495,8 +16974,6 @@ static int __pyx_pw_4cdec_5_cdec_12CandidateSet_1__cinit__(PyObject *__pyx_v_sel __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_evaluator), __pyx_ptype_4cdec_5_cdec_SegmentEvaluator, 1, "evaluator", 0))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_4cdec_5_cdec_12CandidateSet___cinit__(((struct __pyx_obj_4cdec_5_cdec_CandidateSet *)__pyx_v_self), __pyx_v_evaluator); - - /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = -1; @@ -17505,13 +16982,21 @@ static int __pyx_pw_4cdec_5_cdec_12CandidateSet_1__cinit__(PyObject *__pyx_v_sel return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":70 + * cdef mteval.CandidateSet* cs + * + * def __cinit__(self, SegmentEvaluator evaluator): # <<<<<<<<<<<<<< + * self.scorer = new shared_ptr[mteval.SegmentEvaluator](evaluator.scorer[0]) + * self.metric = evaluator.metric + */ + static int __pyx_pf_4cdec_5_cdec_12CandidateSet___cinit__(struct __pyx_obj_4cdec_5_cdec_CandidateSet *__pyx_v_self, struct __pyx_obj_4cdec_5_cdec_SegmentEvaluator *__pyx_v_evaluator) { int __pyx_r; __Pyx_RefNannyDeclarations EvaluationMetric *__pyx_t_1; __Pyx_RefNannySetupContext("__cinit__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":71 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":71 * * def __cinit__(self, SegmentEvaluator evaluator): * self.scorer = new shared_ptr[mteval.SegmentEvaluator](evaluator.scorer[0]) # <<<<<<<<<<<<<< @@ -17520,7 +17005,7 @@ static int __pyx_pf_4cdec_5_cdec_12CandidateSet___cinit__(struct __pyx_obj_4cdec */ __pyx_v_self->scorer = new boost::shared_ptr((__pyx_v_evaluator->scorer[0])); - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":72 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":72 * def __cinit__(self, SegmentEvaluator evaluator): * self.scorer = new shared_ptr[mteval.SegmentEvaluator](evaluator.scorer[0]) * self.metric = evaluator.metric # <<<<<<<<<<<<<< @@ -17530,7 +17015,7 @@ static int __pyx_pf_4cdec_5_cdec_12CandidateSet___cinit__(struct __pyx_obj_4cdec __pyx_t_1 = __pyx_v_evaluator->metric; __pyx_v_self->metric = __pyx_t_1; - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":73 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":73 * self.scorer = new shared_ptr[mteval.SegmentEvaluator](evaluator.scorer[0]) * self.metric = evaluator.metric * self.cs = new mteval.CandidateSet() # <<<<<<<<<<<<<< @@ -17539,44 +17024,33 @@ static int __pyx_pf_4cdec_5_cdec_12CandidateSet___cinit__(struct __pyx_obj_4cdec */ __pyx_v_self->cs = new training::CandidateSet(); - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":70 - * cdef mteval.CandidateSet* cs - * - * def __cinit__(self, SegmentEvaluator evaluator): # <<<<<<<<<<<<<< - * self.scorer = new shared_ptr[mteval.SegmentEvaluator](evaluator.scorer[0]) - * self.metric = evaluator.metric - */ - - /* function exit code */ __pyx_r = 0; __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":75 - * self.cs = new mteval.CandidateSet() - * - * def __dealloc__(self): # <<<<<<<<<<<<<< - * del self.scorer - * del self.cs - */ - /* Python wrapper */ static void __pyx_pw_4cdec_5_cdec_12CandidateSet_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_4cdec_5_cdec_12CandidateSet_3__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_4cdec_5_cdec_12CandidateSet_2__dealloc__(((struct __pyx_obj_4cdec_5_cdec_CandidateSet *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); } -static void __pyx_pf_4cdec_5_cdec_12CandidateSet_2__dealloc__(struct __pyx_obj_4cdec_5_cdec_CandidateSet *__pyx_v_self) { +/* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":75 + * self.cs = new mteval.CandidateSet() + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * del self.scorer + * del self.cs + */ + +static void __pyx_pf_4cdec_5_cdec_12CandidateSet_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cdec_5_cdec_CandidateSet *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":76 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":76 * * def __dealloc__(self): * del self.scorer # <<<<<<<<<<<<<< @@ -17585,7 +17059,7 @@ static void __pyx_pf_4cdec_5_cdec_12CandidateSet_2__dealloc__(struct __pyx_obj_4 */ delete __pyx_v_self->scorer; - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":77 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":77 * def __dealloc__(self): * del self.scorer * del self.cs # <<<<<<<<<<<<<< @@ -17594,26 +17068,9 @@ static void __pyx_pf_4cdec_5_cdec_12CandidateSet_2__dealloc__(struct __pyx_obj_4 */ delete __pyx_v_self->cs; - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":75 - * self.cs = new mteval.CandidateSet() - * - * def __dealloc__(self): # <<<<<<<<<<<<<< - * del self.scorer - * del self.cs - */ - - /* function exit code */ __Pyx_RefNannyFinishContext(); } -/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":79 - * del self.cs - * - * def __len__(self): # <<<<<<<<<<<<<< - * return self.cs.size() - * - */ - /* Python wrapper */ static Py_ssize_t __pyx_pw_4cdec_5_cdec_12CandidateSet_5__len__(PyObject *__pyx_v_self); /*proto*/ static Py_ssize_t __pyx_pw_4cdec_5_cdec_12CandidateSet_5__len__(PyObject *__pyx_v_self) { @@ -17621,18 +17078,24 @@ static Py_ssize_t __pyx_pw_4cdec_5_cdec_12CandidateSet_5__len__(PyObject *__pyx_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_12CandidateSet_4__len__(((struct __pyx_obj_4cdec_5_cdec_CandidateSet *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":79 + * del self.cs + * + * def __len__(self): # <<<<<<<<<<<<<< + * return self.cs.size() + * + */ + static Py_ssize_t __pyx_pf_4cdec_5_cdec_12CandidateSet_4__len__(struct __pyx_obj_4cdec_5_cdec_CandidateSet *__pyx_v_self) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":80 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":80 * * def __len__(self): * return self.cs.size() # <<<<<<<<<<<<<< @@ -17642,28 +17105,12 @@ static Py_ssize_t __pyx_pf_4cdec_5_cdec_12CandidateSet_4__len__(struct __pyx_obj __pyx_r = __pyx_v_self->cs->size(); goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":79 - * del self.cs - * - * def __len__(self): # <<<<<<<<<<<<<< - * return self.cs.size() - * - */ - - /* function exit code */ + __pyx_r = 0; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":82 - * return self.cs.size() - * - * def __getitem__(self,int k): # <<<<<<<<<<<<<< - * if not 0 <= k < self.cs.size(): - * raise IndexError('candidate set index out of range') - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_12CandidateSet_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_k); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_12CandidateSet_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_k) { @@ -17675,7 +17122,7 @@ static PyObject *__pyx_pw_4cdec_5_cdec_12CandidateSet_7__getitem__(PyObject *__p __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0); assert(__pyx_arg_k); { - __pyx_v_k = __Pyx_PyInt_As_int(__pyx_arg_k); if (unlikely((__pyx_v_k == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_k = __Pyx_PyInt_AsInt(__pyx_arg_k); if (unlikely((__pyx_v_k == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -17684,12 +17131,18 @@ static PyObject *__pyx_pw_4cdec_5_cdec_12CandidateSet_7__getitem__(PyObject *__p return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4cdec_5_cdec_12CandidateSet_6__getitem__(((struct __pyx_obj_4cdec_5_cdec_CandidateSet *)__pyx_v_self), ((int)__pyx_v_k)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":82 + * return self.cs.size() + * + * def __getitem__(self,int k): # <<<<<<<<<<<<<< + * if not 0 <= k < self.cs.size(): + * raise IndexError('candidate set index out of range') + */ + static PyObject *__pyx_pf_4cdec_5_cdec_12CandidateSet_6__getitem__(struct __pyx_obj_4cdec_5_cdec_CandidateSet *__pyx_v_self, int __pyx_v_k) { struct __pyx_obj_4cdec_5_cdec_Candidate *__pyx_v_candidate = 0; PyObject *__pyx_r = NULL; @@ -17702,7 +17155,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12CandidateSet_6__getitem__(struct __pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__getitem__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":83 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":83 * * def __getitem__(self,int k): * if not 0 <= k < self.cs.size(): # <<<<<<<<<<<<<< @@ -17716,33 +17169,35 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12CandidateSet_6__getitem__(struct __pyx_ __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":84 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":84 * def __getitem__(self,int k): * if not 0 <= k < self.cs.size(): * raise IndexError('candidate set index out of range') # <<<<<<<<<<<<<< * cdef Candidate candidate = Candidate() * candidate.candidate = &self.cs[0][k] */ - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_Call(__pyx_builtin_IndexError, ((PyObject *)__pyx_k_tuple_45), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 84; __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[5]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L3; } + __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":85 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":85 * if not 0 <= k < self.cs.size(): * raise IndexError('candidate set index out of range') * cdef Candidate candidate = Candidate() # <<<<<<<<<<<<<< * candidate.candidate = &self.cs[0][k] * candidate.score = self.metric.ComputeScore(self.cs[0][k].eval_feats) */ - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_Candidate)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_Candidate)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_v_candidate = ((struct __pyx_obj_4cdec_5_cdec_Candidate *)__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":86 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":86 * raise IndexError('candidate set index out of range') * cdef Candidate candidate = Candidate() * candidate.candidate = &self.cs[0][k] # <<<<<<<<<<<<<< @@ -17751,7 +17206,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12CandidateSet_6__getitem__(struct __pyx_ */ __pyx_v_candidate->candidate = (&((__pyx_v_self->cs[0])[__pyx_v_k])); - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":87 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":87 * cdef Candidate candidate = Candidate() * candidate.candidate = &self.cs[0][k] * candidate.score = self.metric.ComputeScore(self.cs[0][k].eval_feats) # <<<<<<<<<<<<<< @@ -17760,7 +17215,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12CandidateSet_6__getitem__(struct __pyx_ */ __pyx_v_candidate->score = __pyx_v_self->metric->ComputeScore(((__pyx_v_self->cs[0])[__pyx_v_k]).eval_feats); - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":88 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":88 * candidate.candidate = &self.cs[0][k] * candidate.score = self.metric.ComputeScore(self.cs[0][k].eval_feats) * return candidate # <<<<<<<<<<<<<< @@ -17772,15 +17227,8 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12CandidateSet_6__getitem__(struct __pyx_ __pyx_r = ((PyObject *)__pyx_v_candidate); goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":82 - * return self.cs.size() - * - * def __getitem__(self,int k): # <<<<<<<<<<<<<< - * if not 0 <= k < self.cs.size(): - * raise IndexError('candidate set index out of range') - */ - - /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("cdec._cdec.CandidateSet.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -17791,15 +17239,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12CandidateSet_6__getitem__(struct __pyx_ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_gb_4cdec_5_cdec_12CandidateSet_10generator16(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ - -/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":90 - * return candidate - * - * def __iter__(self): # <<<<<<<<<<<<<< - * cdef unsigned i - * for i in range(len(self)): - */ +static PyObject *__pyx_gb_4cdec_5_cdec_12CandidateSet_10generator19(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_12CandidateSet_9__iter__(PyObject *__pyx_v_self); /*proto*/ @@ -17808,21 +17248,27 @@ static PyObject *__pyx_pw_4cdec_5_cdec_12CandidateSet_9__iter__(PyObject *__pyx_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_12CandidateSet_8__iter__(((struct __pyx_obj_4cdec_5_cdec_CandidateSet *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":90 + * return candidate + * + * def __iter__(self): # <<<<<<<<<<<<<< + * cdef unsigned i + * for i in range(len(self)): + */ + static PyObject *__pyx_pf_4cdec_5_cdec_12CandidateSet_8__iter__(struct __pyx_obj_4cdec_5_cdec_CandidateSet *__pyx_v_self) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__ *__pyx_cur_scope; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25___iter__ *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__iter__", 0); - __pyx_cur_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__ *)__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_22___iter__(__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_22___iter__, __pyx_empty_tuple, NULL); + __pyx_cur_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25___iter__ *)__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_25___iter__(__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_25___iter__, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; @@ -17832,13 +17278,12 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12CandidateSet_8__iter__(struct __pyx_obj __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); { - __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_5_cdec_12CandidateSet_10generator16, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_5_cdec_12CandidateSet_10generator19, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } - /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; @@ -17851,9 +17296,9 @@ static PyObject *__pyx_pf_4cdec_5_cdec_12CandidateSet_8__iter__(struct __pyx_obj return __pyx_r; } -static PyObject *__pyx_gb_4cdec_5_cdec_12CandidateSet_10generator16(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ +static PyObject *__pyx_gb_4cdec_5_cdec_12CandidateSet_10generator19(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__ *__pyx_cur_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__ *)__pyx_generator->closure); + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25___iter__ *__pyx_cur_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25___iter__ *)__pyx_generator->closure); PyObject *__pyx_r = NULL; Py_ssize_t __pyx_t_1; unsigned int __pyx_t_2; @@ -17873,7 +17318,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_12CandidateSet_10generator16(__pyx_Genera __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":92 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":92 * def __iter__(self): * cdef unsigned i * for i in range(len(self)): # <<<<<<<<<<<<<< @@ -17884,14 +17329,14 @@ static PyObject *__pyx_gb_4cdec_5_cdec_12CandidateSet_10generator16(__pyx_Genera for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) { __pyx_cur_scope->__pyx_v_i = __pyx_t_2; - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":93 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":93 * cdef unsigned i * for i in range(len(self)): * yield self[i] # <<<<<<<<<<<<<< * * def add_kbest(self, Hypergraph hypergraph, unsigned k): */ - __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_cur_scope->__pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_cur_scope->__pyx_v_i, sizeof(unsigned int)+1, PyLong_FromUnsignedLong, 0, 0, 1); if (!__pyx_t_3) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; @@ -17907,16 +17352,6 @@ static PyObject *__pyx_gb_4cdec_5_cdec_12CandidateSet_10generator16(__pyx_Genera __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":90 - * return candidate - * - * def __iter__(self): # <<<<<<<<<<<<<< - * cdef unsigned i - * for i in range(len(self)): - */ - - /* function exit code */ PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; @@ -17930,14 +17365,6 @@ static PyObject *__pyx_gb_4cdec_5_cdec_12CandidateSet_10generator16(__pyx_Genera return NULL; } -/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":95 - * yield self[i] - * - * def add_kbest(self, Hypergraph hypergraph, unsigned k): # <<<<<<<<<<<<<< - * """cs.add_kbest(Hypergraph hypergraph, int k) -> Extract K-best hypotheses - * from the hypergraph and add them to the candidate set.""" - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_12CandidateSet_12add_kbest(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4cdec_5_cdec_12CandidateSet_11add_kbest[] = "cs.add_kbest(Hypergraph hypergraph, int k) -> Extract K-best hypotheses \n from the hypergraph and add them to the candidate set."; @@ -17951,7 +17378,7 @@ static PyObject *__pyx_pw_4cdec_5_cdec_12CandidateSet_12add_kbest(PyObject *__py __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("add_kbest (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hypergraph,&__pyx_n_s_k,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__hypergraph,&__pyx_n_s__k,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; @@ -17965,10 +17392,10 @@ static PyObject *__pyx_pw_4cdec_5_cdec_12CandidateSet_12add_kbest(PyObject *__py kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_hypergraph)) != 0)) kw_args--; + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__hypergraph)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: - if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_k)) != 0)) kw_args--; + if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__k)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("add_kbest", 1, 2, 2, 1); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } @@ -17983,7 +17410,7 @@ static PyObject *__pyx_pw_4cdec_5_cdec_12CandidateSet_12add_kbest(PyObject *__py values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_hypergraph = ((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)values[0]); - __pyx_v_k = __Pyx_PyInt_As_unsigned_int(values[1]); if (unlikely((__pyx_v_k == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_k = __Pyx_PyInt_AsUnsignedInt(values[1]); if (unlikely((__pyx_v_k == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; @@ -17995,8 +17422,6 @@ static PyObject *__pyx_pw_4cdec_5_cdec_12CandidateSet_12add_kbest(PyObject *__py __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_hypergraph), __pyx_ptype_4cdec_5_cdec_Hypergraph, 1, "hypergraph", 0))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_4cdec_5_cdec_12CandidateSet_11add_kbest(((struct __pyx_obj_4cdec_5_cdec_CandidateSet *)__pyx_v_self), __pyx_v_hypergraph, __pyx_v_k); - - /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; @@ -18005,59 +17430,56 @@ static PyObject *__pyx_pw_4cdec_5_cdec_12CandidateSet_12add_kbest(PyObject *__py return __pyx_r; } -static PyObject *__pyx_pf_4cdec_5_cdec_12CandidateSet_11add_kbest(struct __pyx_obj_4cdec_5_cdec_CandidateSet *__pyx_v_self, struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_hypergraph, unsigned int __pyx_v_k) { - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("add_kbest", 0); - - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":98 +/* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":95 + * yield self[i] + * + * def add_kbest(self, Hypergraph hypergraph, unsigned k): # <<<<<<<<<<<<<< * """cs.add_kbest(Hypergraph hypergraph, int k) -> Extract K-best hypotheses * from the hypergraph and add them to the candidate set.""" - * self.cs.AddKBestCandidates(hypergraph.hg[0], k, self.scorer.get()) # <<<<<<<<<<<<<< - * - * cdef class SegmentEvaluator: */ - __pyx_v_self->cs->AddKBestCandidates((__pyx_v_hypergraph->hg[0]), __pyx_v_k, __pyx_v_self->scorer->get()); - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":95 - * yield self[i] - * - * def add_kbest(self, Hypergraph hypergraph, unsigned k): # <<<<<<<<<<<<<< +static PyObject *__pyx_pf_4cdec_5_cdec_12CandidateSet_11add_kbest(struct __pyx_obj_4cdec_5_cdec_CandidateSet *__pyx_v_self, struct __pyx_obj_4cdec_5_cdec_Hypergraph *__pyx_v_hypergraph, unsigned int __pyx_v_k) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("add_kbest", 0); + + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":98 * """cs.add_kbest(Hypergraph hypergraph, int k) -> Extract K-best hypotheses * from the hypergraph and add them to the candidate set.""" + * self.cs.AddKBestCandidates(hypergraph.hg[0], k, self.scorer.get()) # <<<<<<<<<<<<<< + * + * cdef class SegmentEvaluator: */ + __pyx_v_self->cs->AddKBestCandidates((__pyx_v_hypergraph->hg[0]), __pyx_v_k, __pyx_v_self->scorer->get()); - /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":104 - * cdef mteval.EvaluationMetric* metric - * - * def __dealloc__(self): # <<<<<<<<<<<<<< - * del self.scorer - * - */ - /* Python wrapper */ static void __pyx_pw_4cdec_5_cdec_16SegmentEvaluator_1__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_4cdec_5_cdec_16SegmentEvaluator_1__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_4cdec_5_cdec_16SegmentEvaluator___dealloc__(((struct __pyx_obj_4cdec_5_cdec_SegmentEvaluator *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); } -static void __pyx_pf_4cdec_5_cdec_16SegmentEvaluator___dealloc__(struct __pyx_obj_4cdec_5_cdec_SegmentEvaluator *__pyx_v_self) { +/* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":104 + * cdef mteval.EvaluationMetric* metric + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * del self.scorer + * + */ + +static void __pyx_pf_4cdec_5_cdec_16SegmentEvaluator___dealloc__(CYTHON_UNUSED struct __pyx_obj_4cdec_5_cdec_SegmentEvaluator *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":105 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":105 * * def __dealloc__(self): * del self.scorer # <<<<<<<<<<<<<< @@ -18066,26 +17488,9 @@ static void __pyx_pf_4cdec_5_cdec_16SegmentEvaluator___dealloc__(struct __pyx_ob */ delete __pyx_v_self->scorer; - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":104 - * cdef mteval.EvaluationMetric* metric - * - * def __dealloc__(self): # <<<<<<<<<<<<<< - * del self.scorer - * - */ - - /* function exit code */ __Pyx_RefNannyFinishContext(); } -/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":107 - * del self.scorer - * - * def evaluate(self, sentence): # <<<<<<<<<<<<<< - * """se.evaluate(sentence) -> SufficientStats for the given hypothesis.""" - * cdef vector[WordID] hyp - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_16SegmentEvaluator_3evaluate(PyObject *__pyx_v_self, PyObject *__pyx_v_sentence); /*proto*/ static char __pyx_doc_4cdec_5_cdec_16SegmentEvaluator_2evaluate[] = "se.evaluate(sentence) -> SufficientStats for the given hypothesis."; @@ -18094,12 +17499,18 @@ static PyObject *__pyx_pw_4cdec_5_cdec_16SegmentEvaluator_3evaluate(PyObject *__ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("evaluate (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_16SegmentEvaluator_2evaluate(((struct __pyx_obj_4cdec_5_cdec_SegmentEvaluator *)__pyx_v_self), ((PyObject *)__pyx_v_sentence)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":107 + * del self.scorer + * + * def evaluate(self, sentence): # <<<<<<<<<<<<<< + * """se.evaluate(sentence) -> SufficientStats for the given hypothesis.""" + * cdef vector[WordID] hyp + */ + static PyObject *__pyx_pf_4cdec_5_cdec_16SegmentEvaluator_2evaluate(struct __pyx_obj_4cdec_5_cdec_SegmentEvaluator *__pyx_v_self, PyObject *__pyx_v_sentence) { std::vector __pyx_v_hyp; struct __pyx_obj_4cdec_5_cdec_SufficientStats *__pyx_v_sf = 0; @@ -18114,19 +17525,19 @@ static PyObject *__pyx_pf_4cdec_5_cdec_16SegmentEvaluator_2evaluate(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("evaluate", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":110 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":110 * """se.evaluate(sentence) -> SufficientStats for the given hypothesis.""" * cdef vector[WordID] hyp * cdef SufficientStats sf = SufficientStats() # <<<<<<<<<<<<<< * sf.metric = self.metric * sf.stats = new mteval.SufficientStats() */ - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SufficientStats)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SufficientStats)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_sf = ((struct __pyx_obj_4cdec_5_cdec_SufficientStats *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":111 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":111 * cdef vector[WordID] hyp * cdef SufficientStats sf = SufficientStats() * sf.metric = self.metric # <<<<<<<<<<<<<< @@ -18136,7 +17547,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_16SegmentEvaluator_2evaluate(struct __pyx __pyx_t_2 = __pyx_v_self->metric; __pyx_v_sf->metric = __pyx_t_2; - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":112 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":112 * cdef SufficientStats sf = SufficientStats() * sf.metric = self.metric * sf.stats = new mteval.SufficientStats() # <<<<<<<<<<<<<< @@ -18145,26 +17556,26 @@ static PyObject *__pyx_pf_4cdec_5_cdec_16SegmentEvaluator_2evaluate(struct __pyx */ __pyx_v_sf->stats = new SufficientStats(); - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":113 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":113 * sf.metric = self.metric * sf.stats = new mteval.SufficientStats() * ConvertSentence(as_str(sentence.strip()), &hyp) # <<<<<<<<<<<<<< * self.scorer.get().Evaluate(hyp, sf.stats) * return sf */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sentence, __pyx_n_s_strip); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_sentence, __pyx_n_s__strip); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __pyx_f_4cdec_5_cdec_as_str(__pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = ((PyObject *)__pyx_f_4cdec_5_cdec_as_str(__pyx_t_3, NULL)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 113; __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_convert_string_from_py_(__pyx_t_1); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; TD::ConvertSentence(__pyx_t_4, (&__pyx_v_hyp)); - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":114 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":114 * sf.stats = new mteval.SufficientStats() * ConvertSentence(as_str(sentence.strip()), &hyp) * self.scorer.get().Evaluate(hyp, sf.stats) # <<<<<<<<<<<<<< @@ -18173,7 +17584,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_16SegmentEvaluator_2evaluate(struct __pyx */ __pyx_v_self->scorer->get()->Evaluate(__pyx_v_hyp, __pyx_v_sf->stats); - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":115 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":115 * ConvertSentence(as_str(sentence.strip()), &hyp) * self.scorer.get().Evaluate(hyp, sf.stats) * return sf # <<<<<<<<<<<<<< @@ -18185,15 +17596,8 @@ static PyObject *__pyx_pf_4cdec_5_cdec_16SegmentEvaluator_2evaluate(struct __pyx __pyx_r = ((PyObject *)__pyx_v_sf); goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":107 - * del self.scorer - * - * def evaluate(self, sentence): # <<<<<<<<<<<<<< - * """se.evaluate(sentence) -> SufficientStats for the given hypothesis.""" - * cdef vector[WordID] hyp - */ - - /* 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_3); @@ -18206,14 +17610,6 @@ static PyObject *__pyx_pf_4cdec_5_cdec_16SegmentEvaluator_2evaluate(struct __pyx return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":117 - * return sf - * - * def candidate_set(self): # <<<<<<<<<<<<<< - * """se.candidate_set() -> Candidate set using this segment evaluator for scoring.""" - * return CandidateSet(self) - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_16SegmentEvaluator_5candidate_set(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_4cdec_5_cdec_16SegmentEvaluator_4candidate_set[] = "se.candidate_set() -> Candidate set using this segment evaluator for scoring."; @@ -18222,12 +17618,18 @@ static PyObject *__pyx_pw_4cdec_5_cdec_16SegmentEvaluator_5candidate_set(PyObjec __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("candidate_set (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_16SegmentEvaluator_4candidate_set(((struct __pyx_obj_4cdec_5_cdec_SegmentEvaluator *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":117 + * return sf + * + * def candidate_set(self): # <<<<<<<<<<<<<< + * """se.candidate_set() -> Candidate set using this segment evaluator for scoring.""" + * return CandidateSet(self) + */ + static PyObject *__pyx_pf_4cdec_5_cdec_16SegmentEvaluator_4candidate_set(struct __pyx_obj_4cdec_5_cdec_SegmentEvaluator *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -18238,7 +17640,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_16SegmentEvaluator_4candidate_set(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("candidate_set", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":119 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":119 * def candidate_set(self): * """se.candidate_set() -> Candidate set using this segment evaluator for scoring.""" * return CandidateSet(self) # <<<<<<<<<<<<<< @@ -18251,22 +17653,15 @@ static PyObject *__pyx_pf_4cdec_5_cdec_16SegmentEvaluator_4candidate_set(struct __Pyx_INCREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_CandidateSet)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_CandidateSet)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":117 - * return sf - * - * def candidate_set(self): # <<<<<<<<<<<<<< - * """se.candidate_set() -> Candidate set using this segment evaluator for scoring.""" - * return CandidateSet(self) - */ - - /* 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); @@ -18278,14 +17673,6 @@ static PyObject *__pyx_pf_4cdec_5_cdec_16SegmentEvaluator_4candidate_set(struct return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":125 - * cdef mteval.EvaluationMetric* metric - * - * def __cinit__(self, bytes name=None): # <<<<<<<<<<<<<< - * if name: - * self.name = new string(name) - */ - /* Python wrapper */ static int __pyx_pw_4cdec_5_cdec_6Scorer_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_4cdec_5_cdec_6Scorer_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { @@ -18297,8 +17684,16 @@ static int __pyx_pw_4cdec_5_cdec_6Scorer_1__cinit__(PyObject *__pyx_v_self, PyOb __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__name,0}; PyObject* values[1] = {0}; + + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":125 + * cdef mteval.EvaluationMetric* metric + * + * def __cinit__(self, bytes name=None): # <<<<<<<<<<<<<< + * if name: + * self.name = new string(name) + */ values[0] = ((PyObject*)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; @@ -18312,7 +17707,7 @@ static int __pyx_pw_4cdec_5_cdec_6Scorer_1__cinit__(PyObject *__pyx_v_self, PyOb switch (pos_args) { case 0: if (kw_args > 0) { - PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name); + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__name); if (value) { values[0] = value; kw_args--; } } } @@ -18338,8 +17733,6 @@ static int __pyx_pw_4cdec_5_cdec_6Scorer_1__cinit__(PyObject *__pyx_v_self, PyOb __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyBytes_Type), 1, "name", 1))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_4cdec_5_cdec_6Scorer___cinit__(((struct __pyx_obj_4cdec_5_cdec_Scorer *)__pyx_v_self), __pyx_v_name); - - /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = -1; @@ -18359,24 +17752,24 @@ static int __pyx_pf_4cdec_5_cdec_6Scorer___cinit__(struct __pyx_obj_4cdec_5_cdec int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":126 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":126 * * def __cinit__(self, bytes name=None): * if name: # <<<<<<<<<<<<<< * self.name = new string(name) * self.metric = mteval.MetricInstance(self.name[0]) */ - __pyx_t_1 = (__pyx_v_name != Py_None) && (PyBytes_GET_SIZE(__pyx_v_name) != 0); + __pyx_t_1 = (((PyObject *)__pyx_v_name) != Py_None) && (PyBytes_GET_SIZE(((PyObject *)__pyx_v_name)) != 0); if (__pyx_t_1) { - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":127 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":127 * def __cinit__(self, bytes name=None): * if name: * self.name = new string(name) # <<<<<<<<<<<<<< * self.metric = mteval.MetricInstance(self.name[0]) * */ - __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_name); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_AsString(((PyObject *)__pyx_v_name)); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;} try { __pyx_t_3 = new std::string(__pyx_t_2); } catch(...) { @@ -18385,7 +17778,7 @@ static int __pyx_pf_4cdec_5_cdec_6Scorer___cinit__(struct __pyx_obj_4cdec_5_cdec } __pyx_v_self->name = __pyx_t_3; - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":128 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":128 * if name: * self.name = new string(name) * self.metric = mteval.MetricInstance(self.name[0]) # <<<<<<<<<<<<<< @@ -18397,15 +17790,6 @@ static int __pyx_pf_4cdec_5_cdec_6Scorer___cinit__(struct __pyx_obj_4cdec_5_cdec } __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":125 - * cdef mteval.EvaluationMetric* metric - * - * def __cinit__(self, bytes name=None): # <<<<<<<<<<<<<< - * if name: - * self.name = new string(name) - */ - - /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; @@ -18416,30 +17800,28 @@ static int __pyx_pf_4cdec_5_cdec_6Scorer___cinit__(struct __pyx_obj_4cdec_5_cdec return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":130 - * self.metric = mteval.MetricInstance(self.name[0]) - * - * def __dealloc__(self): # <<<<<<<<<<<<<< - * del self.name - * - */ - /* Python wrapper */ static void __pyx_pw_4cdec_5_cdec_6Scorer_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_4cdec_5_cdec_6Scorer_3__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_4cdec_5_cdec_6Scorer_2__dealloc__(((struct __pyx_obj_4cdec_5_cdec_Scorer *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); } -static void __pyx_pf_4cdec_5_cdec_6Scorer_2__dealloc__(struct __pyx_obj_4cdec_5_cdec_Scorer *__pyx_v_self) { +/* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":130 + * self.metric = mteval.MetricInstance(self.name[0]) + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * del self.name + * + */ + +static void __pyx_pf_4cdec_5_cdec_6Scorer_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cdec_5_cdec_Scorer *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":131 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":131 * * def __dealloc__(self): * del self.name # <<<<<<<<<<<<<< @@ -18448,26 +17830,9 @@ static void __pyx_pf_4cdec_5_cdec_6Scorer_2__dealloc__(struct __pyx_obj_4cdec_5_ */ delete __pyx_v_self->name; - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":130 - * self.metric = mteval.MetricInstance(self.name[0]) - * - * def __dealloc__(self): # <<<<<<<<<<<<<< - * del self.name - * - */ - - /* function exit code */ __Pyx_RefNannyFinishContext(); } -/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":133 - * del self.name - * - * def __call__(self, refs): # <<<<<<<<<<<<<< - * if isinstance(refs, basestring): - * refs = [refs] - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_6Scorer_5__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_6Scorer_5__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { @@ -18479,7 +17844,7 @@ static PyObject *__pyx_pw_4cdec_5_cdec_6Scorer_5__call__(PyObject *__pyx_v_self, __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__call__ (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_refs,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__refs,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; @@ -18492,7 +17857,7 @@ static PyObject *__pyx_pw_4cdec_5_cdec_6Scorer_5__call__(PyObject *__pyx_v_self, kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_refs)) != 0)) kw_args--; + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__refs)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { @@ -18514,12 +17879,18 @@ static PyObject *__pyx_pw_4cdec_5_cdec_6Scorer_5__call__(PyObject *__pyx_v_self, return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4cdec_5_cdec_6Scorer_4__call__(((struct __pyx_obj_4cdec_5_cdec_Scorer *)__pyx_v_self), __pyx_v_refs); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":133 + * del self.name + * + * def __call__(self, refs): # <<<<<<<<<<<<<< + * if isinstance(refs, basestring): + * refs = [refs] + */ + static PyObject *__pyx_pf_4cdec_5_cdec_6Scorer_4__call__(struct __pyx_obj_4cdec_5_cdec_Scorer *__pyx_v_self, PyObject *__pyx_v_refs) { std::vector > *__pyx_v_refsv; std::vector *__pyx_v_refv; @@ -18544,7 +17915,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_6Scorer_4__call__(struct __pyx_obj_4cdec_ __Pyx_RefNannySetupContext("__call__", 0); __Pyx_INCREF(__pyx_v_refs); - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":134 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":134 * * def __call__(self, refs): * if isinstance(refs, basestring): # <<<<<<<<<<<<<< @@ -18555,7 +17926,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_6Scorer_4__call__(struct __pyx_obj_4cdec_ __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":135 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":135 * def __call__(self, refs): * if isinstance(refs, basestring): * refs = [refs] # <<<<<<<<<<<<<< @@ -18567,13 +17938,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_6Scorer_4__call__(struct __pyx_obj_4cdec_ __Pyx_INCREF(__pyx_v_refs); PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_refs); __Pyx_GIVEREF(__pyx_v_refs); - __Pyx_DECREF_SET(__pyx_v_refs, __pyx_t_3); + __Pyx_DECREF(__pyx_v_refs); + __pyx_v_refs = ((PyObject *)__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L3; } __pyx_L3:; - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":136 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":136 * if isinstance(refs, basestring): * refs = [refs] * cdef vector[vector[WordID]]* refsv = new vector[vector[WordID]]() # <<<<<<<<<<<<<< @@ -18588,7 +17960,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_6Scorer_4__call__(struct __pyx_obj_4cdec_ } __pyx_v_refsv = __pyx_t_4; - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":138 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":138 * cdef vector[vector[WordID]]* refsv = new vector[vector[WordID]]() * cdef vector[WordID]* refv * for ref in refs: # <<<<<<<<<<<<<< @@ -18621,19 +17993,19 @@ static PyObject *__pyx_pf_4cdec_5_cdec_6Scorer_4__call__(struct __pyx_obj_4cdec_ } else { __pyx_t_7 = __pyx_t_6(__pyx_t_3); if (unlikely(!__pyx_t_7)) { - PyObject* exc_type = PyErr_Occurred(); - if (exc_type) { - if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + if (PyErr_Occurred()) { + if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[5]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } __Pyx_GOTREF(__pyx_t_7); } - __Pyx_XDECREF_SET(__pyx_v_ref, __pyx_t_7); + __Pyx_XDECREF(__pyx_v_ref); + __pyx_v_ref = __pyx_t_7; __pyx_t_7 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":139 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":139 * cdef vector[WordID]* refv * for ref in refs: * refv = new vector[WordID]() # <<<<<<<<<<<<<< @@ -18648,26 +18020,26 @@ static PyObject *__pyx_pf_4cdec_5_cdec_6Scorer_4__call__(struct __pyx_obj_4cdec_ } __pyx_v_refv = __pyx_t_8; - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":140 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":140 * for ref in refs: * refv = new vector[WordID]() * ConvertSentence(as_str(ref.strip()), refv) # <<<<<<<<<<<<<< * refsv.push_back(refv[0]) * del refv */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_ref, __pyx_n_s_strip); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_ref, __pyx_n_s__strip); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); - __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __pyx_f_4cdec_5_cdec_as_str(__pyx_t_9, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = ((PyObject *)__pyx_f_4cdec_5_cdec_as_str(__pyx_t_9, NULL)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_10 = __pyx_convert_string_from_py_(__pyx_t_7); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; TD::ConvertSentence(__pyx_t_10, __pyx_v_refv); - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":141 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":141 * refv = new vector[WordID]() * ConvertSentence(as_str(ref.strip()), refv) * refsv.push_back(refv[0]) # <<<<<<<<<<<<<< @@ -18676,7 +18048,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_6Scorer_4__call__(struct __pyx_obj_4cdec_ */ __pyx_v_refsv->push_back((__pyx_v_refv[0])); - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":142 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":142 * ConvertSentence(as_str(ref.strip()), refv) * refsv.push_back(refv[0]) * del refv # <<<<<<<<<<<<<< @@ -18687,19 +18059,19 @@ static PyObject *__pyx_pf_4cdec_5_cdec_6Scorer_4__call__(struct __pyx_obj_4cdec_ } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":144 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":144 * del refv * cdef unsigned i * cdef SegmentEvaluator evaluator = SegmentEvaluator() # <<<<<<<<<<<<<< * evaluator.metric = self.metric * evaluator.scorer = new shared_ptr[mteval.SegmentEvaluator]( */ - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SegmentEvaluator)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_SegmentEvaluator)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_v_evaluator = ((struct __pyx_obj_4cdec_5_cdec_SegmentEvaluator *)__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":145 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":145 * cdef unsigned i * cdef SegmentEvaluator evaluator = SegmentEvaluator() * evaluator.metric = self.metric # <<<<<<<<<<<<<< @@ -18709,7 +18081,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_6Scorer_4__call__(struct __pyx_obj_4cdec_ __pyx_t_11 = __pyx_v_self->metric; __pyx_v_evaluator->metric = __pyx_t_11; - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":146 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":146 * cdef SegmentEvaluator evaluator = SegmentEvaluator() * evaluator.metric = self.metric * evaluator.scorer = new shared_ptr[mteval.SegmentEvaluator]( # <<<<<<<<<<<<<< @@ -18718,7 +18090,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_6Scorer_4__call__(struct __pyx_obj_4cdec_ */ __pyx_v_evaluator->scorer = new boost::shared_ptr(__pyx_v_self->metric->CreateSegmentEvaluator((__pyx_v_refsv[0]))); - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":148 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":148 * evaluator.scorer = new shared_ptr[mteval.SegmentEvaluator]( * self.metric.CreateSegmentEvaluator(refsv[0])) * del refsv # in theory should not delete but store in SegmentEvaluator # <<<<<<<<<<<<<< @@ -18727,7 +18099,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_6Scorer_4__call__(struct __pyx_obj_4cdec_ */ delete __pyx_v_refsv; - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":149 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":149 * self.metric.CreateSegmentEvaluator(refsv[0])) * del refsv # in theory should not delete but store in SegmentEvaluator * return evaluator # <<<<<<<<<<<<<< @@ -18739,15 +18111,8 @@ static PyObject *__pyx_pf_4cdec_5_cdec_6Scorer_4__call__(struct __pyx_obj_4cdec_ __pyx_r = ((PyObject *)__pyx_v_evaluator); goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":133 - * del self.name - * - * def __call__(self, refs): # <<<<<<<<<<<<<< - * if isinstance(refs, basestring): - * refs = [refs] - */ - - /* 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_7); @@ -18763,14 +18128,6 @@ static PyObject *__pyx_pf_4cdec_5_cdec_6Scorer_4__call__(struct __pyx_obj_4cdec_ return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":151 - * return evaluator - * - * def __str__(self): # <<<<<<<<<<<<<< - * return str(self.name.c_str()) - * - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_6Scorer_7__str__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_6Scorer_7__str__(PyObject *__pyx_v_self) { @@ -18778,12 +18135,18 @@ static PyObject *__pyx_pw_4cdec_5_cdec_6Scorer_7__str__(PyObject *__pyx_v_self) __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__str__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_6Scorer_6__str__(((struct __pyx_obj_4cdec_5_cdec_Scorer *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":151 + * return evaluator + * + * def __str__(self): # <<<<<<<<<<<<<< + * return str(self.name.c_str()) + * + */ + static PyObject *__pyx_pf_4cdec_5_cdec_6Scorer_6__str__(struct __pyx_obj_4cdec_5_cdec_Scorer *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -18794,7 +18157,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_6Scorer_6__str__(struct __pyx_obj_4cdec_5 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__str__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":152 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":152 * * def __str__(self): * return str(self.name.c_str()) # <<<<<<<<<<<<<< @@ -18803,28 +18166,21 @@ static PyObject *__pyx_pf_4cdec_5_cdec_6Scorer_6__str__(struct __pyx_obj_4cdec_5 */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->name->c_str()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); + __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); - __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_1)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":151 - * return evaluator - * - * def __str__(self): # <<<<<<<<<<<<<< - * return str(self.name.c_str()) - * - */ - - /* 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); @@ -18836,7 +18192,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_6Scorer_6__str__(struct __pyx_obj_4cdec_5 return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":154 +/* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":154 * return str(self.name.c_str()) * * cdef float _compute_score(void* metric_, mteval.SufficientStats* stats): # <<<<<<<<<<<<<< @@ -18862,19 +18218,17 @@ static float __pyx_f_4cdec_5_cdec__compute_score(void *__pyx_v_metric_, Sufficie int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_compute_score", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":155 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":155 * * cdef float _compute_score(void* metric_, mteval.SufficientStats* stats): * cdef Metric metric = metric_ # <<<<<<<<<<<<<< * cdef list ss = [] * cdef unsigned i */ - __pyx_t_1 = ((PyObject *)__pyx_v_metric_); - __Pyx_INCREF(__pyx_t_1); - __pyx_v_metric = ((struct __pyx_obj_4cdec_5_cdec_Metric *)__pyx_t_1); - __pyx_t_1 = 0; + __Pyx_INCREF(((PyObject *)((struct __pyx_obj_4cdec_5_cdec_Metric *)__pyx_v_metric_))); + __pyx_v_metric = ((struct __pyx_obj_4cdec_5_cdec_Metric *)__pyx_v_metric_); - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":156 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":156 * cdef float _compute_score(void* metric_, mteval.SufficientStats* stats): * cdef Metric metric = metric_ * cdef list ss = [] # <<<<<<<<<<<<<< @@ -18886,7 +18240,7 @@ static float __pyx_f_4cdec_5_cdec__compute_score(void *__pyx_v_metric_, Sufficie __pyx_v_ss = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":158 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":158 * cdef list ss = [] * cdef unsigned i * for i in range(stats.size()): # <<<<<<<<<<<<<< @@ -18897,7 +18251,7 @@ static float __pyx_f_4cdec_5_cdec__compute_score(void *__pyx_v_metric_, Sufficie for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { __pyx_v_i = __pyx_t_3; - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":159 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":159 * cdef unsigned i * for i in range(stats.size()): * ss.append(stats[0][i]) # <<<<<<<<<<<<<< @@ -18910,43 +18264,36 @@ static float __pyx_f_4cdec_5_cdec__compute_score(void *__pyx_v_metric_, Sufficie __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":160 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":160 * for i in range(stats.size()): * ss.append(stats[0][i]) * return metric.score(ss) # <<<<<<<<<<<<<< * * cdef void _compute_sufficient_stats(void* metric_, */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_metric), __pyx_n_s_score); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_metric), __pyx_n_s__score); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_INCREF(__pyx_v_ss); - PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_ss); - __Pyx_GIVEREF(__pyx_v_ss); - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_INCREF(((PyObject *)__pyx_v_ss)); + PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_ss)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_ss)); + __pyx_t_6 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; __pyx_t_7 = __pyx_PyFloat_AsFloat(__pyx_t_6); if (unlikely((__pyx_t_7 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_r = __pyx_t_7; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":154 - * return str(self.name.c_str()) - * - * cdef float _compute_score(void* metric_, mteval.SufficientStats* stats): # <<<<<<<<<<<<<< - * cdef Metric metric = metric_ - * cdef list ss = [] - */ - - /* function exit code */ + __pyx_r = 0; + goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); - __Pyx_WriteUnraisable("cdec._cdec._compute_score", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); + __Pyx_WriteUnraisable("cdec._cdec._compute_score", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_metric); @@ -18955,7 +18302,7 @@ static float __pyx_f_4cdec_5_cdec__compute_score(void *__pyx_v_metric_, Sufficie return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":162 +/* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":162 * return metric.score(ss) * * cdef void _compute_sufficient_stats(void* metric_, # <<<<<<<<<<<<<< @@ -18982,19 +18329,17 @@ static void __pyx_f_4cdec_5_cdec__compute_sufficient_stats(void *__pyx_v_metric_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_compute_sufficient_stats", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":166 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":166 * vector[string]* refs, * mteval.SufficientStats* out): * cdef Metric metric = metric_ # <<<<<<<<<<<<<< * cdef list refs_ = [] * cdef unsigned i */ - __pyx_t_1 = ((PyObject *)__pyx_v_metric_); - __Pyx_INCREF(__pyx_t_1); - __pyx_v_metric = ((struct __pyx_obj_4cdec_5_cdec_Metric *)__pyx_t_1); - __pyx_t_1 = 0; + __Pyx_INCREF(((PyObject *)((struct __pyx_obj_4cdec_5_cdec_Metric *)__pyx_v_metric_))); + __pyx_v_metric = ((struct __pyx_obj_4cdec_5_cdec_Metric *)__pyx_v_metric_); - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":167 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":167 * mteval.SufficientStats* out): * cdef Metric metric = metric_ * cdef list refs_ = [] # <<<<<<<<<<<<<< @@ -19006,7 +18351,7 @@ static void __pyx_f_4cdec_5_cdec__compute_sufficient_stats(void *__pyx_v_metric_ __pyx_v_refs_ = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":169 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":169 * cdef list refs_ = [] * cdef unsigned i * for i in range(refs.size()): # <<<<<<<<<<<<<< @@ -19017,7 +18362,7 @@ static void __pyx_f_4cdec_5_cdec__compute_sufficient_stats(void *__pyx_v_metric_ for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { __pyx_v_i = __pyx_t_3; - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":170 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":170 * cdef unsigned i * for i in range(refs.size()): * refs_.append(str(refs[0][i].c_str())) # <<<<<<<<<<<<<< @@ -19025,116 +18370,107 @@ static void __pyx_f_4cdec_5_cdec__compute_sufficient_stats(void *__pyx_v_metric_ * out.fields.resize(len(ss)) */ __pyx_t_1 = __Pyx_PyBytes_FromString(((__pyx_v_refs[0])[__pyx_v_i]).c_str()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); + __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); - __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_1)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_refs_, __pyx_t_1); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":171 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":171 * for i in range(refs.size()): * refs_.append(str(refs[0][i].c_str())) * cdef list ss = metric.evaluate(str(hyp.c_str()), refs_) # <<<<<<<<<<<<<< * out.fields.resize(len(ss)) * for i in range(len(ss)): */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_metric), __pyx_n_s_evaluate); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_metric), __pyx_n_s__evaluate); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_hyp->c_str()); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); + __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); - __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_4)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); - __Pyx_INCREF(__pyx_v_refs_); - PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_refs_); - __Pyx_GIVEREF(__pyx_v_refs_); + __Pyx_INCREF(((PyObject *)__pyx_v_refs_)); + PyTuple_SET_ITEM(__pyx_t_6, 1, ((PyObject *)__pyx_v_refs_)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_refs_)); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (!(likely(PyList_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_4)->tp_name), 0))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; + if (!(likely(PyList_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected list, got %.200s", Py_TYPE(__pyx_t_4)->tp_name), 0))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ss = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":172 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":172 * refs_.append(str(refs[0][i].c_str())) * cdef list ss = metric.evaluate(str(hyp.c_str()), refs_) * out.fields.resize(len(ss)) # <<<<<<<<<<<<<< * for i in range(len(ss)): * out.fields[i] = ss[i] */ - if (unlikely(__pyx_v_ss == Py_None)) { + if (unlikely(((PyObject *)__pyx_v_ss) == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_7 = PyList_GET_SIZE(__pyx_v_ss); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = PyList_GET_SIZE(((PyObject *)__pyx_v_ss)); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_out->fields.resize(__pyx_t_7); - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":173 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":173 * cdef list ss = metric.evaluate(str(hyp.c_str()), refs_) * out.fields.resize(len(ss)) * for i in range(len(ss)): # <<<<<<<<<<<<<< * out.fields[i] = ss[i] * */ - if (unlikely(__pyx_v_ss == Py_None)) { + if (unlikely(((PyObject *)__pyx_v_ss) == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_7 = PyList_GET_SIZE(__pyx_v_ss); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = PyList_GET_SIZE(((PyObject *)__pyx_v_ss)); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_7; __pyx_t_3+=1) { __pyx_v_i = __pyx_t_3; - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":174 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":174 * out.fields.resize(len(ss)) * for i in range(len(ss)): * out.fields[i] = ss[i] # <<<<<<<<<<<<<< * * cdef class Metric: */ - if (unlikely(__pyx_v_ss == Py_None)) { + if (unlikely(((PyObject *)__pyx_v_ss) == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_ss, __pyx_v_i, unsigned int, 0, __Pyx_PyInt_From_unsigned_int, 1, 0, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_t_4 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_ss), __pyx_v_i, sizeof(unsigned int)+1, PyLong_FromUnsignedLong, 1, 0, 1); if (!__pyx_t_4) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = __pyx_PyFloat_AsFloat(__pyx_t_4); if (unlikely((__pyx_t_8 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; (__pyx_v_out->fields[__pyx_v_i]) = __pyx_t_8; } - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":162 - * return metric.score(ss) - * - * cdef void _compute_sufficient_stats(void* metric_, # <<<<<<<<<<<<<< - * string* hyp, - * vector[string]* refs, - */ - - /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); - __Pyx_WriteUnraisable("cdec._cdec._compute_sufficient_stats", __pyx_clineno, __pyx_lineno, __pyx_filename, 0); + __Pyx_WriteUnraisable("cdec._cdec._compute_sufficient_stats", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF((PyObject *)__pyx_v_metric); __Pyx_XDECREF(__pyx_v_refs_); @@ -19142,14 +18478,6 @@ static void __pyx_f_4cdec_5_cdec__compute_sufficient_stats(void *__pyx_v_metric_ __Pyx_RefNannyFinishContext(); } -/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":178 - * cdef class Metric: - * cdef Scorer scorer - * def __cinit__(self): # <<<<<<<<<<<<<< - * self.scorer = Scorer() - * cdef bytes class_name = self.__class__.__name__ - */ - /* Python wrapper */ static int __pyx_pw_4cdec_5_cdec_6Metric_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_4cdec_5_cdec_6Metric_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { @@ -19160,12 +18488,18 @@ static int __pyx_pw_4cdec_5_cdec_6Metric_1__cinit__(PyObject *__pyx_v_self, PyOb __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;} if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1; __pyx_r = __pyx_pf_4cdec_5_cdec_6Metric___cinit__(((struct __pyx_obj_4cdec_5_cdec_Metric *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":178 + * cdef class Metric: + * cdef Scorer scorer + * def __cinit__(self): # <<<<<<<<<<<<<< + * self.scorer = Scorer() + * cdef bytes class_name = self.__class__.__name__ + */ + static int __pyx_pf_4cdec_5_cdec_6Metric___cinit__(struct __pyx_obj_4cdec_5_cdec_Metric *__pyx_v_self) { PyObject *__pyx_v_class_name = 0; int __pyx_r; @@ -19179,14 +18513,14 @@ static int __pyx_pf_4cdec_5_cdec_6Metric___cinit__(struct __pyx_obj_4cdec_5_cdec int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":179 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":179 * cdef Scorer scorer * def __cinit__(self): * self.scorer = Scorer() # <<<<<<<<<<<<<< * cdef bytes class_name = self.__class__.__name__ * self.scorer.name = new string(class_name) */ - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_Scorer)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_Scorer)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->scorer); @@ -19194,30 +18528,30 @@ static int __pyx_pf_4cdec_5_cdec_6Metric___cinit__(struct __pyx_obj_4cdec_5_cdec __pyx_v_self->scorer = ((struct __pyx_obj_4cdec_5_cdec_Scorer *)__pyx_t_1); __pyx_t_1 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":180 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":180 * def __cinit__(self): * self.scorer = Scorer() * cdef bytes class_name = self.__class__.__name__ # <<<<<<<<<<<<<< * self.scorer.name = new string(class_name) * self.scorer.metric = mteval.PyMetricInstance(self.scorer.name[0], */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s____class__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s____name__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_class_name = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":181 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":181 * self.scorer = Scorer() * cdef bytes class_name = self.__class__.__name__ * self.scorer.name = new string(class_name) # <<<<<<<<<<<<<< * self.scorer.metric = mteval.PyMetricInstance(self.scorer.name[0], * self, _compute_sufficient_stats, _compute_score) */ - __pyx_t_3 = __Pyx_PyObject_AsString(__pyx_v_class_name); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_AsString(((PyObject *)__pyx_v_class_name)); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} try { __pyx_t_4 = new std::string(__pyx_t_3); } catch(...) { @@ -19226,7 +18560,7 @@ static int __pyx_pf_4cdec_5_cdec_6Metric___cinit__(struct __pyx_obj_4cdec_5_cdec } __pyx_v_self->scorer->name = __pyx_t_4; - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":182 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":182 * cdef bytes class_name = self.__class__.__name__ * self.scorer.name = new string(class_name) * self.scorer.metric = mteval.PyMetricInstance(self.scorer.name[0], # <<<<<<<<<<<<<< @@ -19235,15 +18569,6 @@ static int __pyx_pf_4cdec_5_cdec_6Metric___cinit__(struct __pyx_obj_4cdec_5_cdec */ __pyx_v_self->scorer->metric = PythonEvaluationMetric::Instance((__pyx_v_self->scorer->name[0]), ((void *)__pyx_v_self), __pyx_f_4cdec_5_cdec__compute_sufficient_stats, __pyx_f_4cdec_5_cdec__compute_score); - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":178 - * cdef class Metric: - * cdef Scorer scorer - * def __cinit__(self): # <<<<<<<<<<<<<< - * self.scorer = Scorer() - * cdef bytes class_name = self.__class__.__name__ - */ - - /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; @@ -19257,14 +18582,6 @@ static int __pyx_pf_4cdec_5_cdec_6Metric___cinit__(struct __pyx_obj_4cdec_5_cdec return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":185 - * self, _compute_sufficient_stats, _compute_score) - * - * def __call__(self, refs): # <<<<<<<<<<<<<< - * return self.scorer(refs) - * - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_6Metric_3__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_6Metric_3__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { @@ -19276,7 +18593,7 @@ static PyObject *__pyx_pw_4cdec_5_cdec_6Metric_3__call__(PyObject *__pyx_v_self, __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__call__ (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_refs,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__refs,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; @@ -19289,7 +18606,7 @@ static PyObject *__pyx_pw_4cdec_5_cdec_6Metric_3__call__(PyObject *__pyx_v_self, kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_refs)) != 0)) kw_args--; + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__refs)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { @@ -19311,12 +18628,18 @@ static PyObject *__pyx_pw_4cdec_5_cdec_6Metric_3__call__(PyObject *__pyx_v_self, return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4cdec_5_cdec_6Metric_2__call__(((struct __pyx_obj_4cdec_5_cdec_Metric *)__pyx_v_self), __pyx_v_refs); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":185 + * self, _compute_sufficient_stats, _compute_score) + * + * def __call__(self, refs): # <<<<<<<<<<<<<< + * return self.scorer(refs) + * + */ + static PyObject *__pyx_pf_4cdec_5_cdec_6Metric_2__call__(struct __pyx_obj_4cdec_5_cdec_Metric *__pyx_v_self, PyObject *__pyx_v_refs) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -19327,7 +18650,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_6Metric_2__call__(struct __pyx_obj_4cdec_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__call__", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":186 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":186 * * def __call__(self, refs): * return self.scorer(refs) # <<<<<<<<<<<<<< @@ -19340,22 +18663,15 @@ static PyObject *__pyx_pf_4cdec_5_cdec_6Metric_2__call__(struct __pyx_obj_4cdec_ __Pyx_INCREF(__pyx_v_refs); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_refs); __Pyx_GIVEREF(__pyx_v_refs); - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_v_self->scorer), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_Call(((PyObject *)__pyx_v_self->scorer), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":185 - * self, _compute_sufficient_stats, _compute_score) - * - * def __call__(self, refs): # <<<<<<<<<<<<<< - * return self.scorer(refs) - * - */ - - /* 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); @@ -19367,14 +18683,6 @@ static PyObject *__pyx_pf_4cdec_5_cdec_6Metric_2__call__(struct __pyx_obj_4cdec_ return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":188 - * return self.scorer(refs) - * - * def score(SufficientStats stats): # <<<<<<<<<<<<<< - * return 0 - * - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_6Metric_5score(PyObject *__pyx_v_stats, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_6Metric_5score(PyObject *__pyx_v_stats, CYTHON_UNUSED PyObject *unused) { @@ -19382,18 +18690,24 @@ static PyObject *__pyx_pw_4cdec_5_cdec_6Metric_5score(PyObject *__pyx_v_stats, C __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("score (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_6Metric_4score(((struct __pyx_obj_4cdec_5_cdec_Metric *)__pyx_v_stats)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":188 + * return self.scorer(refs) + * + * def score(SufficientStats stats): # <<<<<<<<<<<<<< + * return 0 + * + */ + static PyObject *__pyx_pf_4cdec_5_cdec_6Metric_4score(CYTHON_UNUSED struct __pyx_obj_4cdec_5_cdec_Metric *__pyx_v_stats) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("score", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":189 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":189 * * def score(SufficientStats stats): * return 0 # <<<<<<<<<<<<<< @@ -19405,29 +18719,13 @@ static PyObject *__pyx_pf_4cdec_5_cdec_6Metric_4score(CYTHON_UNUSED struct __pyx __pyx_r = __pyx_int_0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":188 - * return self.scorer(refs) - * - * def score(SufficientStats stats): # <<<<<<<<<<<<<< - * return 0 - * - */ - - /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":191 - * return 0 - * - * def evaluate(self, hyp, refs): # <<<<<<<<<<<<<< - * return [] - * - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_6Metric_7evaluate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_6Metric_7evaluate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { @@ -19440,7 +18738,7 @@ static PyObject *__pyx_pw_4cdec_5_cdec_6Metric_7evaluate(PyObject *__pyx_v_self, __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("evaluate (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hyp,&__pyx_n_s_refs,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__hyp,&__pyx_n_s__refs,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; @@ -19454,10 +18752,10 @@ static PyObject *__pyx_pw_4cdec_5_cdec_6Metric_7evaluate(PyObject *__pyx_v_self, kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_hyp)) != 0)) kw_args--; + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__hyp)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: - if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_refs)) != 0)) kw_args--; + if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__refs)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("evaluate", 1, 2, 2, 1); {__pyx_filename = __pyx_f[5]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } @@ -19483,12 +18781,18 @@ static PyObject *__pyx_pw_4cdec_5_cdec_6Metric_7evaluate(PyObject *__pyx_v_self, return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4cdec_5_cdec_6Metric_6evaluate(((struct __pyx_obj_4cdec_5_cdec_Metric *)__pyx_v_self), __pyx_v_hyp, __pyx_v_refs); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":191 + * return 0 + * + * def evaluate(self, hyp, refs): # <<<<<<<<<<<<<< + * return [] + * + */ + static PyObject *__pyx_pf_4cdec_5_cdec_6Metric_6evaluate(CYTHON_UNUSED struct __pyx_obj_4cdec_5_cdec_Metric *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_hyp, CYTHON_UNUSED PyObject *__pyx_v_refs) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -19498,7 +18802,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_6Metric_6evaluate(CYTHON_UNUSED struct __ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("evaluate", 0); - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":192 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":192 * * def evaluate(self, hyp, refs): * return [] # <<<<<<<<<<<<<< @@ -19508,19 +18812,12 @@ static PyObject *__pyx_pf_4cdec_5_cdec_6Metric_6evaluate(CYTHON_UNUSED struct __ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; + __pyx_r = ((PyObject *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":191 - * return 0 - * - * def evaluate(self, hyp, refs): # <<<<<<<<<<<<<< - * return [] - * - */ - - /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("cdec._cdec.Metric.evaluate", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -19531,14 +18828,6 @@ static PyObject *__pyx_pf_4cdec_5_cdec_6Metric_6evaluate(CYTHON_UNUSED struct __ return __pyx_r; } -/* "cdec/_cdec.pyx":28 - * class ParseFailed(Exception): pass - * - * def set_silent(yn): # <<<<<<<<<<<<<< - * """set_silent(bool): Configure the verbosity of cdec.""" - * SetSilent(yn) - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_3set_silent(PyObject *__pyx_self, PyObject *__pyx_v_yn); /*proto*/ static char __pyx_doc_4cdec_5_cdec_2set_silent[] = "set_silent(bool): Configure the verbosity of cdec."; @@ -19548,12 +18837,18 @@ static PyObject *__pyx_pw_4cdec_5_cdec_3set_silent(PyObject *__pyx_self, PyObjec __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_silent (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_2set_silent(__pyx_self, ((PyObject *)__pyx_v_yn)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "cdec/_cdec.pyx":28 + * class ParseFailed(Exception): pass + * + * def set_silent(yn): # <<<<<<<<<<<<<< + * """set_silent(bool): Configure the verbosity of cdec.""" + * SetSilent(yn) + */ + static PyObject *__pyx_pf_4cdec_5_cdec_2set_silent(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_yn) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -19573,15 +18868,6 @@ static PyObject *__pyx_pf_4cdec_5_cdec_2set_silent(CYTHON_UNUSED PyObject *__pyx __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_yn); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;} SetSilent(__pyx_t_1); - /* "cdec/_cdec.pyx":28 - * class ParseFailed(Exception): pass - * - * def set_silent(yn): # <<<<<<<<<<<<<< - * """set_silent(bool): Configure the verbosity of cdec.""" - * SetSilent(yn) - */ - - /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; @@ -19592,15 +18878,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_2set_silent(CYTHON_UNUSED PyObject *__pyx __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_gb_4cdec_5_cdec_6generator17(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ - -/* "cdec/_cdec.pyx":32 - * SetSilent(yn) - * - * def _make_config(config): # <<<<<<<<<<<<<< - * for key, value in config.items(): - * if isinstance(value, dict): - */ +static PyObject *__pyx_gb_4cdec_5_cdec_6generator20(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_5_make_config(PyObject *__pyx_self, PyObject *__pyx_v_config); /*proto*/ @@ -19610,21 +18888,27 @@ static PyObject *__pyx_pw_4cdec_5_cdec_5_make_config(PyObject *__pyx_self, PyObj __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_make_config (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_4_make_config(__pyx_self, ((PyObject *)__pyx_v_config)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "cdec/_cdec.pyx":32 + * SetSilent(yn) + * + * def _make_config(config): # <<<<<<<<<<<<<< + * for key, value in config.items(): + * if isinstance(value, dict): + */ + static PyObject *__pyx_pf_4cdec_5_cdec_4_make_config(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_config) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config *__pyx_cur_scope; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_26__make_config *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("_make_config", 0); - __pyx_cur_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config *)__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_23__make_config(__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_23__make_config, __pyx_empty_tuple, NULL); + __pyx_cur_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_26__make_config *)__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_26__make_config(__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_26__make_config, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; @@ -19634,13 +18918,12 @@ static PyObject *__pyx_pf_4cdec_5_cdec_4_make_config(CYTHON_UNUSED PyObject *__p __Pyx_INCREF(__pyx_cur_scope->__pyx_v_config); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_config); { - __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_5_cdec_6generator17, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_5_cdec_6generator20, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } - /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; @@ -19653,9 +18936,9 @@ static PyObject *__pyx_pf_4cdec_5_cdec_4_make_config(CYTHON_UNUSED PyObject *__p return __pyx_r; } -static PyObject *__pyx_gb_4cdec_5_cdec_6generator17(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ +static PyObject *__pyx_gb_4cdec_5_cdec_6generator20(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config *__pyx_cur_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config *)__pyx_generator->closure); + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_26__make_config *__pyx_cur_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_26__make_config *)__pyx_generator->closure); PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -19694,9 +18977,9 @@ static PyObject *__pyx_gb_4cdec_5_cdec_6generator17(__pyx_GeneratorObject *__pyx * if isinstance(value, dict): * for name, info in value.items(): */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_config, __pyx_n_s_items); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_config, __pyx_n_s__items); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) { @@ -19726,9 +19009,8 @@ static PyObject *__pyx_gb_4cdec_5_cdec_6generator17(__pyx_GeneratorObject *__pyx } else { __pyx_t_2 = __pyx_t_4(__pyx_t_1); if (unlikely(!__pyx_t_2)) { - PyObject* exc_type = PyErr_Occurred(); - if (exc_type) { - if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + if (PyErr_Occurred()) { + if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; @@ -19764,7 +19046,8 @@ static PyObject *__pyx_gb_4cdec_5_cdec_6generator17(__pyx_GeneratorObject *__pyx __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - } else { + } else + { Py_ssize_t index = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); @@ -19786,12 +19069,14 @@ static PyObject *__pyx_gb_4cdec_5_cdec_6generator17(__pyx_GeneratorObject *__pyx __pyx_L7_unpacking_done:; } __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_key); - __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_key, __pyx_t_5); + __Pyx_XDECREF(__pyx_cur_scope->__pyx_v_key); __Pyx_GIVEREF(__pyx_t_5); + __pyx_cur_scope->__pyx_v_key = __pyx_t_5; __pyx_t_5 = 0; __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_value); - __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_value, __pyx_t_6); + __Pyx_XDECREF(__pyx_cur_scope->__pyx_v_value); __Pyx_GIVEREF(__pyx_t_6); + __pyx_cur_scope->__pyx_v_value = __pyx_t_6; __pyx_t_6 = 0; /* "cdec/_cdec.pyx":34 @@ -19812,9 +19097,9 @@ static PyObject *__pyx_gb_4cdec_5_cdec_6generator17(__pyx_GeneratorObject *__pyx * yield key, '%s %s' % (name, info) * elif isinstance(value, list): */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_value, __pyx_n_s_items); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_value, __pyx_n_s__items); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyList_CheckExact(__pyx_t_6) || PyTuple_CheckExact(__pyx_t_6)) { @@ -19844,9 +19129,8 @@ static PyObject *__pyx_gb_4cdec_5_cdec_6generator17(__pyx_GeneratorObject *__pyx } else { __pyx_t_6 = __pyx_t_12(__pyx_t_2); 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(); + if (PyErr_Occurred()) { + if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; @@ -19882,7 +19166,8 @@ static PyObject *__pyx_gb_4cdec_5_cdec_6generator17(__pyx_GeneratorObject *__pyx __Pyx_GOTREF(__pyx_t_7); #endif __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else { + } else + { Py_ssize_t index = -1; __pyx_t_13 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_13); @@ -19904,12 +19189,14 @@ static PyObject *__pyx_gb_4cdec_5_cdec_6generator17(__pyx_GeneratorObject *__pyx __pyx_L12_unpacking_done:; } __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_name); - __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_name, __pyx_t_5); + __Pyx_XDECREF(__pyx_cur_scope->__pyx_v_name); __Pyx_GIVEREF(__pyx_t_5); + __pyx_cur_scope->__pyx_v_name = __pyx_t_5; __pyx_t_5 = 0; __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_info); - __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_info, __pyx_t_7); + __Pyx_XDECREF(__pyx_cur_scope->__pyx_v_info); __Pyx_GIVEREF(__pyx_t_7); + __pyx_cur_scope->__pyx_v_info = __pyx_t_7; __pyx_t_7 = 0; /* "cdec/_cdec.pyx":36 @@ -19927,18 +19214,18 @@ static PyObject *__pyx_gb_4cdec_5_cdec_6generator17(__pyx_GeneratorObject *__pyx __Pyx_INCREF(__pyx_cur_scope->__pyx_v_info); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_cur_scope->__pyx_v_info); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_info); - __pyx_t_7 = __Pyx_PyString_Format(__pyx_kp_s_s_s_2, __pyx_t_6); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_7 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_46), ((PyObject *)__pyx_t_6)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_7)); + __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_key); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_cur_scope->__pyx_v_key); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_key); - PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_7); - __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_6, 1, ((PyObject *)__pyx_t_7)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; - __pyx_r = __pyx_t_6; + __pyx_r = ((PyObject *)__pyx_t_6); __pyx_t_6 = 0; __Pyx_XGIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_t_0 = __pyx_t_1; @@ -20014,9 +19301,8 @@ static PyObject *__pyx_gb_4cdec_5_cdec_6generator17(__pyx_GeneratorObject *__pyx } else { __pyx_t_6 = __pyx_t_12(__pyx_t_2); 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(); + if (PyErr_Occurred()) { + if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; @@ -20024,8 +19310,9 @@ static PyObject *__pyx_gb_4cdec_5_cdec_6generator17(__pyx_GeneratorObject *__pyx __Pyx_GOTREF(__pyx_t_6); } __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_name); - __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_name, __pyx_t_6); + __Pyx_XDECREF(__pyx_cur_scope->__pyx_v_name); __Pyx_GIVEREF(__pyx_t_6); + __pyx_cur_scope->__pyx_v_name = __pyx_t_6; __pyx_t_6 = 0; /* "cdec/_cdec.pyx":39 @@ -20043,7 +19330,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_6generator17(__pyx_GeneratorObject *__pyx __Pyx_INCREF(__pyx_cur_scope->__pyx_v_name); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_cur_scope->__pyx_v_name); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_name); - __pyx_r = __pyx_t_6; + __pyx_r = ((PyObject *)__pyx_t_6); __pyx_t_6 = 0; __Pyx_XGIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_t_0 = __pyx_t_1; @@ -20088,9 +19375,9 @@ static PyObject *__pyx_gb_4cdec_5_cdec_6generator17(__pyx_GeneratorObject *__pyx __Pyx_INCREF(__pyx_cur_scope->__pyx_v_value); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_cur_scope->__pyx_v_value); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_value); - __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 41; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_key); @@ -20099,7 +19386,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_6generator17(__pyx_GeneratorObject *__pyx PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_r = __pyx_t_2; + __pyx_r = ((PyObject *)__pyx_t_2); __pyx_t_2 = 0; __Pyx_XGIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_t_0 = __pyx_t_1; @@ -20121,16 +19408,6 @@ static PyObject *__pyx_gb_4cdec_5_cdec_6generator17(__pyx_GeneratorObject *__pyx __pyx_L8:; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "cdec/_cdec.pyx":32 - * SetSilent(yn) - * - * def _make_config(config): # <<<<<<<<<<<<<< - * for key, value in config.items(): - * if isinstance(value, dict): - */ - - /* function exit code */ PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; @@ -20149,14 +19426,6 @@ static PyObject *__pyx_gb_4cdec_5_cdec_6generator17(__pyx_GeneratorObject *__pyx return NULL; } -/* "cdec/_cdec.pyx":47 - * cdef DenseVector weights - * - * def __init__(self, config_str=None, **config): # <<<<<<<<<<<<<< - * """Decoder('formalism = scfg') -> initialize from configuration string - * Decoder(formalism='scfg') -> initialize from named parameters - */ - /* Python wrapper */ static int __pyx_pw_4cdec_5_cdec_7Decoder_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4cdec_5_cdec_7Decoder___init__[] = "Decoder('formalism = scfg') -> initialize from configuration string\n Decoder(formalism='scfg') -> initialize from named parameters\n Create a decoder using a given configuration. Formalism is required."; @@ -20175,8 +19444,16 @@ static int __pyx_pw_4cdec_5_cdec_7Decoder_1__init__(PyObject *__pyx_v_self, PyOb __pyx_v_config = PyDict_New(); if (unlikely(!__pyx_v_config)) return -1; __Pyx_GOTREF(__pyx_v_config); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_config_str,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__config_str,0}; PyObject* values[1] = {0}; + + /* "cdec/_cdec.pyx":47 + * cdef DenseVector weights + * + * def __init__(self, config_str=None, **config): # <<<<<<<<<<<<<< + * """Decoder('formalism = scfg') -> initialize from configuration string + * Decoder(formalism='scfg') -> initialize from named parameters + */ values[0] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; @@ -20190,7 +19467,7 @@ static int __pyx_pw_4cdec_5_cdec_7Decoder_1__init__(PyObject *__pyx_v_self, PyOb switch (pos_args) { case 0: if (kw_args > 0) { - PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_config_str); + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__config_str); if (value) { values[0] = value; kw_args--; } } } @@ -20216,13 +19493,11 @@ static int __pyx_pw_4cdec_5_cdec_7Decoder_1__init__(PyObject *__pyx_v_self, PyOb return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4cdec_5_cdec_7Decoder___init__(((struct __pyx_obj_4cdec_5_cdec_Decoder *)__pyx_v_self), __pyx_v_config_str, __pyx_v_config); - - /* function exit code */ __Pyx_XDECREF(__pyx_v_config); __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_gb_4cdec_5_cdec_7Decoder_8__init___2generator21(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ +static PyObject *__pyx_gb_4cdec_5_cdec_7Decoder_8__init___2generator24(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ /* "cdec/_cdec.pyx":56 * 'csplit', 'tagger', 'lexalign'): @@ -20233,30 +19508,29 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7Decoder_8__init___2generator21(__pyx_Gen */ static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_8__init___genexpr(PyObject *__pyx_self) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr *__pyx_cur_scope; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_28_genexpr *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("genexpr", 0); - __pyx_cur_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr *)__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_25_genexpr(__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_25_genexpr, __pyx_empty_tuple, NULL); + __pyx_cur_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_28_genexpr *)__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_28_genexpr(__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_28_genexpr, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; } __Pyx_GOTREF(__pyx_cur_scope); - __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__ *) __pyx_self; + __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_27___init__ *) __pyx_self; __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); { - __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_5_cdec_7Decoder_8__init___2generator21, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_4cdec_5_cdec_7Decoder_8__init___2generator24, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } - /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; @@ -20269,9 +19543,9 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_8__init___genexpr(PyObject *__py return __pyx_r; } -static PyObject *__pyx_gb_4cdec_5_cdec_7Decoder_8__init___2generator21(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ +static PyObject *__pyx_gb_4cdec_5_cdec_7Decoder_8__init___2generator24(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr *__pyx_cur_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr *)__pyx_generator->closure); + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_28_genexpr *__pyx_cur_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_28_genexpr *)__pyx_generator->closure); PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; @@ -20292,18 +19566,18 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7Decoder_8__init___2generator21(__pyx_Gen } __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_make_config); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s___make_config); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_config)) { __Pyx_RaiseClosureNameError("config"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_INCREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_config); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_config); - __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_config); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope->__pyx_v_config)); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_cur_scope->__pyx_outer_scope->__pyx_v_config)); + __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope->__pyx_v_config)); + __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; if (PyList_CheckExact(__pyx_t_3) || PyTuple_CheckExact(__pyx_t_3)) { __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; __pyx_t_5 = NULL; @@ -20331,9 +19605,8 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7Decoder_8__init___2generator21(__pyx_Gen } else { __pyx_t_3 = __pyx_t_5(__pyx_t_2); if (unlikely(!__pyx_t_3)) { - PyObject* exc_type = PyErr_Occurred(); - if (exc_type) { - if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + if (PyErr_Occurred()) { + if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; @@ -20341,12 +19614,13 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7Decoder_8__init___2generator21(__pyx_Gen __Pyx_GOTREF(__pyx_t_3); } __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_kv); - __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_kv, __pyx_t_3); + __Pyx_XDECREF(__pyx_cur_scope->__pyx_v_kv); __Pyx_GIVEREF(__pyx_t_3); + __pyx_cur_scope->__pyx_v_kv = __pyx_t_3; __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_s_s_3, __pyx_cur_scope->__pyx_v_kv); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - __pyx_r = __pyx_t_3; + __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_47), __pyx_cur_scope->__pyx_v_kv); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __pyx_r = ((PyObject *)__pyx_t_3); __pyx_t_3 = 0; __Pyx_XGIVEREF(__pyx_t_2); __pyx_cur_scope->__pyx_t_0 = __pyx_t_2; @@ -20366,8 +19640,6 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7Decoder_8__init___2generator21(__pyx_Gen if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* function exit code */ PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; @@ -20392,7 +19664,7 @@ static PyObject *__pyx_gb_4cdec_5_cdec_7Decoder_8__init___2generator21(__pyx_Gen */ static int __pyx_pf_4cdec_5_cdec_7Decoder___init__(struct __pyx_obj_4cdec_5_cdec_Decoder *__pyx_v_self, PyObject *__pyx_v_config_str, PyObject *__pyx_v_config) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__ *__pyx_cur_scope; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_27___init__ *__pyx_cur_scope; PyObject *__pyx_v_formalism = NULL; std::istringstream *__pyx_v_config_stream; int __pyx_r; @@ -20400,15 +19672,15 @@ static int __pyx_pf_4cdec_5_cdec_7Decoder___init__(struct __pyx_obj_4cdec_5_cdec int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; - int __pyx_t_4; - PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_4 = NULL; + 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("__init__", 0); - __pyx_cur_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__ *)__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_24___init__(__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_24___init__, __pyx_empty_tuple, NULL); + __pyx_cur_scope = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_27___init__ *)__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_27___init__(__pyx_ptype_4cdec_5_cdec___pyx_scope_struct_27___init__, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return -1; @@ -20437,7 +19709,7 @@ static int __pyx_pf_4cdec_5_cdec_7Decoder___init__(struct __pyx_obj_4cdec_5_cdec * if formalism not in ('scfg', 'fst', 'lextrans', 'pb', * 'csplit', 'tagger', 'lexalign'): */ - __pyx_t_3 = __Pyx_PyDict_GetItemDefault(__pyx_cur_scope->__pyx_v_config, __pyx_n_s_formalism, Py_None); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_cur_scope->__pyx_v_config), ((PyObject *)__pyx_n_s__formalism), Py_None); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_v_formalism = __pyx_t_3; __pyx_t_3 = 0; @@ -20451,40 +19723,54 @@ static int __pyx_pf_4cdec_5_cdec_7Decoder___init__(struct __pyx_obj_4cdec_5_cdec */ __Pyx_INCREF(__pyx_v_formalism); __pyx_t_3 = __pyx_v_formalism; - __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_scfg, Py_NE)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__pyx_t_2) { - __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_fst, Py_NE)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_4 = __pyx_t_1; + __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, ((PyObject *)__pyx_n_s__scfg), Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (((int)__pyx_t_2)) { + __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, ((PyObject *)__pyx_n_s__fst), Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_5 = ((int)__pyx_t_1); } else { - __pyx_t_4 = __pyx_t_2; + __pyx_t_5 = ((int)__pyx_t_2); } - if (__pyx_t_4) { - __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_lextrans, Py_NE)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_1 = __pyx_t_2; + if (__pyx_t_5) { + __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, ((PyObject *)__pyx_n_s__lextrans), Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_1 = ((int)__pyx_t_2); } else { - __pyx_t_1 = __pyx_t_4; + __pyx_t_1 = __pyx_t_5; } if (__pyx_t_1) { - __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_pb, Py_NE)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_2 = __pyx_t_4; + __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, ((PyObject *)__pyx_n_s__pb), Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_2 = ((int)__pyx_t_5); } else { __pyx_t_2 = __pyx_t_1; } if (__pyx_t_2) { - __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_csplit, Py_NE)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_4 = __pyx_t_1; + __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, ((PyObject *)__pyx_n_s__csplit), Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_5 = ((int)__pyx_t_1); } else { - __pyx_t_4 = __pyx_t_2; + __pyx_t_5 = __pyx_t_2; } - if (__pyx_t_4) { - __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_tagger, Py_NE)); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_1 = __pyx_t_2; + if (__pyx_t_5) { + __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, ((PyObject *)__pyx_n_s__tagger), Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_1 = ((int)__pyx_t_2); } else { - __pyx_t_1 = __pyx_t_4; + __pyx_t_1 = __pyx_t_5; } if (__pyx_t_1) { - __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_lexalign, Py_NE)); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_2 = __pyx_t_4; + __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, ((PyObject *)__pyx_n_s__lexalign), Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_2 = ((int)__pyx_t_5); } else { __pyx_t_2 = __pyx_t_1; } @@ -20499,23 +19785,25 @@ static int __pyx_pf_4cdec_5_cdec_7Decoder___init__(struct __pyx_obj_4cdec_5_cdec * config_str = '\n'.join('%s = %s' % kv for kv in _make_config(config)) * cdef istringstream* config_stream = new istringstream(config_str) */ - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_InvalidConfig); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__InvalidConfig); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_formalism_s_unknown, __pyx_v_formalism); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_48), __pyx_v_formalism); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); - __Pyx_GIVEREF(__pyx_t_5); - __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_4)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_4)); + __pyx_t_4 = 0; + __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_Raise(__pyx_t_5, 0, 0, 0); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L4; } + __pyx_L4:; /* "cdec/_cdec.pyx":56 * 'csplit', 'tagger', 'lexalign'): @@ -20524,12 +19812,21 @@ static int __pyx_pf_4cdec_5_cdec_7Decoder___init__(struct __pyx_obj_4cdec_5_cdec * cdef istringstream* config_stream = new istringstream(config_str) * self.dec = new decoder.Decoder(config_stream) */ - __pyx_t_5 = __pyx_pf_4cdec_5_cdec_7Decoder_8__init___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyString_Join(__pyx_kp_s__16, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_kp_s_40), __pyx_n_s__join); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_6 = __pyx_pf_4cdec_5_cdec_7Decoder_8__init___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF_SET(__pyx_v_config_str, __pyx_t_6); + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6); + __Pyx_GIVEREF(__pyx_t_6); + __pyx_t_6 = 0; + __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_v_config_str); + __pyx_v_config_str = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L3; } @@ -20570,7 +19867,7 @@ static int __pyx_pf_4cdec_5_cdec_7Decoder___init__(struct __pyx_obj_4cdec_5_cdec * self.weights.vector = &self.dec.CurrentWeightVector() * self.weights.owned = True */ - __pyx_t_6 = __pyx_tp_new_4cdec_5_cdec_DenseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_DenseVector)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __pyx_tp_new_4cdec_5_cdec_DenseVector(((PyTypeObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_DenseVector)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); if (!(likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_4cdec_5_cdec_DenseVector)))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GIVEREF(__pyx_t_6); @@ -20597,20 +19894,11 @@ static int __pyx_pf_4cdec_5_cdec_7Decoder___init__(struct __pyx_obj_4cdec_5_cdec */ __pyx_v_self->weights->owned = 1; - /* "cdec/_cdec.pyx":47 - * cdef DenseVector weights - * - * def __init__(self, config_str=None, **config): # <<<<<<<<<<<<<< - * """Decoder('formalism = scfg') -> initialize from configuration string - * Decoder(formalism='scfg') -> initialize from named parameters - */ - - /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("cdec._cdec.Decoder.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; @@ -20622,26 +19910,24 @@ static int __pyx_pf_4cdec_5_cdec_7Decoder___init__(struct __pyx_obj_4cdec_5_cdec return __pyx_r; } -/* "cdec/_cdec.pyx":64 - * self.weights.owned = True - * - * def __dealloc__(self): # <<<<<<<<<<<<<< - * del self.dec - * - */ - /* Python wrapper */ static void __pyx_pw_4cdec_5_cdec_7Decoder_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_4cdec_5_cdec_7Decoder_3__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_4cdec_5_cdec_7Decoder_2__dealloc__(((struct __pyx_obj_4cdec_5_cdec_Decoder *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); } -static void __pyx_pf_4cdec_5_cdec_7Decoder_2__dealloc__(struct __pyx_obj_4cdec_5_cdec_Decoder *__pyx_v_self) { +/* "cdec/_cdec.pyx":64 + * self.weights.owned = True + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * del self.dec + * + */ + +static void __pyx_pf_4cdec_5_cdec_7Decoder_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_4cdec_5_cdec_Decoder *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); @@ -20654,26 +19940,9 @@ static void __pyx_pf_4cdec_5_cdec_7Decoder_2__dealloc__(struct __pyx_obj_4cdec_5 */ delete __pyx_v_self->dec; - /* "cdec/_cdec.pyx":64 - * self.weights.owned = True - * - * def __dealloc__(self): # <<<<<<<<<<<<<< - * del self.dec - * - */ - - /* function exit code */ __Pyx_RefNannyFinishContext(); } -/* "cdec/_cdec.pyx":68 - * - * property weights: - * def __get__(self): # <<<<<<<<<<<<<< - * return self.weights - * - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_7Decoder_7weights_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_4cdec_5_cdec_7Decoder_7weights_1__get__(PyObject *__pyx_v_self) { @@ -20681,12 +19950,18 @@ static PyObject *__pyx_pw_4cdec_5_cdec_7Decoder_7weights_1__get__(PyObject *__py __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_7Decoder_7weights___get__(((struct __pyx_obj_4cdec_5_cdec_Decoder *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "cdec/_cdec.pyx":68 + * + * property weights: + * def __get__(self): # <<<<<<<<<<<<<< + * return self.weights + * + */ + static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_7weights___get__(struct __pyx_obj_4cdec_5_cdec_Decoder *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -20704,29 +19979,13 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_7weights___get__(struct __pyx_ob __pyx_r = ((PyObject *)__pyx_v_self->weights); goto __pyx_L0; - /* "cdec/_cdec.pyx":68 - * - * property weights: - * def __get__(self): # <<<<<<<<<<<<<< - * return self.weights - * - */ - - /* function exit code */ + __pyx_r = Py_None; __Pyx_INCREF(Py_None); __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "cdec/_cdec.pyx":71 - * return self.weights - * - * def __set__(self, weights): # <<<<<<<<<<<<<< - * if isinstance(weights, DenseVector): - * self.weights.vector[0] = ( weights).vector[0] - */ - /* Python wrapper */ static int __pyx_pw_4cdec_5_cdec_7Decoder_7weights_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_weights); /*proto*/ static int __pyx_pw_4cdec_5_cdec_7Decoder_7weights_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_weights) { @@ -20734,12 +19993,18 @@ static int __pyx_pw_4cdec_5_cdec_7Decoder_7weights_3__set__(PyObject *__pyx_v_se __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__set__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_7Decoder_7weights_2__set__(((struct __pyx_obj_4cdec_5_cdec_Decoder *)__pyx_v_self), ((PyObject *)__pyx_v_weights)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "cdec/_cdec.pyx":71 + * return self.weights + * + * def __set__(self, weights): # <<<<<<<<<<<<<< + * if isinstance(weights, DenseVector): + * self.weights.vector[0] = ( weights).vector[0] + */ + static int __pyx_pf_4cdec_5_cdec_7Decoder_7weights_2__set__(struct __pyx_obj_4cdec_5_cdec_Decoder *__pyx_v_self, PyObject *__pyx_v_weights) { PyObject *__pyx_v_fname = NULL; PyObject *__pyx_v_fval = NULL; @@ -20831,9 +20096,9 @@ static int __pyx_pf_4cdec_5_cdec_7Decoder_7weights_2__set__(struct __pyx_obj_4cd * self.weights[fname] = fval * else: */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_weights, __pyx_n_s_items); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_weights, __pyx_n_s__items); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyList_CheckExact(__pyx_t_4) || PyTuple_CheckExact(__pyx_t_4)) { @@ -20863,9 +20128,8 @@ static int __pyx_pf_4cdec_5_cdec_7Decoder_7weights_2__set__(struct __pyx_obj_4cd } else { __pyx_t_4 = __pyx_t_6(__pyx_t_3); if (unlikely(!__pyx_t_4)) { - PyObject* exc_type = PyErr_Occurred(); - if (exc_type) { - if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + if (PyErr_Occurred()) { + if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; @@ -20901,7 +20165,8 @@ static int __pyx_pf_4cdec_5_cdec_7Decoder_7weights_2__set__(struct __pyx_obj_4cd __Pyx_GOTREF(__pyx_t_8); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else { + } else + { Py_ssize_t index = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); @@ -20922,9 +20187,11 @@ static int __pyx_pf_4cdec_5_cdec_7Decoder_7weights_2__set__(struct __pyx_obj_4cd {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L7_unpacking_done:; } - __Pyx_XDECREF_SET(__pyx_v_fname, __pyx_t_7); + __Pyx_XDECREF(__pyx_v_fname); + __pyx_v_fname = __pyx_t_7; __pyx_t_7 = 0; - __Pyx_XDECREF_SET(__pyx_v_fval, __pyx_t_8); + __Pyx_XDECREF(__pyx_v_fval); + __pyx_v_fval = __pyx_t_8; __pyx_t_8 = 0; /* "cdec/_cdec.pyx":79 @@ -20934,7 +20201,7 @@ static int __pyx_pf_4cdec_5_cdec_7Decoder_7weights_2__set__(struct __pyx_obj_4cd * else: * raise TypeError('cannot initialize weights with %s' % type(weights)) */ - if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_self->weights), __pyx_v_fname, __pyx_v_fval) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyObject_SetItem(((PyObject *)__pyx_v_self->weights), __pyx_v_fname, __pyx_v_fval) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L3; @@ -20948,31 +20215,22 @@ static int __pyx_pf_4cdec_5_cdec_7Decoder_7weights_2__set__(struct __pyx_obj_4cd * * property formalism: */ - __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_cannot_initialize_weights_with_s, ((PyObject *)Py_TYPE(__pyx_v_weights))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_49), ((PyObject *)Py_TYPE(__pyx_v_weights))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); - __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_3)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(((PyObject *)__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[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __pyx_L3:; - /* "cdec/_cdec.pyx":71 - * return self.weights - * - * def __set__(self, weights): # <<<<<<<<<<<<<< - * if isinstance(weights, DenseVector): - * self.weights.vector[0] = ( weights).vector[0] - */ - - /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; @@ -20987,16 +20245,8 @@ static int __pyx_pf_4cdec_5_cdec_7Decoder_7weights_2__set__(struct __pyx_obj_4cd __Pyx_XDECREF(__pyx_v_fname); __Pyx_XDECREF(__pyx_v_fval); __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "cdec/_cdec.pyx":84 - * - * property formalism: - * def __get__(self): # <<<<<<<<<<<<<< - * cdef variables_map* conf = &self.dec.GetConf() - * return str(conf[0]['formalism'].as_str().c_str()) - */ + return __pyx_r; +} /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_7Decoder_9formalism_1__get__(PyObject *__pyx_v_self); /*proto*/ @@ -21005,12 +20255,18 @@ static PyObject *__pyx_pw_4cdec_5_cdec_7Decoder_9formalism_1__get__(PyObject *__ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_7Decoder_9formalism___get__(((struct __pyx_obj_4cdec_5_cdec_Decoder *)__pyx_v_self)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "cdec/_cdec.pyx":84 + * + * property formalism: + * def __get__(self): # <<<<<<<<<<<<<< + * cdef variables_map* conf = &self.dec.GetConf() + * return str(conf[0]['formalism'].as_str().c_str()) + */ + static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_9formalism___get__(struct __pyx_obj_4cdec_5_cdec_Decoder *__pyx_v_self) { const boost::program_options::variables_map *__pyx_v_conf; PyObject *__pyx_r = NULL; @@ -21039,29 +20295,22 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_9formalism___get__(struct __pyx_ * def read_weights(self, weights): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBytes_FromString(((__pyx_v_conf[0])[__pyx_k_formalism]).as().c_str()); 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_t_1 = __Pyx_PyBytes_FromString(((__pyx_v_conf[0])[__pyx_k__formalism]).as().c_str()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_t_2 = PyTuple_New(1); 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); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); - __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_1)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_2), NULL); 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_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "cdec/_cdec.pyx":84 - * - * property formalism: - * def __get__(self): # <<<<<<<<<<<<<< - * cdef variables_map* conf = &self.dec.GetConf() - * return str(conf[0]['formalism'].as_str().c_str()) - */ - - /* 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); @@ -21073,14 +20322,6 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_9formalism___get__(struct __pyx_ return __pyx_r; } -/* "cdec/_cdec.pyx":88 - * return str(conf[0]['formalism'].as_str().c_str()) - * - * def read_weights(self, weights): # <<<<<<<<<<<<<< - * """decoder.read_weights(filename): Read decoder weights from a file.""" - * with open(weights) as fp: - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_7Decoder_5read_weights(PyObject *__pyx_v_self, PyObject *__pyx_v_weights); /*proto*/ static char __pyx_doc_4cdec_5_cdec_7Decoder_4read_weights[] = "decoder.read_weights(filename): Read decoder weights from a file."; @@ -21089,12 +20330,18 @@ static PyObject *__pyx_pw_4cdec_5_cdec_7Decoder_5read_weights(PyObject *__pyx_v_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("read_weights (wrapper)", 0); __pyx_r = __pyx_pf_4cdec_5_cdec_7Decoder_4read_weights(((struct __pyx_obj_4cdec_5_cdec_Decoder *)__pyx_v_self), ((PyObject *)__pyx_v_weights)); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "cdec/_cdec.pyx":88 + * return str(conf[0]['formalism'].as_str().c_str()) + * + * def read_weights(self, weights): # <<<<<<<<<<<<<< + * """decoder.read_weights(filename): Read decoder weights from a file.""" + * with open(weights) as fp: + */ + static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_4read_weights(struct __pyx_obj_4cdec_5_cdec_Decoder *__pyx_v_self, PyObject *__pyx_v_weights) { PyObject *__pyx_v_fp = NULL; PyObject *__pyx_v_line = NULL; @@ -21136,14 +20383,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_4read_weights(struct __pyx_obj_4 __Pyx_INCREF(__pyx_v_weights); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_weights); __Pyx_GIVEREF(__pyx_v_weights); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyObject_Call(__pyx_builtin_open, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_3 = __Pyx_PyObject_LookupSpecial(__pyx_t_2, __pyx_n_s_exit); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s____exit__); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyObject_LookupSpecial(__pyx_t_2, __pyx_n_s_enter); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s____enter__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -21191,16 +20438,16 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_4read_weights(struct __pyx_obj_4 } else { __pyx_t_2 = __pyx_t_9(__pyx_t_4); if (unlikely(!__pyx_t_2)) { - PyObject* exc_type = PyErr_Occurred(); - if (exc_type) { - if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); + if (PyErr_Occurred()) { + if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L7_error;} } break; } __Pyx_GOTREF(__pyx_t_2); } - __Pyx_XDECREF_SET(__pyx_v_line, __pyx_t_2); + __Pyx_XDECREF(__pyx_v_line); + __pyx_v_line = __pyx_t_2; __pyx_t_2 = 0; /* "cdec/_cdec.pyx":92 @@ -21210,22 +20457,24 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_4read_weights(struct __pyx_obj_4 * fname, value = line.split() * self.weights[fname.strip()] = float(value) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_strip); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L7_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s__strip); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L7_error;} + __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_startswith); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L7_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__startswith); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L7_error;} + __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_51), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_10) { goto __pyx_L16_continue; + goto __pyx_L18; } + __pyx_L18:; /* "cdec/_cdec.pyx":93 * for line in fp: @@ -21234,9 +20483,9 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_4read_weights(struct __pyx_obj_4 * self.weights[fname.strip()] = float(value) * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L7_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s__split); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L7_error;} + __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { @@ -21268,7 +20517,8 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_4read_weights(struct __pyx_obj_4 __Pyx_GOTREF(__pyx_t_11); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - } else { + } else + { Py_ssize_t index = -1; __pyx_t_12 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_12); @@ -21289,9 +20539,11 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_4read_weights(struct __pyx_obj_4 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __pyx_L20_unpacking_done:; } - __Pyx_XDECREF_SET(__pyx_v_fname, __pyx_t_1); + __Pyx_XDECREF(__pyx_v_fname); + __pyx_v_fname = __pyx_t_1; __pyx_t_1 = 0; - __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_11); + __Pyx_XDECREF(__pyx_v_value); + __pyx_v_value = __pyx_t_11; __pyx_t_11 = 0; /* "cdec/_cdec.pyx":94 @@ -21304,12 +20556,12 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_4read_weights(struct __pyx_obj_4 __pyx_t_14 = __Pyx_PyObject_AsDouble(__pyx_v_value); if (unlikely(__pyx_t_14 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __pyx_t_2 = PyFloat_FromDouble(__pyx_t_14); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_fname, __pyx_n_s_strip); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L7_error;} + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_fname, __pyx_n_s__strip); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_11); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L7_error;} + __pyx_t_1 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_self->weights), __pyx_t_1, __pyx_t_2) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L7_error;} + if (PyObject_SetItem(((PyObject *)__pyx_v_self->weights), __pyx_t_1, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L7_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_L16_continue:; @@ -21340,11 +20592,19 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_4read_weights(struct __pyx_obj_4 __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_1); - __pyx_t_11 = PyTuple_Pack(3, __pyx_t_4, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;} + __pyx_t_11 = PyTuple_New(3); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;} __Pyx_GOTREF(__pyx_t_11); - __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_11, NULL); + __Pyx_INCREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + __Pyx_INCREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_2); + __Pyx_INCREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __pyx_t_15 = PyObject_Call(__pyx_t_3, __pyx_t_11, NULL); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;} __Pyx_GOTREF(__pyx_t_15); __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_15); @@ -21354,11 +20614,14 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_4read_weights(struct __pyx_obj_4 if (__pyx_t_16) { __Pyx_GIVEREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); - __Pyx_XGIVEREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); __Pyx_ErrRestore(__pyx_t_4, __pyx_t_2, __pyx_t_1); __pyx_t_4 = 0; __pyx_t_2 = 0; __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L9_except_error;} + goto __pyx_L23; } + __pyx_L23:; + __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -21379,17 +20642,15 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_4read_weights(struct __pyx_obj_4 } } /*finally:*/ { - /*normal exit:*/{ - if (__pyx_t_3) { - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__22, NULL); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } - goto __pyx_L6; + if (__pyx_t_3) { + __pyx_t_7 = PyObject_Call(__pyx_t_3, __pyx_k_tuple_52, NULL); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_16 = __Pyx_PyObject_IsTrue(__pyx_t_7); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (__pyx_t_16 < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_L6:; } goto __pyx_L24; __pyx_L3_error:; @@ -21398,15 +20659,6 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_4read_weights(struct __pyx_obj_4 __pyx_L24:; } - /* "cdec/_cdec.pyx":88 - * return str(conf[0]['formalism'].as_str().c_str()) - * - * def read_weights(self, weights): # <<<<<<<<<<<<<< - * """decoder.read_weights(filename): Read decoder weights from a file.""" - * with open(weights) as fp: - */ - - /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; @@ -21427,14 +20679,6 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_4read_weights(struct __pyx_obj_4 return __pyx_r; } -/* "cdec/_cdec.pyx":96 - * self.weights[fname.strip()] = float(value) - * - * def translate(self, sentence, grammar=None): # <<<<<<<<<<<<<< - * """decoder.translate(sentence, grammar=None) -> Hypergraph - * Translate a sentence (string/Lattice) with a grammar (string/list of rules).""" - */ - /* Python wrapper */ static PyObject *__pyx_pw_4cdec_5_cdec_7Decoder_7translate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_4cdec_5_cdec_7Decoder_6translate[] = "decoder.translate(sentence, grammar=None) -> Hypergraph\n Translate a sentence (string/Lattice) with a grammar (string/list of rules)."; @@ -21448,8 +20692,16 @@ static PyObject *__pyx_pw_4cdec_5_cdec_7Decoder_7translate(PyObject *__pyx_v_sel __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("translate (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sentence,&__pyx_n_s_grammar,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__sentence,&__pyx_n_s__grammar,0}; PyObject* values[2] = {0,0}; + + /* "cdec/_cdec.pyx":96 + * self.weights[fname.strip()] = float(value) + * + * def translate(self, sentence, grammar=None): # <<<<<<<<<<<<<< + * """decoder.translate(sentence, grammar=None) -> Hypergraph + * Translate a sentence (string/Lattice) with a grammar (string/list of rules).""" + */ values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; @@ -21463,11 +20715,11 @@ static PyObject *__pyx_pw_4cdec_5_cdec_7Decoder_7translate(PyObject *__pyx_v_sel kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_sentence)) != 0)) kw_args--; + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__sentence)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { - PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_grammar); + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__grammar); if (value) { values[1] = value; kw_args--; } } } @@ -21494,8 +20746,6 @@ static PyObject *__pyx_pw_4cdec_5_cdec_7Decoder_7translate(PyObject *__pyx_v_sel return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4cdec_5_cdec_7Decoder_6translate(((struct __pyx_obj_4cdec_5_cdec_Decoder *)__pyx_v_self), __pyx_v_sentence, __pyx_v_grammar); - - /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -21534,12 +20784,12 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_6translate(struct __pyx_obj_4cde * elif isinstance(sentence, Lattice): * input_str = str(sentence) # PLF format */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_sentence, __pyx_n_s_strip); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_sentence, __pyx_n_s__strip); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __pyx_f_4cdec_5_cdec_as_str(__pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = ((PyObject *)__pyx_f_4cdec_5_cdec_as_str(__pyx_t_4, NULL)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_input_str = ((PyObject*)__pyx_t_3); @@ -21570,10 +20820,10 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_6translate(struct __pyx_obj_4cde __Pyx_INCREF(__pyx_v_sentence); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_sentence); __Pyx_GIVEREF(__pyx_v_sentence); - __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __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_t_4 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__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; - if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_4)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_4)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_input_str = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L3; @@ -21587,16 +20837,16 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_6translate(struct __pyx_obj_4cde * if grammar: * if isinstance(grammar, basestring): */ - __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Cannot_translate_input_type_s, ((PyObject *)Py_TYPE(__pyx_v_sentence))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_53), ((PyObject *)Py_TYPE(__pyx_v_sentence))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_4)); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); - __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_4)); + __Pyx_GIVEREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -21631,7 +20881,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_6translate(struct __pyx_obj_4cde * else: * self.dec.AddSupplementalGrammar(TextGrammar(grammar).grammar[0]) */ - __pyx_t_4 = __pyx_f_4cdec_5_cdec_as_str(__pyx_v_grammar, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = ((PyObject *)__pyx_f_4cdec_5_cdec_as_str(__pyx_v_grammar, NULL)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __pyx_convert_string_from_py_(__pyx_t_4); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -21652,9 +20902,9 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_6translate(struct __pyx_obj_4cde __Pyx_INCREF(__pyx_v_grammar); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_grammar); __Pyx_GIVEREF(__pyx_v_grammar); - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_TextGrammar)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_TextGrammar)), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; __pyx_v_self->dec->AddSupplementalGrammar((((struct __pyx_obj_4cdec_5_cdec_TextGrammar *)__pyx_t_3)->__pyx_base.grammar[0])); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } @@ -21679,7 +20929,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_6translate(struct __pyx_obj_4cde * if observer.hypergraph == NULL: * raise ParseFailed() */ - __pyx_t_5 = __pyx_convert_string_from_py_(__pyx_v_input_str); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __pyx_convert_string_from_py_(((PyObject *)__pyx_v_input_str)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->dec->Decode(__pyx_t_5, (&__pyx_v_observer)); /* "cdec/_cdec.pyx":113 @@ -21699,15 +20949,17 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_6translate(struct __pyx_obj_4cde * cdef Hypergraph hg = Hypergraph() * hg.hg = new hypergraph.Hypergraph(observer.hypergraph[0]) */ - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_ParseFailed); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s__ParseFailed); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + goto __pyx_L6; } + __pyx_L6:; /* "cdec/_cdec.pyx":115 * if observer.hypergraph == NULL: @@ -21716,7 +20968,7 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_6translate(struct __pyx_obj_4cde * hg.hg = new hypergraph.Hypergraph(observer.hypergraph[0]) * return hg */ - __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_Hypergraph)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_Hypergraph)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_v_hg = ((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)__pyx_t_4); __pyx_t_4 = 0; @@ -21739,15 +20991,8 @@ static PyObject *__pyx_pf_4cdec_5_cdec_7Decoder_6translate(struct __pyx_obj_4cde __pyx_r = ((PyObject *)__pyx_v_hg); goto __pyx_L0; - /* "cdec/_cdec.pyx":96 - * self.weights[fname.strip()] = float(value) - * - * def translate(self, sentence, grammar=None): # <<<<<<<<<<<<<< - * """decoder.translate(sentence, grammar=None) -> Hypergraph - * Translate a sentence (string/Lattice) with a grammar (string/list of rules).""" - */ - - /* 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); @@ -21774,10 +21019,6 @@ static std::string __pyx_convert_string_from_py_(PyObject *__pyx_v_o) { char *__pyx_v_data; std::string __pyx_r; __Pyx_RefNannyDeclarations - char *__pyx_t_1; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_convert_string_from_py_", 0); /* "string.from_py":15 @@ -21787,8 +21028,7 @@ static std::string __pyx_convert_string_from_py_(PyObject *__pyx_v_o) { * return string(data, length) * */ - __pyx_t_1 = __Pyx_PyObject_AsStringAndSize(__pyx_v_o, (&__pyx_v_length)); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_v_data = __pyx_t_1; + __pyx_v_data = __Pyx_PyObject_AsStringAndSize(__pyx_v_o, (&__pyx_v_length)); /* "string.from_py":16 * cdef Py_ssize_t length @@ -21800,99 +21040,250 @@ static std::string __pyx_convert_string_from_py_(PyObject *__pyx_v_o) { __pyx_r = std::string(__pyx_v_data, __pyx_v_length); goto __pyx_L0; - /* "string.from_py":13 - * - * @cname("__pyx_convert_string_from_py_") - * cdef string __pyx_convert_string_from_py_(object o) except *: # <<<<<<<<<<<<<< - * cdef Py_ssize_t length - * cdef char* data = __Pyx_PyObject_AsStringAndSize(o, &length) - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_AddTraceback("string.from_py.__pyx_convert_string_from_py_", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_tp_new_4cdec_5_cdec_DenseVector(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___iter__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_24___iter__[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_24___iter__ = 0; + +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_24___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___iter__ *p; PyObject *o; - if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { - o = (*t->tp_alloc)(t, 0); + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_24___iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___iter__)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_24___iter__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_24___iter__]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___iter__)); + PyObject_INIT(o, t); + PyObject_GC_Track(o); } else { - o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; } - if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___iter__ *)o); + p->__pyx_v_i = 0; + p->__pyx_v_self = 0; + p->__pyx_t_1 = 0; return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec_DenseVector(PyObject *o) { - #if PY_VERSION_HEX >= 0x030400a1 - if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { - if (PyObject_CallFinalizerFromDealloc(o)) return; +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_24___iter__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___iter__ *)o; + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_v_i); + Py_CLEAR(p->__pyx_v_self); + Py_CLEAR(p->__pyx_t_1); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_24___iter__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___iter__))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_24___iter__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_24___iter__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___iter__ *)o); + } else { + (*Py_TYPE(o)->tp_free)(o); + } +} + +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_24___iter__(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___iter__ *)o; + if (p->__pyx_v_i) { + e = (*v)(p->__pyx_v_i, 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_t_1) { + e = (*v)(p->__pyx_t_1, a); if (e) return e; } + return 0; +} + +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_24___iter__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___iter__ *)o; + PyObject* tmp; + tmp = ((PyObject*)p->__pyx_v_i); + p->__pyx_v_i = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_v_self); + p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_SufficientStats *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_t_1); + p->__pyx_t_1 = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_24___iter__[] = { + {0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_24___iter__ = { + PyVarObject_HEAD_INIT(0, 0) + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_24___iter__"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___iter__), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_24___iter__, /*tp_dealloc*/ + 0, /*tp_print*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #else + 0, /*reserved*/ + #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_4cdec_5_cdec___pyx_scope_struct_24___iter__, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_24___iter__, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_4cdec_5_cdec___pyx_scope_struct_24___iter__, /*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_4cdec_5_cdec___pyx_scope_struct_24___iter__, /*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*/ + #if PY_VERSION_HEX >= 0x02060000 + 0, /*tp_version_tag*/ #endif +}; + +static PyObject *__pyx_tp_new_4cdec_5_cdec_TRule(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + PyObject *o; + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + return o; +} + +static void __pyx_tp_dealloc_4cdec_5_cdec_TRule(PyObject *o) { { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); - __pyx_pw_4cdec_5_cdec_11DenseVector_3__dealloc__(o); + __pyx_pw_4cdec_5_cdec_5TRule_3__dealloc__(o); + if (PyErr_Occurred()) PyErr_WriteUnraisable(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); } - (*Py_TYPE(o)->tp_free)(o); + (*Py_TYPE(o)->tp_free)(o); +} + +static PyObject *__pyx_getprop_4cdec_5_cdec_5TRule_arity(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_5TRule_5arity_1__get__(o); +} + +static PyObject *__pyx_getprop_4cdec_5_cdec_5TRule_f(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_5TRule_1f_1__get__(o); +} + +static int __pyx_setprop_4cdec_5_cdec_5TRule_f(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_4cdec_5_cdec_5TRule_1f_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_4cdec_5_cdec_5TRule_e(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_5TRule_1e_1__get__(o); +} + +static int __pyx_setprop_4cdec_5_cdec_5TRule_e(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_4cdec_5_cdec_5TRule_1e_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_4cdec_5_cdec_5TRule_a(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_5TRule_1a_1__get__(o); +} + +static int __pyx_setprop_4cdec_5_cdec_5TRule_a(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_4cdec_5_cdec_5TRule_1a_4__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_4cdec_5_cdec_5TRule_scores(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_5TRule_6scores_1__get__(o); +} + +static int __pyx_setprop_4cdec_5_cdec_5TRule_scores(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_4cdec_5_cdec_5TRule_6scores_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } } -static PyObject *__pyx_sq_item_4cdec_5_cdec_DenseVector(PyObject *o, Py_ssize_t i) { - PyObject *r; - PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0; - r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x); - Py_DECREF(x); - return r; + +static PyObject *__pyx_getprop_4cdec_5_cdec_5TRule_lhs(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_5TRule_3lhs_1__get__(o); } -static int __pyx_mp_ass_subscript_4cdec_5_cdec_DenseVector(PyObject *o, PyObject *i, PyObject *v) { +static int __pyx_setprop_4cdec_5_cdec_5TRule_lhs(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { - return __pyx_pw_4cdec_5_cdec_11DenseVector_9__setitem__(o, i, v); + return __pyx_pw_4cdec_5_cdec_5TRule_3lhs_3__set__(o, v); } else { - PyErr_Format(PyExc_NotImplementedError, - "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name); + PyErr_SetString(PyExc_NotImplementedError, "__del__"); return -1; } } -static PyMethodDef __pyx_methods_4cdec_5_cdec_DenseVector[] = { - {__Pyx_NAMESTR("dot"), (PyCFunction)__pyx_pw_4cdec_5_cdec_11DenseVector_14dot, METH_O, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_11DenseVector_13dot)}, - {__Pyx_NAMESTR("tosparse"), (PyCFunction)__pyx_pw_4cdec_5_cdec_11DenseVector_16tosparse, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_11DenseVector_15tosparse)}, +static PyMethodDef __pyx_methods_4cdec_5_cdec_TRule[] = { {0, 0, 0, 0} }; -static PySequenceMethods __pyx_tp_as_sequence_DenseVector = { - __pyx_pw_4cdec_5_cdec_11DenseVector_5__len__, /*sq_length*/ - 0, /*sq_concat*/ - 0, /*sq_repeat*/ - __pyx_sq_item_4cdec_5_cdec_DenseVector, /*sq_item*/ - 0, /*sq_slice*/ - 0, /*sq_ass_item*/ - 0, /*sq_ass_slice*/ - 0, /*sq_contains*/ - 0, /*sq_inplace_concat*/ - 0, /*sq_inplace_repeat*/ -}; - -static PyMappingMethods __pyx_tp_as_mapping_DenseVector = { - __pyx_pw_4cdec_5_cdec_11DenseVector_5__len__, /*mp_length*/ - __pyx_pw_4cdec_5_cdec_11DenseVector_7__getitem__, /*mp_subscript*/ - __pyx_mp_ass_subscript_4cdec_5_cdec_DenseVector, /*mp_ass_subscript*/ +static struct PyGetSetDef __pyx_getsets_4cdec_5_cdec_TRule[] = { + {(char *)"arity", __pyx_getprop_4cdec_5_cdec_5TRule_arity, 0, 0, 0}, + {(char *)"f", __pyx_getprop_4cdec_5_cdec_5TRule_f, __pyx_setprop_4cdec_5_cdec_5TRule_f, 0, 0}, + {(char *)"e", __pyx_getprop_4cdec_5_cdec_5TRule_e, __pyx_setprop_4cdec_5_cdec_5TRule_e, 0, 0}, + {(char *)"a", __pyx_getprop_4cdec_5_cdec_5TRule_a, __pyx_setprop_4cdec_5_cdec_5TRule_a, 0, 0}, + {(char *)"scores", __pyx_getprop_4cdec_5_cdec_5TRule_scores, __pyx_setprop_4cdec_5_cdec_5TRule_scores, 0, 0}, + {(char *)"lhs", __pyx_getprop_4cdec_5_cdec_5TRule_lhs, __pyx_setprop_4cdec_5_cdec_5TRule_lhs, 0, 0}, + {0, 0, 0, 0, 0} }; -static PyTypeObject __pyx_type_4cdec_5_cdec_DenseVector = { +static PyTypeObject __pyx_type_4cdec_5_cdec_TRule = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.DenseVector"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec_DenseVector), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.TRule"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec_TRule), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec_DenseVector, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec_TRule, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -21903,11 +21294,11 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_DenseVector = { #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ - &__pyx_tp_as_sequence_DenseVector, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_DenseVector, /*tp_as_mapping*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ - 0, /*tp_str*/ + __pyx_pw_4cdec_5_cdec_5TRule_5__str__, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ @@ -21917,19 +21308,19 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_DenseVector = { 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ - __pyx_pw_4cdec_5_cdec_11DenseVector_11__iter__, /*tp_iter*/ + 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_4cdec_5_cdec_DenseVector, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec_TRule, /*tp_methods*/ 0, /*tp_members*/ - 0, /*tp_getset*/ + __pyx_getsets_4cdec_5_cdec_TRule, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ - __pyx_pw_4cdec_5_cdec_11DenseVector_1__init__, /*tp_init*/ + __pyx_pw_4cdec_5_cdec_5TRule_1__init__, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec_DenseVector, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec_TRule, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -21941,146 +21332,24 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_DenseVector = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif - #if PY_VERSION_HEX >= 0x030400a1 - 0, /*tp_finalize*/ - #endif }; -static PyObject *__pyx_tp_new_4cdec_5_cdec_SparseVector(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - 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); - } +static PyObject *__pyx_tp_new_4cdec_5_cdec_MRule(PyTypeObject *t, PyObject *a, PyObject *k) { + PyObject *o = __pyx_tp_new_4cdec_5_cdec_TRule(t, a, k); if (unlikely(!o)) return 0; return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec_SparseVector(PyObject *o) { - #if PY_VERSION_HEX >= 0x030400a1 - if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { - if (PyObject_CallFinalizerFromDealloc(o)) return; - } - #endif - { - PyObject *etype, *eval, *etb; - PyErr_Fetch(&etype, &eval, &etb); - ++Py_REFCNT(o); - __pyx_pw_4cdec_5_cdec_12SparseVector_3__dealloc__(o); - --Py_REFCNT(o); - PyErr_Restore(etype, eval, etb); - } - (*Py_TYPE(o)->tp_free)(o); -} -static PyObject *__pyx_sq_item_4cdec_5_cdec_SparseVector(PyObject *o, Py_ssize_t i) { - PyObject *r; - PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0; - r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x); - Py_DECREF(x); - return r; -} - -static int __pyx_mp_ass_subscript_4cdec_5_cdec_SparseVector(PyObject *o, PyObject *i, PyObject *v) { - if (v) { - return __pyx_pw_4cdec_5_cdec_12SparseVector_9__setitem__(o, i, v); - } - else { - PyErr_Format(PyExc_NotImplementedError, - "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name); - return -1; - } -} - -static PyMethodDef __pyx_methods_4cdec_5_cdec_SparseVector[] = { - {__Pyx_NAMESTR("copy"), (PyCFunction)__pyx_pw_4cdec_5_cdec_12SparseVector_5copy, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_12SparseVector_4copy)}, - {__Pyx_NAMESTR("dot"), (PyCFunction)__pyx_pw_4cdec_5_cdec_12SparseVector_14dot, METH_O, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_12SparseVector_13dot)}, +static PyMethodDef __pyx_methods_4cdec_5_cdec_MRule[] = { {0, 0, 0, 0} }; -static PyNumberMethods __pyx_tp_as_number_SparseVector = { - __pyx_pw_4cdec_5_cdec_12SparseVector_32__add__, /*nb_add*/ - __pyx_pw_4cdec_5_cdec_12SparseVector_34__sub__, /*nb_subtract*/ - __pyx_pw_4cdec_5_cdec_12SparseVector_36__mul__, /*nb_multiply*/ - #if PY_MAJOR_VERSION < 3 - __pyx_pw_4cdec_5_cdec_12SparseVector_38__div__, /*nb_divide*/ - #endif - 0, /*nb_remainder*/ - 0, /*nb_divmod*/ - 0, /*nb_power*/ - __pyx_pw_4cdec_5_cdec_12SparseVector_22__neg__, /*nb_negative*/ - 0, /*nb_positive*/ - 0, /*nb_absolute*/ - 0, /*nb_nonzero*/ - 0, /*nb_invert*/ - 0, /*nb_lshift*/ - 0, /*nb_rshift*/ - 0, /*nb_and*/ - 0, /*nb_xor*/ - 0, /*nb_or*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_coerce*/ - #endif - 0, /*nb_int*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_long*/ - #else - 0, /*reserved*/ - #endif - 0, /*nb_float*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_oct*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*nb_hex*/ - #endif - __pyx_pw_4cdec_5_cdec_12SparseVector_24__iadd__, /*nb_inplace_add*/ - __pyx_pw_4cdec_5_cdec_12SparseVector_26__isub__, /*nb_inplace_subtract*/ - __pyx_pw_4cdec_5_cdec_12SparseVector_28__imul__, /*nb_inplace_multiply*/ - #if PY_MAJOR_VERSION < 3 - __pyx_pw_4cdec_5_cdec_12SparseVector_30__idiv__, /*nb_inplace_divide*/ - #endif - 0, /*nb_inplace_remainder*/ - 0, /*nb_inplace_power*/ - 0, /*nb_inplace_lshift*/ - 0, /*nb_inplace_rshift*/ - 0, /*nb_inplace_and*/ - 0, /*nb_inplace_xor*/ - 0, /*nb_inplace_or*/ - 0, /*nb_floor_divide*/ - 0, /*nb_true_divide*/ - 0, /*nb_inplace_floor_divide*/ - 0, /*nb_inplace_true_divide*/ - #if PY_VERSION_HEX >= 0x02050000 - 0, /*nb_index*/ - #endif -}; - -static PySequenceMethods __pyx_tp_as_sequence_SparseVector = { - __pyx_pw_4cdec_5_cdec_12SparseVector_18__len__, /*sq_length*/ - 0, /*sq_concat*/ - 0, /*sq_repeat*/ - __pyx_sq_item_4cdec_5_cdec_SparseVector, /*sq_item*/ - 0, /*sq_slice*/ - 0, /*sq_ass_item*/ - 0, /*sq_ass_slice*/ - __pyx_pw_4cdec_5_cdec_12SparseVector_20__contains__, /*sq_contains*/ - 0, /*sq_inplace_concat*/ - 0, /*sq_inplace_repeat*/ -}; - -static PyMappingMethods __pyx_tp_as_mapping_SparseVector = { - __pyx_pw_4cdec_5_cdec_12SparseVector_18__len__, /*mp_length*/ - __pyx_pw_4cdec_5_cdec_12SparseVector_7__getitem__, /*mp_subscript*/ - __pyx_mp_ass_subscript_4cdec_5_cdec_SparseVector, /*mp_ass_subscript*/ -}; - -static PyTypeObject __pyx_type_4cdec_5_cdec_SparseVector = { +static PyTypeObject __pyx_type_4cdec_5_cdec_MRule = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.SparseVector"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec_SparseVector), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.MRule"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec_MRule), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec_SparseVector, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec_TRule, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -22090,12 +21359,16 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_SparseVector = { 0, /*reserved*/ #endif 0, /*tp_repr*/ - &__pyx_tp_as_number_SparseVector, /*tp_as_number*/ - &__pyx_tp_as_sequence_SparseVector, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_SparseVector, /*tp_as_mapping*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ + #if CYTHON_COMPILING_IN_PYPY + __pyx_pw_4cdec_5_cdec_5TRule_5__str__, /*tp_str*/ + #else 0, /*tp_str*/ + #endif 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ @@ -22103,11 +21376,11 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_SparseVector = { 0, /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ - __pyx_pw_4cdec_5_cdec_12SparseVector_16__richcmp__, /*tp_richcompare*/ + 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ - __pyx_pw_4cdec_5_cdec_12SparseVector_11__iter__, /*tp_iter*/ + 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_4cdec_5_cdec_SparseVector, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec_MRule, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -22115,9 +21388,9 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_SparseVector = { 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ - __pyx_pw_4cdec_5_cdec_12SparseVector_1__init__, /*tp_init*/ + __pyx_pw_4cdec_5_cdec_5MRule_1__init__, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec_SparseVector, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec_MRule, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -22129,79 +21402,77 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_SparseVector = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif - #if PY_VERSION_HEX >= 0x030400a1 - 0, /*tp_finalize*/ - #endif }; -static PyObject *__pyx_tp_new_4cdec_5_cdec_NT(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_4cdec_5_cdec_NT *p; +static PyObject *__pyx_tp_new_4cdec_5_cdec_DenseVector(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { 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); - } + o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; - p = ((struct __pyx_obj_4cdec_5_cdec_NT *)o); - p->cat = ((PyObject*)Py_None); Py_INCREF(Py_None); return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec_NT(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec_NT *p = (struct __pyx_obj_4cdec_5_cdec_NT *)o; - #if PY_VERSION_HEX >= 0x030400a1 - if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { - if (PyObject_CallFinalizerFromDealloc(o)) return; - } - #endif - Py_CLEAR(p->cat); - (*Py_TYPE(o)->tp_free)(o); -} - -static PyObject *__pyx_getprop_4cdec_5_cdec_2NT_cat(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_4cdec_5_cdec_2NT_3cat_1__get__(o); -} - -static int __pyx_setprop_4cdec_5_cdec_2NT_cat(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { - if (v) { - return __pyx_pw_4cdec_5_cdec_2NT_3cat_3__set__(o, v); - } - else { - return __pyx_pw_4cdec_5_cdec_2NT_3cat_5__del__(o); +static void __pyx_tp_dealloc_4cdec_5_cdec_DenseVector(PyObject *o) { + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + ++Py_REFCNT(o); + __pyx_pw_4cdec_5_cdec_11DenseVector_3__dealloc__(o); + if (PyErr_Occurred()) PyErr_WriteUnraisable(o); + --Py_REFCNT(o); + PyErr_Restore(etype, eval, etb); } + (*Py_TYPE(o)->tp_free)(o); } - -static PyObject *__pyx_getprop_4cdec_5_cdec_2NT_ref(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_4cdec_5_cdec_2NT_3ref_1__get__(o); +static PyObject *__pyx_sq_item_4cdec_5_cdec_DenseVector(PyObject *o, Py_ssize_t i) { + PyObject *r; + PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0; + r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x); + Py_DECREF(x); + return r; } -static int __pyx_setprop_4cdec_5_cdec_2NT_ref(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { +static int __pyx_mp_ass_subscript_4cdec_5_cdec_DenseVector(PyObject *o, PyObject *i, PyObject *v) { if (v) { - return __pyx_pw_4cdec_5_cdec_2NT_3ref_3__set__(o, v); + return __pyx_pw_4cdec_5_cdec_11DenseVector_9__setitem__(o, i, v); } else { - PyErr_SetString(PyExc_NotImplementedError, "__del__"); + PyErr_Format(PyExc_NotImplementedError, + "Subscript deletion not supported by %s", Py_TYPE(o)->tp_name); return -1; } } -static PyMethodDef __pyx_methods_4cdec_5_cdec_NT[] = { +static PyMethodDef __pyx_methods_4cdec_5_cdec_DenseVector[] = { + {__Pyx_NAMESTR("dot"), (PyCFunction)__pyx_pw_4cdec_5_cdec_11DenseVector_14dot, METH_O, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_11DenseVector_13dot)}, + {__Pyx_NAMESTR("tosparse"), (PyCFunction)__pyx_pw_4cdec_5_cdec_11DenseVector_16tosparse, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_11DenseVector_15tosparse)}, {0, 0, 0, 0} }; -static struct PyGetSetDef __pyx_getsets_4cdec_5_cdec_NT[] = { - {(char *)"cat", __pyx_getprop_4cdec_5_cdec_2NT_cat, __pyx_setprop_4cdec_5_cdec_2NT_cat, 0, 0}, - {(char *)"ref", __pyx_getprop_4cdec_5_cdec_2NT_ref, __pyx_setprop_4cdec_5_cdec_2NT_ref, 0, 0}, - {0, 0, 0, 0, 0} +static PySequenceMethods __pyx_tp_as_sequence_DenseVector = { + __pyx_pw_4cdec_5_cdec_11DenseVector_5__len__, /*sq_length*/ + 0, /*sq_concat*/ + 0, /*sq_repeat*/ + __pyx_sq_item_4cdec_5_cdec_DenseVector, /*sq_item*/ + 0, /*sq_slice*/ + 0, /*sq_ass_item*/ + 0, /*sq_ass_slice*/ + 0, /*sq_contains*/ + 0, /*sq_inplace_concat*/ + 0, /*sq_inplace_repeat*/ }; -static PyTypeObject __pyx_type_4cdec_5_cdec_NT = { +static PyMappingMethods __pyx_tp_as_mapping_DenseVector = { + __pyx_pw_4cdec_5_cdec_11DenseVector_5__len__, /*mp_length*/ + __pyx_pw_4cdec_5_cdec_11DenseVector_7__getitem__, /*mp_subscript*/ + __pyx_mp_ass_subscript_4cdec_5_cdec_DenseVector, /*mp_ass_subscript*/ +}; + +static PyTypeObject __pyx_type_4cdec_5_cdec_DenseVector = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.NT"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec_NT), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.DenseVector"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec_DenseVector), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec_NT, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec_DenseVector, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -22212,11 +21483,11 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_NT = { #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ - 0, /*tp_as_sequence*/ - 0, /*tp_as_mapping*/ + &__pyx_tp_as_sequence_DenseVector, /*tp_as_sequence*/ + &__pyx_tp_as_mapping_DenseVector, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ - __pyx_pw_4cdec_5_cdec_2NT_3__str__, /*tp_str*/ + 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ @@ -22226,19 +21497,19 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_NT = { 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ - 0, /*tp_iter*/ + __pyx_pw_4cdec_5_cdec_11DenseVector_11__iter__, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_4cdec_5_cdec_NT, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec_DenseVector, /*tp_methods*/ 0, /*tp_members*/ - __pyx_getsets_4cdec_5_cdec_NT, /*tp_getset*/ + 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ - __pyx_pw_4cdec_5_cdec_2NT_1__init__, /*tp_init*/ + __pyx_pw_4cdec_5_cdec_11DenseVector_1__init__, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec_NT, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec_DenseVector, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -22250,60 +21521,136 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_NT = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif - #if PY_VERSION_HEX >= 0x030400a1 - 0, /*tp_finalize*/ - #endif }; -static PyObject *__pyx_tp_new_4cdec_5_cdec_NTRef(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { +static PyObject *__pyx_tp_new_4cdec_5_cdec_SufficientStats(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { 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); - } + o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec_NTRef(PyObject *o) { - #if PY_VERSION_HEX >= 0x030400a1 - if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { - if (PyObject_CallFinalizerFromDealloc(o)) return; +static void __pyx_tp_dealloc_4cdec_5_cdec_SufficientStats(PyObject *o) { + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + ++Py_REFCNT(o); + __pyx_pw_4cdec_5_cdec_15SufficientStats_1__dealloc__(o); + if (PyErr_Occurred()) PyErr_WriteUnraisable(o); + --Py_REFCNT(o); + PyErr_Restore(etype, eval, etb); } - #endif (*Py_TYPE(o)->tp_free)(o); } +static PyObject *__pyx_sq_item_4cdec_5_cdec_SufficientStats(PyObject *o, Py_ssize_t i) { + PyObject *r; + PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0; + r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x); + Py_DECREF(x); + return r; +} -static PyObject *__pyx_getprop_4cdec_5_cdec_5NTRef_ref(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_4cdec_5_cdec_5NTRef_3ref_1__get__(o); +static PyObject *__pyx_getprop_4cdec_5_cdec_15SufficientStats_score(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_15SufficientStats_5score_1__get__(o); } -static int __pyx_setprop_4cdec_5_cdec_5NTRef_ref(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { - if (v) { - return __pyx_pw_4cdec_5_cdec_5NTRef_3ref_3__set__(o, v); - } - else { - PyErr_SetString(PyExc_NotImplementedError, "__del__"); - return -1; - } +static PyObject *__pyx_getprop_4cdec_5_cdec_15SufficientStats_detail(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_15SufficientStats_6detail_1__get__(o); } -static PyMethodDef __pyx_methods_4cdec_5_cdec_NTRef[] = { +static PyMethodDef __pyx_methods_4cdec_5_cdec_SufficientStats[] = { {0, 0, 0, 0} }; -static struct PyGetSetDef __pyx_getsets_4cdec_5_cdec_NTRef[] = { - {(char *)"ref", __pyx_getprop_4cdec_5_cdec_5NTRef_ref, __pyx_setprop_4cdec_5_cdec_5NTRef_ref, 0, 0}, +static struct PyGetSetDef __pyx_getsets_4cdec_5_cdec_SufficientStats[] = { + {(char *)"score", __pyx_getprop_4cdec_5_cdec_15SufficientStats_score, 0, 0, 0}, + {(char *)"detail", __pyx_getprop_4cdec_5_cdec_15SufficientStats_detail, 0, 0, 0}, {0, 0, 0, 0, 0} }; -static PyTypeObject __pyx_type_4cdec_5_cdec_NTRef = { +static PyNumberMethods __pyx_tp_as_number_SufficientStats = { + __pyx_pw_4cdec_5_cdec_15SufficientStats_12__add__, /*nb_add*/ + 0, /*nb_subtract*/ + 0, /*nb_multiply*/ + #if PY_MAJOR_VERSION < 3 + 0, /*nb_divide*/ + #endif + 0, /*nb_remainder*/ + 0, /*nb_divmod*/ + 0, /*nb_power*/ + 0, /*nb_negative*/ + 0, /*nb_positive*/ + 0, /*nb_absolute*/ + 0, /*nb_nonzero*/ + 0, /*nb_invert*/ + 0, /*nb_lshift*/ + 0, /*nb_rshift*/ + 0, /*nb_and*/ + 0, /*nb_xor*/ + 0, /*nb_or*/ + #if PY_MAJOR_VERSION < 3 + 0, /*nb_coerce*/ + #endif + 0, /*nb_int*/ + #if PY_MAJOR_VERSION < 3 + 0, /*nb_long*/ + #else + 0, /*reserved*/ + #endif + 0, /*nb_float*/ + #if PY_MAJOR_VERSION < 3 + 0, /*nb_oct*/ + #endif + #if PY_MAJOR_VERSION < 3 + 0, /*nb_hex*/ + #endif + __pyx_pw_4cdec_5_cdec_15SufficientStats_10__iadd__, /*nb_inplace_add*/ + 0, /*nb_inplace_subtract*/ + 0, /*nb_inplace_multiply*/ + #if PY_MAJOR_VERSION < 3 + 0, /*nb_inplace_divide*/ + #endif + 0, /*nb_inplace_remainder*/ + 0, /*nb_inplace_power*/ + 0, /*nb_inplace_lshift*/ + 0, /*nb_inplace_rshift*/ + 0, /*nb_inplace_and*/ + 0, /*nb_inplace_xor*/ + 0, /*nb_inplace_or*/ + 0, /*nb_floor_divide*/ + 0, /*nb_true_divide*/ + 0, /*nb_inplace_floor_divide*/ + 0, /*nb_inplace_true_divide*/ + #if PY_VERSION_HEX >= 0x02050000 + 0, /*nb_index*/ + #endif +}; + +static PySequenceMethods __pyx_tp_as_sequence_SufficientStats = { + __pyx_pw_4cdec_5_cdec_15SufficientStats_3__len__, /*sq_length*/ + 0, /*sq_concat*/ + 0, /*sq_repeat*/ + __pyx_sq_item_4cdec_5_cdec_SufficientStats, /*sq_item*/ + 0, /*sq_slice*/ + 0, /*sq_ass_item*/ + 0, /*sq_ass_slice*/ + 0, /*sq_contains*/ + 0, /*sq_inplace_concat*/ + 0, /*sq_inplace_repeat*/ +}; + +static PyMappingMethods __pyx_tp_as_mapping_SufficientStats = { + __pyx_pw_4cdec_5_cdec_15SufficientStats_3__len__, /*mp_length*/ + __pyx_pw_4cdec_5_cdec_15SufficientStats_8__getitem__, /*mp_subscript*/ + 0, /*mp_ass_subscript*/ +}; + +static PyTypeObject __pyx_type_4cdec_5_cdec_SufficientStats = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.NTRef"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec_NTRef), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.SufficientStats"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec_SufficientStats), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec_NTRef, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec_SufficientStats, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -22313,12 +21660,12 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_NTRef = { 0, /*reserved*/ #endif 0, /*tp_repr*/ - 0, /*tp_as_number*/ - 0, /*tp_as_sequence*/ - 0, /*tp_as_mapping*/ + &__pyx_tp_as_number_SufficientStats, /*tp_as_number*/ + &__pyx_tp_as_sequence_SufficientStats, /*tp_as_sequence*/ + &__pyx_tp_as_mapping_SufficientStats, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ - __pyx_pw_4cdec_5_cdec_5NTRef_3__str__, /*tp_str*/ + 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ @@ -22328,19 +21675,19 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_NTRef = { 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ - 0, /*tp_iter*/ + __pyx_pw_4cdec_5_cdec_15SufficientStats_5__iter__, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_4cdec_5_cdec_NTRef, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec_SufficientStats, /*tp_methods*/ 0, /*tp_members*/ - __pyx_getsets_4cdec_5_cdec_NTRef, /*tp_getset*/ + __pyx_getsets_4cdec_5_cdec_SufficientStats, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ - __pyx_pw_4cdec_5_cdec_5NTRef_1__init__, /*tp_init*/ + 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec_NTRef, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec_SufficientStats, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -22352,133 +21699,115 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_NTRef = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif - #if PY_VERSION_HEX >= 0x030400a1 - 0, /*tp_finalize*/ - #endif -}; - -static PyObject *__pyx_tp_new_4cdec_5_cdec_TRule(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - 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; - return o; -} - -static void __pyx_tp_dealloc_4cdec_5_cdec_TRule(PyObject *o) { - #if PY_VERSION_HEX >= 0x030400a1 - if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { - if (PyObject_CallFinalizerFromDealloc(o)) return; - } - #endif - { - PyObject *etype, *eval, *etb; - PyErr_Fetch(&etype, &eval, &etb); - ++Py_REFCNT(o); - __pyx_pw_4cdec_5_cdec_5TRule_3__dealloc__(o); - --Py_REFCNT(o); - PyErr_Restore(etype, eval, etb); - } - (*Py_TYPE(o)->tp_free)(o); -} - -static PyObject *__pyx_getprop_4cdec_5_cdec_5TRule_arity(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_4cdec_5_cdec_5TRule_5arity_1__get__(o); -} - -static PyObject *__pyx_getprop_4cdec_5_cdec_5TRule_f(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_4cdec_5_cdec_5TRule_1f_1__get__(o); -} - -static int __pyx_setprop_4cdec_5_cdec_5TRule_f(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { - if (v) { - return __pyx_pw_4cdec_5_cdec_5TRule_1f_3__set__(o, v); - } - else { - PyErr_SetString(PyExc_NotImplementedError, "__del__"); - return -1; - } -} +}; -static PyObject *__pyx_getprop_4cdec_5_cdec_5TRule_e(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_4cdec_5_cdec_5TRule_1e_1__get__(o); -} +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23_lines *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_23_lines[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_23_lines = 0; -static int __pyx_setprop_4cdec_5_cdec_5TRule_e(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { - if (v) { - return __pyx_pw_4cdec_5_cdec_5TRule_1e_3__set__(o, v); - } - else { - PyErr_SetString(PyExc_NotImplementedError, "__del__"); - return -1; +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_23_lines(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23_lines *p; + PyObject *o; + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_23_lines > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23_lines)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_23_lines[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_23_lines]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23_lines)); + PyObject_INIT(o, t); + PyObject_GC_Track(o); + } else { + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; } + p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23_lines *)o); + p->__pyx_outer_scope = 0; + p->__pyx_v_delta = 0; + p->__pyx_v_i = 0; + p->__pyx_v_label = 0; + p->__pyx_v_weight = 0; + p->__pyx_t_1 = 0; + p->__pyx_t_3 = 0; + return o; } -static PyObject *__pyx_getprop_4cdec_5_cdec_5TRule_a(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_4cdec_5_cdec_5TRule_1a_1__get__(o); +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_23_lines(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23_lines *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23_lines *)o; + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_outer_scope); + Py_CLEAR(p->__pyx_v_delta); + Py_CLEAR(p->__pyx_v_i); + Py_CLEAR(p->__pyx_v_label); + Py_CLEAR(p->__pyx_v_weight); + Py_CLEAR(p->__pyx_t_1); + Py_CLEAR(p->__pyx_t_3); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_23_lines < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23_lines))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_23_lines[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_23_lines++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23_lines *)o); + } else { + (*Py_TYPE(o)->tp_free)(o); + } } -static int __pyx_setprop_4cdec_5_cdec_5TRule_a(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { - if (v) { - return __pyx_pw_4cdec_5_cdec_5TRule_1a_4__set__(o, v); +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_23_lines(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23_lines *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23_lines *)o; + if (p->__pyx_outer_scope) { + e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e; } - else { - PyErr_SetString(PyExc_NotImplementedError, "__del__"); - return -1; + if (p->__pyx_v_delta) { + e = (*v)(p->__pyx_v_delta, a); if (e) return e; } -} - -static PyObject *__pyx_getprop_4cdec_5_cdec_5TRule_scores(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_4cdec_5_cdec_5TRule_6scores_1__get__(o); -} - -static int __pyx_setprop_4cdec_5_cdec_5TRule_scores(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { - if (v) { - return __pyx_pw_4cdec_5_cdec_5TRule_6scores_3__set__(o, v); + if (p->__pyx_v_i) { + e = (*v)(p->__pyx_v_i, a); if (e) return e; } - else { - PyErr_SetString(PyExc_NotImplementedError, "__del__"); - return -1; + if (p->__pyx_v_label) { + e = (*v)(p->__pyx_v_label, a); if (e) return e; } -} - -static PyObject *__pyx_getprop_4cdec_5_cdec_5TRule_lhs(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_4cdec_5_cdec_5TRule_3lhs_1__get__(o); -} - -static int __pyx_setprop_4cdec_5_cdec_5TRule_lhs(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { - if (v) { - return __pyx_pw_4cdec_5_cdec_5TRule_3lhs_3__set__(o, v); + if (p->__pyx_v_weight) { + e = (*v)(p->__pyx_v_weight, a); if (e) return e; } - else { - PyErr_SetString(PyExc_NotImplementedError, "__del__"); - return -1; + if (p->__pyx_t_1) { + e = (*v)(p->__pyx_t_1, a); if (e) return e; + } + if (p->__pyx_t_3) { + e = (*v)(p->__pyx_t_3, a); if (e) return e; } + return 0; } -static PyMethodDef __pyx_methods_4cdec_5_cdec_TRule[] = { - {0, 0, 0, 0} -}; +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_23_lines(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23_lines *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23_lines *)o; + PyObject* tmp; + tmp = ((PyObject*)p->__pyx_outer_scope); + p->__pyx_outer_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22_todot *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_v_delta); + p->__pyx_v_delta = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_v_i); + p->__pyx_v_i = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_v_label); + p->__pyx_v_label = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_v_weight); + p->__pyx_v_weight = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_t_1); + p->__pyx_t_1 = 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 struct PyGetSetDef __pyx_getsets_4cdec_5_cdec_TRule[] = { - {(char *)"arity", __pyx_getprop_4cdec_5_cdec_5TRule_arity, 0, 0, 0}, - {(char *)"f", __pyx_getprop_4cdec_5_cdec_5TRule_f, __pyx_setprop_4cdec_5_cdec_5TRule_f, 0, 0}, - {(char *)"e", __pyx_getprop_4cdec_5_cdec_5TRule_e, __pyx_setprop_4cdec_5_cdec_5TRule_e, 0, 0}, - {(char *)"a", __pyx_getprop_4cdec_5_cdec_5TRule_a, __pyx_setprop_4cdec_5_cdec_5TRule_a, 0, 0}, - {(char *)"scores", __pyx_getprop_4cdec_5_cdec_5TRule_scores, __pyx_setprop_4cdec_5_cdec_5TRule_scores, 0, 0}, - {(char *)"lhs", __pyx_getprop_4cdec_5_cdec_5TRule_lhs, __pyx_setprop_4cdec_5_cdec_5TRule_lhs, 0, 0}, - {0, 0, 0, 0, 0} +static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_23_lines[] = { + {0, 0, 0, 0} }; -static PyTypeObject __pyx_type_4cdec_5_cdec_TRule = { +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_23_lines = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.TRule"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec_TRule), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_23_lines"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23_lines), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec_TRule, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_23_lines, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -22493,29 +21822,29 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_TRule = { 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ - __pyx_pw_4cdec_5_cdec_5TRule_5__str__, /*tp_str*/ + 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, /*tp_flags*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ - 0, /*tp_traverse*/ - 0, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_23_lines, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_23_lines, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_4cdec_5_cdec_TRule, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec___pyx_scope_struct_23_lines, /*tp_methods*/ 0, /*tp_members*/ - __pyx_getsets_4cdec_5_cdec_TRule, /*tp_getset*/ + 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ - __pyx_pw_4cdec_5_cdec_5TRule_1__init__, /*tp_init*/ + 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec_TRule, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_23_lines, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -22527,27 +21856,67 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_TRule = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif - #if PY_VERSION_HEX >= 0x030400a1 - 0, /*tp_finalize*/ - #endif }; -static PyObject *__pyx_tp_new_4cdec_5_cdec_MRule(PyTypeObject *t, PyObject *a, PyObject *k) { - PyObject *o = __pyx_tp_new_4cdec_5_cdec_TRule(t, a, k); - if (unlikely(!o)) return 0; +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_27___init__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_27___init__[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_27___init__ = 0; + +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_27___init__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_27___init__ *p; + PyObject *o; + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_27___init__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_27___init__)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_27___init__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_27___init__]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_27___init__)); + PyObject_INIT(o, t); + PyObject_GC_Track(o); + } else { + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + } + p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_27___init__ *)o); + p->__pyx_v_config = 0; return o; } -static PyMethodDef __pyx_methods_4cdec_5_cdec_MRule[] = { +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_27___init__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_27___init__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_27___init__ *)o; + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_v_config); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_27___init__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_27___init__))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_27___init__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_27___init__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_27___init__ *)o); + } else { + (*Py_TYPE(o)->tp_free)(o); + } +} + +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_27___init__(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_27___init__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_27___init__ *)o; + if (p->__pyx_v_config) { + e = (*v)(p->__pyx_v_config, a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_27___init__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_27___init__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_27___init__ *)o; + PyObject* tmp; + tmp = ((PyObject*)p->__pyx_v_config); + p->__pyx_v_config = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_27___init__[] = { {0, 0, 0, 0} }; -static PyTypeObject __pyx_type_4cdec_5_cdec_MRule = { +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_27___init__ = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.MRule"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec_MRule), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_27___init__"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_27___init__), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec_TRule, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_27___init__, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -22562,23 +21931,19 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_MRule = { 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ - #if CYTHON_COMPILING_IN_PYPY - __pyx_pw_4cdec_5_cdec_5TRule_5__str__, /*tp_str*/ - #else 0, /*tp_str*/ - #endif 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, /*tp_flags*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ - 0, /*tp_traverse*/ - 0, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_27___init__, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_27___init__, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_4cdec_5_cdec_MRule, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec___pyx_scope_struct_27___init__, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -22586,9 +21951,9 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_MRule = { 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ - __pyx_pw_4cdec_5_cdec_5MRule_1__init__, /*tp_init*/ + 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec_MRule, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_27___init__, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -22600,68 +21965,67 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_MRule = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif - #if PY_VERSION_HEX >= 0x030400a1 - 0, /*tp_finalize*/ - #endif }; -static PyObject *__pyx_tp_new_4cdec_5_cdec_Grammar(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_21___iter__[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_21___iter__ = 0; + +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_21___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__ *p; PyObject *o; - if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { - o = (*t->tp_alloc)(t, 0); + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_21___iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_21___iter__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_21___iter__]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__)); + PyObject_INIT(o, t); + PyObject_GC_Track(o); } else { - o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; } - if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__ *)o); + p->__pyx_v_self = 0; return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec_Grammar(PyObject *o) { - #if PY_VERSION_HEX >= 0x030400a1 - if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { - if (PyObject_CallFinalizerFromDealloc(o)) return; - } - #endif - { - PyObject *etype, *eval, *etb; - PyErr_Fetch(&etype, &eval, &etb); - ++Py_REFCNT(o); - __pyx_pw_4cdec_5_cdec_7Grammar_1__dealloc__(o); - --Py_REFCNT(o); - PyErr_Restore(etype, eval, etb); +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_21___iter__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__ *)o; + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_v_self); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_21___iter__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_21___iter__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_21___iter__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__ *)o); + } else { + (*Py_TYPE(o)->tp_free)(o); } - (*Py_TYPE(o)->tp_free)(o); } -static PyObject *__pyx_getprop_4cdec_5_cdec_7Grammar_name(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_4cdec_5_cdec_7Grammar_4name_1__get__(o); +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_21___iter__(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__ *)o; + if (p->__pyx_v_self) { + e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; + } + return 0; } -static int __pyx_setprop_4cdec_5_cdec_7Grammar_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { - if (v) { - return __pyx_pw_4cdec_5_cdec_7Grammar_4name_3__set__(o, v); - } - else { - PyErr_SetString(PyExc_NotImplementedError, "__del__"); - return -1; - } +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_21___iter__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__ *)o; + PyObject* tmp; + tmp = ((PyObject*)p->__pyx_v_self); + p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_Lattice *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; } -static PyMethodDef __pyx_methods_4cdec_5_cdec_Grammar[] = { +static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_21___iter__[] = { {0, 0, 0, 0} }; -static struct PyGetSetDef __pyx_getsets_4cdec_5_cdec_Grammar[] = { - {(char *)"name", __pyx_getprop_4cdec_5_cdec_7Grammar_name, __pyx_setprop_4cdec_5_cdec_7Grammar_name, 0, 0}, - {0, 0, 0, 0, 0} -}; - -static PyTypeObject __pyx_type_4cdec_5_cdec_Grammar = { +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_21___iter__ = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.Grammar"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec_Grammar), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_21___iter__"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec_Grammar, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_21___iter__, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -22680,17 +22044,17 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_Grammar = { 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, /*tp_flags*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ - 0, /*tp_traverse*/ - 0, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_21___iter__, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_21___iter__, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ - __pyx_pw_4cdec_5_cdec_7Grammar_3__iter__, /*tp_iter*/ + 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_4cdec_5_cdec_Grammar, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec___pyx_scope_struct_21___iter__, /*tp_methods*/ 0, /*tp_members*/ - __pyx_getsets_4cdec_5_cdec_Grammar, /*tp_getset*/ + 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ @@ -22698,7 +22062,7 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_Grammar = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec_Grammar, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_21___iter__, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -22710,27 +22074,58 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_Grammar = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif - #if PY_VERSION_HEX >= 0x030400a1 - 0, /*tp_finalize*/ - #endif }; -static PyObject *__pyx_tp_new_4cdec_5_cdec_TextGrammar(PyTypeObject *t, PyObject *a, PyObject *k) { - PyObject *o = __pyx_tp_new_4cdec_5_cdec_Grammar(t, a, k); +static PyObject *__pyx_tp_new_4cdec_5_cdec_Metric(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec_Metric *p; + PyObject *o; + o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_4cdec_5_cdec_Metric *)o); + p->scorer = ((struct __pyx_obj_4cdec_5_cdec_Scorer *)Py_None); Py_INCREF(Py_None); + if (unlikely(__pyx_pw_4cdec_5_cdec_6Metric_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) { + Py_DECREF(o); o = 0; + } return o; } -static PyMethodDef __pyx_methods_4cdec_5_cdec_TextGrammar[] = { +static void __pyx_tp_dealloc_4cdec_5_cdec_Metric(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec_Metric *p = (struct __pyx_obj_4cdec_5_cdec_Metric *)o; + PyObject_GC_UnTrack(o); + Py_CLEAR(p->scorer); + (*Py_TYPE(o)->tp_free)(o); +} + +static int __pyx_tp_traverse_4cdec_5_cdec_Metric(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_4cdec_5_cdec_Metric *p = (struct __pyx_obj_4cdec_5_cdec_Metric *)o; + if (p->scorer) { + e = (*v)(((PyObject*)p->scorer), a); if (e) return e; + } + return 0; +} + +static int __pyx_tp_clear_4cdec_5_cdec_Metric(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec_Metric *p = (struct __pyx_obj_4cdec_5_cdec_Metric *)o; + PyObject* tmp; + tmp = ((PyObject*)p->scorer); + p->scorer = ((struct __pyx_obj_4cdec_5_cdec_Scorer *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyMethodDef __pyx_methods_4cdec_5_cdec_Metric[] = { + {__Pyx_NAMESTR("score"), (PyCFunction)__pyx_pw_4cdec_5_cdec_6Metric_5score, METH_NOARGS, __Pyx_DOCSTR(0)}, + {__Pyx_NAMESTR("evaluate"), (PyCFunction)__pyx_pw_4cdec_5_cdec_6Metric_7evaluate, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, {0, 0, 0, 0} }; -static PyTypeObject __pyx_type_4cdec_5_cdec_TextGrammar = { +static PyTypeObject __pyx_type_4cdec_5_cdec_Metric = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.TextGrammar"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec_TextGrammar), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.Metric"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec_Metric), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec_Grammar, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec_Metric, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -22744,24 +22139,20 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_TextGrammar = { 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ - 0, /*tp_call*/ + __pyx_pw_4cdec_5_cdec_6Metric_3__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, /*tp_flags*/ + 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*/ - 0, /*tp_traverse*/ - 0, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec_Metric, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec_Metric, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ - #if CYTHON_COMPILING_IN_PYPY - __pyx_pw_4cdec_5_cdec_7Grammar_3__iter__, /*tp_iter*/ - #else 0, /*tp_iter*/ - #endif 0, /*tp_iternext*/ - __pyx_methods_4cdec_5_cdec_TextGrammar, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec_Metric, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -22769,9 +22160,9 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_TextGrammar = { 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ - __pyx_pw_4cdec_5_cdec_11TextGrammar_1__init__, /*tp_init*/ + 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec_TextGrammar, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec_Metric, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -22783,93 +22174,75 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_TextGrammar = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif - #if PY_VERSION_HEX >= 0x030400a1 - 0, /*tp_finalize*/ - #endif }; -static struct __pyx_vtabstruct_4cdec_5_cdec_Hypergraph __pyx_vtable_4cdec_5_cdec_Hypergraph; -static PyObject *__pyx_tp_new_4cdec_5_cdec_Hypergraph(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_4cdec_5_cdec_Hypergraph *p; +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_unique_kbest *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_11_unique_kbest[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_11_unique_kbest = 0; + +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_11_unique_kbest(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_unique_kbest *p; PyObject *o; - if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { - o = (*t->tp_alloc)(t, 0); + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_11_unique_kbest > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_unique_kbest)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_11_unique_kbest[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_11_unique_kbest]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_unique_kbest)); + PyObject_INIT(o, t); + PyObject_GC_Track(o); } else { - o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; } - if (unlikely(!o)) return 0; - p = ((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)o); - p->__pyx_vtab = __pyx_vtabptr_4cdec_5_cdec_Hypergraph; + p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_unique_kbest *)o); + p->__pyx_v_self = 0; + p->__pyx_v_size = 0; return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec_Hypergraph(PyObject *o) { - #if PY_VERSION_HEX >= 0x030400a1 - if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { - if (PyObject_CallFinalizerFromDealloc(o)) return; - } - #endif - { - PyObject *etype, *eval, *etb; - PyErr_Fetch(&etype, &eval, &etb); - ++Py_REFCNT(o); - __pyx_pw_4cdec_5_cdec_10Hypergraph_1__dealloc__(o); - --Py_REFCNT(o); - PyErr_Restore(etype, eval, etb); +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_11_unique_kbest(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_unique_kbest *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_unique_kbest *)o; + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_v_self); + Py_CLEAR(p->__pyx_v_size); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_11_unique_kbest < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_unique_kbest))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_11_unique_kbest[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_11_unique_kbest++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_unique_kbest *)o); + } else { + (*Py_TYPE(o)->tp_free)(o); } - (*Py_TYPE(o)->tp_free)(o); -} - -static PyObject *__pyx_getprop_4cdec_5_cdec_10Hypergraph_edges(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_4cdec_5_cdec_10Hypergraph_5edges_1__get__(o); -} - -static PyObject *__pyx_getprop_4cdec_5_cdec_10Hypergraph_nodes(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_4cdec_5_cdec_10Hypergraph_5nodes_1__get__(o); } -static PyObject *__pyx_getprop_4cdec_5_cdec_10Hypergraph_goal(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_4cdec_5_cdec_10Hypergraph_4goal_1__get__(o); +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_11_unique_kbest(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_unique_kbest *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_unique_kbest *)o; + if (p->__pyx_v_self) { + e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; + } + if (p->__pyx_v_size) { + e = (*v)(p->__pyx_v_size, a); if (e) return e; + } + return 0; } -static PyObject *__pyx_getprop_4cdec_5_cdec_10Hypergraph_npaths(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_4cdec_5_cdec_10Hypergraph_6npaths_1__get__(o); +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_11_unique_kbest(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_unique_kbest *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_unique_kbest *)o; + PyObject* tmp; + tmp = ((PyObject*)p->__pyx_v_self); + p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_v_size); + p->__pyx_v_size = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; } -static PyMethodDef __pyx_methods_4cdec_5_cdec_Hypergraph[] = { - {__Pyx_NAMESTR("viterbi"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_3viterbi, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_2viterbi)}, - {__Pyx_NAMESTR("viterbi_trees"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_5viterbi_trees, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_4viterbi_trees)}, - {__Pyx_NAMESTR("viterbi_features"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_7viterbi_features, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_6viterbi_features)}, - {__Pyx_NAMESTR("viterbi_forest"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_9viterbi_forest, METH_NOARGS, __Pyx_DOCSTR(0)}, - {__Pyx_NAMESTR("viterbi_joshua"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_11viterbi_joshua, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_10viterbi_joshua)}, - {__Pyx_NAMESTR("kbest"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_13kbest, METH_O, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_12kbest)}, - {__Pyx_NAMESTR("kbest_trees"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_16kbest_trees, METH_O, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_15kbest_trees)}, - {__Pyx_NAMESTR("kbest_features"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_19kbest_features, METH_O, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_18kbest_features)}, - {__Pyx_NAMESTR("sample"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_22sample, METH_O, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_21sample)}, - {__Pyx_NAMESTR("sample_trees"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_25sample_trees, METH_O, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_24sample_trees)}, - {__Pyx_NAMESTR("intersect"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_28intersect, METH_O, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_27intersect)}, - {__Pyx_NAMESTR("prune"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_30prune, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_29prune)}, - {__Pyx_NAMESTR("lattice"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_32lattice, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_31lattice)}, - {__Pyx_NAMESTR("plf"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_34plf, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_33plf)}, - {__Pyx_NAMESTR("reweight"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_36reweight, METH_O, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_35reweight)}, - {__Pyx_NAMESTR("inside_outside"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_38inside_outside, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_37inside_outside)}, +static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_11_unique_kbest[] = { {0, 0, 0, 0} }; -static struct PyGetSetDef __pyx_getsets_4cdec_5_cdec_Hypergraph[] = { - {(char *)"edges", __pyx_getprop_4cdec_5_cdec_10Hypergraph_edges, 0, 0, 0}, - {(char *)"nodes", __pyx_getprop_4cdec_5_cdec_10Hypergraph_nodes, 0, 0, 0}, - {(char *)"goal", __pyx_getprop_4cdec_5_cdec_10Hypergraph_goal, 0, 0, 0}, - {(char *)"npaths", __pyx_getprop_4cdec_5_cdec_10Hypergraph_npaths, 0, 0, 0}, - {0, 0, 0, 0, 0} -}; - -static PyTypeObject __pyx_type_4cdec_5_cdec_Hypergraph = { +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_11_unique_kbest = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.Hypergraph"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec_Hypergraph), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_11_unique_kbest"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_unique_kbest), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec_Hypergraph, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_11_unique_kbest, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -22888,17 +22261,17 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_Hypergraph = { 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, /*tp_flags*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ - 0, /*tp_traverse*/ - 0, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_11_unique_kbest, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_11_unique_kbest, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_4cdec_5_cdec_Hypergraph, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec___pyx_scope_struct_11_unique_kbest, /*tp_methods*/ 0, /*tp_members*/ - __pyx_getsets_4cdec_5_cdec_Hypergraph, /*tp_getset*/ + 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ @@ -22906,7 +22279,7 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_Hypergraph = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec_Hypergraph, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_11_unique_kbest, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -22918,134 +22291,58 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_Hypergraph = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif - #if PY_VERSION_HEX >= 0x030400a1 - 0, /*tp_finalize*/ - #endif }; -static struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphEdge __pyx_vtable_4cdec_5_cdec_HypergraphEdge; -static PyObject *__pyx_tp_new_4cdec_5_cdec_HypergraphEdge(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *p; +static PyObject *__pyx_tp_new_4cdec_5_cdec_Candidate(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { 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); - } + o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; - p = ((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)o); - p->__pyx_vtab = __pyx_vtabptr_4cdec_5_cdec_HypergraphEdge; - p->trule = ((struct __pyx_obj_4cdec_5_cdec_TRule *)Py_None); Py_INCREF(Py_None); return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec_HypergraphEdge(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *p = (struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)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->trule); +static void __pyx_tp_dealloc_4cdec_5_cdec_Candidate(PyObject *o) { (*Py_TYPE(o)->tp_free)(o); } -static int __pyx_tp_traverse_4cdec_5_cdec_HypergraphEdge(PyObject *o, visitproc v, void *a) { - int e; - struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *p = (struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)o; - if (p->trule) { - e = (*v)(((PyObject*)p->trule), a); if (e) return e; - } - return 0; -} - -static int __pyx_tp_clear_4cdec_5_cdec_HypergraphEdge(PyObject *o) { - PyObject* tmp; - struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *p = (struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)o; - tmp = ((PyObject*)p->trule); - p->trule = ((struct __pyx_obj_4cdec_5_cdec_TRule *)Py_None); Py_INCREF(Py_None); - Py_XDECREF(tmp); - return 0; -} - -static PyObject *__pyx_getprop_4cdec_5_cdec_14HypergraphEdge_head_node(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_4cdec_5_cdec_14HypergraphEdge_9head_node_1__get__(o); -} - -static PyObject *__pyx_getprop_4cdec_5_cdec_14HypergraphEdge_tail_nodes(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_4cdec_5_cdec_14HypergraphEdge_10tail_nodes_1__get__(o); -} - -static PyObject *__pyx_getprop_4cdec_5_cdec_14HypergraphEdge_span(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_4cdec_5_cdec_14HypergraphEdge_4span_1__get__(o); -} - -static PyObject *__pyx_getprop_4cdec_5_cdec_14HypergraphEdge_src_span(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_4cdec_5_cdec_14HypergraphEdge_8src_span_1__get__(o); -} - -static PyObject *__pyx_getprop_4cdec_5_cdec_14HypergraphEdge_feature_values(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_4cdec_5_cdec_14HypergraphEdge_14feature_values_1__get__(o); +static PyObject *__pyx_getprop_4cdec_5_cdec_9Candidate_words(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_9Candidate_5words_1__get__(o); } -static PyObject *__pyx_getprop_4cdec_5_cdec_14HypergraphEdge_prob(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_4cdec_5_cdec_14HypergraphEdge_4prob_1__get__(o); +static PyObject *__pyx_getprop_4cdec_5_cdec_9Candidate_fmap(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_9Candidate_4fmap_1__get__(o); } -static PyObject *__pyx_getprop_4cdec_5_cdec_14HypergraphEdge_trule(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_4cdec_5_cdec_14HypergraphEdge_5trule_1__get__(o); +static PyObject *__pyx_getprop_4cdec_5_cdec_9Candidate_score(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_9Candidate_5score_1__get__(o); } -static int __pyx_setprop_4cdec_5_cdec_14HypergraphEdge_trule(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { +static int __pyx_setprop_4cdec_5_cdec_9Candidate_score(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { - return __pyx_pw_4cdec_5_cdec_14HypergraphEdge_5trule_3__set__(o, v); - } - else { - return __pyx_pw_4cdec_5_cdec_14HypergraphEdge_5trule_5__del__(o); - } -} - -static PyMethodDef __pyx_methods_4cdec_5_cdec_HypergraphEdge[] = { - {0, 0, 0, 0} -}; - -static struct PyGetSetDef __pyx_getsets_4cdec_5_cdec_HypergraphEdge[] = { - {(char *)"head_node", __pyx_getprop_4cdec_5_cdec_14HypergraphEdge_head_node, 0, 0, 0}, - {(char *)"tail_nodes", __pyx_getprop_4cdec_5_cdec_14HypergraphEdge_tail_nodes, 0, 0, 0}, - {(char *)"span", __pyx_getprop_4cdec_5_cdec_14HypergraphEdge_span, 0, 0, 0}, - {(char *)"src_span", __pyx_getprop_4cdec_5_cdec_14HypergraphEdge_src_span, 0, 0, 0}, - {(char *)"feature_values", __pyx_getprop_4cdec_5_cdec_14HypergraphEdge_feature_values, 0, 0, 0}, - {(char *)"prob", __pyx_getprop_4cdec_5_cdec_14HypergraphEdge_prob, 0, 0, 0}, - {(char *)"trule", __pyx_getprop_4cdec_5_cdec_14HypergraphEdge_trule, __pyx_setprop_4cdec_5_cdec_14HypergraphEdge_trule, 0, 0}, - {0, 0, 0, 0, 0} -}; - -static PySequenceMethods __pyx_tp_as_sequence_HypergraphEdge = { - __pyx_pw_4cdec_5_cdec_14HypergraphEdge_1__len__, /*sq_length*/ - 0, /*sq_concat*/ - 0, /*sq_repeat*/ - 0, /*sq_item*/ - 0, /*sq_slice*/ - 0, /*sq_ass_item*/ - 0, /*sq_ass_slice*/ - 0, /*sq_contains*/ - 0, /*sq_inplace_concat*/ - 0, /*sq_inplace_repeat*/ + return __pyx_pw_4cdec_5_cdec_9Candidate_5score_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyMethodDef __pyx_methods_4cdec_5_cdec_Candidate[] = { + {0, 0, 0, 0} }; -static PyMappingMethods __pyx_tp_as_mapping_HypergraphEdge = { - __pyx_pw_4cdec_5_cdec_14HypergraphEdge_1__len__, /*mp_length*/ - 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ +static struct PyGetSetDef __pyx_getsets_4cdec_5_cdec_Candidate[] = { + {(char *)"words", __pyx_getprop_4cdec_5_cdec_9Candidate_words, 0, 0, 0}, + {(char *)"fmap", __pyx_getprop_4cdec_5_cdec_9Candidate_fmap, 0, 0, 0}, + {(char *)"score", __pyx_getprop_4cdec_5_cdec_9Candidate_score, __pyx_setprop_4cdec_5_cdec_9Candidate_score, 0, 0}, + {0, 0, 0, 0, 0} }; -static PyTypeObject __pyx_type_4cdec_5_cdec_HypergraphEdge = { +static PyTypeObject __pyx_type_4cdec_5_cdec_Candidate = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.HypergraphEdge"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec_HypergraphEdge), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.Candidate"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec_Candidate), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec_HypergraphEdge, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec_Candidate, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -23056,25 +22353,25 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_HypergraphEdge = { #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ - &__pyx_tp_as_sequence_HypergraphEdge, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_HypergraphEdge, /*tp_as_mapping*/ + 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*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ - __pyx_tp_traverse_4cdec_5_cdec_HypergraphEdge, /*tp_traverse*/ - __pyx_tp_clear_4cdec_5_cdec_HypergraphEdge, /*tp_clear*/ - __pyx_pw_4cdec_5_cdec_14HypergraphEdge_3__richcmp__, /*tp_richcompare*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_4cdec_5_cdec_HypergraphEdge, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec_Candidate, /*tp_methods*/ 0, /*tp_members*/ - __pyx_getsets_4cdec_5_cdec_HypergraphEdge, /*tp_getset*/ + __pyx_getsets_4cdec_5_cdec_Candidate, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ @@ -23082,7 +22379,7 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_HypergraphEdge = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec_HypergraphEdge, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec_Candidate, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -23094,74 +22391,135 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_HypergraphEdge = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif - #if PY_VERSION_HEX >= 0x030400a1 - 0, /*tp_finalize*/ - #endif }; -static struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphNode __pyx_vtable_4cdec_5_cdec_HypergraphNode; -static PyObject *__pyx_tp_new_4cdec_5_cdec_HypergraphNode(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_4cdec_5_cdec_HypergraphNode *p; +static PyObject *__pyx_tp_new_4cdec_5_cdec_SparseVector(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { 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); - } + o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; - p = ((struct __pyx_obj_4cdec_5_cdec_HypergraphNode *)o); - p->__pyx_vtab = __pyx_vtabptr_4cdec_5_cdec_HypergraphNode; return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec_HypergraphNode(PyObject *o) { - #if PY_VERSION_HEX >= 0x030400a1 - if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { - if (PyObject_CallFinalizerFromDealloc(o)) return; +static void __pyx_tp_dealloc_4cdec_5_cdec_SparseVector(PyObject *o) { + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + ++Py_REFCNT(o); + __pyx_pw_4cdec_5_cdec_12SparseVector_3__dealloc__(o); + if (PyErr_Occurred()) PyErr_WriteUnraisable(o); + --Py_REFCNT(o); + PyErr_Restore(etype, eval, etb); } - #endif (*Py_TYPE(o)->tp_free)(o); } - -static PyObject *__pyx_getprop_4cdec_5_cdec_14HypergraphNode_id(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_4cdec_5_cdec_14HypergraphNode_2id_1__get__(o); -} - -static PyObject *__pyx_getprop_4cdec_5_cdec_14HypergraphNode_in_edges(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_4cdec_5_cdec_14HypergraphNode_8in_edges_1__get__(o); +static PyObject *__pyx_sq_item_4cdec_5_cdec_SparseVector(PyObject *o, Py_ssize_t i) { + PyObject *r; + PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0; + r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x); + Py_DECREF(x); + return r; } -static PyObject *__pyx_getprop_4cdec_5_cdec_14HypergraphNode_out_edges(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_4cdec_5_cdec_14HypergraphNode_9out_edges_1__get__(o); +static int __pyx_mp_ass_subscript_4cdec_5_cdec_SparseVector(PyObject *o, PyObject *i, PyObject *v) { + if (v) { + return __pyx_pw_4cdec_5_cdec_12SparseVector_9__setitem__(o, i, v); + } + else { + PyErr_Format(PyExc_NotImplementedError, + "Subscript deletion not supported by %s", Py_TYPE(o)->tp_name); + return -1; + } } -static PyObject *__pyx_getprop_4cdec_5_cdec_14HypergraphNode_span(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_4cdec_5_cdec_14HypergraphNode_4span_1__get__(o); -} +static PyMethodDef __pyx_methods_4cdec_5_cdec_SparseVector[] = { + {__Pyx_NAMESTR("copy"), (PyCFunction)__pyx_pw_4cdec_5_cdec_12SparseVector_5copy, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_12SparseVector_4copy)}, + {__Pyx_NAMESTR("dot"), (PyCFunction)__pyx_pw_4cdec_5_cdec_12SparseVector_14dot, METH_O, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_12SparseVector_13dot)}, + {0, 0, 0, 0} +}; -static PyObject *__pyx_getprop_4cdec_5_cdec_14HypergraphNode_cat(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_4cdec_5_cdec_14HypergraphNode_3cat_1__get__(o); -} +static PyNumberMethods __pyx_tp_as_number_SparseVector = { + __pyx_pw_4cdec_5_cdec_12SparseVector_32__add__, /*nb_add*/ + __pyx_pw_4cdec_5_cdec_12SparseVector_34__sub__, /*nb_subtract*/ + __pyx_pw_4cdec_5_cdec_12SparseVector_36__mul__, /*nb_multiply*/ + #if PY_MAJOR_VERSION < 3 + __pyx_pw_4cdec_5_cdec_12SparseVector_38__div__, /*nb_divide*/ + #endif + 0, /*nb_remainder*/ + 0, /*nb_divmod*/ + 0, /*nb_power*/ + __pyx_pw_4cdec_5_cdec_12SparseVector_22__neg__, /*nb_negative*/ + 0, /*nb_positive*/ + 0, /*nb_absolute*/ + 0, /*nb_nonzero*/ + 0, /*nb_invert*/ + 0, /*nb_lshift*/ + 0, /*nb_rshift*/ + 0, /*nb_and*/ + 0, /*nb_xor*/ + 0, /*nb_or*/ + #if PY_MAJOR_VERSION < 3 + 0, /*nb_coerce*/ + #endif + 0, /*nb_int*/ + #if PY_MAJOR_VERSION < 3 + 0, /*nb_long*/ + #else + 0, /*reserved*/ + #endif + 0, /*nb_float*/ + #if PY_MAJOR_VERSION < 3 + 0, /*nb_oct*/ + #endif + #if PY_MAJOR_VERSION < 3 + 0, /*nb_hex*/ + #endif + __pyx_pw_4cdec_5_cdec_12SparseVector_24__iadd__, /*nb_inplace_add*/ + __pyx_pw_4cdec_5_cdec_12SparseVector_26__isub__, /*nb_inplace_subtract*/ + __pyx_pw_4cdec_5_cdec_12SparseVector_28__imul__, /*nb_inplace_multiply*/ + #if PY_MAJOR_VERSION < 3 + __pyx_pw_4cdec_5_cdec_12SparseVector_30__idiv__, /*nb_inplace_divide*/ + #endif + 0, /*nb_inplace_remainder*/ + 0, /*nb_inplace_power*/ + 0, /*nb_inplace_lshift*/ + 0, /*nb_inplace_rshift*/ + 0, /*nb_inplace_and*/ + 0, /*nb_inplace_xor*/ + 0, /*nb_inplace_or*/ + 0, /*nb_floor_divide*/ + 0, /*nb_true_divide*/ + 0, /*nb_inplace_floor_divide*/ + 0, /*nb_inplace_true_divide*/ + #if PY_VERSION_HEX >= 0x02050000 + 0, /*nb_index*/ + #endif +}; -static PyMethodDef __pyx_methods_4cdec_5_cdec_HypergraphNode[] = { - {0, 0, 0, 0} +static PySequenceMethods __pyx_tp_as_sequence_SparseVector = { + __pyx_pw_4cdec_5_cdec_12SparseVector_18__len__, /*sq_length*/ + 0, /*sq_concat*/ + 0, /*sq_repeat*/ + __pyx_sq_item_4cdec_5_cdec_SparseVector, /*sq_item*/ + 0, /*sq_slice*/ + 0, /*sq_ass_item*/ + 0, /*sq_ass_slice*/ + __pyx_pw_4cdec_5_cdec_12SparseVector_20__contains__, /*sq_contains*/ + 0, /*sq_inplace_concat*/ + 0, /*sq_inplace_repeat*/ }; -static struct PyGetSetDef __pyx_getsets_4cdec_5_cdec_HypergraphNode[] = { - {(char *)"id", __pyx_getprop_4cdec_5_cdec_14HypergraphNode_id, 0, 0, 0}, - {(char *)"in_edges", __pyx_getprop_4cdec_5_cdec_14HypergraphNode_in_edges, 0, 0, 0}, - {(char *)"out_edges", __pyx_getprop_4cdec_5_cdec_14HypergraphNode_out_edges, 0, 0, 0}, - {(char *)"span", __pyx_getprop_4cdec_5_cdec_14HypergraphNode_span, 0, 0, 0}, - {(char *)"cat", __pyx_getprop_4cdec_5_cdec_14HypergraphNode_cat, 0, 0, 0}, - {0, 0, 0, 0, 0} +static PyMappingMethods __pyx_tp_as_mapping_SparseVector = { + __pyx_pw_4cdec_5_cdec_12SparseVector_18__len__, /*mp_length*/ + __pyx_pw_4cdec_5_cdec_12SparseVector_7__getitem__, /*mp_subscript*/ + __pyx_mp_ass_subscript_4cdec_5_cdec_SparseVector, /*mp_ass_subscript*/ }; -static PyTypeObject __pyx_type_4cdec_5_cdec_HypergraphNode = { +static PyTypeObject __pyx_type_4cdec_5_cdec_SparseVector = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.HypergraphNode"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec_HypergraphNode), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.SparseVector"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec_SparseVector), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec_HypergraphNode, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec_SparseVector, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -23171,9 +22529,9 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_HypergraphNode = { 0, /*reserved*/ #endif 0, /*tp_repr*/ - 0, /*tp_as_number*/ - 0, /*tp_as_sequence*/ - 0, /*tp_as_mapping*/ + &__pyx_tp_as_number_SparseVector, /*tp_as_number*/ + &__pyx_tp_as_sequence_SparseVector, /*tp_as_sequence*/ + &__pyx_tp_as_mapping_SparseVector, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ @@ -23184,21 +22542,21 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_HypergraphNode = { 0, /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ - __pyx_pw_4cdec_5_cdec_14HypergraphNode_1__richcmp__, /*tp_richcompare*/ + __pyx_pw_4cdec_5_cdec_12SparseVector_16__richcmp__, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ - 0, /*tp_iter*/ + __pyx_pw_4cdec_5_cdec_12SparseVector_11__iter__, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_4cdec_5_cdec_HypergraphNode, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec_SparseVector, /*tp_methods*/ 0, /*tp_members*/ - __pyx_getsets_4cdec_5_cdec_HypergraphNode, /*tp_getset*/ + 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ - 0, /*tp_init*/ + __pyx_pw_4cdec_5_cdec_12SparseVector_1__init__, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec_HypergraphNode, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec_SparseVector, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -23210,92 +22568,115 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_HypergraphNode = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif - #if PY_VERSION_HEX >= 0x030400a1 - 0, /*tp_finalize*/ - #endif }; -static PyObject *__pyx_tp_new_4cdec_5_cdec_Lattice(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_26__make_config *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_26__make_config[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_26__make_config = 0; + +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_26__make_config(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_26__make_config *p; PyObject *o; - if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { - o = (*t->tp_alloc)(t, 0); + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_26__make_config > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_26__make_config)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_26__make_config[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_26__make_config]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_26__make_config)); + PyObject_INIT(o, t); + PyObject_GC_Track(o); } else { - o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); - } - if (unlikely(!o)) return 0; - if (unlikely(__pyx_pw_4cdec_5_cdec_7Lattice_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) { - Py_DECREF(o); o = 0; + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; } + p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_26__make_config *)o); + p->__pyx_v_config = 0; + p->__pyx_v_info = 0; + p->__pyx_v_key = 0; + p->__pyx_v_name = 0; + p->__pyx_v_value = 0; + p->__pyx_t_0 = 0; + p->__pyx_t_1 = 0; return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec_Lattice(PyObject *o) { - #if PY_VERSION_HEX >= 0x030400a1 - if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { - if (PyObject_CallFinalizerFromDealloc(o)) return; - } - #endif - { - PyObject *etype, *eval, *etb; - PyErr_Fetch(&etype, &eval, &etb); - ++Py_REFCNT(o); - __pyx_pw_4cdec_5_cdec_7Lattice_5__dealloc__(o); - --Py_REFCNT(o); - PyErr_Restore(etype, eval, etb); +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_26__make_config(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_26__make_config *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_26__make_config *)o; + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_v_config); + Py_CLEAR(p->__pyx_v_info); + Py_CLEAR(p->__pyx_v_key); + Py_CLEAR(p->__pyx_v_name); + Py_CLEAR(p->__pyx_v_value); + Py_CLEAR(p->__pyx_t_0); + Py_CLEAR(p->__pyx_t_1); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_26__make_config < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_26__make_config))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_26__make_config[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_26__make_config++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_26__make_config *)o); + } else { + (*Py_TYPE(o)->tp_free)(o); } - (*Py_TYPE(o)->tp_free)(o); -} -static PyObject *__pyx_sq_item_4cdec_5_cdec_Lattice(PyObject *o, Py_ssize_t i) { - PyObject *r; - PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0; - r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x); - Py_DECREF(x); - return r; } -static int __pyx_mp_ass_subscript_4cdec_5_cdec_Lattice(PyObject *o, PyObject *i, PyObject *v) { - if (v) { - return __pyx_pw_4cdec_5_cdec_7Lattice_9__setitem__(o, i, v); +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_26__make_config(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_26__make_config *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_26__make_config *)o; + if (p->__pyx_v_config) { + e = (*v)(p->__pyx_v_config, a); if (e) return e; + } + if (p->__pyx_v_info) { + e = (*v)(p->__pyx_v_info, a); if (e) return e; + } + if (p->__pyx_v_key) { + e = (*v)(p->__pyx_v_key, a); if (e) return e; + } + if (p->__pyx_v_name) { + e = (*v)(p->__pyx_v_name, a); if (e) return e; } - else { - PyErr_Format(PyExc_NotImplementedError, - "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name); - return -1; + if (p->__pyx_v_value) { + e = (*v)(p->__pyx_v_value, 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_1) { + e = (*v)(p->__pyx_t_1, a); if (e) return e; } + return 0; } -static PyMethodDef __pyx_methods_4cdec_5_cdec_Lattice[] = { - {__Pyx_NAMESTR("__unicode__"), (PyCFunction)__pyx_pw_4cdec_5_cdec_7Lattice_15__unicode__, METH_NOARGS, __Pyx_DOCSTR(0)}, - {__Pyx_NAMESTR("todot"), (PyCFunction)__pyx_pw_4cdec_5_cdec_7Lattice_20todot, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_7Lattice_19todot)}, - {__Pyx_NAMESTR("as_hypergraph"), (PyCFunction)__pyx_pw_4cdec_5_cdec_7Lattice_22as_hypergraph, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_7Lattice_21as_hypergraph)}, - {0, 0, 0, 0} -}; - -static PySequenceMethods __pyx_tp_as_sequence_Lattice = { - __pyx_pw_4cdec_5_cdec_7Lattice_11__len__, /*sq_length*/ - 0, /*sq_concat*/ - 0, /*sq_repeat*/ - __pyx_sq_item_4cdec_5_cdec_Lattice, /*sq_item*/ - 0, /*sq_slice*/ - 0, /*sq_ass_item*/ - 0, /*sq_ass_slice*/ - 0, /*sq_contains*/ - 0, /*sq_inplace_concat*/ - 0, /*sq_inplace_repeat*/ -}; +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_26__make_config(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_26__make_config *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_26__make_config *)o; + PyObject* tmp; + tmp = ((PyObject*)p->__pyx_v_config); + p->__pyx_v_config = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_v_info); + p->__pyx_v_info = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_v_key); + p->__pyx_v_key = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_v_name); + p->__pyx_v_name = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_v_value); + p->__pyx_v_value = 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_1); + p->__pyx_t_1 = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} -static PyMappingMethods __pyx_tp_as_mapping_Lattice = { - __pyx_pw_4cdec_5_cdec_7Lattice_11__len__, /*mp_length*/ - __pyx_pw_4cdec_5_cdec_7Lattice_7__getitem__, /*mp_subscript*/ - __pyx_mp_ass_subscript_4cdec_5_cdec_Lattice, /*mp_ass_subscript*/ +static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_26__make_config[] = { + {0, 0, 0, 0} }; -static PyTypeObject __pyx_type_4cdec_5_cdec_Lattice = { +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_26__make_config = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.Lattice"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec_Lattice), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_26__make_config"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_26__make_config), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec_Lattice, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_26__make_config, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -23306,23 +22687,23 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_Lattice = { #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ - &__pyx_tp_as_sequence_Lattice, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_Lattice, /*tp_as_mapping*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ - __pyx_pw_4cdec_5_cdec_7Lattice_13__str__, /*tp_str*/ + 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, /*tp_flags*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ - 0, /*tp_traverse*/ - 0, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_26__make_config, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_26__make_config, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ - __pyx_pw_4cdec_5_cdec_7Lattice_17__iter__, /*tp_iter*/ + 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_4cdec_5_cdec_Lattice, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec___pyx_scope_struct_26__make_config, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -23330,9 +22711,9 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_Lattice = { 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ - __pyx_pw_4cdec_5_cdec_7Lattice_3__init__, /*tp_init*/ + 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec_Lattice, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_26__make_config, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -23344,46 +22725,63 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_Lattice = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif - #if PY_VERSION_HEX >= 0x030400a1 - 0, /*tp_finalize*/ - #endif }; -static PyObject *__pyx_tp_new_4cdec_5_cdec_Candidate(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { +static PyObject *__pyx_tp_new_4cdec_5_cdec_NT(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec_NT *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); - } + o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_4cdec_5_cdec_NT *)o); + p->cat = ((PyObject*)Py_None); Py_INCREF(Py_None); return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec_Candidate(PyObject *o) { - #if PY_VERSION_HEX >= 0x030400a1 - if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { - if (PyObject_CallFinalizerFromDealloc(o)) return; - } - #endif +static void __pyx_tp_dealloc_4cdec_5_cdec_NT(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec_NT *p = (struct __pyx_obj_4cdec_5_cdec_NT *)o; + PyObject_GC_UnTrack(o); + Py_CLEAR(p->cat); (*Py_TYPE(o)->tp_free)(o); } -static PyObject *__pyx_getprop_4cdec_5_cdec_9Candidate_words(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_4cdec_5_cdec_9Candidate_5words_1__get__(o); +static int __pyx_tp_traverse_4cdec_5_cdec_NT(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_4cdec_5_cdec_NT *p = (struct __pyx_obj_4cdec_5_cdec_NT *)o; + if (p->cat) { + e = (*v)(p->cat, a); if (e) return e; + } + return 0; } -static PyObject *__pyx_getprop_4cdec_5_cdec_9Candidate_fmap(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_4cdec_5_cdec_9Candidate_4fmap_1__get__(o); +static int __pyx_tp_clear_4cdec_5_cdec_NT(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec_NT *p = (struct __pyx_obj_4cdec_5_cdec_NT *)o; + PyObject* tmp; + tmp = ((PyObject*)p->cat); + p->cat = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; } -static PyObject *__pyx_getprop_4cdec_5_cdec_9Candidate_score(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_4cdec_5_cdec_9Candidate_5score_1__get__(o); +static PyObject *__pyx_getprop_4cdec_5_cdec_2NT_cat(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_2NT_3cat_1__get__(o); } -static int __pyx_setprop_4cdec_5_cdec_9Candidate_score(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { +static int __pyx_setprop_4cdec_5_cdec_2NT_cat(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { - return __pyx_pw_4cdec_5_cdec_9Candidate_5score_3__set__(o, v); + return __pyx_pw_4cdec_5_cdec_2NT_3cat_3__set__(o, v); + } + else { + return __pyx_pw_4cdec_5_cdec_2NT_3cat_5__del__(o); + } +} + +static PyObject *__pyx_getprop_4cdec_5_cdec_2NT_ref(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_2NT_3ref_1__get__(o); +} + +static int __pyx_setprop_4cdec_5_cdec_2NT_ref(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_4cdec_5_cdec_2NT_3ref_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); @@ -23391,19 +22789,22 @@ static int __pyx_setprop_4cdec_5_cdec_9Candidate_score(PyObject *o, PyObject *v, } } -static struct PyGetSetDef __pyx_getsets_4cdec_5_cdec_Candidate[] = { - {(char *)"words", __pyx_getprop_4cdec_5_cdec_9Candidate_words, 0, 0, 0}, - {(char *)"fmap", __pyx_getprop_4cdec_5_cdec_9Candidate_fmap, 0, 0, 0}, - {(char *)"score", __pyx_getprop_4cdec_5_cdec_9Candidate_score, __pyx_setprop_4cdec_5_cdec_9Candidate_score, 0, 0}, +static PyMethodDef __pyx_methods_4cdec_5_cdec_NT[] = { + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_4cdec_5_cdec_NT[] = { + {(char *)"cat", __pyx_getprop_4cdec_5_cdec_2NT_cat, __pyx_setprop_4cdec_5_cdec_2NT_cat, 0, 0}, + {(char *)"ref", __pyx_getprop_4cdec_5_cdec_2NT_ref, __pyx_setprop_4cdec_5_cdec_2NT_ref, 0, 0}, {0, 0, 0, 0, 0} }; -static PyTypeObject __pyx_type_4cdec_5_cdec_Candidate = { +static PyTypeObject __pyx_type_4cdec_5_cdec_NT = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.Candidate"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec_Candidate), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.NT"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec_NT), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec_Candidate, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec_NT, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -23418,29 +22819,29 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_Candidate = { 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ - 0, /*tp_str*/ + __pyx_pw_4cdec_5_cdec_2NT_3__str__, /*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, /*tp_flags*/ + 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*/ - 0, /*tp_traverse*/ - 0, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec_NT, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec_NT, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - 0, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec_NT, /*tp_methods*/ 0, /*tp_members*/ - __pyx_getsets_4cdec_5_cdec_Candidate, /*tp_getset*/ + __pyx_getsets_4cdec_5_cdec_NT, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ - 0, /*tp_init*/ + __pyx_pw_4cdec_5_cdec_2NT_1__init__, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec_Candidate, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec_NT, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -23452,127 +22853,61 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_Candidate = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif - #if PY_VERSION_HEX >= 0x030400a1 - 0, /*tp_finalize*/ - #endif }; -static PyObject *__pyx_tp_new_4cdec_5_cdec_SufficientStats(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { +static PyObject *__pyx_tp_new_4cdec_5_cdec_Lattice(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { 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); - } + o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; + if (unlikely(__pyx_pw_4cdec_5_cdec_7Lattice_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) { + Py_DECREF(o); o = 0; + } return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec_SufficientStats(PyObject *o) { - #if PY_VERSION_HEX >= 0x030400a1 - if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { - if (PyObject_CallFinalizerFromDealloc(o)) return; - } - #endif +static void __pyx_tp_dealloc_4cdec_5_cdec_Lattice(PyObject *o) { { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); - __pyx_pw_4cdec_5_cdec_15SufficientStats_1__dealloc__(o); + __pyx_pw_4cdec_5_cdec_7Lattice_5__dealloc__(o); + if (PyErr_Occurred()) PyErr_WriteUnraisable(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); } (*Py_TYPE(o)->tp_free)(o); } -static PyObject *__pyx_sq_item_4cdec_5_cdec_SufficientStats(PyObject *o, Py_ssize_t i) { +static PyObject *__pyx_sq_item_4cdec_5_cdec_Lattice(PyObject *o, Py_ssize_t i) { PyObject *r; PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0; r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x); Py_DECREF(x); return r; -} - -static PyObject *__pyx_getprop_4cdec_5_cdec_15SufficientStats_score(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_4cdec_5_cdec_15SufficientStats_5score_1__get__(o); -} - -static PyObject *__pyx_getprop_4cdec_5_cdec_15SufficientStats_detail(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_4cdec_5_cdec_15SufficientStats_6detail_1__get__(o); -} - -static PyMethodDef __pyx_methods_4cdec_5_cdec_SufficientStats[] = { - {0, 0, 0, 0} -}; - -static struct PyGetSetDef __pyx_getsets_4cdec_5_cdec_SufficientStats[] = { - {(char *)"score", __pyx_getprop_4cdec_5_cdec_15SufficientStats_score, 0, 0, 0}, - {(char *)"detail", __pyx_getprop_4cdec_5_cdec_15SufficientStats_detail, 0, 0, 0}, - {0, 0, 0, 0, 0} -}; - -static PyNumberMethods __pyx_tp_as_number_SufficientStats = { - __pyx_pw_4cdec_5_cdec_15SufficientStats_12__add__, /*nb_add*/ - 0, /*nb_subtract*/ - 0, /*nb_multiply*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_divide*/ - #endif - 0, /*nb_remainder*/ - 0, /*nb_divmod*/ - 0, /*nb_power*/ - 0, /*nb_negative*/ - 0, /*nb_positive*/ - 0, /*nb_absolute*/ - 0, /*nb_nonzero*/ - 0, /*nb_invert*/ - 0, /*nb_lshift*/ - 0, /*nb_rshift*/ - 0, /*nb_and*/ - 0, /*nb_xor*/ - 0, /*nb_or*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_coerce*/ - #endif - 0, /*nb_int*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_long*/ - #else - 0, /*reserved*/ - #endif - 0, /*nb_float*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_oct*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*nb_hex*/ - #endif - __pyx_pw_4cdec_5_cdec_15SufficientStats_10__iadd__, /*nb_inplace_add*/ - 0, /*nb_inplace_subtract*/ - 0, /*nb_inplace_multiply*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_inplace_divide*/ - #endif - 0, /*nb_inplace_remainder*/ - 0, /*nb_inplace_power*/ - 0, /*nb_inplace_lshift*/ - 0, /*nb_inplace_rshift*/ - 0, /*nb_inplace_and*/ - 0, /*nb_inplace_xor*/ - 0, /*nb_inplace_or*/ - 0, /*nb_floor_divide*/ - 0, /*nb_true_divide*/ - 0, /*nb_inplace_floor_divide*/ - 0, /*nb_inplace_true_divide*/ - #if PY_VERSION_HEX >= 0x02050000 - 0, /*nb_index*/ - #endif +} + +static int __pyx_mp_ass_subscript_4cdec_5_cdec_Lattice(PyObject *o, PyObject *i, PyObject *v) { + if (v) { + return __pyx_pw_4cdec_5_cdec_7Lattice_9__setitem__(o, i, v); + } + else { + PyErr_Format(PyExc_NotImplementedError, + "Subscript deletion not supported by %s", Py_TYPE(o)->tp_name); + return -1; + } +} + +static PyMethodDef __pyx_methods_4cdec_5_cdec_Lattice[] = { + {__Pyx_NAMESTR("__unicode__"), (PyCFunction)__pyx_pw_4cdec_5_cdec_7Lattice_15__unicode__, METH_NOARGS, __Pyx_DOCSTR(0)}, + {__Pyx_NAMESTR("todot"), (PyCFunction)__pyx_pw_4cdec_5_cdec_7Lattice_20todot, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_7Lattice_19todot)}, + {__Pyx_NAMESTR("as_hypergraph"), (PyCFunction)__pyx_pw_4cdec_5_cdec_7Lattice_22as_hypergraph, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_7Lattice_21as_hypergraph)}, + {0, 0, 0, 0} }; -static PySequenceMethods __pyx_tp_as_sequence_SufficientStats = { - __pyx_pw_4cdec_5_cdec_15SufficientStats_3__len__, /*sq_length*/ +static PySequenceMethods __pyx_tp_as_sequence_Lattice = { + __pyx_pw_4cdec_5_cdec_7Lattice_11__len__, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ - __pyx_sq_item_4cdec_5_cdec_SufficientStats, /*sq_item*/ + __pyx_sq_item_4cdec_5_cdec_Lattice, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ @@ -23581,18 +22916,18 @@ static PySequenceMethods __pyx_tp_as_sequence_SufficientStats = { 0, /*sq_inplace_repeat*/ }; -static PyMappingMethods __pyx_tp_as_mapping_SufficientStats = { - __pyx_pw_4cdec_5_cdec_15SufficientStats_3__len__, /*mp_length*/ - __pyx_pw_4cdec_5_cdec_15SufficientStats_8__getitem__, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ +static PyMappingMethods __pyx_tp_as_mapping_Lattice = { + __pyx_pw_4cdec_5_cdec_7Lattice_11__len__, /*mp_length*/ + __pyx_pw_4cdec_5_cdec_7Lattice_7__getitem__, /*mp_subscript*/ + __pyx_mp_ass_subscript_4cdec_5_cdec_Lattice, /*mp_ass_subscript*/ }; -static PyTypeObject __pyx_type_4cdec_5_cdec_SufficientStats = { +static PyTypeObject __pyx_type_4cdec_5_cdec_Lattice = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.SufficientStats"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec_SufficientStats), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.Lattice"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec_Lattice), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec_SufficientStats, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec_Lattice, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -23602,12 +22937,12 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_SufficientStats = { 0, /*reserved*/ #endif 0, /*tp_repr*/ - &__pyx_tp_as_number_SufficientStats, /*tp_as_number*/ - &__pyx_tp_as_sequence_SufficientStats, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_SufficientStats, /*tp_as_mapping*/ + 0, /*tp_as_number*/ + &__pyx_tp_as_sequence_Lattice, /*tp_as_sequence*/ + &__pyx_tp_as_mapping_Lattice, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ - 0, /*tp_str*/ + __pyx_pw_4cdec_5_cdec_7Lattice_13__str__, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ @@ -23617,19 +22952,19 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_SufficientStats = { 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ - __pyx_pw_4cdec_5_cdec_15SufficientStats_5__iter__, /*tp_iter*/ + __pyx_pw_4cdec_5_cdec_7Lattice_17__iter__, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_4cdec_5_cdec_SufficientStats, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec_Lattice, /*tp_methods*/ 0, /*tp_members*/ - __pyx_getsets_4cdec_5_cdec_SufficientStats, /*tp_getset*/ + 0, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ - 0, /*tp_init*/ + __pyx_pw_4cdec_5_cdec_7Lattice_3__init__, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec_SufficientStats, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec_Lattice, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -23641,59 +22976,211 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_SufficientStats = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif - #if PY_VERSION_HEX >= 0x030400a1 - 0, /*tp_finalize*/ - #endif }; -static PyObject *__pyx_tp_new_4cdec_5_cdec_CandidateSet(PyTypeObject *t, PyObject *a, PyObject *k) { +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15_sample_trees *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_15_sample_trees[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_15_sample_trees = 0; + +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_15_sample_trees(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15_sample_trees *p; PyObject *o; - if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { - o = (*t->tp_alloc)(t, 0); + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_15_sample_trees > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15_sample_trees)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_15_sample_trees[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_15_sample_trees]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15_sample_trees)); + PyObject_INIT(o, t); + PyObject_GC_Track(o); } else { - o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); - } - if (unlikely(!o)) return 0; - if (unlikely(__pyx_pw_4cdec_5_cdec_12CandidateSet_1__cinit__(o, a, k) < 0)) { - Py_DECREF(o); o = 0; + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; } + p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15_sample_trees *)o); + p->__pyx_v_self = 0; return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec_CandidateSet(PyObject *o) { - #if PY_VERSION_HEX >= 0x030400a1 - if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { - if (PyObject_CallFinalizerFromDealloc(o)) return; +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_15_sample_trees(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15_sample_trees *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15_sample_trees *)o; + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_v_self); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_15_sample_trees < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15_sample_trees))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_15_sample_trees[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_15_sample_trees++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15_sample_trees *)o); + } else { + (*Py_TYPE(o)->tp_free)(o); } - #endif - { - PyObject *etype, *eval, *etb; - PyErr_Fetch(&etype, &eval, &etb); - ++Py_REFCNT(o); - __pyx_pw_4cdec_5_cdec_12CandidateSet_3__dealloc__(o); - --Py_REFCNT(o); - PyErr_Restore(etype, eval, etb); +} + +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_15_sample_trees(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15_sample_trees *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15_sample_trees *)o; + if (p->__pyx_v_self) { + e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; } + return 0; +} + +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_15_sample_trees(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15_sample_trees *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15_sample_trees *)o; + PyObject* tmp; + tmp = ((PyObject*)p->__pyx_v_self); + p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_15_sample_trees[] = { + {0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_15_sample_trees = { + PyVarObject_HEAD_INIT(0, 0) + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_15_sample_trees"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15_sample_trees), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_15_sample_trees, /*tp_dealloc*/ + 0, /*tp_print*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #else + 0, /*reserved*/ + #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_4cdec_5_cdec___pyx_scope_struct_15_sample_trees, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_15_sample_trees, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_4cdec_5_cdec___pyx_scope_struct_15_sample_trees, /*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_4cdec_5_cdec___pyx_scope_struct_15_sample_trees, /*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*/ + #if PY_VERSION_HEX >= 0x02060000 + 0, /*tp_version_tag*/ + #endif +}; +static struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphEdge __pyx_vtable_4cdec_5_cdec_HypergraphEdge; + +static PyObject *__pyx_tp_new_4cdec_5_cdec_HypergraphEdge(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *p; + PyObject *o; + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)o); + p->__pyx_vtab = __pyx_vtabptr_4cdec_5_cdec_HypergraphEdge; + p->trule = ((struct __pyx_obj_4cdec_5_cdec_TRule *)Py_None); Py_INCREF(Py_None); + return o; +} + +static void __pyx_tp_dealloc_4cdec_5_cdec_HypergraphEdge(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *p = (struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)o; + PyObject_GC_UnTrack(o); + Py_CLEAR(p->trule); (*Py_TYPE(o)->tp_free)(o); } -static PyObject *__pyx_sq_item_4cdec_5_cdec_CandidateSet(PyObject *o, Py_ssize_t i) { - PyObject *r; - PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0; - r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x); - Py_DECREF(x); - return r; + +static int __pyx_tp_traverse_4cdec_5_cdec_HypergraphEdge(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *p = (struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)o; + if (p->trule) { + e = (*v)(((PyObject*)p->trule), a); if (e) return e; + } + return 0; } -static PyMethodDef __pyx_methods_4cdec_5_cdec_CandidateSet[] = { - {__Pyx_NAMESTR("add_kbest"), (PyCFunction)__pyx_pw_4cdec_5_cdec_12CandidateSet_12add_kbest, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_12CandidateSet_11add_kbest)}, +static int __pyx_tp_clear_4cdec_5_cdec_HypergraphEdge(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *p = (struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)o; + PyObject* tmp; + tmp = ((PyObject*)p->trule); + p->trule = ((struct __pyx_obj_4cdec_5_cdec_TRule *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyObject *__pyx_getprop_4cdec_5_cdec_14HypergraphEdge_head_node(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_14HypergraphEdge_9head_node_1__get__(o); +} + +static PyObject *__pyx_getprop_4cdec_5_cdec_14HypergraphEdge_tail_nodes(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_14HypergraphEdge_10tail_nodes_1__get__(o); +} + +static PyObject *__pyx_getprop_4cdec_5_cdec_14HypergraphEdge_span(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_14HypergraphEdge_4span_1__get__(o); +} + +static PyObject *__pyx_getprop_4cdec_5_cdec_14HypergraphEdge_src_span(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_14HypergraphEdge_8src_span_1__get__(o); +} + +static PyObject *__pyx_getprop_4cdec_5_cdec_14HypergraphEdge_feature_values(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_14HypergraphEdge_14feature_values_1__get__(o); +} + +static PyObject *__pyx_getprop_4cdec_5_cdec_14HypergraphEdge_prob(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_14HypergraphEdge_4prob_1__get__(o); +} + +static PyObject *__pyx_getprop_4cdec_5_cdec_14HypergraphEdge_trule(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_14HypergraphEdge_5trule_1__get__(o); +} + +static int __pyx_setprop_4cdec_5_cdec_14HypergraphEdge_trule(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_4cdec_5_cdec_14HypergraphEdge_5trule_3__set__(o, v); + } + else { + return __pyx_pw_4cdec_5_cdec_14HypergraphEdge_5trule_5__del__(o); + } +} + +static PyMethodDef __pyx_methods_4cdec_5_cdec_HypergraphEdge[] = { {0, 0, 0, 0} }; -static PySequenceMethods __pyx_tp_as_sequence_CandidateSet = { - __pyx_pw_4cdec_5_cdec_12CandidateSet_5__len__, /*sq_length*/ +static struct PyGetSetDef __pyx_getsets_4cdec_5_cdec_HypergraphEdge[] = { + {(char *)"head_node", __pyx_getprop_4cdec_5_cdec_14HypergraphEdge_head_node, 0, 0, 0}, + {(char *)"tail_nodes", __pyx_getprop_4cdec_5_cdec_14HypergraphEdge_tail_nodes, 0, 0, 0}, + {(char *)"span", __pyx_getprop_4cdec_5_cdec_14HypergraphEdge_span, 0, 0, 0}, + {(char *)"src_span", __pyx_getprop_4cdec_5_cdec_14HypergraphEdge_src_span, 0, 0, 0}, + {(char *)"feature_values", __pyx_getprop_4cdec_5_cdec_14HypergraphEdge_feature_values, 0, 0, 0}, + {(char *)"prob", __pyx_getprop_4cdec_5_cdec_14HypergraphEdge_prob, 0, 0, 0}, + {(char *)"trule", __pyx_getprop_4cdec_5_cdec_14HypergraphEdge_trule, __pyx_setprop_4cdec_5_cdec_14HypergraphEdge_trule, 0, 0}, + {0, 0, 0, 0, 0} +}; + +static PySequenceMethods __pyx_tp_as_sequence_HypergraphEdge = { + __pyx_pw_4cdec_5_cdec_14HypergraphEdge_1__len__, /*sq_length*/ 0, /*sq_concat*/ 0, /*sq_repeat*/ - __pyx_sq_item_4cdec_5_cdec_CandidateSet, /*sq_item*/ + 0, /*sq_item*/ 0, /*sq_slice*/ 0, /*sq_ass_item*/ 0, /*sq_ass_slice*/ @@ -23702,18 +23189,18 @@ static PySequenceMethods __pyx_tp_as_sequence_CandidateSet = { 0, /*sq_inplace_repeat*/ }; -static PyMappingMethods __pyx_tp_as_mapping_CandidateSet = { - __pyx_pw_4cdec_5_cdec_12CandidateSet_5__len__, /*mp_length*/ - __pyx_pw_4cdec_5_cdec_12CandidateSet_7__getitem__, /*mp_subscript*/ +static PyMappingMethods __pyx_tp_as_mapping_HypergraphEdge = { + __pyx_pw_4cdec_5_cdec_14HypergraphEdge_1__len__, /*mp_length*/ + 0, /*mp_subscript*/ 0, /*mp_ass_subscript*/ }; -static PyTypeObject __pyx_type_4cdec_5_cdec_CandidateSet = { +static PyTypeObject __pyx_type_4cdec_5_cdec_HypergraphEdge = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.CandidateSet"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec_CandidateSet), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.HypergraphEdge"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec_HypergraphEdge), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec_CandidateSet, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec_HypergraphEdge, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -23724,25 +23211,25 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_CandidateSet = { #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ - &__pyx_tp_as_sequence_CandidateSet, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_CandidateSet, /*tp_as_mapping*/ + &__pyx_tp_as_sequence_HypergraphEdge, /*tp_as_sequence*/ + &__pyx_tp_as_mapping_HypergraphEdge, /*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, /*tp_flags*/ + 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*/ - 0, /*tp_traverse*/ - 0, /*tp_clear*/ - 0, /*tp_richcompare*/ + __pyx_tp_traverse_4cdec_5_cdec_HypergraphEdge, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec_HypergraphEdge, /*tp_clear*/ + __pyx_pw_4cdec_5_cdec_14HypergraphEdge_3__richcmp__, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ - __pyx_pw_4cdec_5_cdec_12CandidateSet_9__iter__, /*tp_iter*/ + 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_4cdec_5_cdec_CandidateSet, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec_HypergraphEdge, /*tp_methods*/ 0, /*tp_members*/ - 0, /*tp_getset*/ + __pyx_getsets_4cdec_5_cdec_HypergraphEdge, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ @@ -23750,7 +23237,7 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_CandidateSet = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec_CandidateSet, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec_HypergraphEdge, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -23762,51 +23249,67 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_CandidateSet = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif - #if PY_VERSION_HEX >= 0x030400a1 - 0, /*tp_finalize*/ - #endif }; -static PyObject *__pyx_tp_new_4cdec_5_cdec_SegmentEvaluator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_2__phrase[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_2__phrase = 0; + +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_2__phrase(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase *p; PyObject *o; - if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { - o = (*t->tp_alloc)(t, 0); + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_2__phrase > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_2__phrase[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_2__phrase]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase)); + PyObject_INIT(o, t); + PyObject_GC_Track(o); } else { - o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; } - if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase *)o); + p->__pyx_v_phrase = 0; return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec_SegmentEvaluator(PyObject *o) { - #if PY_VERSION_HEX >= 0x030400a1 - if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { - if (PyObject_CallFinalizerFromDealloc(o)) return; +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_2__phrase(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase *)o; + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_v_phrase); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_2__phrase < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_2__phrase[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_2__phrase++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase *)o); + } else { + (*Py_TYPE(o)->tp_free)(o); } - #endif - { - PyObject *etype, *eval, *etb; - PyErr_Fetch(&etype, &eval, &etb); - ++Py_REFCNT(o); - __pyx_pw_4cdec_5_cdec_16SegmentEvaluator_1__dealloc__(o); - --Py_REFCNT(o); - PyErr_Restore(etype, eval, etb); +} + +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_2__phrase(PyObject *o, visitproc v, void *a) { + int e; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase *)o; + if (p->__pyx_v_phrase) { + e = (*v)(p->__pyx_v_phrase, a); if (e) return e; } - (*Py_TYPE(o)->tp_free)(o); + return 0; } -static PyMethodDef __pyx_methods_4cdec_5_cdec_SegmentEvaluator[] = { - {__Pyx_NAMESTR("evaluate"), (PyCFunction)__pyx_pw_4cdec_5_cdec_16SegmentEvaluator_3evaluate, METH_O, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_16SegmentEvaluator_2evaluate)}, - {__Pyx_NAMESTR("candidate_set"), (PyCFunction)__pyx_pw_4cdec_5_cdec_16SegmentEvaluator_5candidate_set, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_16SegmentEvaluator_4candidate_set)}, +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_2__phrase(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase *)o; + PyObject* tmp; + tmp = ((PyObject*)p->__pyx_v_phrase); + p->__pyx_v_phrase = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); + return 0; +} + +static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_2__phrase[] = { {0, 0, 0, 0} }; -static PyTypeObject __pyx_type_4cdec_5_cdec_SegmentEvaluator = { +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_2__phrase = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.SegmentEvaluator"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec_SegmentEvaluator), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_2__phrase"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec_SegmentEvaluator, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_2__phrase, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -23825,15 +23328,15 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_SegmentEvaluator = { 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, /*tp_flags*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ - 0, /*tp_traverse*/ - 0, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_2__phrase, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_2__phrase, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_4cdec_5_cdec_SegmentEvaluator, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec___pyx_scope_struct_2__phrase, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -23843,7 +23346,7 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_SegmentEvaluator = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec_SegmentEvaluator, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_2__phrase, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -23855,18 +23358,11 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_SegmentEvaluator = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif - #if PY_VERSION_HEX >= 0x030400a1 - 0, /*tp_finalize*/ - #endif }; static PyObject *__pyx_tp_new_4cdec_5_cdec_Scorer(PyTypeObject *t, PyObject *a, PyObject *k) { 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); - } + o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; if (unlikely(__pyx_pw_4cdec_5_cdec_6Scorer_1__cinit__(o, a, k) < 0)) { Py_DECREF(o); o = 0; @@ -23875,16 +23371,12 @@ static PyObject *__pyx_tp_new_4cdec_5_cdec_Scorer(PyTypeObject *t, PyObject *a, } static void __pyx_tp_dealloc_4cdec_5_cdec_Scorer(PyObject *o) { - #if PY_VERSION_HEX >= 0x030400a1 - if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { - if (PyObject_CallFinalizerFromDealloc(o)) return; - } - #endif { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); __pyx_pw_4cdec_5_cdec_6Scorer_3__dealloc__(o); + if (PyErr_Occurred()) PyErr_WriteUnraisable(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); } @@ -23949,70 +23441,187 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_Scorer = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif - #if PY_VERSION_HEX >= 0x030400a1 - 0, /*tp_finalize*/ +}; +static struct __pyx_vtabstruct_4cdec_5_cdec_HypergraphNode __pyx_vtable_4cdec_5_cdec_HypergraphNode; + +static PyObject *__pyx_tp_new_4cdec_5_cdec_HypergraphNode(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec_HypergraphNode *p; + PyObject *o; + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_4cdec_5_cdec_HypergraphNode *)o); + p->__pyx_vtab = __pyx_vtabptr_4cdec_5_cdec_HypergraphNode; + return o; +} + +static void __pyx_tp_dealloc_4cdec_5_cdec_HypergraphNode(PyObject *o) { + (*Py_TYPE(o)->tp_free)(o); +} + +static PyObject *__pyx_getprop_4cdec_5_cdec_14HypergraphNode_id(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_14HypergraphNode_2id_1__get__(o); +} + +static PyObject *__pyx_getprop_4cdec_5_cdec_14HypergraphNode_in_edges(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_14HypergraphNode_8in_edges_1__get__(o); +} + +static PyObject *__pyx_getprop_4cdec_5_cdec_14HypergraphNode_out_edges(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_14HypergraphNode_9out_edges_1__get__(o); +} + +static PyObject *__pyx_getprop_4cdec_5_cdec_14HypergraphNode_span(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_14HypergraphNode_4span_1__get__(o); +} + +static PyObject *__pyx_getprop_4cdec_5_cdec_14HypergraphNode_cat(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_14HypergraphNode_3cat_1__get__(o); +} + +static PyMethodDef __pyx_methods_4cdec_5_cdec_HypergraphNode[] = { + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_4cdec_5_cdec_HypergraphNode[] = { + {(char *)"id", __pyx_getprop_4cdec_5_cdec_14HypergraphNode_id, 0, 0, 0}, + {(char *)"in_edges", __pyx_getprop_4cdec_5_cdec_14HypergraphNode_in_edges, 0, 0, 0}, + {(char *)"out_edges", __pyx_getprop_4cdec_5_cdec_14HypergraphNode_out_edges, 0, 0, 0}, + {(char *)"span", __pyx_getprop_4cdec_5_cdec_14HypergraphNode_span, 0, 0, 0}, + {(char *)"cat", __pyx_getprop_4cdec_5_cdec_14HypergraphNode_cat, 0, 0, 0}, + {0, 0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_4cdec_5_cdec_HypergraphNode = { + PyVarObject_HEAD_INIT(0, 0) + __Pyx_NAMESTR("cdec._cdec.HypergraphNode"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec_HypergraphNode), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_4cdec_5_cdec_HypergraphNode, /*tp_dealloc*/ + 0, /*tp_print*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + #if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ + #else + 0, /*reserved*/ + #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, /*tp_flags*/ + 0, /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + __pyx_pw_4cdec_5_cdec_14HypergraphNode_1__richcmp__, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_methods_4cdec_5_cdec_HypergraphNode, /*tp_methods*/ + 0, /*tp_members*/ + __pyx_getsets_4cdec_5_cdec_HypergraphNode, /*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_4cdec_5_cdec_HypergraphNode, /*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*/ + #if PY_VERSION_HEX >= 0x02060000 + 0, /*tp_version_tag*/ #endif }; -static PyObject *__pyx_tp_new_4cdec_5_cdec_Metric(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_4cdec_5_cdec_Metric *p; +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_10_kbest_features[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_10_kbest_features = 0; + +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_10_kbest_features(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features *p; PyObject *o; - if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { - o = (*t->tp_alloc)(t, 0); + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_10_kbest_features > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_10_kbest_features[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_10_kbest_features]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features)); + PyObject_INIT(o, t); + PyObject_GC_Track(o); } else { - o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); - } - if (unlikely(!o)) return 0; - p = ((struct __pyx_obj_4cdec_5_cdec_Metric *)o); - p->scorer = ((struct __pyx_obj_4cdec_5_cdec_Scorer *)Py_None); Py_INCREF(Py_None); - if (unlikely(__pyx_pw_4cdec_5_cdec_6Metric_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) { - Py_DECREF(o); o = 0; + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; } + p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features *)o); + p->__pyx_v_fmap = 0; + p->__pyx_v_self = 0; + p->__pyx_v_size = 0; return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec_Metric(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec_Metric *p = (struct __pyx_obj_4cdec_5_cdec_Metric *)o; - #if PY_VERSION_HEX >= 0x030400a1 - if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { - if (PyObject_CallFinalizerFromDealloc(o)) return; - } - #endif +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_10_kbest_features(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features *)o; PyObject_GC_UnTrack(o); - Py_CLEAR(p->scorer); - (*Py_TYPE(o)->tp_free)(o); + Py_CLEAR(p->__pyx_v_fmap); + Py_CLEAR(p->__pyx_v_self); + Py_CLEAR(p->__pyx_v_size); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_10_kbest_features < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_10_kbest_features[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_10_kbest_features++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features *)o); + } else { + (*Py_TYPE(o)->tp_free)(o); + } } -static int __pyx_tp_traverse_4cdec_5_cdec_Metric(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_10_kbest_features(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_4cdec_5_cdec_Metric *p = (struct __pyx_obj_4cdec_5_cdec_Metric *)o; - if (p->scorer) { - e = (*v)(((PyObject*)p->scorer), a); if (e) return e; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features *)o; + if (p->__pyx_v_fmap) { + e = (*v)(((PyObject*)p->__pyx_v_fmap), 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_size) { + e = (*v)(p->__pyx_v_size, a); if (e) return e; } return 0; } -static int __pyx_tp_clear_4cdec_5_cdec_Metric(PyObject *o) { +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_10_kbest_features(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features *)o; PyObject* tmp; - struct __pyx_obj_4cdec_5_cdec_Metric *p = (struct __pyx_obj_4cdec_5_cdec_Metric *)o; - tmp = ((PyObject*)p->scorer); - p->scorer = ((struct __pyx_obj_4cdec_5_cdec_Scorer *)Py_None); Py_INCREF(Py_None); + tmp = ((PyObject*)p->__pyx_v_fmap); + p->__pyx_v_fmap = ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_v_self); + p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_v_size); + p->__pyx_v_size = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyMethodDef __pyx_methods_4cdec_5_cdec_Metric[] = { - {__Pyx_NAMESTR("score"), (PyCFunction)__pyx_pw_4cdec_5_cdec_6Metric_5score, METH_NOARGS, __Pyx_DOCSTR(0)}, - {__Pyx_NAMESTR("evaluate"), (PyCFunction)__pyx_pw_4cdec_5_cdec_6Metric_7evaluate, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}, +static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_10_kbest_features[] = { {0, 0, 0, 0} }; -static PyTypeObject __pyx_type_4cdec_5_cdec_Metric = { +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_10_kbest_features = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.Metric"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec_Metric), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_10_kbest_features"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec_Metric, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_10_kbest_features, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -24026,20 +23635,20 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_Metric = { 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ - __pyx_pw_4cdec_5_cdec_6Metric_3__call__, /*tp_call*/ + 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*/ + 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_4cdec_5_cdec_Metric, /*tp_traverse*/ - __pyx_tp_clear_4cdec_5_cdec_Metric, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_10_kbest_features, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_10_kbest_features, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_4cdec_5_cdec_Metric, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec___pyx_scope_struct_10_kbest_features, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -24049,7 +23658,7 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_Metric = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec_Metric, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_10_kbest_features, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -24061,70 +23670,26 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_Metric = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif - #if PY_VERSION_HEX >= 0x030400a1 - 0, /*tp_finalize*/ - #endif }; -static PyObject *__pyx_tp_new_4cdec_5_cdec_Decoder(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_4cdec_5_cdec_Decoder *p; +static PyObject *__pyx_tp_new_4cdec_5_cdec_NTRef(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { 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); - } + o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; - p = ((struct __pyx_obj_4cdec_5_cdec_Decoder *)o); - p->weights = ((struct __pyx_obj_4cdec_5_cdec_DenseVector *)Py_None); Py_INCREF(Py_None); return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec_Decoder(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec_Decoder *p = (struct __pyx_obj_4cdec_5_cdec_Decoder *)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 *etype, *eval, *etb; - PyErr_Fetch(&etype, &eval, &etb); - ++Py_REFCNT(o); - __pyx_pw_4cdec_5_cdec_7Decoder_3__dealloc__(o); - --Py_REFCNT(o); - PyErr_Restore(etype, eval, etb); - } - Py_CLEAR(p->weights); +static void __pyx_tp_dealloc_4cdec_5_cdec_NTRef(PyObject *o) { (*Py_TYPE(o)->tp_free)(o); } -static int __pyx_tp_traverse_4cdec_5_cdec_Decoder(PyObject *o, visitproc v, void *a) { - int e; - struct __pyx_obj_4cdec_5_cdec_Decoder *p = (struct __pyx_obj_4cdec_5_cdec_Decoder *)o; - if (p->weights) { - e = (*v)(((PyObject*)p->weights), a); if (e) return e; - } - return 0; -} - -static int __pyx_tp_clear_4cdec_5_cdec_Decoder(PyObject *o) { - PyObject* tmp; - struct __pyx_obj_4cdec_5_cdec_Decoder *p = (struct __pyx_obj_4cdec_5_cdec_Decoder *)o; - tmp = ((PyObject*)p->weights); - p->weights = ((struct __pyx_obj_4cdec_5_cdec_DenseVector *)Py_None); Py_INCREF(Py_None); - Py_XDECREF(tmp); - return 0; -} - -static PyObject *__pyx_getprop_4cdec_5_cdec_7Decoder_weights(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_4cdec_5_cdec_7Decoder_7weights_1__get__(o); +static PyObject *__pyx_getprop_4cdec_5_cdec_5NTRef_ref(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_5NTRef_3ref_1__get__(o); } -static int __pyx_setprop_4cdec_5_cdec_7Decoder_weights(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { +static int __pyx_setprop_4cdec_5_cdec_5NTRef_ref(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { if (v) { - return __pyx_pw_4cdec_5_cdec_7Decoder_7weights_3__set__(o, v); + return __pyx_pw_4cdec_5_cdec_5NTRef_3ref_3__set__(o, v); } else { PyErr_SetString(PyExc_NotImplementedError, "__del__"); @@ -24132,28 +23697,21 @@ static int __pyx_setprop_4cdec_5_cdec_7Decoder_weights(PyObject *o, PyObject *v, } } -static PyObject *__pyx_getprop_4cdec_5_cdec_7Decoder_formalism(PyObject *o, CYTHON_UNUSED void *x) { - return __pyx_pw_4cdec_5_cdec_7Decoder_9formalism_1__get__(o); -} - -static PyMethodDef __pyx_methods_4cdec_5_cdec_Decoder[] = { - {__Pyx_NAMESTR("read_weights"), (PyCFunction)__pyx_pw_4cdec_5_cdec_7Decoder_5read_weights, METH_O, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_7Decoder_4read_weights)}, - {__Pyx_NAMESTR("translate"), (PyCFunction)__pyx_pw_4cdec_5_cdec_7Decoder_7translate, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_7Decoder_6translate)}, +static PyMethodDef __pyx_methods_4cdec_5_cdec_NTRef[] = { {0, 0, 0, 0} }; -static struct PyGetSetDef __pyx_getsets_4cdec_5_cdec_Decoder[] = { - {(char *)"weights", __pyx_getprop_4cdec_5_cdec_7Decoder_weights, __pyx_setprop_4cdec_5_cdec_7Decoder_weights, 0, 0}, - {(char *)"formalism", __pyx_getprop_4cdec_5_cdec_7Decoder_formalism, 0, 0, 0}, +static struct PyGetSetDef __pyx_getsets_4cdec_5_cdec_NTRef[] = { + {(char *)"ref", __pyx_getprop_4cdec_5_cdec_5NTRef_ref, __pyx_setprop_4cdec_5_cdec_5NTRef_ref, 0, 0}, {0, 0, 0, 0, 0} }; -static PyTypeObject __pyx_type_4cdec_5_cdec_Decoder = { +static PyTypeObject __pyx_type_4cdec_5_cdec_NTRef = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.Decoder"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec_Decoder), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.NTRef"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec_NTRef), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec_Decoder, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec_NTRef, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -24168,29 +23726,29 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_Decoder = { 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ - 0, /*tp_str*/ + __pyx_pw_4cdec_5_cdec_5NTRef_3__str__, /*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*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ - __pyx_tp_traverse_4cdec_5_cdec_Decoder, /*tp_traverse*/ - __pyx_tp_clear_4cdec_5_cdec_Decoder, /*tp_clear*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_4cdec_5_cdec_Decoder, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec_NTRef, /*tp_methods*/ 0, /*tp_members*/ - __pyx_getsets_4cdec_5_cdec_Decoder, /*tp_getset*/ + __pyx_getsets_4cdec_5_cdec_NTRef, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ - __pyx_pw_4cdec_5_cdec_7Decoder_1__init__, /*tp_init*/ + __pyx_pw_4cdec_5_cdec_5NTRef_1__init__, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec_Decoder, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec_NTRef, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -24202,63 +23760,57 @@ static PyTypeObject __pyx_type_4cdec_5_cdec_Decoder = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif - #if PY_VERSION_HEX >= 0x030400a1 - 0, /*tp_finalize*/ - #endif }; -static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct____iter__[8]; -static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct____iter__ = 0; - -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct____iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { +static PyObject *__pyx_tp_new_4cdec_5_cdec_Grammar(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; - if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct____iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__)))) { - o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct____iter__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct____iter__]; - memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__)); - (void) PyObject_INIT(o, t); - PyObject_GC_Track(o); - } else { - o = (*t->tp_alloc)(t, 0); - if (unlikely(!o)) return 0; - } + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct____iter__(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__ *)o; - PyObject_GC_UnTrack(o); - Py_CLEAR(p->__pyx_v_self); - if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct____iter__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__))) { - __pyx_freelist_4cdec_5_cdec___pyx_scope_struct____iter__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct____iter__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__ *)o); - } else { - (*Py_TYPE(o)->tp_free)(o); +static void __pyx_tp_dealloc_4cdec_5_cdec_Grammar(PyObject *o) { + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + ++Py_REFCNT(o); + __pyx_pw_4cdec_5_cdec_7Grammar_1__dealloc__(o); + if (PyErr_Occurred()) PyErr_WriteUnraisable(o); + --Py_REFCNT(o); + PyErr_Restore(etype, eval, etb); } + (*Py_TYPE(o)->tp_free)(o); } -static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct____iter__(PyObject *o, visitproc v, void *a) { - int e; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__ *)o; - if (p->__pyx_v_self) { - e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; - } - return 0; +static PyObject *__pyx_getprop_4cdec_5_cdec_7Grammar_name(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_7Grammar_4name_1__get__(o); } -static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct____iter__(PyObject *o) { - PyObject* tmp; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__ *)o; - tmp = ((PyObject*)p->__pyx_v_self); - p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_DenseVector *)Py_None); Py_INCREF(Py_None); - Py_XDECREF(tmp); - return 0; +static int __pyx_setprop_4cdec_5_cdec_7Grammar_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_4cdec_5_cdec_7Grammar_4name_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } } -static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct____iter__ = { +static PyMethodDef __pyx_methods_4cdec_5_cdec_Grammar[] = { + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_4cdec_5_cdec_Grammar[] = { + {(char *)"name", __pyx_getprop_4cdec_5_cdec_7Grammar_name, __pyx_setprop_4cdec_5_cdec_7Grammar_name, 0, 0}, + {0, 0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_4cdec_5_cdec_Grammar = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct____iter__"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.Grammar"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec_Grammar), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct____iter__, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec_Grammar, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -24277,17 +23829,17 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct____iter__ = { 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*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ - __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct____iter__, /*tp_traverse*/ - __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct____iter__, /*tp_clear*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ - 0, /*tp_iter*/ + __pyx_pw_4cdec_5_cdec_7Grammar_3__iter__, /*tp_iter*/ 0, /*tp_iternext*/ - 0, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec_Grammar, /*tp_methods*/ 0, /*tp_members*/ - 0, /*tp_getset*/ + __pyx_getsets_4cdec_5_cdec_Grammar, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ @@ -24295,7 +23847,7 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct____iter__ = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct____iter__, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec_Grammar, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -24307,63 +23859,85 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct____iter__ = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif - #if PY_VERSION_HEX >= 0x030400a1 - 0, /*tp_finalize*/ - #endif }; +static struct __pyx_vtabstruct_4cdec_5_cdec_Hypergraph __pyx_vtable_4cdec_5_cdec_Hypergraph; -static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_1___iter__[8]; -static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_1___iter__ = 0; - -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_1___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { +static PyObject *__pyx_tp_new_4cdec_5_cdec_Hypergraph(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec_Hypergraph *p; PyObject *o; - if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_1___iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__)))) { - o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_1___iter__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_1___iter__]; - memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__)); - (void) PyObject_INIT(o, t); - PyObject_GC_Track(o); - } else { - o = (*t->tp_alloc)(t, 0); - if (unlikely(!o)) return 0; - } + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)o); + p->__pyx_vtab = __pyx_vtabptr_4cdec_5_cdec_Hypergraph; return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_1___iter__(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__ *)o; - PyObject_GC_UnTrack(o); - Py_CLEAR(p->__pyx_v_self); - if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_1___iter__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__))) { - __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_1___iter__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_1___iter__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__ *)o); - } else { - (*Py_TYPE(o)->tp_free)(o); +static void __pyx_tp_dealloc_4cdec_5_cdec_Hypergraph(PyObject *o) { + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + ++Py_REFCNT(o); + __pyx_pw_4cdec_5_cdec_10Hypergraph_1__dealloc__(o); + if (PyErr_Occurred()) PyErr_WriteUnraisable(o); + --Py_REFCNT(o); + PyErr_Restore(etype, eval, etb); } + (*Py_TYPE(o)->tp_free)(o); } -static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_1___iter__(PyObject *o, visitproc v, void *a) { - int e; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__ *)o; - if (p->__pyx_v_self) { - e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; - } - return 0; +static PyObject *__pyx_getprop_4cdec_5_cdec_10Hypergraph_edges(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_10Hypergraph_5edges_1__get__(o); } -static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_1___iter__(PyObject *o) { - PyObject* tmp; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__ *)o; - tmp = ((PyObject*)p->__pyx_v_self); - p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)Py_None); Py_INCREF(Py_None); - Py_XDECREF(tmp); - return 0; +static PyObject *__pyx_getprop_4cdec_5_cdec_10Hypergraph_nodes(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_10Hypergraph_5nodes_1__get__(o); +} + +static PyObject *__pyx_getprop_4cdec_5_cdec_10Hypergraph_goal(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_10Hypergraph_4goal_1__get__(o); } -static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_1___iter__ = { +static PyObject *__pyx_getprop_4cdec_5_cdec_10Hypergraph_npaths(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_10Hypergraph_6npaths_1__get__(o); +} + +static PyMethodDef __pyx_methods_4cdec_5_cdec_Hypergraph[] = { + {__Pyx_NAMESTR("viterbi"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_3viterbi, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_2viterbi)}, + {__Pyx_NAMESTR("viterbi_trees"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_5viterbi_trees, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_4viterbi_trees)}, + {__Pyx_NAMESTR("viterbi_features"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_7viterbi_features, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_6viterbi_features)}, + {__Pyx_NAMESTR("viterbi_forest"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_9viterbi_forest, METH_NOARGS, __Pyx_DOCSTR(0)}, + {__Pyx_NAMESTR("viterbi_joshua"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_11viterbi_joshua, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_10viterbi_joshua)}, + {__Pyx_NAMESTR("kbest"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_13kbest, METH_O, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_12kbest)}, + {__Pyx_NAMESTR("kbest_trees"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_16kbest_trees, METH_O, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_15kbest_trees)}, + {__Pyx_NAMESTR("kbest_features"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_19kbest_features, METH_O, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_18kbest_features)}, + {__Pyx_NAMESTR("unique_kbest"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_22unique_kbest, METH_O, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_21unique_kbest)}, + {__Pyx_NAMESTR("unique_kbest_trees"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_25unique_kbest_trees, METH_O, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_24unique_kbest_trees)}, + {__Pyx_NAMESTR("unique_kbest_features"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_28unique_kbest_features, METH_O, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_27unique_kbest_features)}, + {__Pyx_NAMESTR("sample"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_31sample, METH_O, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_30sample)}, + {__Pyx_NAMESTR("sample_trees"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_34sample_trees, METH_O, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_33sample_trees)}, + {__Pyx_NAMESTR("intersect"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_37intersect, METH_O, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_36intersect)}, + {__Pyx_NAMESTR("prune"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_39prune, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_38prune)}, + {__Pyx_NAMESTR("lattice"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_41lattice, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_40lattice)}, + {__Pyx_NAMESTR("plf"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_43plf, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_42plf)}, + {__Pyx_NAMESTR("reweight"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_45reweight, METH_O, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_44reweight)}, + {__Pyx_NAMESTR("inside_outside"), (PyCFunction)__pyx_pw_4cdec_5_cdec_10Hypergraph_47inside_outside, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_10Hypergraph_46inside_outside)}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_4cdec_5_cdec_Hypergraph[] = { + {(char *)"edges", __pyx_getprop_4cdec_5_cdec_10Hypergraph_edges, 0, 0, 0}, + {(char *)"nodes", __pyx_getprop_4cdec_5_cdec_10Hypergraph_nodes, 0, 0, 0}, + {(char *)"goal", __pyx_getprop_4cdec_5_cdec_10Hypergraph_goal, 0, 0, 0}, + {(char *)"npaths", __pyx_getprop_4cdec_5_cdec_10Hypergraph_npaths, 0, 0, 0}, + {0, 0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_4cdec_5_cdec_Hypergraph = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_1___iter__"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.Hypergraph"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec_Hypergraph), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_1___iter__, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec_Hypergraph, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -24382,17 +23956,17 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_1___iter__ = { 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*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ - __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_1___iter__, /*tp_traverse*/ - __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_1___iter__, /*tp_clear*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - 0, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec_Hypergraph, /*tp_methods*/ 0, /*tp_members*/ - 0, /*tp_getset*/ + __pyx_getsets_4cdec_5_cdec_Hypergraph, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ @@ -24400,7 +23974,7 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_1___iter__ = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_1___iter__, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec_Hypergraph, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -24412,63 +23986,68 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_1___iter__ = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif - #if PY_VERSION_HEX >= 0x030400a1 - 0, /*tp_finalize*/ - #endif }; -static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_2__phrase[8]; -static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_2__phrase = 0; - -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_2__phrase(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { +static PyObject *__pyx_tp_new_4cdec_5_cdec_CandidateSet(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o; - if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_2__phrase > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase)))) { - o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_2__phrase[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_2__phrase]; - memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase)); - (void) PyObject_INIT(o, t); - PyObject_GC_Track(o); - } else { - o = (*t->tp_alloc)(t, 0); - if (unlikely(!o)) return 0; + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + if (unlikely(__pyx_pw_4cdec_5_cdec_12CandidateSet_1__cinit__(o, a, k) < 0)) { + Py_DECREF(o); o = 0; } return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_2__phrase(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase *)o; - PyObject_GC_UnTrack(o); - Py_CLEAR(p->__pyx_v_phrase); - if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_2__phrase < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase))) { - __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_2__phrase[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_2__phrase++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase *)o); - } else { - (*Py_TYPE(o)->tp_free)(o); +static void __pyx_tp_dealloc_4cdec_5_cdec_CandidateSet(PyObject *o) { + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + ++Py_REFCNT(o); + __pyx_pw_4cdec_5_cdec_12CandidateSet_3__dealloc__(o); + if (PyErr_Occurred()) PyErr_WriteUnraisable(o); + --Py_REFCNT(o); + PyErr_Restore(etype, eval, etb); } + (*Py_TYPE(o)->tp_free)(o); } - -static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_2__phrase(PyObject *o, visitproc v, void *a) { - int e; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase *)o; - if (p->__pyx_v_phrase) { - e = (*v)(p->__pyx_v_phrase, a); if (e) return e; - } - return 0; +static PyObject *__pyx_sq_item_4cdec_5_cdec_CandidateSet(PyObject *o, Py_ssize_t i) { + PyObject *r; + PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0; + r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x); + Py_DECREF(x); + return r; } -static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_2__phrase(PyObject *o) { - PyObject* tmp; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase *)o; - tmp = ((PyObject*)p->__pyx_v_phrase); - p->__pyx_v_phrase = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - return 0; -} +static PyMethodDef __pyx_methods_4cdec_5_cdec_CandidateSet[] = { + {__Pyx_NAMESTR("add_kbest"), (PyCFunction)__pyx_pw_4cdec_5_cdec_12CandidateSet_12add_kbest, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_12CandidateSet_11add_kbest)}, + {0, 0, 0, 0} +}; -static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_2__phrase = { +static PySequenceMethods __pyx_tp_as_sequence_CandidateSet = { + __pyx_pw_4cdec_5_cdec_12CandidateSet_5__len__, /*sq_length*/ + 0, /*sq_concat*/ + 0, /*sq_repeat*/ + __pyx_sq_item_4cdec_5_cdec_CandidateSet, /*sq_item*/ + 0, /*sq_slice*/ + 0, /*sq_ass_item*/ + 0, /*sq_ass_slice*/ + 0, /*sq_contains*/ + 0, /*sq_inplace_concat*/ + 0, /*sq_inplace_repeat*/ +}; + +static PyMappingMethods __pyx_tp_as_mapping_CandidateSet = { + __pyx_pw_4cdec_5_cdec_12CandidateSet_5__len__, /*mp_length*/ + __pyx_pw_4cdec_5_cdec_12CandidateSet_7__getitem__, /*mp_subscript*/ + 0, /*mp_ass_subscript*/ +}; + +static PyTypeObject __pyx_type_4cdec_5_cdec_CandidateSet = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_2__phrase"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.CandidateSet"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec_CandidateSet), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_2__phrase, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec_CandidateSet, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -24479,23 +24058,23 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_2__phrase = { #endif 0, /*tp_repr*/ 0, /*tp_as_number*/ - 0, /*tp_as_sequence*/ - 0, /*tp_as_mapping*/ + &__pyx_tp_as_sequence_CandidateSet, /*tp_as_sequence*/ + &__pyx_tp_as_mapping_CandidateSet, /*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*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ - __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_2__phrase, /*tp_traverse*/ - __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_2__phrase, /*tp_clear*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ - 0, /*tp_iter*/ + __pyx_pw_4cdec_5_cdec_12CandidateSet_9__iter__, /*tp_iter*/ 0, /*tp_iternext*/ - 0, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec_CandidateSet, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -24505,7 +24084,7 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_2__phrase = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_2__phrase, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec_CandidateSet, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -24517,77 +24096,67 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_2__phrase = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif - #if PY_VERSION_HEX >= 0x030400a1 - 0, /*tp_finalize*/ - #endif }; -static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_3_genexpr[8]; -static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_3_genexpr = 0; +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22_todot *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_22_todot[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_22_todot = 0; -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_3_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_22_todot(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22_todot *p; PyObject *o; - if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_3_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr)))) { - o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_3_genexpr[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_3_genexpr]; - memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr)); - (void) PyObject_INIT(o, t); + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_22_todot > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22_todot)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_22_todot[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_22_todot]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22_todot)); + PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } + p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22_todot *)o); + p->__pyx_v_self = 0; return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_3_genexpr(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr *)o; +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_22_todot(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22_todot *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22_todot *)o; PyObject_GC_UnTrack(o); - Py_CLEAR(p->__pyx_outer_scope); - Py_CLEAR(p->__pyx_v_w); - Py_CLEAR(p->__pyx_t_0); - if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_3_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr))) { - __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_3_genexpr[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_3_genexpr++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr *)o); + Py_CLEAR(p->__pyx_v_self); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_22_todot < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22_todot))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_22_todot[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_22_todot++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22_todot *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } -static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_3_genexpr(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_22_todot(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr *)o; - if (p->__pyx_outer_scope) { - e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e; - } - if (p->__pyx_v_w) { - e = (*v)(p->__pyx_v_w, a); if (e) return e; - } - if (p->__pyx_t_0) { - e = (*v)(p->__pyx_t_0, a); if (e) return e; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22_todot *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22_todot *)o; + if (p->__pyx_v_self) { + e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; } return 0; } -static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_3_genexpr(PyObject *o) { +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_22_todot(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22_todot *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22_todot *)o; PyObject* tmp; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr *)o; - tmp = ((PyObject*)p->__pyx_outer_scope); - p->__pyx_outer_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase *)Py_None); Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->__pyx_v_w); - p->__pyx_v_w = 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); + tmp = ((PyObject*)p->__pyx_v_self); + p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_Lattice *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_3_genexpr = { +static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_22_todot[] = { + {0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_22_todot = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_3_genexpr"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_22_todot"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22_todot), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_3_genexpr, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_22_todot, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -24608,13 +24177,13 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_3_genexpr = { 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_4cdec_5_cdec___pyx_scope_struct_3_genexpr, /*tp_traverse*/ - __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_3_genexpr, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_22_todot, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_22_todot, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - 0, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec___pyx_scope_struct_22_todot, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -24624,7 +24193,7 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_3_genexpr = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_3_genexpr, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_22_todot, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -24636,63 +24205,91 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_3_genexpr = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif - #if PY_VERSION_HEX >= 0x030400a1 - 0, /*tp_finalize*/ - #endif }; -static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_4___get__[8]; -static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_4___get__ = 0; +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees = 0; -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_4___get__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees *p; PyObject *o; - if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_4___get__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__)))) { - o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_4___get__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_4___get__]; - memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__)); - (void) PyObject_INIT(o, t); + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees)); + PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } + p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees *)o); + p->__pyx_v_e_tree = 0; + p->__pyx_v_f_tree = 0; + p->__pyx_v_self = 0; + p->__pyx_v_size = 0; return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_4___get__(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__ *)o; +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees *)o; PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_v_e_tree); + Py_CLEAR(p->__pyx_v_f_tree); Py_CLEAR(p->__pyx_v_self); - if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_4___get__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__))) { - __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_4___get__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_4___get__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__ *)o); + Py_CLEAR(p->__pyx_v_size); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } -static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_4___get__(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__ *)o; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees *)o; + if (p->__pyx_v_e_tree) { + e = (*v)(p->__pyx_v_e_tree, a); if (e) return e; + } + if (p->__pyx_v_f_tree) { + e = (*v)(p->__pyx_v_f_tree, 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_size) { + e = (*v)(p->__pyx_v_size, a); if (e) return e; + } return 0; } -static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_4___get__(PyObject *o) { +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees *)o; PyObject* tmp; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__ *)o; + tmp = ((PyObject*)p->__pyx_v_e_tree); + p->__pyx_v_e_tree = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_v_f_tree); + p->__pyx_v_f_tree = ((PyObject*)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_self); - p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_TRule *)Py_None); Py_INCREF(Py_None); + p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_v_size); + p->__pyx_v_size = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_4___get__ = { +static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees[] = { + {0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_4___get__"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_9_kbest_trees"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_4___get__, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -24713,13 +24310,13 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_4___get__ = { 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_4cdec_5_cdec___pyx_scope_struct_4___get__, /*tp_traverse*/ - __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_4___get__, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - 0, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -24729,7 +24326,7 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_4___get__ = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_4___get__, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -24741,25 +24338,25 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_4___get__ = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif - #if PY_VERSION_HEX >= 0x030400a1 - 0, /*tp_finalize*/ - #endif }; static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_5___str__[8]; static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_5___str__ = 0; static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_5___str__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__ *p; PyObject *o; if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_5___str__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__)))) { o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_5___str__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_5___str__]; memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__)); - (void) PyObject_INIT(o, t); + PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } + p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__ *)o); + p->__pyx_v_self = 0; return o; } @@ -24784,14 +24381,18 @@ static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_5___str__(PyObject } static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_5___str__(PyObject *o) { - PyObject* tmp; struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__ *)o; + PyObject* tmp; tmp = ((PyObject*)p->__pyx_v_self); p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_TRule *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } +static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_5___str__[] = { + {0, 0, 0, 0} +}; + static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_5___str__ = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_5___str__"), /*tp_name*/ @@ -24824,7 +24425,7 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_5___str__ = { 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - 0, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec___pyx_scope_struct_5___str__, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -24846,77 +24447,40 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_5___str__ = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif - #if PY_VERSION_HEX >= 0x030400a1 - 0, /*tp_finalize*/ - #endif }; -static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_6_genexpr[8]; -static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_6_genexpr = 0; - -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_6_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { +static PyObject *__pyx_tp_new_4cdec_5_cdec_SegmentEvaluator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { PyObject *o; - if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_6_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr)))) { - o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_6_genexpr[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_6_genexpr]; - memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr)); - (void) PyObject_INIT(o, t); - PyObject_GC_Track(o); - } else { - o = (*t->tp_alloc)(t, 0); - if (unlikely(!o)) return 0; - } + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_6_genexpr(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr *)o; - PyObject_GC_UnTrack(o); - Py_CLEAR(p->__pyx_outer_scope); - Py_CLEAR(p->__pyx_v_feat); - Py_CLEAR(p->__pyx_t_0); - if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_6_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr))) { - __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_6_genexpr[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_6_genexpr++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr *)o); - } else { - (*Py_TYPE(o)->tp_free)(o); - } -} - -static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_6_genexpr(PyObject *o, visitproc v, void *a) { - int e; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr *)o; - if (p->__pyx_outer_scope) { - e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e; - } - if (p->__pyx_v_feat) { - e = (*v)(p->__pyx_v_feat, a); if (e) return e; - } - if (p->__pyx_t_0) { - e = (*v)(p->__pyx_t_0, a); if (e) return e; +static void __pyx_tp_dealloc_4cdec_5_cdec_SegmentEvaluator(PyObject *o) { + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + ++Py_REFCNT(o); + __pyx_pw_4cdec_5_cdec_16SegmentEvaluator_1__dealloc__(o); + if (PyErr_Occurred()) PyErr_WriteUnraisable(o); + --Py_REFCNT(o); + PyErr_Restore(etype, eval, etb); } - return 0; + (*Py_TYPE(o)->tp_free)(o); } -static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_6_genexpr(PyObject *o) { - PyObject* tmp; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr *)o; - tmp = ((PyObject*)p->__pyx_outer_scope); - p->__pyx_outer_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__ *)Py_None); Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->__pyx_v_feat); - p->__pyx_v_feat = 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); - return 0; -} +static PyMethodDef __pyx_methods_4cdec_5_cdec_SegmentEvaluator[] = { + {__Pyx_NAMESTR("evaluate"), (PyCFunction)__pyx_pw_4cdec_5_cdec_16SegmentEvaluator_3evaluate, METH_O, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_16SegmentEvaluator_2evaluate)}, + {__Pyx_NAMESTR("candidate_set"), (PyCFunction)__pyx_pw_4cdec_5_cdec_16SegmentEvaluator_5candidate_set, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_16SegmentEvaluator_4candidate_set)}, + {0, 0, 0, 0} +}; -static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_6_genexpr = { +static PyTypeObject __pyx_type_4cdec_5_cdec_SegmentEvaluator = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_6_genexpr"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.SegmentEvaluator"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec_SegmentEvaluator), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_6_genexpr, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec_SegmentEvaluator, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -24935,15 +24499,15 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_6_genexpr = { 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*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ - __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_6_genexpr, /*tp_traverse*/ - __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_6_genexpr, /*tp_clear*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - 0, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec_SegmentEvaluator, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -24953,7 +24517,7 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_6_genexpr = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_6_genexpr, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec_SegmentEvaluator, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -24965,70 +24529,67 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_6_genexpr = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif - #if PY_VERSION_HEX >= 0x030400a1 - 0, /*tp_finalize*/ - #endif }; -static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_7___iter__[8]; -static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_7___iter__ = 0; +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_16___get__[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_16___get__ = 0; -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_7___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_16___get__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__ *p; PyObject *o; - if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_7___iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__)))) { - o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_7___iter__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_7___iter__]; - memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__)); - (void) PyObject_INIT(o, t); + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_16___get__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_16___get__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_16___get__]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__)); + PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } + p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__ *)o); + p->__pyx_v_self = 0; return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_7___iter__(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__ *)o; +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_16___get__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__ *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_self); - Py_CLEAR(p->__pyx_v_trule); - if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_7___iter__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__))) { - __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_7___iter__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_7___iter__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__ *)o); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_16___get__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_16___get__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_16___get__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__ *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } -static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_7___iter__(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_16___get__(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__ *)o; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__ *)o; if (p->__pyx_v_self) { e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; } - if (p->__pyx_v_trule) { - e = (*v)(((PyObject*)p->__pyx_v_trule), a); if (e) return e; - } return 0; } -static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_7___iter__(PyObject *o) { +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_16___get__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__ *)o; PyObject* tmp; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__ *)o; tmp = ((PyObject*)p->__pyx_v_self); - p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_Grammar *)Py_None); Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->__pyx_v_trule); - p->__pyx_v_trule = ((struct __pyx_obj_4cdec_5_cdec_TRule *)Py_None); Py_INCREF(Py_None); + p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_7___iter__ = { +static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_16___get__[] = { + {0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_16___get__ = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_7___iter__"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_16___get__"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_7___iter__, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_16___get__, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -25049,13 +24610,13 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_7___iter__ = { 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_4cdec_5_cdec___pyx_scope_struct_7___iter__, /*tp_traverse*/ - __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_7___iter__, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_16___get__, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_16___get__, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - 0, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec___pyx_scope_struct_16___get__, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -25065,7 +24626,7 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_7___iter__ = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_7___iter__, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_16___get__, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -25077,70 +24638,67 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_7___iter__ = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif - #if PY_VERSION_HEX >= 0x030400a1 - 0, /*tp_finalize*/ - #endif }; -static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_8_kbest[8]; -static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_8_kbest = 0; +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20___get__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_20___get__[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_20___get__ = 0; -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_8_kbest(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_20___get__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20___get__ *p; PyObject *o; - if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_8_kbest > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest)))) { - o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_8_kbest[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_8_kbest]; - memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest)); - (void) PyObject_INIT(o, t); + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_20___get__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20___get__)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_20___get__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_20___get__]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20___get__)); + PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } + p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20___get__ *)o); + p->__pyx_v_self = 0; return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_8_kbest(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest *)o; +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_20___get__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20___get__ *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_self); - Py_CLEAR(p->__pyx_v_size); - if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_8_kbest < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest))) { - __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_8_kbest[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_8_kbest++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest *)o); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_20___get__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20___get__))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_20___get__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_20___get__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20___get__ *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } -static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_8_kbest(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_20___get__(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest *)o; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20___get__ *)o; if (p->__pyx_v_self) { e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; } - if (p->__pyx_v_size) { - e = (*v)(p->__pyx_v_size, a); if (e) return e; - } return 0; } -static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_8_kbest(PyObject *o) { +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_20___get__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20___get__ *)o; PyObject* tmp; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest *)o; tmp = ((PyObject*)p->__pyx_v_self); - p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)Py_None); Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->__pyx_v_size); - p->__pyx_v_size = Py_None; Py_INCREF(Py_None); + p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_HypergraphNode *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_8_kbest = { +static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_20___get__[] = { + {0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_20___get__ = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_8_kbest"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_20___get__"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20___get__), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_8_kbest, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_20___get__, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -25161,13 +24719,13 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_8_kbest = { 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_4cdec_5_cdec___pyx_scope_struct_8_kbest, /*tp_traverse*/ - __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_8_kbest, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_20___get__, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_20___get__, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - 0, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec___pyx_scope_struct_20___get__, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -25177,7 +24735,7 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_8_kbest = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_8_kbest, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_20___get__, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -25189,45 +24747,49 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_8_kbest = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif - #if PY_VERSION_HEX >= 0x030400a1 - 0, /*tp_finalize*/ - #endif }; -static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees[8]; -static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees = 0; +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13_unique_kbest_features *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_13_unique_kbest_features[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_13_unique_kbest_features = 0; -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_13_unique_kbest_features(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13_unique_kbest_features *p; PyObject *o; - if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees)))) { - o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees]; - memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees)); - (void) PyObject_INIT(o, t); + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_13_unique_kbest_features > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13_unique_kbest_features)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_13_unique_kbest_features[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_13_unique_kbest_features]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13_unique_kbest_features)); + PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } + p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13_unique_kbest_features *)o); + p->__pyx_v_fmap = 0; + p->__pyx_v_self = 0; + p->__pyx_v_size = 0; return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees *)o; +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_13_unique_kbest_features(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13_unique_kbest_features *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13_unique_kbest_features *)o; PyObject_GC_UnTrack(o); - Py_CLEAR(p->__pyx_v_e_tree); - Py_CLEAR(p->__pyx_v_f_tree); + Py_CLEAR(p->__pyx_v_fmap); Py_CLEAR(p->__pyx_v_self); Py_CLEAR(p->__pyx_v_size); - if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees))) { - __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees *)o); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_13_unique_kbest_features < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13_unique_kbest_features))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_13_unique_kbest_features[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_13_unique_kbest_features++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13_unique_kbest_features *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } -static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_13_unique_kbest_features(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees *)o; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13_unique_kbest_features *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13_unique_kbest_features *)o; + if (p->__pyx_v_fmap) { + e = (*v)(((PyObject*)p->__pyx_v_fmap), a); if (e) return e; + } if (p->__pyx_v_self) { e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; } @@ -25237,9 +24799,12 @@ static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees(PyObj return 0; } -static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees(PyObject *o) { +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_13_unique_kbest_features(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13_unique_kbest_features *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13_unique_kbest_features *)o; PyObject* tmp; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees *)o; + tmp = ((PyObject*)p->__pyx_v_fmap); + p->__pyx_v_fmap = ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_self); p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); @@ -25249,12 +24814,16 @@ static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees(PyObject return 0; } -static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees = { +static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_13_unique_kbest_features[] = { + {0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_13_unique_kbest_features = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_9_kbest_trees"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_13_unique_kbest_features"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13_unique_kbest_features), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_13_unique_kbest_features, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -25275,13 +24844,13 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees = { 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_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees, /*tp_traverse*/ - __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_13_unique_kbest_features, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_13_unique_kbest_features, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - 0, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec___pyx_scope_struct_13_unique_kbest_features, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -25291,7 +24860,7 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_13_unique_kbest_features, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -25303,77 +24872,83 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif - #if PY_VERSION_HEX >= 0x030400a1 - 0, /*tp_finalize*/ - #endif }; -static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_10_kbest_features[8]; -static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_10_kbest_features = 0; +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_28_genexpr *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_28_genexpr[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_28_genexpr = 0; -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_10_kbest_features(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_28_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_28_genexpr *p; PyObject *o; - if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_10_kbest_features > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features)))) { - o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_10_kbest_features[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_10_kbest_features]; - memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features)); - (void) PyObject_INIT(o, t); + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_28_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_28_genexpr)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_28_genexpr[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_28_genexpr]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_28_genexpr)); + PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } + p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_28_genexpr *)o); + p->__pyx_outer_scope = 0; + p->__pyx_v_kv = 0; + p->__pyx_t_0 = 0; return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_10_kbest_features(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features *)o; +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_28_genexpr(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_28_genexpr *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_28_genexpr *)o; PyObject_GC_UnTrack(o); - Py_CLEAR(p->__pyx_v_fmap); - Py_CLEAR(p->__pyx_v_self); - Py_CLEAR(p->__pyx_v_size); - if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_10_kbest_features < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features))) { - __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_10_kbest_features[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_10_kbest_features++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features *)o); + Py_CLEAR(p->__pyx_outer_scope); + Py_CLEAR(p->__pyx_v_kv); + Py_CLEAR(p->__pyx_t_0); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_28_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_28_genexpr))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_28_genexpr[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_28_genexpr++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_28_genexpr *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } -static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_10_kbest_features(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_28_genexpr(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features *)o; - if (p->__pyx_v_fmap) { - e = (*v)(((PyObject*)p->__pyx_v_fmap), a); if (e) return e; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_28_genexpr *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_28_genexpr *)o; + if (p->__pyx_outer_scope) { + e = (*v)(((PyObject*)p->__pyx_outer_scope), 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_kv) { + e = (*v)(p->__pyx_v_kv, a); if (e) return e; } - if (p->__pyx_v_size) { - e = (*v)(p->__pyx_v_size, a); if (e) return e; + if (p->__pyx_t_0) { + e = (*v)(p->__pyx_t_0, a); if (e) return e; } return 0; } -static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_10_kbest_features(PyObject *o) { +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_28_genexpr(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_28_genexpr *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_28_genexpr *)o; PyObject* tmp; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features *)o; - tmp = ((PyObject*)p->__pyx_v_fmap); - p->__pyx_v_fmap = ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)Py_None); Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->__pyx_v_self); - p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)Py_None); Py_INCREF(Py_None); + tmp = ((PyObject*)p->__pyx_outer_scope); + p->__pyx_outer_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_27___init__ *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); - tmp = ((PyObject*)p->__pyx_v_size); - p->__pyx_v_size = Py_None; Py_INCREF(Py_None); + tmp = ((PyObject*)p->__pyx_v_kv); + p->__pyx_v_kv = 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); return 0; } -static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_10_kbest_features = { +static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_28_genexpr[] = { + {0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_28_genexpr = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_10_kbest_features"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_10_kbest_features), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_28_genexpr"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_28_genexpr), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_10_kbest_features, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_28_genexpr, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -25394,13 +24969,13 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_10_kbest_features 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_4cdec_5_cdec___pyx_scope_struct_10_kbest_features, /*tp_traverse*/ - __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_10_kbest_features, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_28_genexpr, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_28_genexpr, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - 0, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec___pyx_scope_struct_28_genexpr, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -25410,7 +24985,7 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_10_kbest_features 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_10_kbest_features, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_28_genexpr, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -25422,63 +24997,83 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_10_kbest_features #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif - #if PY_VERSION_HEX >= 0x030400a1 - 0, /*tp_finalize*/ - #endif }; -static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_11_sample[8]; -static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_11_sample = 0; +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_3_genexpr[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_3_genexpr = 0; -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_11_sample(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_3_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr *p; PyObject *o; - if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_11_sample > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample)))) { - o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_11_sample[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_11_sample]; - memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample)); - (void) PyObject_INIT(o, t); + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_3_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_3_genexpr[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_3_genexpr]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr)); + PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } + p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr *)o); + p->__pyx_outer_scope = 0; + p->__pyx_v_w = 0; + p->__pyx_t_0 = 0; return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_11_sample(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample *)o; +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_3_genexpr(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr *)o; PyObject_GC_UnTrack(o); - Py_CLEAR(p->__pyx_v_self); - if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_11_sample < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample))) { - __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_11_sample[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_11_sample++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample *)o); + Py_CLEAR(p->__pyx_outer_scope); + Py_CLEAR(p->__pyx_v_w); + Py_CLEAR(p->__pyx_t_0); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_3_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_3_genexpr[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_3_genexpr++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } -static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_11_sample(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_3_genexpr(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample *)o; - if (p->__pyx_v_self) { - e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr *)o; + if (p->__pyx_outer_scope) { + e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e; + } + if (p->__pyx_v_w) { + e = (*v)(p->__pyx_v_w, a); if (e) return e; + } + if (p->__pyx_t_0) { + e = (*v)(p->__pyx_t_0, a); if (e) return e; } return 0; } -static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_11_sample(PyObject *o) { +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_3_genexpr(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr *)o; PyObject* tmp; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample *)o; - tmp = ((PyObject*)p->__pyx_v_self); - p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)Py_None); Py_INCREF(Py_None); + tmp = ((PyObject*)p->__pyx_outer_scope); + p->__pyx_outer_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_2__phrase *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_v_w); + p->__pyx_v_w = 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); return 0; } -static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_11_sample = { +static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_3_genexpr[] = { + {0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_3_genexpr = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_11_sample"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_11_sample), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_3_genexpr"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_3_genexpr), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_11_sample, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_3_genexpr, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -25499,13 +25094,13 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_11_sample = { 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_4cdec_5_cdec___pyx_scope_struct_11_sample, /*tp_traverse*/ - __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_11_sample, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_3_genexpr, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_3_genexpr, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - 0, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec___pyx_scope_struct_3_genexpr, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -25515,7 +25110,7 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_11_sample = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_11_sample, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_3_genexpr, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -25527,63 +25122,75 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_11_sample = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif - #if PY_VERSION_HEX >= 0x030400a1 - 0, /*tp_finalize*/ - #endif }; -static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_12_sample_trees[8]; -static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_12_sample_trees = 0; +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_8_kbest[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_8_kbest = 0; -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_12_sample_trees(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_8_kbest(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest *p; PyObject *o; - if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_12_sample_trees > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees)))) { - o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_12_sample_trees[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_12_sample_trees]; - memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees)); - (void) PyObject_INIT(o, t); + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_8_kbest > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_8_kbest[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_8_kbest]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest)); + PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } + p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest *)o); + p->__pyx_v_self = 0; + p->__pyx_v_size = 0; return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_12_sample_trees(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees *)o; +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_8_kbest(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_self); - if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_12_sample_trees < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees))) { - __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_12_sample_trees[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_12_sample_trees++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees *)o); + Py_CLEAR(p->__pyx_v_size); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_8_kbest < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_8_kbest[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_8_kbest++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } -static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_12_sample_trees(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_8_kbest(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees *)o; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest *)o; if (p->__pyx_v_self) { e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; } + if (p->__pyx_v_size) { + e = (*v)(p->__pyx_v_size, a); if (e) return e; + } return 0; } -static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_12_sample_trees(PyObject *o) { +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_8_kbest(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest *)o; PyObject* tmp; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees *)o; tmp = ((PyObject*)p->__pyx_v_self); p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_v_size); + p->__pyx_v_size = Py_None; Py_INCREF(Py_None); + Py_XDECREF(tmp); return 0; } -static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_12_sample_trees = { +static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_8_kbest[] = { + {0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_8_kbest = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_12_sample_trees"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_sample_trees), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_8_kbest"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_8_kbest), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_12_sample_trees, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_8_kbest, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -25604,13 +25211,13 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_12_sample_trees = 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_4cdec_5_cdec___pyx_scope_struct_12_sample_trees, /*tp_traverse*/ - __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_12_sample_trees, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_8_kbest, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_8_kbest, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - 0, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec___pyx_scope_struct_8_kbest, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -25620,7 +25227,7 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_12_sample_trees = 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_12_sample_trees, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_8_kbest, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -25632,63 +25239,67 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_12_sample_trees = #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif - #if PY_VERSION_HEX >= 0x030400a1 - 0, /*tp_finalize*/ - #endif }; -static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_13___get__[8]; -static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_13___get__ = 0; +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___get__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_18___get__[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_18___get__ = 0; -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_13___get__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_18___get__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___get__ *p; PyObject *o; - if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_13___get__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__)))) { - o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_13___get__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_13___get__]; - memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__)); - (void) PyObject_INIT(o, t); + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_18___get__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___get__)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_18___get__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_18___get__]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___get__)); + PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } + p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___get__ *)o); + p->__pyx_v_self = 0; return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_13___get__(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__ *)o; +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_18___get__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___get__ *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_self); - if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_13___get__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__))) { - __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_13___get__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_13___get__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__ *)o); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_18___get__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___get__))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_18___get__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_18___get__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___get__ *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } -static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_13___get__(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_18___get__(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__ *)o; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___get__ *)o; if (p->__pyx_v_self) { e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; } return 0; } -static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_13___get__(PyObject *o) { +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_18___get__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___get__ *)o; PyObject* tmp; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__ *)o; tmp = ((PyObject*)p->__pyx_v_self); - p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)Py_None); Py_INCREF(Py_None); + p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_13___get__ = { +static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_18___get__[] = { + {0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_18___get__ = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_13___get__"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_13___get__), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_18___get__"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___get__), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_13___get__, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_18___get__, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -25709,13 +25320,13 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_13___get__ = { 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_4cdec_5_cdec___pyx_scope_struct_13___get__, /*tp_traverse*/ - __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_13___get__, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_18___get__, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_18___get__, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - 0, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec___pyx_scope_struct_18___get__, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -25725,7 +25336,7 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_13___get__ = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_13___get__, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_18___get__, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -25737,63 +25348,75 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_13___get__ = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif - #if PY_VERSION_HEX >= 0x030400a1 - 0, /*tp_finalize*/ - #endif }; -static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_14___get__[8]; -static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_14___get__ = 0; +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_7___iter__[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_7___iter__ = 0; -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_14___get__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_7___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__ *p; PyObject *o; - if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_14___get__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__)))) { - o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_14___get__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_14___get__]; - memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__)); - (void) PyObject_INIT(o, t); + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_7___iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_7___iter__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_7___iter__]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__)); + PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } + p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__ *)o); + p->__pyx_v_self = 0; + p->__pyx_v_trule = 0; return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_14___get__(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__ *)o; +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_7___iter__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__ *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_self); - if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_14___get__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__))) { - __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_14___get__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_14___get__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__ *)o); + Py_CLEAR(p->__pyx_v_trule); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_7___iter__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_7___iter__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_7___iter__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__ *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } -static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_14___get__(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_7___iter__(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__ *)o; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__ *)o; if (p->__pyx_v_self) { e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; } + if (p->__pyx_v_trule) { + e = (*v)(((PyObject*)p->__pyx_v_trule), a); if (e) return e; + } return 0; } -static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_14___get__(PyObject *o) { +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_7___iter__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__ *)o; PyObject* tmp; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__ *)o; tmp = ((PyObject*)p->__pyx_v_self); - p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)Py_None); Py_INCREF(Py_None); + p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_Grammar *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_v_trule); + p->__pyx_v_trule = ((struct __pyx_obj_4cdec_5_cdec_TRule *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_14___get__ = { +static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_7___iter__[] = { + {0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_7___iter__ = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_14___get__"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14___get__), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_7___iter__"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_7___iter__), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_14___get__, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_7___iter__, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -25814,13 +25437,13 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_14___get__ = { 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_4cdec_5_cdec___pyx_scope_struct_14___get__, /*tp_traverse*/ - __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_14___get__, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_7___iter__, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_7___iter__, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - 0, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec___pyx_scope_struct_7___iter__, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -25830,7 +25453,7 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_14___get__ = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_14___get__, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_7___iter__, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -25842,63 +25465,67 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_14___get__ = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif - #if PY_VERSION_HEX >= 0x030400a1 - 0, /*tp_finalize*/ - #endif }; -static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_15___get__[8]; -static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_15___get__ = 0; +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19___get__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_19___get__[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_19___get__ = 0; -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_15___get__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_19___get__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19___get__ *p; PyObject *o; - if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_15___get__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__)))) { - o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_15___get__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_15___get__]; - memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__)); - (void) PyObject_INIT(o, t); + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_19___get__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19___get__)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_19___get__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_19___get__]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19___get__)); + PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } + p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19___get__ *)o); + p->__pyx_v_self = 0; return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_15___get__(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__ *)o; +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_19___get__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19___get__ *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_self); - if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_15___get__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__))) { - __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_15___get__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_15___get__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__ *)o); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_19___get__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19___get__))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_19___get__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_19___get__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19___get__ *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } -static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_15___get__(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_19___get__(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__ *)o; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19___get__ *)o; if (p->__pyx_v_self) { e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; } return 0; } -static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_15___get__(PyObject *o) { +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_19___get__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19___get__ *)o; PyObject* tmp; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__ *)o; tmp = ((PyObject*)p->__pyx_v_self); - p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *)Py_None); Py_INCREF(Py_None); + p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_HypergraphNode *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_15___get__ = { +static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_19___get__[] = { + {0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_19___get__ = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_15___get__"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_15___get__), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_19___get__"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19___get__), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_15___get__, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_19___get__, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -25919,13 +25546,13 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_15___get__ = { 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_4cdec_5_cdec___pyx_scope_struct_15___get__, /*tp_traverse*/ - __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_15___get__, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_19___get__, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_19___get__, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - 0, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec___pyx_scope_struct_19___get__, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -25935,7 +25562,7 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_15___get__ = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_15___get__, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_19___get__, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -25947,63 +25574,24 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_15___get__ = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif - #if PY_VERSION_HEX >= 0x030400a1 - 0, /*tp_finalize*/ - #endif }; -static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_16___get__[8]; -static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_16___get__ = 0; - -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_16___get__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - PyObject *o; - if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_16___get__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__)))) { - o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_16___get__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_16___get__]; - memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__)); - (void) PyObject_INIT(o, t); - PyObject_GC_Track(o); - } else { - o = (*t->tp_alloc)(t, 0); - if (unlikely(!o)) return 0; - } +static PyObject *__pyx_tp_new_4cdec_5_cdec_TextGrammar(PyTypeObject *t, PyObject *a, PyObject *k) { + PyObject *o = __pyx_tp_new_4cdec_5_cdec_Grammar(t, a, k); + if (unlikely(!o)) return 0; return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_16___get__(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__ *)o; - PyObject_GC_UnTrack(o); - Py_CLEAR(p->__pyx_v_self); - if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_16___get__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__))) { - __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_16___get__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_16___get__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__ *)o); - } else { - (*Py_TYPE(o)->tp_free)(o); - } -} - -static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_16___get__(PyObject *o, visitproc v, void *a) { - int e; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__ *)o; - if (p->__pyx_v_self) { - e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; - } - return 0; -} - -static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_16___get__(PyObject *o) { - PyObject* tmp; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__ *)o; - tmp = ((PyObject*)p->__pyx_v_self); - p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_HypergraphNode *)Py_None); Py_INCREF(Py_None); - Py_XDECREF(tmp); - return 0; -} +static PyMethodDef __pyx_methods_4cdec_5_cdec_TextGrammar[] = { + {0, 0, 0, 0} +}; -static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_16___get__ = { +static PyTypeObject __pyx_type_4cdec_5_cdec_TextGrammar = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_16___get__"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_16___get__), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.TextGrammar"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec_TextGrammar), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_16___get__, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec_Grammar, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -26022,15 +25610,19 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_16___get__ = { 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*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ - __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_16___get__, /*tp_traverse*/ - __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_16___get__, /*tp_clear*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ + #if CYTHON_COMPILING_IN_PYPY + __pyx_pw_4cdec_5_cdec_7Grammar_3__iter__, /*tp_iter*/ + #else 0, /*tp_iter*/ + #endif 0, /*tp_iternext*/ - 0, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec_TextGrammar, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -26038,9 +25630,9 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_16___get__ = { 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ - 0, /*tp_init*/ + __pyx_pw_4cdec_5_cdec_11TextGrammar_1__init__, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_16___get__, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec_TextGrammar, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -26052,63 +25644,67 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_16___get__ = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif - #if PY_VERSION_HEX >= 0x030400a1 - 0, /*tp_finalize*/ - #endif }; -static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_17___get__[8]; -static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_17___get__ = 0; +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25___iter__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_25___iter__[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_25___iter__ = 0; -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_17___get__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_25___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25___iter__ *p; PyObject *o; - if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_17___get__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__)))) { - o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_17___get__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_17___get__]; - memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__)); - (void) PyObject_INIT(o, t); + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_25___iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25___iter__)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_25___iter__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_25___iter__]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25___iter__)); + PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } + p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25___iter__ *)o); + p->__pyx_v_self = 0; return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_17___get__(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__ *)o; +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_25___iter__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25___iter__ *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_self); - if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_17___get__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__))) { - __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_17___get__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_17___get__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__ *)o); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_25___iter__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25___iter__))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_25___iter__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_25___iter__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25___iter__ *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } -static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_17___get__(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_25___iter__(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__ *)o; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25___iter__ *)o; if (p->__pyx_v_self) { e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; } return 0; } -static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_17___get__(PyObject *o) { +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_25___iter__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25___iter__ *)o; PyObject* tmp; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__ *)o; tmp = ((PyObject*)p->__pyx_v_self); - p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_HypergraphNode *)Py_None); Py_INCREF(Py_None); + p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_CandidateSet *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_17___get__ = { +static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_25___iter__[] = { + {0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_25___iter__ = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_17___get__"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_25___iter__"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25___iter__), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_17___get__, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_25___iter__, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -26129,13 +25725,13 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_17___get__ = { 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_4cdec_5_cdec___pyx_scope_struct_17___get__, /*tp_traverse*/ - __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_17___get__, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_25___iter__, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_25___iter__, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - 0, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec___pyx_scope_struct_25___iter__, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -26145,7 +25741,7 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_17___get__ = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_17___get__, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_25___iter__, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -26157,63 +25753,88 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_17___get__ = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif - #if PY_VERSION_HEX >= 0x030400a1 - 0, /*tp_finalize*/ - #endif }; -static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_18___iter__[8]; -static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_18___iter__ = 0; - -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_18___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { +static PyObject *__pyx_tp_new_4cdec_5_cdec_Decoder(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec_Decoder *p; PyObject *o; - if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_18___iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__)))) { - o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_18___iter__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_18___iter__]; - memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__)); - (void) PyObject_INIT(o, t); - PyObject_GC_Track(o); - } else { - o = (*t->tp_alloc)(t, 0); - if (unlikely(!o)) return 0; - } + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + p = ((struct __pyx_obj_4cdec_5_cdec_Decoder *)o); + p->weights = ((struct __pyx_obj_4cdec_5_cdec_DenseVector *)Py_None); Py_INCREF(Py_None); return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_18___iter__(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__ *)o; - PyObject_GC_UnTrack(o); - Py_CLEAR(p->__pyx_v_self); - if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_18___iter__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__))) { - __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_18___iter__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_18___iter__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__ *)o); - } else { - (*Py_TYPE(o)->tp_free)(o); +static void __pyx_tp_dealloc_4cdec_5_cdec_Decoder(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec_Decoder *p = (struct __pyx_obj_4cdec_5_cdec_Decoder *)o; + PyObject_GC_UnTrack(o); + { + PyObject *etype, *eval, *etb; + PyErr_Fetch(&etype, &eval, &etb); + ++Py_REFCNT(o); + __pyx_pw_4cdec_5_cdec_7Decoder_3__dealloc__(o); + if (PyErr_Occurred()) PyErr_WriteUnraisable(o); + --Py_REFCNT(o); + PyErr_Restore(etype, eval, etb); } + Py_CLEAR(p->weights); + (*Py_TYPE(o)->tp_free)(o); } -static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_18___iter__(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_4cdec_5_cdec_Decoder(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__ *)o; - if (p->__pyx_v_self) { - e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; + struct __pyx_obj_4cdec_5_cdec_Decoder *p = (struct __pyx_obj_4cdec_5_cdec_Decoder *)o; + if (p->weights) { + e = (*v)(((PyObject*)p->weights), a); if (e) return e; } return 0; } -static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_18___iter__(PyObject *o) { +static int __pyx_tp_clear_4cdec_5_cdec_Decoder(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec_Decoder *p = (struct __pyx_obj_4cdec_5_cdec_Decoder *)o; PyObject* tmp; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__ *)o; - tmp = ((PyObject*)p->__pyx_v_self); - p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_Lattice *)Py_None); Py_INCREF(Py_None); + tmp = ((PyObject*)p->weights); + p->weights = ((struct __pyx_obj_4cdec_5_cdec_DenseVector *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_18___iter__ = { +static PyObject *__pyx_getprop_4cdec_5_cdec_7Decoder_weights(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_7Decoder_7weights_1__get__(o); +} + +static int __pyx_setprop_4cdec_5_cdec_7Decoder_weights(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) { + if (v) { + return __pyx_pw_4cdec_5_cdec_7Decoder_7weights_3__set__(o, v); + } + else { + PyErr_SetString(PyExc_NotImplementedError, "__del__"); + return -1; + } +} + +static PyObject *__pyx_getprop_4cdec_5_cdec_7Decoder_formalism(PyObject *o, CYTHON_UNUSED void *x) { + return __pyx_pw_4cdec_5_cdec_7Decoder_9formalism_1__get__(o); +} + +static PyMethodDef __pyx_methods_4cdec_5_cdec_Decoder[] = { + {__Pyx_NAMESTR("read_weights"), (PyCFunction)__pyx_pw_4cdec_5_cdec_7Decoder_5read_weights, METH_O, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_7Decoder_4read_weights)}, + {__Pyx_NAMESTR("translate"), (PyCFunction)__pyx_pw_4cdec_5_cdec_7Decoder_7translate, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_4cdec_5_cdec_7Decoder_6translate)}, + {0, 0, 0, 0} +}; + +static struct PyGetSetDef __pyx_getsets_4cdec_5_cdec_Decoder[] = { + {(char *)"weights", __pyx_getprop_4cdec_5_cdec_7Decoder_weights, __pyx_setprop_4cdec_5_cdec_7Decoder_weights, 0, 0}, + {(char *)"formalism", __pyx_getprop_4cdec_5_cdec_7Decoder_formalism, 0, 0, 0}, + {0, 0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_4cdec_5_cdec_Decoder = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_18___iter__"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_18___iter__), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.Decoder"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec_Decoder), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_18___iter__, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec_Decoder, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -26232,25 +25853,25 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_18___iter__ = { 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*/ + 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_4cdec_5_cdec___pyx_scope_struct_18___iter__, /*tp_traverse*/ - __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_18___iter__, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec_Decoder, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec_Decoder, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - 0, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec_Decoder, /*tp_methods*/ 0, /*tp_members*/ - 0, /*tp_getset*/ + __pyx_getsets_4cdec_5_cdec_Decoder, /*tp_getset*/ 0, /*tp_base*/ 0, /*tp_dict*/ 0, /*tp_descr_get*/ 0, /*tp_descr_set*/ 0, /*tp_dictoffset*/ - 0, /*tp_init*/ + __pyx_pw_4cdec_5_cdec_7Decoder_1__init__, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_18___iter__, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec_Decoder, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -26262,63 +25883,67 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_18___iter__ = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif - #if PY_VERSION_HEX >= 0x030400a1 - 0, /*tp_finalize*/ - #endif }; -static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_19_todot[8]; -static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_19_todot = 0; +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct____iter__[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct____iter__ = 0; -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_19_todot(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct____iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__ *p; PyObject *o; - if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_19_todot > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot)))) { - o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_19_todot[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_19_todot]; - memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot)); - (void) PyObject_INIT(o, t); + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct____iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct____iter__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct____iter__]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__)); + PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } + p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__ *)o); + p->__pyx_v_self = 0; return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_19_todot(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot *)o; +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct____iter__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__ *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_self); - if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_19_todot < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot))) { - __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_19_todot[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_19_todot++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot *)o); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct____iter__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct____iter__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct____iter__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__ *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } -static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_19_todot(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct____iter__(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot *)o; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__ *)o; if (p->__pyx_v_self) { e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; } return 0; } -static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_19_todot(PyObject *o) { +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct____iter__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__ *)o; PyObject* tmp; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot *)o; tmp = ((PyObject*)p->__pyx_v_self); - p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_Lattice *)Py_None); Py_INCREF(Py_None); + p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_DenseVector *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_19_todot = { +static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct____iter__[] = { + {0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct____iter__ = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_19_todot"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct____iter__"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct____iter__), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_19_todot, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct____iter__, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -26339,13 +25964,13 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_19_todot = { 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_4cdec_5_cdec___pyx_scope_struct_19_todot, /*tp_traverse*/ - __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_19_todot, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct____iter__, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct____iter__, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - 0, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec___pyx_scope_struct____iter__, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -26355,7 +25980,7 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_19_todot = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_19_todot, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct____iter__, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -26367,105 +25992,67 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_19_todot = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif - #if PY_VERSION_HEX >= 0x030400a1 - 0, /*tp_finalize*/ - #endif }; -static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_20_lines[8]; -static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_20_lines = 0; +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14_sample *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_14_sample[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_14_sample = 0; -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_20_lines(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_14_sample(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14_sample *p; PyObject *o; - if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_20_lines > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines)))) { - o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_20_lines[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_20_lines]; - memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines)); - (void) PyObject_INIT(o, t); + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_14_sample > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14_sample)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_14_sample[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_14_sample]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14_sample)); + PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } + p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14_sample *)o); + p->__pyx_v_self = 0; return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_20_lines(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines *)o; +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_14_sample(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14_sample *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14_sample *)o; PyObject_GC_UnTrack(o); - Py_CLEAR(p->__pyx_outer_scope); - Py_CLEAR(p->__pyx_v_delta); - Py_CLEAR(p->__pyx_v_i); - Py_CLEAR(p->__pyx_v_label); - Py_CLEAR(p->__pyx_v_weight); - Py_CLEAR(p->__pyx_t_1); - Py_CLEAR(p->__pyx_t_3); - if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_20_lines < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines))) { - __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_20_lines[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_20_lines++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines *)o); + Py_CLEAR(p->__pyx_v_self); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_14_sample < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14_sample))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_14_sample[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_14_sample++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14_sample *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } -static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_20_lines(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_14_sample(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines *)o; - if (p->__pyx_outer_scope) { - e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e; - } - if (p->__pyx_v_delta) { - e = (*v)(p->__pyx_v_delta, a); if (e) return e; - } - if (p->__pyx_v_i) { - e = (*v)(p->__pyx_v_i, a); if (e) return e; - } - if (p->__pyx_v_label) { - e = (*v)(p->__pyx_v_label, a); if (e) return e; - } - if (p->__pyx_v_weight) { - e = (*v)(p->__pyx_v_weight, a); if (e) return e; - } - if (p->__pyx_t_1) { - e = (*v)(p->__pyx_t_1, a); if (e) return e; - } - if (p->__pyx_t_3) { - e = (*v)(p->__pyx_t_3, a); if (e) return e; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14_sample *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14_sample *)o; + if (p->__pyx_v_self) { + e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; } return 0; } -static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_20_lines(PyObject *o) { +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_14_sample(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14_sample *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14_sample *)o; PyObject* tmp; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines *)o; - tmp = ((PyObject*)p->__pyx_outer_scope); - p->__pyx_outer_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_19_todot *)Py_None); Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->__pyx_v_delta); - p->__pyx_v_delta = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->__pyx_v_i); - p->__pyx_v_i = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->__pyx_v_label); - p->__pyx_v_label = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->__pyx_v_weight); - p->__pyx_v_weight = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->__pyx_t_1); - p->__pyx_t_1 = 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); + tmp = ((PyObject*)p->__pyx_v_self); + p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_20_lines = { +static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_14_sample[] = { + {0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_14_sample = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_20_lines"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_20_lines), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_14_sample"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_14_sample), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_20_lines, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_14_sample, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -26486,13 +26073,13 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_20_lines = { 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_4cdec_5_cdec___pyx_scope_struct_20_lines, /*tp_traverse*/ - __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_20_lines, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_14_sample, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_14_sample, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - 0, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec___pyx_scope_struct_14_sample, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -26502,7 +26089,7 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_20_lines = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_20_lines, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_14_sample, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -26514,63 +26101,67 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_20_lines = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif - #if PY_VERSION_HEX >= 0x030400a1 - 0, /*tp_finalize*/ - #endif }; -static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_21___iter__[8]; -static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_21___iter__ = 0; +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_17___get__[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_17___get__ = 0; -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_21___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_17___get__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__ *p; PyObject *o; - if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_21___iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__)))) { - o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_21___iter__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_21___iter__]; - memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__)); - (void) PyObject_INIT(o, t); + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_17___get__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_17___get__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_17___get__]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__)); + PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } + p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__ *)o); + p->__pyx_v_self = 0; return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_21___iter__(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__ *)o; +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_17___get__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__ *)o; PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_self); - if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_21___iter__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__))) { - __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_21___iter__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_21___iter__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__ *)o); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_17___get__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_17___get__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_17___get__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__ *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } -static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_21___iter__(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_17___get__(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__ *)o; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__ *)o; if (p->__pyx_v_self) { e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; } return 0; } -static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_21___iter__(PyObject *o) { +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_17___get__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__ *)o; PyObject* tmp; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__ *)o; tmp = ((PyObject*)p->__pyx_v_self); - p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_SufficientStats *)Py_None); Py_INCREF(Py_None); + p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_21___iter__ = { +static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_17___get__[] = { + {0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_17___get__ = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_21___iter__"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_21___iter__), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_17___get__"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_17___get__), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_21___iter__, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_17___get__, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -26591,13 +26182,13 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_21___iter__ = { 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_4cdec_5_cdec___pyx_scope_struct_21___iter__, /*tp_traverse*/ - __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_21___iter__, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_17___get__, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_17___get__, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - 0, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec___pyx_scope_struct_17___get__, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -26607,7 +26198,7 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_21___iter__ = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_21___iter__, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_17___get__, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -26619,63 +26210,83 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_21___iter__ = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif - #if PY_VERSION_HEX >= 0x030400a1 - 0, /*tp_finalize*/ - #endif }; -static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_22___iter__[8]; -static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_22___iter__ = 0; +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_6_genexpr[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_6_genexpr = 0; -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_22___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_6_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr *p; PyObject *o; - if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_22___iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__)))) { - o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_22___iter__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_22___iter__]; - memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__)); - (void) PyObject_INIT(o, t); + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_6_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_6_genexpr[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_6_genexpr]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr)); + PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } + p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr *)o); + p->__pyx_outer_scope = 0; + p->__pyx_v_feat = 0; + p->__pyx_t_0 = 0; return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_22___iter__(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__ *)o; +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_6_genexpr(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr *)o; PyObject_GC_UnTrack(o); - Py_CLEAR(p->__pyx_v_self); - if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_22___iter__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__))) { - __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_22___iter__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_22___iter__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__ *)o); + Py_CLEAR(p->__pyx_outer_scope); + Py_CLEAR(p->__pyx_v_feat); + Py_CLEAR(p->__pyx_t_0); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_6_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_6_genexpr[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_6_genexpr++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } -static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_22___iter__(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_6_genexpr(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__ *)o; - if (p->__pyx_v_self) { - e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr *)o; + if (p->__pyx_outer_scope) { + e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e; + } + if (p->__pyx_v_feat) { + e = (*v)(p->__pyx_v_feat, a); if (e) return e; + } + if (p->__pyx_t_0) { + e = (*v)(p->__pyx_t_0, a); if (e) return e; } return 0; } -static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_22___iter__(PyObject *o) { +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_6_genexpr(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr *)o; PyObject* tmp; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__ *)o; - tmp = ((PyObject*)p->__pyx_v_self); - p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_CandidateSet *)Py_None); Py_INCREF(Py_None); + tmp = ((PyObject*)p->__pyx_outer_scope); + p->__pyx_outer_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_5___str__ *)Py_None); Py_INCREF(Py_None); + Py_XDECREF(tmp); + tmp = ((PyObject*)p->__pyx_v_feat); + p->__pyx_v_feat = 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); return 0; } -static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_22___iter__ = { +static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_6_genexpr[] = { + {0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_6_genexpr = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_22___iter__"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_22___iter__), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_6_genexpr"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_6_genexpr), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_22___iter__, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_6_genexpr, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -26696,13 +26307,13 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_22___iter__ = { 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_4cdec_5_cdec___pyx_scope_struct_22___iter__, /*tp_traverse*/ - __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_22___iter__, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_6_genexpr, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_6_genexpr, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - 0, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec___pyx_scope_struct_6_genexpr, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -26712,7 +26323,7 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_22___iter__ = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_22___iter__, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_6_genexpr, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -26724,105 +26335,91 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_22___iter__ = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif - #if PY_VERSION_HEX >= 0x030400a1 - 0, /*tp_finalize*/ - #endif }; -static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_23__make_config[8]; -static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_23__make_config = 0; +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_unique_kbest_trees *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_12_unique_kbest_trees[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_12_unique_kbest_trees = 0; -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_23__make_config(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_12_unique_kbest_trees(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_unique_kbest_trees *p; PyObject *o; - if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_23__make_config > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config)))) { - o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_23__make_config[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_23__make_config]; - memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config)); - (void) PyObject_INIT(o, t); + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_12_unique_kbest_trees > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_unique_kbest_trees)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_12_unique_kbest_trees[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_12_unique_kbest_trees]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_unique_kbest_trees)); + PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } + p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_unique_kbest_trees *)o); + p->__pyx_v_e_tree = 0; + p->__pyx_v_f_tree = 0; + p->__pyx_v_self = 0; + p->__pyx_v_size = 0; return o; -} - -static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_23__make_config(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config *)o; - PyObject_GC_UnTrack(o); - Py_CLEAR(p->__pyx_v_config); - Py_CLEAR(p->__pyx_v_info); - Py_CLEAR(p->__pyx_v_key); - Py_CLEAR(p->__pyx_v_name); - Py_CLEAR(p->__pyx_v_value); - Py_CLEAR(p->__pyx_t_0); - Py_CLEAR(p->__pyx_t_1); - if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_23__make_config < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config))) { - __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_23__make_config[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_23__make_config++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config *)o); +} + +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_12_unique_kbest_trees(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_unique_kbest_trees *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_unique_kbest_trees *)o; + PyObject_GC_UnTrack(o); + Py_CLEAR(p->__pyx_v_e_tree); + Py_CLEAR(p->__pyx_v_f_tree); + Py_CLEAR(p->__pyx_v_self); + Py_CLEAR(p->__pyx_v_size); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_12_unique_kbest_trees < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_unique_kbest_trees))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_12_unique_kbest_trees[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_12_unique_kbest_trees++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_unique_kbest_trees *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } -static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_23__make_config(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_12_unique_kbest_trees(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config *)o; - if (p->__pyx_v_config) { - e = (*v)(p->__pyx_v_config, a); if (e) return e; - } - if (p->__pyx_v_info) { - e = (*v)(p->__pyx_v_info, a); if (e) return e; - } - if (p->__pyx_v_key) { - e = (*v)(p->__pyx_v_key, a); if (e) return e; - } - if (p->__pyx_v_name) { - e = (*v)(p->__pyx_v_name, a); if (e) return e; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_unique_kbest_trees *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_unique_kbest_trees *)o; + if (p->__pyx_v_e_tree) { + e = (*v)(p->__pyx_v_e_tree, a); if (e) return e; } - if (p->__pyx_v_value) { - e = (*v)(p->__pyx_v_value, a); if (e) return e; + if (p->__pyx_v_f_tree) { + e = (*v)(p->__pyx_v_f_tree, a); if (e) return e; } - if (p->__pyx_t_0) { - e = (*v)(p->__pyx_t_0, 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_t_1) { - e = (*v)(p->__pyx_t_1, a); if (e) return e; + if (p->__pyx_v_size) { + e = (*v)(p->__pyx_v_size, a); if (e) return e; } return 0; } -static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_23__make_config(PyObject *o) { +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_12_unique_kbest_trees(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_unique_kbest_trees *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_unique_kbest_trees *)o; PyObject* tmp; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config *)o; - tmp = ((PyObject*)p->__pyx_v_config); - p->__pyx_v_config = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->__pyx_v_info); - p->__pyx_v_info = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->__pyx_v_key); - p->__pyx_v_key = Py_None; Py_INCREF(Py_None); + tmp = ((PyObject*)p->__pyx_v_e_tree); + p->__pyx_v_e_tree = ((PyObject*)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); - tmp = ((PyObject*)p->__pyx_v_name); - p->__pyx_v_name = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->__pyx_v_value); - p->__pyx_v_value = Py_None; Py_INCREF(Py_None); + tmp = ((PyObject*)p->__pyx_v_f_tree); + p->__pyx_v_f_tree = ((PyObject*)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); + tmp = ((PyObject*)p->__pyx_v_self); + p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_Hypergraph *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); - tmp = ((PyObject*)p->__pyx_t_1); - p->__pyx_t_1 = Py_None; Py_INCREF(Py_None); + tmp = ((PyObject*)p->__pyx_v_size); + p->__pyx_v_size = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_23__make_config = { +static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_12_unique_kbest_trees[] = { + {0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_12_unique_kbest_trees = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_23__make_config"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_23__make_config), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_12_unique_kbest_trees"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_12_unique_kbest_trees), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_23__make_config, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_12_unique_kbest_trees, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -26843,13 +26440,13 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_23__make_config = 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_4cdec_5_cdec___pyx_scope_struct_23__make_config, /*tp_traverse*/ - __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_23__make_config, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_12_unique_kbest_trees, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_12_unique_kbest_trees, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - 0, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec___pyx_scope_struct_12_unique_kbest_trees, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -26859,7 +26456,7 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_23__make_config = 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_23__make_config, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_12_unique_kbest_trees, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -26871,63 +26468,67 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_23__make_config = #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif - #if PY_VERSION_HEX >= 0x030400a1 - 0, /*tp_finalize*/ - #endif }; -static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_24___init__[8]; -static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_24___init__ = 0; +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_4___get__[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_4___get__ = 0; -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_24___init__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_4___get__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__ *p; PyObject *o; - if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_24___init__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__)))) { - o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_24___init__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_24___init__]; - memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__)); - (void) PyObject_INIT(o, t); + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_4___get__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_4___get__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_4___get__]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__)); + PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } + p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__ *)o); + p->__pyx_v_self = 0; return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_24___init__(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__ *)o; +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_4___get__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__ *)o; PyObject_GC_UnTrack(o); - Py_CLEAR(p->__pyx_v_config); - if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_24___init__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__))) { - __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_24___init__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_24___init__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__ *)o); + Py_CLEAR(p->__pyx_v_self); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_4___get__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_4___get__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_4___get__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__ *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } -static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_24___init__(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_4___get__(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__ *)o; - if (p->__pyx_v_config) { - e = (*v)(p->__pyx_v_config, a); if (e) return e; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__ *)o; + if (p->__pyx_v_self) { + e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; } return 0; } -static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_24___init__(PyObject *o) { +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_4___get__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__ *)o; PyObject* tmp; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__ *)o; - tmp = ((PyObject*)p->__pyx_v_config); - p->__pyx_v_config = ((PyObject*)Py_None); Py_INCREF(Py_None); + tmp = ((PyObject*)p->__pyx_v_self); + p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_TRule *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_24___init__ = { +static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_4___get__[] = { + {0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_4___get__ = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_24___init__"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_4___get__"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_4___get__), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_24___init__, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_4___get__, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -26948,13 +26549,13 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_24___init__ = { 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_4cdec_5_cdec___pyx_scope_struct_24___init__, /*tp_traverse*/ - __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_24___init__, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_4___get__, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_4___get__, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - 0, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec___pyx_scope_struct_4___get__, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -26964,7 +26565,7 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_24___init__ = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_24___init__, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_4___get__, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -26976,77 +26577,67 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_24___init__ = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif - #if PY_VERSION_HEX >= 0x030400a1 - 0, /*tp_finalize*/ - #endif }; -static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_25_genexpr[8]; -static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_25_genexpr = 0; +static struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__ *__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_1___iter__[8]; +static int __pyx_freecount_4cdec_5_cdec___pyx_scope_struct_1___iter__ = 0; -static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_25_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { +static PyObject *__pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_1___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__ *p; PyObject *o; - if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_25_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr)))) { - o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_25_genexpr[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_25_genexpr]; - memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr)); - (void) PyObject_INIT(o, t); + if (likely((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_1___iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__)))) { + o = (PyObject*)__pyx_freelist_4cdec_5_cdec___pyx_scope_struct_1___iter__[--__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_1___iter__]; + memset(o, 0, sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__)); + PyObject_INIT(o, t); PyObject_GC_Track(o); } else { o = (*t->tp_alloc)(t, 0); if (unlikely(!o)) return 0; } + p = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__ *)o); + p->__pyx_v_self = 0; return o; } -static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_25_genexpr(PyObject *o) { - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr *)o; +static void __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_1___iter__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__ *)o; PyObject_GC_UnTrack(o); - Py_CLEAR(p->__pyx_outer_scope); - Py_CLEAR(p->__pyx_v_kv); - Py_CLEAR(p->__pyx_t_0); - if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_25_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr))) { - __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_25_genexpr[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_25_genexpr++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr *)o); + Py_CLEAR(p->__pyx_v_self); + if ((__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_1___iter__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__))) { + __pyx_freelist_4cdec_5_cdec___pyx_scope_struct_1___iter__[__pyx_freecount_4cdec_5_cdec___pyx_scope_struct_1___iter__++] = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__ *)o); } else { (*Py_TYPE(o)->tp_free)(o); } } -static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_25_genexpr(PyObject *o, visitproc v, void *a) { +static int __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_1___iter__(PyObject *o, visitproc v, void *a) { int e; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr *)o; - if (p->__pyx_outer_scope) { - e = (*v)(((PyObject*)p->__pyx_outer_scope), a); if (e) return e; - } - if (p->__pyx_v_kv) { - e = (*v)(p->__pyx_v_kv, a); if (e) return e; - } - if (p->__pyx_t_0) { - e = (*v)(p->__pyx_t_0, a); if (e) return e; + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__ *)o; + if (p->__pyx_v_self) { + e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e; } return 0; } -static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_25_genexpr(PyObject *o) { +static int __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_1___iter__(PyObject *o) { + struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__ *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__ *)o; PyObject* tmp; - struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr *p = (struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr *)o; - tmp = ((PyObject*)p->__pyx_outer_scope); - p->__pyx_outer_scope = ((struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_24___init__ *)Py_None); Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->__pyx_v_kv); - p->__pyx_v_kv = 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); + tmp = ((PyObject*)p->__pyx_v_self); + p->__pyx_v_self = ((struct __pyx_obj_4cdec_5_cdec_SparseVector *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_25_genexpr = { +static PyMethodDef __pyx_methods_4cdec_5_cdec___pyx_scope_struct_1___iter__[] = { + {0, 0, 0, 0} +}; + +static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_1___iter__ = { PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_25_genexpr"), /*tp_name*/ - sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_25_genexpr), /*tp_basicsize*/ + __Pyx_NAMESTR("cdec._cdec.__pyx_scope_struct_1___iter__"), /*tp_name*/ + sizeof(struct __pyx_obj_4cdec_5_cdec___pyx_scope_struct_1___iter__), /*tp_basicsize*/ 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_25_genexpr, /*tp_dealloc*/ + __pyx_tp_dealloc_4cdec_5_cdec___pyx_scope_struct_1___iter__, /*tp_dealloc*/ 0, /*tp_print*/ 0, /*tp_getattr*/ 0, /*tp_setattr*/ @@ -27067,13 +26658,13 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_25_genexpr = { 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_4cdec_5_cdec___pyx_scope_struct_25_genexpr, /*tp_traverse*/ - __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_25_genexpr, /*tp_clear*/ + __pyx_tp_traverse_4cdec_5_cdec___pyx_scope_struct_1___iter__, /*tp_traverse*/ + __pyx_tp_clear_4cdec_5_cdec___pyx_scope_struct_1___iter__, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - 0, /*tp_methods*/ + __pyx_methods_4cdec_5_cdec___pyx_scope_struct_1___iter__, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -27083,7 +26674,7 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_25_genexpr = { 0, /*tp_dictoffset*/ 0, /*tp_init*/ 0, /*tp_alloc*/ - __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_25_genexpr, /*tp_new*/ + __pyx_tp_new_4cdec_5_cdec___pyx_scope_struct_1___iter__, /*tp_new*/ 0, /*tp_free*/ 0, /*tp_is_gc*/ 0, /*tp_bases*/ @@ -27095,9 +26686,6 @@ static PyTypeObject __pyx_type_4cdec_5_cdec___pyx_scope_struct_25_genexpr = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif - #if PY_VERSION_HEX >= 0x030400a1 - 0, /*tp_finalize*/ - #endif }; static PyMethodDef __pyx_methods[] = { @@ -27123,165 +26711,163 @@ static struct PyModuleDef __pyx_moduledef = { #endif static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_n_s_BLEU, __pyx_k_BLEU, sizeof(__pyx_k_BLEU), 0, 0, 1, 1}, - {&__pyx_n_s_CER, __pyx_k_CER, sizeof(__pyx_k_CER), 0, 0, 1, 1}, - {&__pyx_kp_s_Cannot_translate_input_type_s, __pyx_k_Cannot_translate_input_type_s, sizeof(__pyx_k_Cannot_translate_input_type_s), 0, 0, 1, 0}, - {&__pyx_n_s_Exception, __pyx_k_Exception, sizeof(__pyx_k_Exception), 0, 0, 1, 1}, - {&__pyx_n_s_IBM_BLEU, __pyx_k_IBM_BLEU, sizeof(__pyx_k_IBM_BLEU), 0, 0, 1, 1}, - {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1}, - {&__pyx_n_s_InvalidConfig, __pyx_k_InvalidConfig, sizeof(__pyx_k_InvalidConfig), 0, 0, 1, 1}, - {&__pyx_n_s_KeyError, __pyx_k_KeyError, sizeof(__pyx_k_KeyError), 0, 0, 1, 1}, - {&__pyx_n_s_NotImplemented, __pyx_k_NotImplemented, sizeof(__pyx_k_NotImplemented), 0, 0, 1, 1}, - {&__pyx_n_s_ParseFailed, __pyx_k_ParseFailed, sizeof(__pyx_k_ParseFailed), 0, 0, 1, 1}, - {&__pyx_n_s_QCRI, __pyx_k_QCRI, sizeof(__pyx_k_QCRI), 0, 0, 1, 1}, - {&__pyx_n_s_QCRI_BLEU, __pyx_k_QCRI_BLEU, sizeof(__pyx_k_QCRI_BLEU), 0, 0, 1, 1}, - {&__pyx_n_s_SSK, __pyx_k_SSK, sizeof(__pyx_k_SSK), 0, 0, 1, 1}, - {&__pyx_n_s_TER, __pyx_k_TER, sizeof(__pyx_k_TER), 0, 0, 1, 1}, - {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1}, - {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1}, - {&__pyx_kp_s__10, __pyx_k__10, sizeof(__pyx_k__10), 0, 0, 1, 0}, - {&__pyx_kp_s__11, __pyx_k__11, sizeof(__pyx_k__11), 0, 0, 1, 0}, - {&__pyx_kp_s__13, __pyx_k__13, sizeof(__pyx_k__13), 0, 0, 1, 0}, - {&__pyx_kp_s__16, __pyx_k__16, sizeof(__pyx_k__16), 0, 0, 1, 0}, - {&__pyx_kp_s__20, __pyx_k__20, sizeof(__pyx_k__20), 0, 0, 1, 0}, - {&__pyx_n_s__23, __pyx_k__23, sizeof(__pyx_k__23), 0, 0, 1, 1}, - {&__pyx_kp_s__4, __pyx_k__4, sizeof(__pyx_k__4), 0, 0, 1, 0}, - {&__pyx_n_s_a, __pyx_k_a, sizeof(__pyx_k_a), 0, 0, 1, 1}, - {&__pyx_n_s_alignments, __pyx_k_alignments, sizeof(__pyx_k_alignments), 0, 0, 1, 1}, - {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1}, - {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1}, - {&__pyx_n_s_beam_alpha, __pyx_k_beam_alpha, sizeof(__pyx_k_beam_alpha), 0, 0, 1, 1}, - {&__pyx_kp_s_candidate_set_index_out_of_range, __pyx_k_candidate_set_index_out_of_range, sizeof(__pyx_k_candidate_set_index_out_of_range), 0, 0, 1, 0}, - {&__pyx_kp_s_cannot_create_lattice_from_s, __pyx_k_cannot_create_lattice_from_s, sizeof(__pyx_k_cannot_create_lattice_from_s), 0, 0, 1, 0}, - {&__pyx_kp_s_cannot_initialize_weights_with_s, __pyx_k_cannot_initialize_weights_with_s, sizeof(__pyx_k_cannot_initialize_weights_with_s), 0, 0, 1, 0}, - {&__pyx_kp_s_cannot_intersect_hypergraph_with, __pyx_k_cannot_intersect_hypergraph_with, sizeof(__pyx_k_cannot_intersect_hypergraph_with), 0, 0, 1, 0}, - {&__pyx_kp_s_cannot_reweight_hypergraph_with, __pyx_k_cannot_reweight_hypergraph_with, sizeof(__pyx_k_cannot_reweight_hypergraph_with), 0, 0, 1, 0}, - {&__pyx_kp_s_cannot_take_the_dot_product_of_s, __pyx_k_cannot_take_the_dot_product_of_s, sizeof(__pyx_k_cannot_take_the_dot_product_of_s), 0, 0, 1, 0}, - {&__pyx_n_s_cat, __pyx_k_cat, sizeof(__pyx_k_cat), 0, 0, 1, 1}, - {&__pyx_n_s_cdec__cdec, __pyx_k_cdec__cdec, sizeof(__pyx_k_cdec__cdec), 0, 0, 1, 1}, - {&__pyx_n_s_cdec_sa__sa, __pyx_k_cdec_sa__sa, sizeof(__pyx_k_cdec_sa__sa), 0, 0, 1, 1}, - {&__pyx_n_s_class, __pyx_k_class, sizeof(__pyx_k_class), 0, 0, 1, 1}, - {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1}, - {&__pyx_kp_s_comparison_not_implemented_for_H, __pyx_k_comparison_not_implemented_for_H, sizeof(__pyx_k_comparison_not_implemented_for_H), 0, 0, 1, 0}, - {&__pyx_kp_s_comparison_not_implemented_for_H_2, __pyx_k_comparison_not_implemented_for_H_2, sizeof(__pyx_k_comparison_not_implemented_for_H_2), 0, 0, 1, 0}, - {&__pyx_kp_s_comparison_not_implemented_for_S, __pyx_k_comparison_not_implemented_for_S, sizeof(__pyx_k_comparison_not_implemented_for_S), 0, 0, 1, 0}, - {&__pyx_n_s_config, __pyx_k_config, sizeof(__pyx_k_config), 0, 0, 1, 1}, - {&__pyx_n_s_config_str, __pyx_k_config_str, sizeof(__pyx_k_config_str), 0, 0, 1, 1}, - {&__pyx_n_s_csplit, __pyx_k_csplit, sizeof(__pyx_k_csplit), 0, 0, 1, 1}, - {&__pyx_n_s_csplit_preserve_full_word, __pyx_k_csplit_preserve_full_word, sizeof(__pyx_k_csplit_preserve_full_word), 0, 0, 1, 1}, - {&__pyx_kp_s_d, __pyx_k_d, sizeof(__pyx_k_d), 0, 0, 1, 0}, - {&__pyx_kp_s_d_d_label_s, __pyx_k_d_d_label_s, sizeof(__pyx_k_d_d_label_s), 0, 0, 1, 0}, - {&__pyx_kp_s_d_shape_doublecircle, __pyx_k_d_shape_doublecircle, sizeof(__pyx_k_d_shape_doublecircle), 0, 0, 1, 0}, - {&__pyx_n_s_delta, __pyx_k_delta, sizeof(__pyx_k_delta), 0, 0, 1, 1}, - {&__pyx_n_s_density, __pyx_k_density, sizeof(__pyx_k_density), 0, 0, 1, 1}, - {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1}, - {&__pyx_kp_s_digraph_lattice, __pyx_k_digraph_lattice, sizeof(__pyx_k_digraph_lattice), 0, 0, 1, 0}, - {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1}, - {&__pyx_n_s_dot, __pyx_k_dot, sizeof(__pyx_k_dot), 0, 0, 1, 1}, - {&__pyx_n_s_e, __pyx_k_e, sizeof(__pyx_k_e), 0, 0, 1, 1}, - {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1}, - {&__pyx_n_s_encoding, __pyx_k_encoding, sizeof(__pyx_k_encoding), 0, 0, 1, 1}, - {&__pyx_n_s_enter, __pyx_k_enter, sizeof(__pyx_k_enter), 0, 0, 1, 1}, - {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1}, - {&__pyx_n_s_eval, __pyx_k_eval, sizeof(__pyx_k_eval), 0, 0, 1, 1}, - {&__pyx_n_s_evaluate, __pyx_k_evaluate, sizeof(__pyx_k_evaluate), 0, 0, 1, 1}, - {&__pyx_n_s_evaluator, __pyx_k_evaluator, sizeof(__pyx_k_evaluator), 0, 0, 1, 1}, - {&__pyx_n_s_exit, __pyx_k_exit, sizeof(__pyx_k_exit), 0, 0, 1, 1}, - {&__pyx_n_s_f, __pyx_k_f, sizeof(__pyx_k_f), 0, 0, 1, 1}, - {&__pyx_n_s_formalism, __pyx_k_formalism, sizeof(__pyx_k_formalism), 0, 0, 1, 1}, - {&__pyx_kp_s_formalism_s_unknown, __pyx_k_formalism_s_unknown, sizeof(__pyx_k_formalism_s_unknown), 0, 0, 1, 0}, - {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1}, - {&__pyx_n_s_fst, __pyx_k_fst, sizeof(__pyx_k_fst), 0, 0, 1, 1}, - {&__pyx_n_s_genexpr, __pyx_k_genexpr, sizeof(__pyx_k_genexpr), 0, 0, 1, 1}, - {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1}, - {&__pyx_n_s_grammar, __pyx_k_grammar, sizeof(__pyx_k_grammar), 0, 0, 1, 1}, - {&__pyx_n_s_hyp, __pyx_k_hyp, sizeof(__pyx_k_hyp), 0, 0, 1, 1}, - {&__pyx_n_s_hypergraph, __pyx_k_hypergraph, sizeof(__pyx_k_hypergraph), 0, 0, 1, 1}, - {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1}, - {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1}, - {&__pyx_n_s_in_edges, __pyx_k_in_edges, sizeof(__pyx_k_in_edges), 0, 0, 1, 1}, - {&__pyx_n_s_info, __pyx_k_info, sizeof(__pyx_k_info), 0, 0, 1, 1}, - {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1}, - {&__pyx_n_s_inp, __pyx_k_inp, sizeof(__pyx_k_inp), 0, 0, 1, 1}, - {&__pyx_n_s_items, __pyx_k_items, sizeof(__pyx_k_items), 0, 0, 1, 1}, - {&__pyx_n_s_join, __pyx_k_join, sizeof(__pyx_k_join), 0, 0, 1, 1}, - {&__pyx_n_s_k, __pyx_k_k, sizeof(__pyx_k_k), 0, 0, 1, 1}, - {&__pyx_n_s_key, __pyx_k_key, sizeof(__pyx_k_key), 0, 0, 1, 1}, - {&__pyx_n_s_label, __pyx_k_label, sizeof(__pyx_k_label), 0, 0, 1, 1}, - {&__pyx_kp_s_lattice_index_out_of_range, __pyx_k_lattice_index_out_of_range, sizeof(__pyx_k_lattice_index_out_of_range), 0, 0, 1, 0}, - {&__pyx_n_s_lexalign, __pyx_k_lexalign, sizeof(__pyx_k_lexalign), 0, 0, 1, 1}, - {&__pyx_n_s_lextrans, __pyx_k_lextrans, sizeof(__pyx_k_lextrans), 0, 0, 1, 1}, - {&__pyx_n_s_lhs, __pyx_k_lhs, sizeof(__pyx_k_lhs), 0, 0, 1, 1}, - {&__pyx_n_s_lines, __pyx_k_lines, sizeof(__pyx_k_lines), 0, 0, 1, 1}, - {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, - {&__pyx_n_s_make_config, __pyx_k_make_config, sizeof(__pyx_k_make_config), 0, 0, 1, 1}, - {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1}, - {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1}, - {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1}, - {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1}, - {&__pyx_kp_s_node_shape_circle, __pyx_k_node_shape_circle, sizeof(__pyx_k_node_shape_circle), 0, 0, 1, 0}, - {&__pyx_n_s_open, __pyx_k_open, sizeof(__pyx_k_open), 0, 0, 1, 1}, - {&__pyx_n_s_pb, __pyx_k_pb, sizeof(__pyx_k_pb), 0, 0, 1, 1}, - {&__pyx_n_s_phrase, __pyx_k_phrase, sizeof(__pyx_k_phrase), 0, 0, 1, 1}, - {&__pyx_n_s_phrase_2, __pyx_k_phrase_2, sizeof(__pyx_k_phrase_2), 0, 0, 1, 1}, - {&__pyx_n_s_plf, __pyx_k_plf, sizeof(__pyx_k_plf), 0, 0, 1, 1}, - {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 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_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1}, - {&__pyx_kp_s_rankdir_LR, __pyx_k_rankdir_LR, sizeof(__pyx_k_rankdir_LR), 0, 0, 1, 0}, - {&__pyx_n_s_ref, __pyx_k_ref, sizeof(__pyx_k_ref), 0, 0, 1, 1}, - {&__pyx_n_s_refs, __pyx_k_refs, sizeof(__pyx_k_refs), 0, 0, 1, 1}, - {&__pyx_n_s_replace, __pyx_k_replace, sizeof(__pyx_k_replace), 0, 0, 1, 1}, - {&__pyx_n_s_rhs, __pyx_k_rhs, sizeof(__pyx_k_rhs), 0, 0, 1, 1}, - {&__pyx_n_s_rules, __pyx_k_rules, sizeof(__pyx_k_rules), 0, 0, 1, 1}, - {&__pyx_kp_s_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 0, 1, 0}, - {&__pyx_kp_s_s_d, __pyx_k_s_d, sizeof(__pyx_k_s_d), 0, 0, 1, 0}, - {&__pyx_kp_s_s_s, __pyx_k_s_s, sizeof(__pyx_k_s_s), 0, 0, 1, 0}, - {&__pyx_kp_s_s_s_2, __pyx_k_s_s_2, sizeof(__pyx_k_s_s_2), 0, 0, 1, 0}, - {&__pyx_kp_s_s_s_3, __pyx_k_s_s_3, sizeof(__pyx_k_s_s_3), 0, 0, 1, 0}, - {&__pyx_kp_s_s_s_s_s, __pyx_k_s_s_s_s, sizeof(__pyx_k_s_s_s_s), 0, 0, 1, 0}, - {&__pyx_n_s_sa, __pyx_k_sa, sizeof(__pyx_k_sa), 0, 0, 1, 1}, - {&__pyx_n_s_scfg, __pyx_k_scfg, sizeof(__pyx_k_scfg), 0, 0, 1, 1}, - {&__pyx_n_s_score, __pyx_k_score, sizeof(__pyx_k_score), 0, 0, 1, 1}, - {&__pyx_n_s_scores, __pyx_k_scores, sizeof(__pyx_k_scores), 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_sentence, __pyx_k_sentence, sizeof(__pyx_k_sentence), 0, 0, 1, 1}, - {&__pyx_n_s_set_silent, __pyx_k_set_silent, sizeof(__pyx_k_set_silent), 0, 0, 1, 1}, - {&__pyx_n_s_span, __pyx_k_span, sizeof(__pyx_k_span), 0, 0, 1, 1}, - {&__pyx_n_s_split, __pyx_k_split, sizeof(__pyx_k_split), 0, 0, 1, 1}, - {&__pyx_n_s_startswith, __pyx_k_startswith, sizeof(__pyx_k_startswith), 0, 0, 1, 1}, - {&__pyx_n_s_strip, __pyx_k_strip, sizeof(__pyx_k_strip), 0, 0, 1, 1}, - {&__pyx_kp_s_sufficient_stats_vector_index_ou, __pyx_k_sufficient_stats_vector_index_ou, sizeof(__pyx_k_sufficient_stats_vector_index_ou), 0, 0, 1, 0}, - {&__pyx_n_s_super, __pyx_k_super, sizeof(__pyx_k_super), 0, 0, 1, 1}, - {&__pyx_n_s_tagger, __pyx_k_tagger, sizeof(__pyx_k_tagger), 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_kp_s_the_grammar_should_contain_TRule, __pyx_k_the_grammar_should_contain_TRule, sizeof(__pyx_k_the_grammar_should_contain_TRule), 0, 0, 1, 0}, - {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1}, - {&__pyx_n_s_todot_locals_lines, __pyx_k_todot_locals_lines, sizeof(__pyx_k_todot_locals_lines), 0, 0, 1, 1}, - {&__pyx_kp_s_usr0_home_cdyer_cdec_python_cde, __pyx_k_usr0_home_cdyer_cdec_python_cde, sizeof(__pyx_k_usr0_home_cdyer_cdec_python_cde), 0, 0, 1, 0}, - {&__pyx_kp_s_usr0_home_cdyer_cdec_python_cde_2, __pyx_k_usr0_home_cdyer_cdec_python_cde_2, sizeof(__pyx_k_usr0_home_cdyer_cdec_python_cde_2), 0, 0, 1, 0}, - {&__pyx_kp_s_usr0_home_cdyer_cdec_python_cde_3, __pyx_k_usr0_home_cdyer_cdec_python_cde_3, sizeof(__pyx_k_usr0_home_cdyer_cdec_python_cde_3), 0, 0, 1, 0}, - {&__pyx_n_s_utf8, __pyx_k_utf8, sizeof(__pyx_k_utf8), 0, 0, 1, 1}, - {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1}, - {&__pyx_n_s_weight, __pyx_k_weight, sizeof(__pyx_k_weight), 0, 0, 1, 1}, - {&__pyx_n_s_yn, __pyx_k_yn, sizeof(__pyx_k_yn), 0, 0, 1, 1}, + {&__pyx_kp_s_10, __pyx_k_10, sizeof(__pyx_k_10), 0, 0, 1, 0}, + {&__pyx_kp_s_11, __pyx_k_11, sizeof(__pyx_k_11), 0, 0, 1, 0}, + {&__pyx_kp_s_12, __pyx_k_12, sizeof(__pyx_k_12), 0, 0, 1, 0}, + {&__pyx_kp_s_13, __pyx_k_13, sizeof(__pyx_k_13), 0, 0, 1, 0}, + {&__pyx_kp_s_15, __pyx_k_15, sizeof(__pyx_k_15), 0, 0, 1, 0}, + {&__pyx_n_s_16, __pyx_k_16, sizeof(__pyx_k_16), 0, 0, 1, 1}, + {&__pyx_kp_s_17, __pyx_k_17, sizeof(__pyx_k_17), 0, 0, 1, 0}, + {&__pyx_kp_s_18, __pyx_k_18, sizeof(__pyx_k_18), 0, 0, 1, 0}, + {&__pyx_kp_s_20, __pyx_k_20, sizeof(__pyx_k_20), 0, 0, 1, 0}, + {&__pyx_kp_s_22, __pyx_k_22, sizeof(__pyx_k_22), 0, 0, 1, 0}, + {&__pyx_kp_s_23, __pyx_k_23, sizeof(__pyx_k_23), 0, 0, 1, 0}, + {&__pyx_kp_s_26, __pyx_k_26, sizeof(__pyx_k_26), 0, 0, 1, 0}, + {&__pyx_kp_s_27, __pyx_k_27, sizeof(__pyx_k_27), 0, 0, 1, 0}, + {&__pyx_kp_s_28, __pyx_k_28, sizeof(__pyx_k_28), 0, 0, 1, 0}, + {&__pyx_kp_s_29, __pyx_k_29, sizeof(__pyx_k_29), 0, 0, 1, 0}, + {&__pyx_kp_s_3, __pyx_k_3, sizeof(__pyx_k_3), 0, 0, 1, 0}, + {&__pyx_kp_s_30, __pyx_k_30, sizeof(__pyx_k_30), 0, 0, 1, 0}, + {&__pyx_kp_s_31, __pyx_k_31, sizeof(__pyx_k_31), 0, 0, 1, 0}, + {&__pyx_kp_s_33, __pyx_k_33, sizeof(__pyx_k_33), 0, 0, 1, 0}, + {&__pyx_kp_s_34, __pyx_k_34, sizeof(__pyx_k_34), 0, 0, 1, 0}, + {&__pyx_kp_s_37, __pyx_k_37, sizeof(__pyx_k_37), 0, 0, 1, 0}, + {&__pyx_n_s_38, __pyx_k_38, sizeof(__pyx_k_38), 0, 0, 1, 1}, + {&__pyx_n_s_39, __pyx_k_39, sizeof(__pyx_k_39), 0, 0, 1, 1}, + {&__pyx_kp_s_4, __pyx_k_4, sizeof(__pyx_k_4), 0, 0, 1, 0}, + {&__pyx_kp_s_40, __pyx_k_40, sizeof(__pyx_k_40), 0, 0, 1, 0}, + {&__pyx_kp_s_42, __pyx_k_42, sizeof(__pyx_k_42), 0, 0, 1, 0}, + {&__pyx_kp_s_44, __pyx_k_44, sizeof(__pyx_k_44), 0, 0, 1, 0}, + {&__pyx_kp_s_46, __pyx_k_46, sizeof(__pyx_k_46), 0, 0, 1, 0}, + {&__pyx_kp_s_47, __pyx_k_47, sizeof(__pyx_k_47), 0, 0, 1, 0}, + {&__pyx_kp_s_48, __pyx_k_48, sizeof(__pyx_k_48), 0, 0, 1, 0}, + {&__pyx_kp_s_49, __pyx_k_49, sizeof(__pyx_k_49), 0, 0, 1, 0}, + {&__pyx_kp_s_50, __pyx_k_50, sizeof(__pyx_k_50), 0, 0, 1, 0}, + {&__pyx_kp_s_53, __pyx_k_53, sizeof(__pyx_k_53), 0, 0, 1, 0}, + {&__pyx_n_s_54, __pyx_k_54, sizeof(__pyx_k_54), 0, 0, 1, 1}, + {&__pyx_n_s_55, __pyx_k_55, sizeof(__pyx_k_55), 0, 0, 1, 1}, + {&__pyx_kp_s_58, __pyx_k_58, sizeof(__pyx_k_58), 0, 0, 1, 0}, + {&__pyx_kp_s_66, __pyx_k_66, sizeof(__pyx_k_66), 0, 0, 1, 0}, + {&__pyx_kp_s_7, __pyx_k_7, sizeof(__pyx_k_7), 0, 0, 1, 0}, + {&__pyx_kp_s_8, __pyx_k_8, sizeof(__pyx_k_8), 0, 0, 1, 0}, + {&__pyx_kp_s_9, __pyx_k_9, sizeof(__pyx_k_9), 0, 0, 1, 0}, + {&__pyx_n_s__BLEU, __pyx_k__BLEU, sizeof(__pyx_k__BLEU), 0, 0, 1, 1}, + {&__pyx_n_s__CER, __pyx_k__CER, sizeof(__pyx_k__CER), 0, 0, 1, 1}, + {&__pyx_n_s__Exception, __pyx_k__Exception, sizeof(__pyx_k__Exception), 0, 0, 1, 1}, + {&__pyx_n_s__IBM_BLEU, __pyx_k__IBM_BLEU, sizeof(__pyx_k__IBM_BLEU), 0, 0, 1, 1}, + {&__pyx_n_s__IndexError, __pyx_k__IndexError, sizeof(__pyx_k__IndexError), 0, 0, 1, 1}, + {&__pyx_n_s__InvalidConfig, __pyx_k__InvalidConfig, sizeof(__pyx_k__InvalidConfig), 0, 0, 1, 1}, + {&__pyx_n_s__KeyError, __pyx_k__KeyError, sizeof(__pyx_k__KeyError), 0, 0, 1, 1}, + {&__pyx_n_s__NotImplemented, __pyx_k__NotImplemented, sizeof(__pyx_k__NotImplemented), 0, 0, 1, 1}, + {&__pyx_n_s__ParseFailed, __pyx_k__ParseFailed, sizeof(__pyx_k__ParseFailed), 0, 0, 1, 1}, + {&__pyx_n_s__QCRI, __pyx_k__QCRI, sizeof(__pyx_k__QCRI), 0, 0, 1, 1}, + {&__pyx_n_s__QCRI_BLEU, __pyx_k__QCRI_BLEU, sizeof(__pyx_k__QCRI_BLEU), 0, 0, 1, 1}, + {&__pyx_n_s__SSK, __pyx_k__SSK, sizeof(__pyx_k__SSK), 0, 0, 1, 1}, + {&__pyx_n_s__TER, __pyx_k__TER, sizeof(__pyx_k__TER), 0, 0, 1, 1}, + {&__pyx_n_s__TypeError, __pyx_k__TypeError, sizeof(__pyx_k__TypeError), 0, 0, 1, 1}, + {&__pyx_n_s__ValueError, __pyx_k__ValueError, sizeof(__pyx_k__ValueError), 0, 0, 1, 1}, + {&__pyx_n_s____class__, __pyx_k____class__, sizeof(__pyx_k____class__), 0, 0, 1, 1}, + {&__pyx_n_s____dict__, __pyx_k____dict__, sizeof(__pyx_k____dict__), 0, 0, 1, 1}, + {&__pyx_n_s____enter__, __pyx_k____enter__, sizeof(__pyx_k____enter__), 0, 0, 1, 1}, + {&__pyx_n_s____exit__, __pyx_k____exit__, sizeof(__pyx_k____exit__), 0, 0, 1, 1}, + {&__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____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____module__, __pyx_k____module__, sizeof(__pyx_k____module__), 0, 0, 1, 1}, + {&__pyx_n_s____name__, __pyx_k____name__, sizeof(__pyx_k____name__), 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____test__, __pyx_k____test__, sizeof(__pyx_k____test__), 0, 0, 1, 1}, + {&__pyx_n_s___make_config, __pyx_k___make_config, sizeof(__pyx_k___make_config), 0, 0, 1, 1}, + {&__pyx_n_s___phrase, __pyx_k___phrase, sizeof(__pyx_k___phrase), 0, 0, 1, 1}, + {&__pyx_n_s___sa, __pyx_k___sa, sizeof(__pyx_k___sa), 0, 0, 1, 1}, + {&__pyx_n_s__a, __pyx_k__a, sizeof(__pyx_k__a), 0, 0, 1, 1}, + {&__pyx_n_s__alignments, __pyx_k__alignments, sizeof(__pyx_k__alignments), 0, 0, 1, 1}, + {&__pyx_n_s__append, __pyx_k__append, sizeof(__pyx_k__append), 0, 0, 1, 1}, + {&__pyx_n_s__args, __pyx_k__args, sizeof(__pyx_k__args), 0, 0, 1, 1}, + {&__pyx_n_s__beam_alpha, __pyx_k__beam_alpha, sizeof(__pyx_k__beam_alpha), 0, 0, 1, 1}, + {&__pyx_n_s__cat, __pyx_k__cat, sizeof(__pyx_k__cat), 0, 0, 1, 1}, + {&__pyx_n_s__close, __pyx_k__close, sizeof(__pyx_k__close), 0, 0, 1, 1}, + {&__pyx_n_s__config, __pyx_k__config, sizeof(__pyx_k__config), 0, 0, 1, 1}, + {&__pyx_n_s__config_str, __pyx_k__config_str, sizeof(__pyx_k__config_str), 0, 0, 1, 1}, + {&__pyx_n_s__csplit, __pyx_k__csplit, sizeof(__pyx_k__csplit), 0, 0, 1, 1}, + {&__pyx_n_s__delta, __pyx_k__delta, sizeof(__pyx_k__delta), 0, 0, 1, 1}, + {&__pyx_n_s__density, __pyx_k__density, sizeof(__pyx_k__density), 0, 0, 1, 1}, + {&__pyx_n_s__dot, __pyx_k__dot, sizeof(__pyx_k__dot), 0, 0, 1, 1}, + {&__pyx_n_s__e, __pyx_k__e, sizeof(__pyx_k__e), 0, 0, 1, 1}, + {&__pyx_n_s__encode, __pyx_k__encode, sizeof(__pyx_k__encode), 0, 0, 1, 1}, + {&__pyx_n_s__encoding, __pyx_k__encoding, sizeof(__pyx_k__encoding), 0, 0, 1, 1}, + {&__pyx_n_s__enumerate, __pyx_k__enumerate, sizeof(__pyx_k__enumerate), 0, 0, 1, 1}, + {&__pyx_n_s__eval, __pyx_k__eval, sizeof(__pyx_k__eval), 0, 0, 1, 1}, + {&__pyx_n_s__evaluate, __pyx_k__evaluate, sizeof(__pyx_k__evaluate), 0, 0, 1, 1}, + {&__pyx_n_s__evaluator, __pyx_k__evaluator, sizeof(__pyx_k__evaluator), 0, 0, 1, 1}, + {&__pyx_n_s__f, __pyx_k__f, sizeof(__pyx_k__f), 0, 0, 1, 1}, + {&__pyx_n_s__formalism, __pyx_k__formalism, sizeof(__pyx_k__formalism), 0, 0, 1, 1}, + {&__pyx_n_s__format, __pyx_k__format, sizeof(__pyx_k__format), 0, 0, 1, 1}, + {&__pyx_n_s__fst, __pyx_k__fst, sizeof(__pyx_k__fst), 0, 0, 1, 1}, + {&__pyx_n_s__genexpr, __pyx_k__genexpr, sizeof(__pyx_k__genexpr), 0, 0, 1, 1}, + {&__pyx_n_s__get, __pyx_k__get, sizeof(__pyx_k__get), 0, 0, 1, 1}, + {&__pyx_n_s__grammar, __pyx_k__grammar, sizeof(__pyx_k__grammar), 0, 0, 1, 1}, + {&__pyx_n_s__hyp, __pyx_k__hyp, sizeof(__pyx_k__hyp), 0, 0, 1, 1}, + {&__pyx_n_s__hypergraph, __pyx_k__hypergraph, sizeof(__pyx_k__hypergraph), 0, 0, 1, 1}, + {&__pyx_n_s__i, __pyx_k__i, sizeof(__pyx_k__i), 0, 0, 1, 1}, + {&__pyx_n_s__in_edges, __pyx_k__in_edges, sizeof(__pyx_k__in_edges), 0, 0, 1, 1}, + {&__pyx_n_s__info, __pyx_k__info, sizeof(__pyx_k__info), 0, 0, 1, 1}, + {&__pyx_n_s__inp, __pyx_k__inp, sizeof(__pyx_k__inp), 0, 0, 1, 1}, + {&__pyx_n_s__items, __pyx_k__items, sizeof(__pyx_k__items), 0, 0, 1, 1}, + {&__pyx_n_s__join, __pyx_k__join, sizeof(__pyx_k__join), 0, 0, 1, 1}, + {&__pyx_n_s__k, __pyx_k__k, sizeof(__pyx_k__k), 0, 0, 1, 1}, + {&__pyx_n_s__key, __pyx_k__key, sizeof(__pyx_k__key), 0, 0, 1, 1}, + {&__pyx_n_s__label, __pyx_k__label, sizeof(__pyx_k__label), 0, 0, 1, 1}, + {&__pyx_n_s__lexalign, __pyx_k__lexalign, sizeof(__pyx_k__lexalign), 0, 0, 1, 1}, + {&__pyx_n_s__lextrans, __pyx_k__lextrans, sizeof(__pyx_k__lextrans), 0, 0, 1, 1}, + {&__pyx_n_s__lhs, __pyx_k__lhs, sizeof(__pyx_k__lhs), 0, 0, 1, 1}, + {&__pyx_n_s__lines, __pyx_k__lines, sizeof(__pyx_k__lines), 0, 0, 1, 1}, + {&__pyx_n_s__name, __pyx_k__name, sizeof(__pyx_k__name), 0, 0, 1, 1}, + {&__pyx_n_s__open, __pyx_k__open, sizeof(__pyx_k__open), 0, 0, 1, 1}, + {&__pyx_n_s__pb, __pyx_k__pb, sizeof(__pyx_k__pb), 0, 0, 1, 1}, + {&__pyx_n_s__phrase, __pyx_k__phrase, sizeof(__pyx_k__phrase), 0, 0, 1, 1}, + {&__pyx_n_s__plf, __pyx_k__plf, sizeof(__pyx_k__plf), 0, 0, 1, 1}, + {&__pyx_n_s__range, __pyx_k__range, sizeof(__pyx_k__range), 0, 0, 1, 1}, + {&__pyx_n_s__ref, __pyx_k__ref, sizeof(__pyx_k__ref), 0, 0, 1, 1}, + {&__pyx_n_s__refs, __pyx_k__refs, sizeof(__pyx_k__refs), 0, 0, 1, 1}, + {&__pyx_n_s__replace, __pyx_k__replace, sizeof(__pyx_k__replace), 0, 0, 1, 1}, + {&__pyx_n_s__rhs, __pyx_k__rhs, sizeof(__pyx_k__rhs), 0, 0, 1, 1}, + {&__pyx_n_s__rules, __pyx_k__rules, sizeof(__pyx_k__rules), 0, 0, 1, 1}, + {&__pyx_n_s__scfg, __pyx_k__scfg, sizeof(__pyx_k__scfg), 0, 0, 1, 1}, + {&__pyx_n_s__score, __pyx_k__score, sizeof(__pyx_k__score), 0, 0, 1, 1}, + {&__pyx_n_s__scores, __pyx_k__scores, sizeof(__pyx_k__scores), 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__sentence, __pyx_k__sentence, sizeof(__pyx_k__sentence), 0, 0, 1, 1}, + {&__pyx_n_s__set_silent, __pyx_k__set_silent, sizeof(__pyx_k__set_silent), 0, 0, 1, 1}, + {&__pyx_n_s__span, __pyx_k__span, sizeof(__pyx_k__span), 0, 0, 1, 1}, + {&__pyx_n_s__split, __pyx_k__split, sizeof(__pyx_k__split), 0, 0, 1, 1}, + {&__pyx_n_s__startswith, __pyx_k__startswith, sizeof(__pyx_k__startswith), 0, 0, 1, 1}, + {&__pyx_n_s__strip, __pyx_k__strip, sizeof(__pyx_k__strip), 0, 0, 1, 1}, + {&__pyx_n_s__super, __pyx_k__super, sizeof(__pyx_k__super), 0, 0, 1, 1}, + {&__pyx_n_s__tagger, __pyx_k__tagger, sizeof(__pyx_k__tagger), 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__utf8, __pyx_k__utf8, sizeof(__pyx_k__utf8), 0, 0, 1, 1}, + {&__pyx_n_s__value, __pyx_k__value, sizeof(__pyx_k__value), 0, 0, 1, 1}, + {&__pyx_n_s__weight, __pyx_k__weight, sizeof(__pyx_k__weight), 0, 0, 1, 1}, + {&__pyx_n_s__yn, __pyx_k__yn, sizeof(__pyx_k__yn), 0, 0, 1, 1}, {0, 0, 0, 0, 0, 0, 0} }; static int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_Exception = __Pyx_GetBuiltinName(__pyx_n_s_Exception); if (!__pyx_builtin_Exception) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_NotImplemented = __Pyx_GetBuiltinName(__pyx_n_s_NotImplemented); if (!__pyx_builtin_NotImplemented) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_n_s_super); if (!__pyx_builtin_super) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_eval = __Pyx_GetBuiltinName(__pyx_n_s_eval); if (!__pyx_builtin_eval) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_open = __Pyx_GetBuiltinName(__pyx_n_s_open); if (!__pyx_builtin_open) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_Exception = __Pyx_GetBuiltinName(__pyx_n_s__Exception); if (!__pyx_builtin_Exception) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s__TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s__KeyError); if (!__pyx_builtin_KeyError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s__range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_NotImplemented = __Pyx_GetBuiltinName(__pyx_n_s__NotImplemented); if (!__pyx_builtin_NotImplemented) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_n_s__super); if (!__pyx_builtin_super) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s__ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_eval = __Pyx_GetBuiltinName(__pyx_n_s__eval); if (!__pyx_builtin_eval) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s__enumerate); if (!__pyx_builtin_enumerate) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s__IndexError); if (!__pyx_builtin_IndexError) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_open = __Pyx_GetBuiltinName(__pyx_n_s__open); if (!__pyx_builtin_open) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} return 0; __pyx_L1_error:; return -1; @@ -27298,139 +26884,139 @@ static int __Pyx_InitCachedConstants(void) { * elif isinstance(data, str): * ret = data */ - __pyx_tuple_ = PyTuple_Pack(1, __pyx_n_s_utf8); if (unlikely(!__pyx_tuple_)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_tuple_); - __Pyx_GIVEREF(__pyx_tuple_); + __pyx_k_tuple_2 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__utf8)); if (unlikely(!__pyx_k_tuple_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_2); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_2)); - /* "/usr0/home/cdyer/cdec/python/cdec/vectors.pxi":95 + /* "/usr0/home/austinma/git/cdec/python/cdec/vectors.pxi":95 * elif op == 3: # != * return not (x == y) * raise NotImplemented('comparison not implemented for SparseVector') # <<<<<<<<<<<<<< * * def __len__(self): */ - __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_comparison_not_implemented_for_S); if (unlikely(!__pyx_tuple__2)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_tuple__2); - __Pyx_GIVEREF(__pyx_tuple__2); + __pyx_k_tuple_5 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_4)); if (unlikely(!__pyx_k_tuple_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_5); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_5)); - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":6 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":6 * * def _phrase(phrase): * return ' '.join(w.encode('utf8') if isinstance(w, unicode) else str(w) for w in phrase) # <<<<<<<<<<<<<< * * cdef class NT: */ - __pyx_tuple__3 = PyTuple_Pack(1, __pyx_n_s_utf8); if (unlikely(!__pyx_tuple__3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_tuple__3); - __Pyx_GIVEREF(__pyx_tuple__3); + __pyx_k_tuple_6 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__utf8)); if (unlikely(!__pyx_k_tuple_6)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_6); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_6)); - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":232 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":232 * trule = convert_rule(trule) * elif not isinstance(trule, TRule): * raise ValueError('the grammar should contain TRule objects') # <<<<<<<<<<<<<< * _g.AddRule(( trule).rule[0]) */ - __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_s_the_grammar_should_contain_TRule); if (unlikely(!__pyx_tuple__5)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_tuple__5); - __Pyx_GIVEREF(__pyx_tuple__5); + __pyx_k_tuple_14 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_13)); if (unlikely(!__pyx_k_tuple_14)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_14); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_14)); - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":244 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":292 * elif op == 3: # != * return not (x == y) * raise NotImplemented('comparison not implemented for HypergraphEdge') # <<<<<<<<<<<<<< * * cdef class HypergraphNode: */ - __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_s_comparison_not_implemented_for_H); if (unlikely(!__pyx_tuple__6)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_tuple__6); - __Pyx_GIVEREF(__pyx_tuple__6); + __pyx_k_tuple_19 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_18)); if (unlikely(!__pyx_k_tuple_19)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_19); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_19)); - /* "/usr0/home/cdyer/cdec/python/cdec/hypergraph.pxi":285 + /* "/usr0/home/austinma/git/cdec/python/cdec/hypergraph.pxi":333 * elif op == 3: # != * return not (x == y) * raise NotImplemented('comparison not implemented for HypergraphNode') # <<<<<<<<<<<<<< */ - __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_s_comparison_not_implemented_for_H_2); if (unlikely(!__pyx_tuple__7)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_tuple__7); - __Pyx_GIVEREF(__pyx_tuple__7); + __pyx_k_tuple_21 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_20)); if (unlikely(!__pyx_k_tuple_21)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 333; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_21); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_21)); - /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":26 + /* "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi":26 * def __getitem__(self, int index): * if not 0 <= index < len(self): * raise IndexError('lattice index out of range') # <<<<<<<<<<<<<< * arcs = [] * cdef vector[lattice.LatticeArc] arc_vector = self.lattice[0][index] */ - __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_lattice_index_out_of_range); if (unlikely(!__pyx_tuple__8)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_tuple__8); - __Pyx_GIVEREF(__pyx_tuple__8); + __pyx_k_tuple_24 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_23)); if (unlikely(!__pyx_k_tuple_24)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_24); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_24)); - /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":39 + /* "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi":39 * def __setitem__(self, int index, tuple arcs): * if not 0 <= index < len(self): * raise IndexError('lattice index out of range') # <<<<<<<<<<<<<< * cdef lattice.LatticeArc* arc * for (label, cost, dist2next) in arcs: */ - __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_lattice_index_out_of_range); if (unlikely(!__pyx_tuple__9)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_tuple__9); - __Pyx_GIVEREF(__pyx_tuple__9); + __pyx_k_tuple_25 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_23)); if (unlikely(!__pyx_k_tuple_25)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_25); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_25)); - /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":69 + /* "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi":69 * for i in range(len(self)): * for label, weight, delta in self[i]: * yield '%d -> %d [label="%s"];' % (i, i+delta, label.replace('"', '\\"')) # <<<<<<<<<<<<<< * yield '%d [shape=doublecircle]' % len(self) * yield '}' */ - __pyx_tuple__12 = PyTuple_Pack(2, __pyx_kp_s__10, __pyx_kp_s__11); if (unlikely(!__pyx_tuple__12)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_tuple__12); - __Pyx_GIVEREF(__pyx_tuple__12); + __pyx_k_tuple_32 = PyTuple_Pack(2, ((PyObject *)__pyx_kp_s_30), ((PyObject *)__pyx_kp_s_31)); if (unlikely(!__pyx_k_tuple_32)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_32); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_32)); - /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":63 + /* "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi":63 * def todot(self): * """lattice.todot() -> Representation of the lattice in GraphViz dot format.""" * def lines(): # <<<<<<<<<<<<<< * yield 'digraph lattice {' * yield 'rankdir = LR;' */ - __pyx_tuple__14 = PyTuple_Pack(4, __pyx_n_s_i, __pyx_n_s_label, __pyx_n_s_weight, __pyx_n_s_delta); if (unlikely(!__pyx_tuple__14)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_tuple__14); - __Pyx_GIVEREF(__pyx_tuple__14); - __pyx_codeobj__15 = (PyObject*)__Pyx_PyCode_New(0, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__14, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr0_home_cdyer_cdec_python_cde, __pyx_n_s_lines, 63, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__15)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_k_tuple_35 = PyTuple_Pack(4, ((PyObject *)__pyx_n_s__i), ((PyObject *)__pyx_n_s__label), ((PyObject *)__pyx_n_s__weight), ((PyObject *)__pyx_n_s__delta)); if (unlikely(!__pyx_k_tuple_35)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_35); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_35)); + __pyx_k_codeobj_36 = (PyObject*)__Pyx_PyCode_New(0, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_35, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_37, __pyx_n_s__lines, 63, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_36)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/cdyer/cdec/python/cdec/lattice.pxi":72 + /* "/usr0/home/austinma/git/cdec/python/cdec/lattice.pxi":72 * yield '%d [shape=doublecircle]' % len(self) * yield '}' * return '\n'.join(lines()).encode('utf8') # <<<<<<<<<<<<<< * * def as_hypergraph(self): */ - __pyx_tuple__17 = PyTuple_Pack(1, __pyx_n_s_utf8); if (unlikely(!__pyx_tuple__17)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_tuple__17); - __Pyx_GIVEREF(__pyx_tuple__17); + __pyx_k_tuple_41 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__utf8)); if (unlikely(!__pyx_k_tuple_41)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_41); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_41)); - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":50 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":50 * def __getitem__(self, int index): * if not 0 <= index < len(self): * raise IndexError('sufficient stats vector index out of range') # <<<<<<<<<<<<<< * return self.stats[0][index] * */ - __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_s_sufficient_stats_vector_index_ou); if (unlikely(!__pyx_tuple__18)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_tuple__18); - __Pyx_GIVEREF(__pyx_tuple__18); + __pyx_k_tuple_43 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_42)); if (unlikely(!__pyx_k_tuple_43)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_43); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_43)); - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":84 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":84 * def __getitem__(self,int k): * if not 0 <= k < self.cs.size(): * raise IndexError('candidate set index out of range') # <<<<<<<<<<<<<< * cdef Candidate candidate = Candidate() * candidate.candidate = &self.cs[0][k] */ - __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_s_candidate_set_index_out_of_range); if (unlikely(!__pyx_tuple__19)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_tuple__19); - __Pyx_GIVEREF(__pyx_tuple__19); + __pyx_k_tuple_45 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_44)); if (unlikely(!__pyx_k_tuple_45)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_45); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_45)); /* "cdec/_cdec.pyx":92 * with open(weights) as fp: @@ -27439,9 +27025,9 @@ static int __Pyx_InitCachedConstants(void) { * fname, value = line.split() * self.weights[fname.strip()] = float(value) */ - __pyx_tuple__21 = PyTuple_Pack(1, __pyx_kp_s__20); if (unlikely(!__pyx_tuple__21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_tuple__21); - __Pyx_GIVEREF(__pyx_tuple__21); + __pyx_k_tuple_51 = PyTuple_Pack(1, ((PyObject *)__pyx_kp_s_50)); if (unlikely(!__pyx_k_tuple_51)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 92; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_51); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_51)); /* "cdec/_cdec.pyx":90 * def read_weights(self, weights): @@ -27450,73 +27036,73 @@ static int __Pyx_InitCachedConstants(void) { * for line in fp: * if line.strip().startswith('#'): continue */ - __pyx_tuple__22 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_tuple__22); - __Pyx_GIVEREF(__pyx_tuple__22); + __pyx_k_tuple_52 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_k_tuple_52)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_52); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_52)); - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":5 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":5 * import cdec.sa._sa as _sa * * def _phrase(phrase): # <<<<<<<<<<<<<< * return ' '.join(w.encode('utf8') if isinstance(w, unicode) else str(w) for w in phrase) * */ - __pyx_tuple__24 = PyTuple_Pack(3, __pyx_n_s_phrase_2, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__24)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_tuple__24); - __Pyx_GIVEREF(__pyx_tuple__24); - __pyx_codeobj__25 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__24, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr0_home_cdyer_cdec_python_cde_2, __pyx_n_s_phrase, 5, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__25)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_k_tuple_56 = PyTuple_Pack(3, ((PyObject *)__pyx_n_s__phrase), ((PyObject *)__pyx_n_s__genexpr), ((PyObject *)__pyx_n_s__genexpr)); if (unlikely(!__pyx_k_tuple_56)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_56); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_56)); + __pyx_k_codeobj_57 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_56, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_58, __pyx_n_s___phrase, 5, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_57)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":194 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":194 * return [] * * BLEU = Scorer('IBM_BLEU') # <<<<<<<<<<<<<< * QCRI = Scorer('QCRI_BLEU') * TER = Scorer('TER') */ - __pyx_tuple__26 = PyTuple_Pack(1, __pyx_n_s_IBM_BLEU); if (unlikely(!__pyx_tuple__26)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_tuple__26); - __Pyx_GIVEREF(__pyx_tuple__26); + __pyx_k_tuple_59 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__IBM_BLEU)); if (unlikely(!__pyx_k_tuple_59)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_59); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_59)); - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":195 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":195 * * BLEU = Scorer('IBM_BLEU') * QCRI = Scorer('QCRI_BLEU') # <<<<<<<<<<<<<< * TER = Scorer('TER') * CER = Scorer('CER') */ - __pyx_tuple__27 = PyTuple_Pack(1, __pyx_n_s_QCRI_BLEU); if (unlikely(!__pyx_tuple__27)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_tuple__27); - __Pyx_GIVEREF(__pyx_tuple__27); + __pyx_k_tuple_60 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__QCRI_BLEU)); if (unlikely(!__pyx_k_tuple_60)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_60); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_60)); - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":196 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":196 * BLEU = Scorer('IBM_BLEU') * QCRI = Scorer('QCRI_BLEU') * TER = Scorer('TER') # <<<<<<<<<<<<<< * CER = Scorer('CER') * SSK = Scorer('SSK') */ - __pyx_tuple__28 = PyTuple_Pack(1, __pyx_n_s_TER); if (unlikely(!__pyx_tuple__28)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_tuple__28); - __Pyx_GIVEREF(__pyx_tuple__28); + __pyx_k_tuple_61 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__TER)); if (unlikely(!__pyx_k_tuple_61)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_61); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_61)); - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":197 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":197 * QCRI = Scorer('QCRI_BLEU') * TER = Scorer('TER') * CER = Scorer('CER') # <<<<<<<<<<<<<< * SSK = Scorer('SSK') */ - __pyx_tuple__29 = PyTuple_Pack(1, __pyx_n_s_CER); if (unlikely(!__pyx_tuple__29)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_tuple__29); - __Pyx_GIVEREF(__pyx_tuple__29); + __pyx_k_tuple_62 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__CER)); if (unlikely(!__pyx_k_tuple_62)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_62); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_62)); - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":198 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":198 * TER = Scorer('TER') * CER = Scorer('CER') * SSK = Scorer('SSK') # <<<<<<<<<<<<<< */ - __pyx_tuple__30 = PyTuple_Pack(1, __pyx_n_s_SSK); if (unlikely(!__pyx_tuple__30)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_tuple__30); - __Pyx_GIVEREF(__pyx_tuple__30); + __pyx_k_tuple_63 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__SSK)); if (unlikely(!__pyx_k_tuple_63)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_63); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_63)); /* "cdec/_cdec.pyx":28 * class ParseFailed(Exception): pass @@ -27525,10 +27111,10 @@ static int __Pyx_InitCachedConstants(void) { * """set_silent(bool): Configure the verbosity of cdec.""" * SetSilent(yn) */ - __pyx_tuple__31 = PyTuple_Pack(1, __pyx_n_s_yn); if (unlikely(!__pyx_tuple__31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_tuple__31); - __Pyx_GIVEREF(__pyx_tuple__31); - __pyx_codeobj__32 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__31, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr0_home_cdyer_cdec_python_cde_3, __pyx_n_s_set_silent, 28, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_k_tuple_64 = PyTuple_Pack(1, ((PyObject *)__pyx_n_s__yn)); if (unlikely(!__pyx_k_tuple_64)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_64); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_64)); + __pyx_k_codeobj_65 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_64, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_66, __pyx_n_s__set_silent, 28, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_65)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "cdec/_cdec.pyx":32 * SetSilent(yn) @@ -27537,10 +27123,10 @@ static int __Pyx_InitCachedConstants(void) { * for key, value in config.items(): * if isinstance(value, dict): */ - __pyx_tuple__33 = PyTuple_Pack(5, __pyx_n_s_config, __pyx_n_s_key, __pyx_n_s_value, __pyx_n_s_name, __pyx_n_s_info); if (unlikely(!__pyx_tuple__33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_tuple__33); - __Pyx_GIVEREF(__pyx_tuple__33); - __pyx_codeobj__34 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__33, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_usr0_home_cdyer_cdec_python_cde_3, __pyx_n_s_make_config, 32, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__34)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_k_tuple_67 = PyTuple_Pack(5, ((PyObject *)__pyx_n_s__config), ((PyObject *)__pyx_n_s__key), ((PyObject *)__pyx_n_s__value), ((PyObject *)__pyx_n_s__name), ((PyObject *)__pyx_n_s__info)); if (unlikely(!__pyx_k_tuple_67)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_k_tuple_67); + __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_67)); + __pyx_k_codeobj_68 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_67, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_66, __pyx_n_s___make_config, 32, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; @@ -27550,8 +27136,8 @@ static int __Pyx_InitCachedConstants(void) { static int __Pyx_InitGlobals(void) { 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_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;}; return 0; __pyx_L1_error:; return -1; @@ -27569,7 +27155,6 @@ PyMODINIT_FUNC PyInit__cdec(void) 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; @@ -27612,6 +27197,14 @@ PyMODINIT_FUNC PyInit__cdec(void) 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); + #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, "cdec._cdec")) { + if (unlikely(PyDict_SetItemString(modules, "cdec._cdec", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + } + #endif __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__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); @@ -27623,16 +27216,8 @@ PyMODINIT_FUNC PyInit__cdec(void) 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_cdec___cdec) { - if (__Pyx_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, "cdec._cdec")) { - if (unlikely(PyDict_SetItemString(modules, "cdec._cdec", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - } + if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s____main__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; } - #endif /*--- Builtin init code ---*/ if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Constants init code ---*/ @@ -27641,8 +27226,36 @@ PyMODINIT_FUNC PyInit__cdec(void) /*--- Variable export code ---*/ /*--- Function export code ---*/ /*--- Type init code ---*/ + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_24___iter__) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_24___iter__ = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_24___iter__; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec_TRule) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #if CYTHON_COMPILING_IN_CPYTHON + { + PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_4cdec_5_cdec_TRule, "__init__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { + __pyx_wrapperbase_4cdec_5_cdec_5TRule___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; + __pyx_wrapperbase_4cdec_5_cdec_5TRule___init__.doc = __pyx_doc_4cdec_5_cdec_5TRule___init__; + ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4cdec_5_cdec_5TRule___init__; + } + } + #endif + if (__Pyx_SetAttrString(__pyx_m, "TRule", (PyObject *)&__pyx_type_4cdec_5_cdec_TRule) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec_TRule = &__pyx_type_4cdec_5_cdec_TRule; + __pyx_type_4cdec_5_cdec_MRule.tp_base = __pyx_ptype_4cdec_5_cdec_TRule; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec_MRule) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #if CYTHON_COMPILING_IN_CPYTHON + { + PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_4cdec_5_cdec_MRule, "__init__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { + __pyx_wrapperbase_4cdec_5_cdec_5MRule___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; + __pyx_wrapperbase_4cdec_5_cdec_5MRule___init__.doc = __pyx_doc_4cdec_5_cdec_5MRule___init__; + ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4cdec_5_cdec_5MRule___init__; + } + } + #endif + if (__Pyx_SetAttrString(__pyx_m, "MRule", (PyObject *)&__pyx_type_4cdec_5_cdec_MRule) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec_MRule = &__pyx_type_4cdec_5_cdec_MRule; if (PyType_Ready(&__pyx_type_4cdec_5_cdec_DenseVector) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_type_4cdec_5_cdec_DenseVector.tp_print = 0; #if CYTHON_COMPILING_IN_CPYTHON { PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_4cdec_5_cdec_DenseVector, "__init__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -27655,8 +27268,24 @@ PyMODINIT_FUNC PyInit__cdec(void) #endif if (__Pyx_SetAttrString(__pyx_m, "DenseVector", (PyObject *)&__pyx_type_4cdec_5_cdec_DenseVector) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_4cdec_5_cdec_DenseVector = &__pyx_type_4cdec_5_cdec_DenseVector; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec_SufficientStats) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "SufficientStats", (PyObject *)&__pyx_type_4cdec_5_cdec_SufficientStats) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec_SufficientStats = &__pyx_type_4cdec_5_cdec_SufficientStats; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_23_lines) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_23_lines = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_23_lines; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_27___init__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_27___init__ = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_27___init__; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_21___iter__) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_21___iter__ = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_21___iter__; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec_Metric) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "Metric", (PyObject *)&__pyx_type_4cdec_5_cdec_Metric) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec_Metric = &__pyx_type_4cdec_5_cdec_Metric; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_11_unique_kbest) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_11_unique_kbest = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_11_unique_kbest; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec_Candidate) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "Candidate", (PyObject *)&__pyx_type_4cdec_5_cdec_Candidate) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec_Candidate = &__pyx_type_4cdec_5_cdec_Candidate; if (PyType_Ready(&__pyx_type_4cdec_5_cdec_SparseVector) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_type_4cdec_5_cdec_SparseVector.tp_print = 0; #if CYTHON_COMPILING_IN_CPYTHON { PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_4cdec_5_cdec_SparseVector, "__init__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -27669,8 +27298,9 @@ PyMODINIT_FUNC PyInit__cdec(void) #endif if (__Pyx_SetAttrString(__pyx_m, "SparseVector", (PyObject *)&__pyx_type_4cdec_5_cdec_SparseVector) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_4cdec_5_cdec_SparseVector = &__pyx_type_4cdec_5_cdec_SparseVector; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_26__make_config) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_26__make_config = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_26__make_config; if (PyType_Ready(&__pyx_type_4cdec_5_cdec_NT) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_type_4cdec_5_cdec_NT.tp_print = 0; #if CYTHON_COMPILING_IN_CPYTHON { PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_4cdec_5_cdec_NT, "__init__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -27683,8 +27313,41 @@ PyMODINIT_FUNC PyInit__cdec(void) #endif if (__Pyx_SetAttrString(__pyx_m, "NT", (PyObject *)&__pyx_type_4cdec_5_cdec_NT) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_4cdec_5_cdec_NT = &__pyx_type_4cdec_5_cdec_NT; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec_Lattice) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #if CYTHON_COMPILING_IN_CPYTHON + { + PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_4cdec_5_cdec_Lattice, "__init__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { + __pyx_wrapperbase_4cdec_5_cdec_7Lattice_2__init__ = *((PyWrapperDescrObject *)wrapper)->d_base; + __pyx_wrapperbase_4cdec_5_cdec_7Lattice_2__init__.doc = __pyx_doc_4cdec_5_cdec_7Lattice_2__init__; + ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4cdec_5_cdec_7Lattice_2__init__; + } + } + #endif + if (__Pyx_SetAttrString(__pyx_m, "Lattice", (PyObject *)&__pyx_type_4cdec_5_cdec_Lattice) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec_Lattice = &__pyx_type_4cdec_5_cdec_Lattice; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_15_sample_trees) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_15_sample_trees = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_15_sample_trees; + __pyx_vtabptr_4cdec_5_cdec_HypergraphEdge = &__pyx_vtable_4cdec_5_cdec_HypergraphEdge; + __pyx_vtable_4cdec_5_cdec_HypergraphEdge.init = (PyObject *(*)(struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *, Hypergraph *, unsigned int))__pyx_f_4cdec_5_cdec_14HypergraphEdge_init; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec_HypergraphEdge) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetVtable(__pyx_type_4cdec_5_cdec_HypergraphEdge.tp_dict, __pyx_vtabptr_4cdec_5_cdec_HypergraphEdge) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "HypergraphEdge", (PyObject *)&__pyx_type_4cdec_5_cdec_HypergraphEdge) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec_HypergraphEdge = &__pyx_type_4cdec_5_cdec_HypergraphEdge; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_2__phrase) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_2__phrase = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_2__phrase; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec_Scorer) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "Scorer", (PyObject *)&__pyx_type_4cdec_5_cdec_Scorer) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec_Scorer = &__pyx_type_4cdec_5_cdec_Scorer; + __pyx_vtabptr_4cdec_5_cdec_HypergraphNode = &__pyx_vtable_4cdec_5_cdec_HypergraphNode; + __pyx_vtable_4cdec_5_cdec_HypergraphNode.init = (PyObject *(*)(struct __pyx_obj_4cdec_5_cdec_HypergraphNode *, Hypergraph *, unsigned int))__pyx_f_4cdec_5_cdec_14HypergraphNode_init; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec_HypergraphNode) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetVtable(__pyx_type_4cdec_5_cdec_HypergraphNode.tp_dict, __pyx_vtabptr_4cdec_5_cdec_HypergraphNode) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "HypergraphNode", (PyObject *)&__pyx_type_4cdec_5_cdec_HypergraphNode) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 294; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec_HypergraphNode = &__pyx_type_4cdec_5_cdec_HypergraphNode; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_10_kbest_features) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_10_kbest_features = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_10_kbest_features; if (PyType_Ready(&__pyx_type_4cdec_5_cdec_NTRef) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_type_4cdec_5_cdec_NTRef.tp_print = 0; #if CYTHON_COMPILING_IN_CPYTHON { PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_4cdec_5_cdec_NTRef, "__init__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -27697,42 +27360,47 @@ PyMODINIT_FUNC PyInit__cdec(void) #endif if (__Pyx_SetAttrString(__pyx_m, "NTRef", (PyObject *)&__pyx_type_4cdec_5_cdec_NTRef) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_4cdec_5_cdec_NTRef = &__pyx_type_4cdec_5_cdec_NTRef; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec_TRule) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_type_4cdec_5_cdec_TRule.tp_print = 0; - #if CYTHON_COMPILING_IN_CPYTHON - { - PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_4cdec_5_cdec_TRule, "__init__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { - __pyx_wrapperbase_4cdec_5_cdec_5TRule___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; - __pyx_wrapperbase_4cdec_5_cdec_5TRule___init__.doc = __pyx_doc_4cdec_5_cdec_5TRule___init__; - ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4cdec_5_cdec_5TRule___init__; - } - } - #endif - if (__Pyx_SetAttrString(__pyx_m, "TRule", (PyObject *)&__pyx_type_4cdec_5_cdec_TRule) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_4cdec_5_cdec_TRule = &__pyx_type_4cdec_5_cdec_TRule; - __pyx_type_4cdec_5_cdec_MRule.tp_base = __pyx_ptype_4cdec_5_cdec_TRule; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec_MRule) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_type_4cdec_5_cdec_MRule.tp_print = 0; - #if CYTHON_COMPILING_IN_CPYTHON - { - PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_4cdec_5_cdec_MRule, "__init__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { - __pyx_wrapperbase_4cdec_5_cdec_5MRule___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; - __pyx_wrapperbase_4cdec_5_cdec_5MRule___init__.doc = __pyx_doc_4cdec_5_cdec_5MRule___init__; - ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4cdec_5_cdec_5MRule___init__; - } - } - #endif - if (__Pyx_SetAttrString(__pyx_m, "MRule", (PyObject *)&__pyx_type_4cdec_5_cdec_MRule) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_4cdec_5_cdec_MRule = &__pyx_type_4cdec_5_cdec_MRule; if (PyType_Ready(&__pyx_type_4cdec_5_cdec_Grammar) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_type_4cdec_5_cdec_Grammar.tp_print = 0; if (__Pyx_SetAttrString(__pyx_m, "Grammar", (PyObject *)&__pyx_type_4cdec_5_cdec_Grammar) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_4cdec_5_cdec_Grammar = &__pyx_type_4cdec_5_cdec_Grammar; + __pyx_vtabptr_4cdec_5_cdec_Hypergraph = &__pyx_vtable_4cdec_5_cdec_Hypergraph; + __pyx_vtable_4cdec_5_cdec_Hypergraph._rng = (MT19937 *(*)(struct __pyx_obj_4cdec_5_cdec_Hypergraph *))__pyx_f_4cdec_5_cdec_10Hypergraph__rng; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec_Hypergraph) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetVtable(__pyx_type_4cdec_5_cdec_Hypergraph.tp_dict, __pyx_vtabptr_4cdec_5_cdec_Hypergraph) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "Hypergraph", (PyObject *)&__pyx_type_4cdec_5_cdec_Hypergraph) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec_Hypergraph = &__pyx_type_4cdec_5_cdec_Hypergraph; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec_CandidateSet) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "CandidateSet", (PyObject *)&__pyx_type_4cdec_5_cdec_CandidateSet) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec_CandidateSet = &__pyx_type_4cdec_5_cdec_CandidateSet; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_22_todot) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_22_todot = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_22_todot; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_5___str__) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_5___str__ = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_5___str__; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec_SegmentEvaluator) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_SetAttrString(__pyx_m, "SegmentEvaluator", (PyObject *)&__pyx_type_4cdec_5_cdec_SegmentEvaluator) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec_SegmentEvaluator = &__pyx_type_4cdec_5_cdec_SegmentEvaluator; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_16___get__) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_16___get__ = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_16___get__; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_20___get__) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_20___get__ = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_20___get__; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_13_unique_kbest_features) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_13_unique_kbest_features = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_13_unique_kbest_features; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_28_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_28_genexpr = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_28_genexpr; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_3_genexpr) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_3_genexpr = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_3_genexpr; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_8_kbest) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_8_kbest = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_8_kbest; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_18___get__) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_18___get__ = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_18___get__; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_7___iter__) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_7___iter__ = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_7___iter__; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_19___get__) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_19___get__ = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_19___get__; __pyx_type_4cdec_5_cdec_TextGrammar.tp_base = __pyx_ptype_4cdec_5_cdec_Grammar; if (PyType_Ready(&__pyx_type_4cdec_5_cdec_TextGrammar) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_type_4cdec_5_cdec_TextGrammar.tp_print = 0; #if CYTHON_COMPILING_IN_CPYTHON { PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_4cdec_5_cdec_TextGrammar, "__init__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -27745,67 +27413,9 @@ PyMODINIT_FUNC PyInit__cdec(void) #endif if (__Pyx_SetAttrString(__pyx_m, "TextGrammar", (PyObject *)&__pyx_type_4cdec_5_cdec_TextGrammar) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_4cdec_5_cdec_TextGrammar = &__pyx_type_4cdec_5_cdec_TextGrammar; - __pyx_vtabptr_4cdec_5_cdec_Hypergraph = &__pyx_vtable_4cdec_5_cdec_Hypergraph; - __pyx_vtable_4cdec_5_cdec_Hypergraph._rng = (MT19937 *(*)(struct __pyx_obj_4cdec_5_cdec_Hypergraph *))__pyx_f_4cdec_5_cdec_10Hypergraph__rng; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec_Hypergraph) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_type_4cdec_5_cdec_Hypergraph.tp_print = 0; - if (__Pyx_SetVtable(__pyx_type_4cdec_5_cdec_Hypergraph.tp_dict, __pyx_vtabptr_4cdec_5_cdec_Hypergraph) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "Hypergraph", (PyObject *)&__pyx_type_4cdec_5_cdec_Hypergraph) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_4cdec_5_cdec_Hypergraph = &__pyx_type_4cdec_5_cdec_Hypergraph; - __pyx_vtabptr_4cdec_5_cdec_HypergraphEdge = &__pyx_vtable_4cdec_5_cdec_HypergraphEdge; - __pyx_vtable_4cdec_5_cdec_HypergraphEdge.init = (PyObject *(*)(struct __pyx_obj_4cdec_5_cdec_HypergraphEdge *, Hypergraph *, unsigned int))__pyx_f_4cdec_5_cdec_14HypergraphEdge_init; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec_HypergraphEdge) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_type_4cdec_5_cdec_HypergraphEdge.tp_print = 0; - if (__Pyx_SetVtable(__pyx_type_4cdec_5_cdec_HypergraphEdge.tp_dict, __pyx_vtabptr_4cdec_5_cdec_HypergraphEdge) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "HypergraphEdge", (PyObject *)&__pyx_type_4cdec_5_cdec_HypergraphEdge) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_4cdec_5_cdec_HypergraphEdge = &__pyx_type_4cdec_5_cdec_HypergraphEdge; - __pyx_vtabptr_4cdec_5_cdec_HypergraphNode = &__pyx_vtable_4cdec_5_cdec_HypergraphNode; - __pyx_vtable_4cdec_5_cdec_HypergraphNode.init = (PyObject *(*)(struct __pyx_obj_4cdec_5_cdec_HypergraphNode *, Hypergraph *, unsigned int))__pyx_f_4cdec_5_cdec_14HypergraphNode_init; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec_HypergraphNode) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_type_4cdec_5_cdec_HypergraphNode.tp_print = 0; - if (__Pyx_SetVtable(__pyx_type_4cdec_5_cdec_HypergraphNode.tp_dict, __pyx_vtabptr_4cdec_5_cdec_HypergraphNode) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__Pyx_SetAttrString(__pyx_m, "HypergraphNode", (PyObject *)&__pyx_type_4cdec_5_cdec_HypergraphNode) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_4cdec_5_cdec_HypergraphNode = &__pyx_type_4cdec_5_cdec_HypergraphNode; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec_Lattice) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_type_4cdec_5_cdec_Lattice.tp_print = 0; - #if CYTHON_COMPILING_IN_CPYTHON - { - PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_4cdec_5_cdec_Lattice, "__init__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { - __pyx_wrapperbase_4cdec_5_cdec_7Lattice_2__init__ = *((PyWrapperDescrObject *)wrapper)->d_base; - __pyx_wrapperbase_4cdec_5_cdec_7Lattice_2__init__.doc = __pyx_doc_4cdec_5_cdec_7Lattice_2__init__; - ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_4cdec_5_cdec_7Lattice_2__init__; - } - } - #endif - if (__Pyx_SetAttrString(__pyx_m, "Lattice", (PyObject *)&__pyx_type_4cdec_5_cdec_Lattice) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_4cdec_5_cdec_Lattice = &__pyx_type_4cdec_5_cdec_Lattice; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec_Candidate) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_type_4cdec_5_cdec_Candidate.tp_print = 0; - if (__Pyx_SetAttrString(__pyx_m, "Candidate", (PyObject *)&__pyx_type_4cdec_5_cdec_Candidate) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_4cdec_5_cdec_Candidate = &__pyx_type_4cdec_5_cdec_Candidate; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec_SufficientStats) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_type_4cdec_5_cdec_SufficientStats.tp_print = 0; - if (__Pyx_SetAttrString(__pyx_m, "SufficientStats", (PyObject *)&__pyx_type_4cdec_5_cdec_SufficientStats) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_4cdec_5_cdec_SufficientStats = &__pyx_type_4cdec_5_cdec_SufficientStats; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec_CandidateSet) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_type_4cdec_5_cdec_CandidateSet.tp_print = 0; - if (__Pyx_SetAttrString(__pyx_m, "CandidateSet", (PyObject *)&__pyx_type_4cdec_5_cdec_CandidateSet) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_4cdec_5_cdec_CandidateSet = &__pyx_type_4cdec_5_cdec_CandidateSet; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec_SegmentEvaluator) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_type_4cdec_5_cdec_SegmentEvaluator.tp_print = 0; - if (__Pyx_SetAttrString(__pyx_m, "SegmentEvaluator", (PyObject *)&__pyx_type_4cdec_5_cdec_SegmentEvaluator) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_4cdec_5_cdec_SegmentEvaluator = &__pyx_type_4cdec_5_cdec_SegmentEvaluator; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec_Scorer) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_type_4cdec_5_cdec_Scorer.tp_print = 0; - if (__Pyx_SetAttrString(__pyx_m, "Scorer", (PyObject *)&__pyx_type_4cdec_5_cdec_Scorer) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_4cdec_5_cdec_Scorer = &__pyx_type_4cdec_5_cdec_Scorer; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec_Metric) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_type_4cdec_5_cdec_Metric.tp_print = 0; - if (__Pyx_SetAttrString(__pyx_m, "Metric", (PyObject *)&__pyx_type_4cdec_5_cdec_Metric) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 176; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_4cdec_5_cdec_Metric = &__pyx_type_4cdec_5_cdec_Metric; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_25___iter__) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_25___iter__ = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_25___iter__; if (PyType_Ready(&__pyx_type_4cdec_5_cdec_Decoder) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_type_4cdec_5_cdec_Decoder.tp_print = 0; #if CYTHON_COMPILING_IN_CPYTHON { PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_4cdec_5_cdec_Decoder, "__init__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -27819,92 +27429,28 @@ PyMODINIT_FUNC PyInit__cdec(void) if (__Pyx_SetAttrString(__pyx_m, "Decoder", (PyObject *)&__pyx_type_4cdec_5_cdec_Decoder) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_4cdec_5_cdec_Decoder = &__pyx_type_4cdec_5_cdec_Decoder; if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct____iter__) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_type_4cdec_5_cdec___pyx_scope_struct____iter__.tp_print = 0; __pyx_ptype_4cdec_5_cdec___pyx_scope_struct____iter__ = &__pyx_type_4cdec_5_cdec___pyx_scope_struct____iter__; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_1___iter__) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_type_4cdec_5_cdec___pyx_scope_struct_1___iter__.tp_print = 0; - __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_1___iter__ = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_1___iter__; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_2__phrase) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_type_4cdec_5_cdec___pyx_scope_struct_2__phrase.tp_print = 0; - __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_2__phrase = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_2__phrase; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_3_genexpr) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_type_4cdec_5_cdec___pyx_scope_struct_3_genexpr.tp_print = 0; - __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_3_genexpr = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_3_genexpr; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_4___get__) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_type_4cdec_5_cdec___pyx_scope_struct_4___get__.tp_print = 0; - __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_4___get__ = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_4___get__; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_5___str__) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 178; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_type_4cdec_5_cdec___pyx_scope_struct_5___str__.tp_print = 0; - __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_5___str__ = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_5___str__; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_14_sample) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_14_sample = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_14_sample; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_17___get__) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_17___get__ = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_17___get__; if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_6_genexpr) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_type_4cdec_5_cdec___pyx_scope_struct_6_genexpr.tp_print = 0; __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_6_genexpr = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_6_genexpr; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_7___iter__) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_type_4cdec_5_cdec___pyx_scope_struct_7___iter__.tp_print = 0; - __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_7___iter__ = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_7___iter__; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_8_kbest) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_type_4cdec_5_cdec___pyx_scope_struct_8_kbest.tp_print = 0; - __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_8_kbest = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_8_kbest; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_type_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees.tp_print = 0; - __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_9_kbest_trees; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_10_kbest_features) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_type_4cdec_5_cdec___pyx_scope_struct_10_kbest_features.tp_print = 0; - __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_10_kbest_features = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_10_kbest_features; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_11_sample) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_type_4cdec_5_cdec___pyx_scope_struct_11_sample.tp_print = 0; - __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_11_sample = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_11_sample; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_12_sample_trees) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_type_4cdec_5_cdec___pyx_scope_struct_12_sample_trees.tp_print = 0; - __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_12_sample_trees = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_12_sample_trees; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_13___get__) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_type_4cdec_5_cdec___pyx_scope_struct_13___get__.tp_print = 0; - __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_13___get__ = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_13___get__; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_14___get__) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_type_4cdec_5_cdec___pyx_scope_struct_14___get__.tp_print = 0; - __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_14___get__ = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_14___get__; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_15___get__) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_type_4cdec_5_cdec___pyx_scope_struct_15___get__.tp_print = 0; - __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_15___get__ = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_15___get__; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_16___get__) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_type_4cdec_5_cdec___pyx_scope_struct_16___get__.tp_print = 0; - __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_16___get__ = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_16___get__; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_17___get__) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 266; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_type_4cdec_5_cdec___pyx_scope_struct_17___get__.tp_print = 0; - __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_17___get__ = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_17___get__; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_18___iter__) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_type_4cdec_5_cdec___pyx_scope_struct_18___iter__.tp_print = 0; - __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_18___iter__ = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_18___iter__; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_19_todot) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_type_4cdec_5_cdec___pyx_scope_struct_19_todot.tp_print = 0; - __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_19_todot = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_19_todot; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_20_lines) < 0) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_type_4cdec_5_cdec___pyx_scope_struct_20_lines.tp_print = 0; - __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_20_lines = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_20_lines; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_21___iter__) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_type_4cdec_5_cdec___pyx_scope_struct_21___iter__.tp_print = 0; - __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_21___iter__ = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_21___iter__; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_22___iter__) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_type_4cdec_5_cdec___pyx_scope_struct_22___iter__.tp_print = 0; - __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_22___iter__ = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_22___iter__; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_23__make_config) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_type_4cdec_5_cdec___pyx_scope_struct_23__make_config.tp_print = 0; - __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_23__make_config = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_23__make_config; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_24___init__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_type_4cdec_5_cdec___pyx_scope_struct_24___init__.tp_print = 0; - __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_24___init__ = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_24___init__; - if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_25_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_type_4cdec_5_cdec___pyx_scope_struct_25_genexpr.tp_print = 0; - __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_25_genexpr = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_25_genexpr; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_12_unique_kbest_trees) < 0) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_12_unique_kbest_trees = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_12_unique_kbest_trees; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_4___get__) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_4___get__ = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_4___get__; + if (PyType_Ready(&__pyx_type_4cdec_5_cdec___pyx_scope_struct_1___iter__) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_5_cdec___pyx_scope_struct_1___iter__ = &__pyx_type_4cdec_5_cdec___pyx_scope_struct_1___iter__; /*--- Type import code ---*/ - __pyx_ptype_4cdec_2sa_3_sa_FloatList = __Pyx_ImportType("cdec.sa._sa", "FloatList", sizeof(struct __pyx_obj_4cdec_2sa_3_sa_FloatList), 1); if (unlikely(!__pyx_ptype_4cdec_2sa_3_sa_FloatList)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_vtabptr_4cdec_2sa_3_sa_FloatList = (struct __pyx_vtabstruct_4cdec_2sa_3_sa_FloatList*)__Pyx_GetVtable(__pyx_ptype_4cdec_2sa_3_sa_FloatList->tp_dict); if (unlikely(!__pyx_vtabptr_4cdec_2sa_3_sa_FloatList)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_4cdec_2sa_3_sa_IntList = __Pyx_ImportType("cdec.sa._sa", "IntList", sizeof(struct __pyx_obj_4cdec_2sa_3_sa_IntList), 1); if (unlikely(!__pyx_ptype_4cdec_2sa_3_sa_IntList)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_vtabptr_4cdec_2sa_3_sa_IntList = (struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList*)__Pyx_GetVtable(__pyx_ptype_4cdec_2sa_3_sa_IntList->tp_dict); if (unlikely(!__pyx_vtabptr_4cdec_2sa_3_sa_IntList)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_4cdec_2sa_3_sa_FeatureVector = __Pyx_ImportType("cdec.sa._sa", "FeatureVector", sizeof(struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector), 1); if (unlikely(!__pyx_ptype_4cdec_2sa_3_sa_FeatureVector)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_4cdec_2sa_3_sa_Phrase = __Pyx_ImportType("cdec.sa._sa", "Phrase", sizeof(struct __pyx_obj_4cdec_2sa_3_sa_Phrase), 1); if (unlikely(!__pyx_ptype_4cdec_2sa_3_sa_Phrase)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_vtabptr_4cdec_2sa_3_sa_Phrase = (struct __pyx_vtabstruct_4cdec_2sa_3_sa_Phrase*)__Pyx_GetVtable(__pyx_ptype_4cdec_2sa_3_sa_Phrase->tp_dict); if (unlikely(!__pyx_vtabptr_4cdec_2sa_3_sa_Phrase)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_ptype_4cdec_2sa_3_sa_Rule = __Pyx_ImportType("cdec.sa._sa", "Rule", sizeof(struct __pyx_obj_4cdec_2sa_3_sa_Rule), 1); if (unlikely(!__pyx_ptype_4cdec_2sa_3_sa_Rule)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_2sa_3_sa_FloatList = __Pyx_ImportType("cdec.sa._sa", "FloatList", sizeof(struct __pyx_obj_4cdec_2sa_3_sa_FloatList), 1); if (unlikely(!__pyx_ptype_4cdec_2sa_3_sa_FloatList)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_vtabptr_4cdec_2sa_3_sa_FloatList = (struct __pyx_vtabstruct_4cdec_2sa_3_sa_FloatList*)__Pyx_GetVtable(__pyx_ptype_4cdec_2sa_3_sa_FloatList->tp_dict); if (unlikely(!__pyx_vtabptr_4cdec_2sa_3_sa_FloatList)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_2sa_3_sa_IntList = __Pyx_ImportType("cdec.sa._sa", "IntList", sizeof(struct __pyx_obj_4cdec_2sa_3_sa_IntList), 1); if (unlikely(!__pyx_ptype_4cdec_2sa_3_sa_IntList)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_vtabptr_4cdec_2sa_3_sa_IntList = (struct __pyx_vtabstruct_4cdec_2sa_3_sa_IntList*)__Pyx_GetVtable(__pyx_ptype_4cdec_2sa_3_sa_IntList->tp_dict); if (unlikely(!__pyx_vtabptr_4cdec_2sa_3_sa_IntList)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_2sa_3_sa_FeatureVector = __Pyx_ImportType("cdec.sa._sa", "FeatureVector", sizeof(struct __pyx_obj_4cdec_2sa_3_sa_FeatureVector), 1); if (unlikely(!__pyx_ptype_4cdec_2sa_3_sa_FeatureVector)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_2sa_3_sa_Phrase = __Pyx_ImportType("cdec.sa._sa", "Phrase", sizeof(struct __pyx_obj_4cdec_2sa_3_sa_Phrase), 1); if (unlikely(!__pyx_ptype_4cdec_2sa_3_sa_Phrase)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_vtabptr_4cdec_2sa_3_sa_Phrase = (struct __pyx_vtabstruct_4cdec_2sa_3_sa_Phrase*)__Pyx_GetVtable(__pyx_ptype_4cdec_2sa_3_sa_Phrase->tp_dict); if (unlikely(!__pyx_vtabptr_4cdec_2sa_3_sa_Phrase)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_ptype_4cdec_2sa_3_sa_Rule = __Pyx_ImportType("cdec.sa._sa", "Rule", sizeof(struct __pyx_obj_4cdec_2sa_3_sa_Rule), 1); if (unlikely(!__pyx_ptype_4cdec_2sa_3_sa_Rule)) {__pyx_filename = __pyx_f[6]; __pyx_lineno = 35; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Variable import code ---*/ /*--- Function import code ---*/ __pyx_t_1 = __Pyx_ImportModule("cdec.sa._sa"); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -27915,7 +27461,7 @@ PyMODINIT_FUNC PyInit__cdec(void) Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; /*--- Execution code ---*/ - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":3 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":3 * cimport grammar * cimport cdec.sa._sa as _sa * import cdec.sa._sa as _sa # <<<<<<<<<<<<<< @@ -27924,82 +27470,82 @@ PyMODINIT_FUNC PyInit__cdec(void) */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_INCREF(__pyx_n_s__23); - PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s__23); - __Pyx_GIVEREF(__pyx_n_s__23); - __pyx_t_3 = __Pyx_Import(__pyx_n_s_cdec_sa__sa, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_INCREF(((PyObject *)__pyx_n_s_55)); + PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s_55)); + __Pyx_GIVEREF(((PyObject *)__pyx_n_s_55)); + __pyx_t_3 = __Pyx_Import(((PyObject *)__pyx_n_s_54), ((PyObject *)__pyx_t_2), -1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_sa, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; + if (PyDict_SetItem(__pyx_d, __pyx_n_s___sa, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/grammar.pxi":5 + /* "/usr0/home/austinma/git/cdec/python/cdec/grammar.pxi":5 * import cdec.sa._sa as _sa * * def _phrase(phrase): # <<<<<<<<<<<<<< * return ' '.join(w.encode('utf8') if isinstance(w, unicode) else str(w) for w in phrase) * */ - __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_4cdec_5_cdec_1_phrase, NULL, __pyx_n_s_cdec__cdec); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_4cdec_5_cdec_1_phrase, NULL, __pyx_n_s_39); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_phrase, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s___phrase, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":194 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":194 * return [] * * BLEU = Scorer('IBM_BLEU') # <<<<<<<<<<<<<< * QCRI = Scorer('QCRI_BLEU') * TER = Scorer('TER') */ - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_Scorer)), __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_Scorer)), ((PyObject *)__pyx_k_tuple_59), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_BLEU, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__BLEU, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":195 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":195 * * BLEU = Scorer('IBM_BLEU') * QCRI = Scorer('QCRI_BLEU') # <<<<<<<<<<<<<< * TER = Scorer('TER') * CER = Scorer('CER') */ - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_Scorer)), __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_Scorer)), ((PyObject *)__pyx_k_tuple_60), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_QCRI, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__QCRI, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":196 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":196 * BLEU = Scorer('IBM_BLEU') * QCRI = Scorer('QCRI_BLEU') * TER = Scorer('TER') # <<<<<<<<<<<<<< * CER = Scorer('CER') * SSK = Scorer('SSK') */ - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_Scorer)), __pyx_tuple__28, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_Scorer)), ((PyObject *)__pyx_k_tuple_61), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_TER, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__TER, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":197 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":197 * QCRI = Scorer('QCRI_BLEU') * TER = Scorer('TER') * CER = Scorer('CER') # <<<<<<<<<<<<<< * SSK = Scorer('SSK') */ - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_Scorer)), __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_Scorer)), ((PyObject *)__pyx_k_tuple_62), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_CER, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__CER, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "/usr0/home/cdyer/cdec/python/cdec/mteval.pxi":198 + /* "/usr0/home/austinma/git/cdec/python/cdec/mteval.pxi":198 * TER = Scorer('TER') * CER = Scorer('CER') * SSK = Scorer('SSK') # <<<<<<<<<<<<<< */ - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_Scorer)), __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_4cdec_5_cdec_Scorer)), ((PyObject *)__pyx_k_tuple_63), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_SSK, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__SSK, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[5]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cdec/_cdec.pyx":22 @@ -28027,22 +27573,19 @@ PyMODINIT_FUNC PyInit__cdec(void) * class ParseFailed(Exception): pass * */ - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_builtin_Exception); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_builtin_Exception); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_Exception); __Pyx_GIVEREF(__pyx_builtin_Exception); - __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_3, __pyx_n_s_InvalidConfig, __pyx_n_s_InvalidConfig, (PyObject *) NULL, __pyx_n_s_cdec__cdec, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_CreateClass(((PyObject *)__pyx_t_2), ((PyObject *)__pyx_t_3), __pyx_n_s__InvalidConfig, __pyx_n_s__InvalidConfig, __pyx_n_s_39); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_InvalidConfig, __pyx_t_3, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_InvalidConfig, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; + if (PyDict_SetItem(__pyx_d, __pyx_n_s__InvalidConfig, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; /* "cdec/_cdec.pyx":26 * @@ -28051,22 +27594,19 @@ PyMODINIT_FUNC PyInit__cdec(void) * * def set_silent(yn): */ - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_builtin_Exception); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_builtin_Exception); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_builtin_Exception); __Pyx_GIVEREF(__pyx_builtin_Exception); - __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_CreateClass(((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_3), __pyx_n_s__ParseFailed, __pyx_n_s__ParseFailed, __pyx_n_s_39); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_3, __pyx_n_s_ParseFailed, __pyx_n_s_ParseFailed, (PyObject *) NULL, __pyx_n_s_cdec__cdec, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_ParseFailed, __pyx_t_3, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ParseFailed, __pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; + if (PyDict_SetItem(__pyx_d, __pyx_n_s__ParseFailed, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; /* "cdec/_cdec.pyx":28 * class ParseFailed(Exception): pass @@ -28075,9 +27615,9 @@ PyMODINIT_FUNC PyInit__cdec(void) * """set_silent(bool): Configure the verbosity of cdec.""" * SetSilent(yn) */ - __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_4cdec_5_cdec_3set_silent, NULL, __pyx_n_s_cdec__cdec); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_4cdec_5_cdec_3set_silent, NULL, __pyx_n_s_39); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_set_silent, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s__set_silent, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cdec/_cdec.pyx":32 @@ -28087,9 +27627,9 @@ PyMODINIT_FUNC PyInit__cdec(void) * for key, value in config.items(): * if isinstance(value, dict): */ - __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_4cdec_5_cdec_5_make_config, NULL, __pyx_n_s_cdec__cdec); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyCFunction_NewEx(&__pyx_mdef_4cdec_5_cdec_5_make_config, NULL, __pyx_n_s_39); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_make_config, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s___make_config, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "cdec/_cdec.pyx":1 @@ -28098,9 +27638,9 @@ PyMODINIT_FUNC PyInit__cdec(void) * from utils cimport * */ __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(((PyObject *)__pyx_t_3)); + if (PyDict_SetItem(__pyx_d, __pyx_n_s____test__, ((PyObject *)__pyx_t_3)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; /* "string.from_py":13 * @@ -28115,7 +27655,6 @@ PyMODINIT_FUNC PyInit__cdec(void) __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); if (__pyx_m) { __Pyx_AddTraceback("init cdec._cdec", __pyx_clineno, __pyx_lineno, __pyx_filename); Py_DECREF(__pyx_m); __pyx_m = 0; @@ -28155,34 +27694,11 @@ static PyObject *__Pyx_GetBuiltinName(PyObject *name) { #if PY_MAJOR_VERSION >= 3 "name '%U' is not defined", name); #else - "name '%.200s' is not defined", PyString_AS_STRING(name)); -#endif - } - return result; -} - -#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 PY_VERSION_HEX >= 0x02060000 - if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) - return NULL; + "name '%s' is not defined", PyString_AS_STRING(name)); #endif - result = (*call)(func, arg, kw); -#if PY_VERSION_HEX >= 0x02060000 - Py_LeaveRecursiveCall(); -#endif - if (unlikely(!result) && unlikely(!PyErr_Occurred())) { - PyErr_SetString( - PyExc_SystemError, - "NULL result without error in PyObject_Call"); } return result; } -#endif static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) { #if CYTHON_COMPILING_IN_CPYTHON @@ -28301,40 +27817,27 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject 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) { - if (PyObject_IsSubclass(instance_class, type)) { - type = instance_class; - } else { - instance_class = NULL; - } - } - } - 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; - } + 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 = PyEval_CallObject(type, args); + 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, @@ -28400,7 +27903,7 @@ static void __Pyx_RaiseArgtupleInvalid( 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)", + "%s() takes %s %" CYTHON_FORMAT_SSIZE_T "d positional argument%s (%" CYTHON_FORMAT_SSIZE_T "d given)", func_name, more_or_less, num_expected, (num_expected == 1) ? "" : "s", num_found); } @@ -28429,13 +27932,13 @@ static CYTHON_INLINE int __Pyx_CheckKeywordStrings( return 1; invalid_keyword_type: PyErr_Format(PyExc_TypeError, - "%.200s() keywords must be strings", function_name); + "%s() keywords must be strings", function_name); return 0; #endif invalid_keyword: PyErr_Format(PyExc_TypeError, #if PY_MAJOR_VERSION < 3 - "%.200s() got an unexpected keyword argument '%.200s'", + "%s() got an unexpected keyword argument '%s'", function_name, PyString_AsString(key)); #else "%s() got an unexpected keyword argument '%U'", @@ -28444,35 +27947,29 @@ invalid_keyword: return 0; } -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, +static 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"); + if (!type) { + PyErr_Format(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 + if (Py_TYPE(obj) == type) return 1; } else { - if (likely(PyObject_TypeCheck(obj, type))) return 1; + if (PyObject_TypeCheck(obj, type)) return 1; } - __Pyx_RaiseArgumentTypeInvalid(name, obj, type); + PyErr_Format(PyExc_TypeError, + "Argument '%s' has incorrect type (expected %s, got %s)", + name, type->tp_name, Py_TYPE(obj)->tp_name); return 0; } static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { if (unlikely(!type)) { - PyErr_SetString(PyExc_SystemError, "Missing type object"); + PyErr_Format(PyExc_SystemError, "Missing type object"); return 0; } if (likely(PyObject_TypeCheck(obj, type))) @@ -28482,123 +27979,10 @@ static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { return 0; } -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_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 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 CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) { PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname); } -#if !CYTHON_COMPILING_IN_CPYTHON -static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values) { - return PyObject_CallMethodObjArgs(sep, __pyx_n_s_join, values, NULL) -} -#endif - static void __Pyx_RaiseDoubleKeywordsError( const char* func_name, PyObject* kw_name) @@ -28698,12 +28082,12 @@ arg_passed_twice: goto bad; invalid_keyword_type: PyErr_Format(PyExc_TypeError, - "%.200s() keywords must be strings", function_name); + "%s() 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'", + "%s() got an unexpected keyword argument '%s'", function_name, PyString_AsString(key)); #else "%s() got an unexpected keyword argument '%U'", @@ -28713,16 +28097,14 @@ bad: return -1; } -static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) { +static CYTHON_INLINE PyObject* __Pyx_PyObject_Append(PyObject* L, PyObject* x) { if (likely(PyList_CheckExact(L))) { - if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1; + if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return NULL; + Py_INCREF(Py_None); + return Py_None; /* this is just to have an accurate signature */ } else { - PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_n_s_append, x); - if (unlikely(!retval)) - return -1; - Py_DECREF(retval); + return __Pyx_PyObject_CallMethod1(L, __pyx_n_s__append, x); } - return 0; } static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { @@ -28810,7 +28192,7 @@ static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { 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", + "need more than %" CYTHON_FORMAT_SSIZE_T "d value%s to unpack", index, (index == 1) ? "" : "s"); } @@ -28877,18 +28259,10 @@ static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) { } static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno, - CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename, - int full_traceback) { + CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename) { PyObject *old_exc, *old_val, *old_tb; PyObject *ctx; __Pyx_ErrFetch(&old_exc, &old_val, &old_tb); - if (full_traceback) { - Py_XINCREF(old_exc); - Py_XINCREF(old_val); - Py_XINCREF(old_tb); - __Pyx_ErrRestore(old_exc, old_val, old_tb); - PyErr_PrintEx(1); - } #if PY_MAJOR_VERSION < 3 ctx = PyString_FromString(name); #else @@ -28936,46 +28310,8 @@ static CYTHON_INLINE PyObject *__Pyx_PyIter_Next2(PyObject* iterator, PyObject* return defval; } if (!PyErr_Occurred()) - PyErr_SetNone(PyExc_StopIteration); - return NULL; -} - -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; + PyErr_SetNone(PyExc_StopIteration); + return NULL; } static PyObject * @@ -29110,10 +28446,11 @@ __Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value) return 0; } static PyObject * -__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op) +__Pyx_CyFunction_get_globals(CYTHON_UNUSED __pyx_CyFunctionObject *op) { - Py_INCREF(op->func_globals); - return op->func_globals; + PyObject* dict = PyModule_GetDict(__pyx_m); + Py_XINCREF(dict); + return dict; } static PyObject * __Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op) @@ -29269,7 +28606,7 @@ static PyMethodDef __pyx_CyFunction_methods[] = { {0, 0, 0, 0} }; static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags, PyObject* qualname, - PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { + PyObject *closure, PyObject *module, PyObject* code) { __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type); if (op == NULL) return NULL; @@ -29287,8 +28624,6 @@ static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int f 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; @@ -29309,7 +28644,6 @@ __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) 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); @@ -29341,7 +28675,6 @@ static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, 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); @@ -29486,18 +28819,14 @@ static PyTypeObject __pyx_CyFunctionType_type = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif -#if PY_VERSION_HEX >= 0x030400a1 - 0, /*tp_finalize*/ -#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) { + if (PyType_Ready(&__pyx_CyFunctionType_type) < 0) return -1; - } + __pyx_CyFunctionType = &__pyx_CyFunctionType_type; return 0; } static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) { @@ -29546,975 +28875,981 @@ static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObjec if (default_value == Py_None) default_value = NULL; value = PyObject_CallMethodObjArgs( - d, __pyx_n_s_get, key, default_value, NULL); + d, __pyx_n_s__get, key, default_value, NULL); } #endif return value; } -static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { +static double __Pyx__PyObject_AsDouble(PyObject* obj) { + PyObject* float_value; #if CYTHON_COMPILING_IN_PYPY - return PyObject_RichCompareBool(s1, s2, equals); + float_value = PyNumber_Float(obj); #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); + PyNumberMethods *nb = Py_TYPE(obj)->tp_as_number; + if (likely(nb) && likely(nb->nb_float)) { + float_value = nb->nb_float(obj); + if (likely(float_value) && unlikely(!PyFloat_Check(float_value))) { + PyErr_Format(PyExc_TypeError, + "__float__ returned non-float (type %.200s)", + Py_TYPE(float_value)->tp_name); + Py_DECREF(float_value); + goto bad; } - } 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 if (PyUnicode_CheckExact(obj) || PyBytes_CheckExact(obj)) { +#if PY_MAJOR_VERSION >= 3 + float_value = PyFloat_FromString(obj); +#else + float_value = PyFloat_FromString(obj, 0); +#endif } 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; + PyObject* args = PyTuple_New(1); + if (unlikely(!args)) goto bad; + PyTuple_SET_ITEM(args, 0, obj); + float_value = PyObject_Call((PyObject*)&PyFloat_Type, args, 0); + PyTuple_SET_ITEM(args, 0, 0); + Py_DECREF(args); } #endif + if (likely(float_value)) { + double value = PyFloat_AS_DOUBLE(float_value); + Py_DECREF(float_value); + return value; + } +bad: + return (double)-1; } -static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { -#if CYTHON_COMPILING_IN_PYPY - return PyObject_RichCompareBool(s1, s2, equals); +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 -#if PY_MAJOR_VERSION < 3 - PyObject* owned_ref = NULL; + PyErr_Fetch(&local_type, &local_value, &local_tb); #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); - } + PyErr_NormalizeException(&local_type, &local_value, &local_tb); +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(tstate->curexc_type)) +#else + if (unlikely(PyErr_Occurred())) #endif - if (s1_is_unicode & s2_is_unicode) { - Py_ssize_t length; - int kind; - void *data1, *data2; - #if CYTHON_PEP393_ENABLED - if (unlikely(PyUnicode_READY(s1) < 0) || unlikely(PyUnicode_READY(s2) < 0)) - return -1; - #endif - 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; + goto bad; + #if PY_MAJOR_VERSION >= 3 + if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) + goto bad; + #endif + Py_INCREF(local_type); + Py_INCREF(local_value); + Py_INCREF(local_tb); + *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; + /* Make sure tstate is in a consistent state when we XDECREF + these objects (DECREF may run arbitrary code). */ + 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 int __Pyx_SetVtable(PyObject *dict, void *vtable) { +#if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0) + 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 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 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0) + 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 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 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_VERSION_HEX >= 0x02050000 + { + #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; /* try absolute import on failure */ } - 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, length * kind); - #if PY_MAJOR_VERSION < 3 - Py_XDECREF(owned_ref); + #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 - 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); + #else + if (level>0) { + PyErr_SetString(PyExc_RuntimeError, "Relative import is not supported for Python <=2.4."); + goto bad; + } + module = PyObject_CallFunctionObjArgs(py_import, + name, global_dict, empty_dict, list, NULL); #endif - return (equals == Py_EQ); -return_ne: - #if PY_MAJOR_VERSION < 3 - Py_XDECREF(owned_ref); +bad: + #if PY_VERSION_HEX < 0x03030000 + Py_XDECREF(py_import); #endif - return (equals == Py_NE); -#endif + Py_XDECREF(empty_list); + Py_XDECREF(empty_dict); + return module; } -static double __Pyx__PyObject_AsDouble(PyObject* obj) { - PyObject* float_value; -#if CYTHON_COMPILING_IN_PYPY - float_value = PyNumber_Float(obj); -#else - PyNumberMethods *nb = Py_TYPE(obj)->tp_as_number; - if (likely(nb) && likely(nb->nb_float)) { - float_value = nb->nb_float(obj); - if (likely(float_value) && unlikely(!PyFloat_Check(float_value))) { - PyErr_Format(PyExc_TypeError, - "__float__ returned non-float (type %.200s)", - Py_TYPE(float_value)->tp_name); - Py_DECREF(float_value); - goto bad; +static PyObject *__Pyx_FindPy2Metaclass(PyObject *bases) { + PyObject *metaclass; +#if PY_MAJOR_VERSION < 3 + if (PyTuple_Check(bases) && PyTuple_GET_SIZE(bases) > 0) { + PyObject *base = PyTuple_GET_ITEM(bases, 0); + metaclass = __Pyx_PyObject_GetAttrStr(base, __pyx_n_s____class__); + if (!metaclass) { + PyErr_Clear(); + metaclass = (PyObject*) Py_TYPE(base); } - } else if (PyUnicode_CheckExact(obj) || PyBytes_CheckExact(obj)) { -#if PY_MAJOR_VERSION >= 3 - float_value = PyFloat_FromString(obj); + } else { + metaclass = (PyObject *) &PyClass_Type; + } #else - float_value = PyFloat_FromString(obj, 0); -#endif + if (PyTuple_Check(bases) && PyTuple_GET_SIZE(bases) > 0) { + PyObject *base = PyTuple_GET_ITEM(bases, 0); + metaclass = (PyObject*) Py_TYPE(base); } else { - PyObject* args = PyTuple_New(1); - if (unlikely(!args)) goto bad; - PyTuple_SET_ITEM(args, 0, obj); - float_value = PyObject_Call((PyObject*)&PyFloat_Type, args, 0); - PyTuple_SET_ITEM(args, 0, 0); - Py_DECREF(args); + metaclass = (PyObject *) &PyType_Type; } #endif - if (likely(float_value)) { - double value = PyFloat_AS_DOUBLE(float_value); - Py_DECREF(float_value); - return value; + Py_INCREF(metaclass); + return metaclass; +} + +static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name, + PyObject *qualname, PyObject *modname) { + PyObject *result; + PyObject *metaclass; + if (PyDict_SetItem(dict, __pyx_n_s____module__, modname) < 0) + return NULL; + if (PyDict_SetItem(dict, __pyx_n_s____qualname__, qualname) < 0) + return NULL; + metaclass = PyDict_GetItem(dict, __pyx_n_s____metaclass__); + if (metaclass) { + Py_INCREF(metaclass); + } else { + metaclass = __Pyx_FindPy2Metaclass(bases); } -bad: - return (double)-1; + result = PyObject_CallFunctionObjArgs(metaclass, name, bases, dict, NULL); + Py_DECREF(metaclass); + return result; } -static int __Pyx_SetVtable(PyObject *dict, void *vtable) { -#if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0) - 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 CYTHON_INLINE WordID __Pyx_PyInt_from_py_WordID(PyObject* x) { + const WordID neg_one = (WordID)-1, const_zero = (WordID)0; + const int is_unsigned = const_zero < neg_one; + if (sizeof(WordID) == sizeof(char)) { + if (is_unsigned) + return (WordID)__Pyx_PyInt_AsUnsignedChar(x); + else + return (WordID)__Pyx_PyInt_AsSignedChar(x); + } else if (sizeof(WordID) == sizeof(short)) { + if (is_unsigned) + return (WordID)__Pyx_PyInt_AsUnsignedShort(x); + else + return (WordID)__Pyx_PyInt_AsSignedShort(x); + } else if (sizeof(WordID) == sizeof(int)) { + if (is_unsigned) + return (WordID)__Pyx_PyInt_AsUnsignedInt(x); + else + return (WordID)__Pyx_PyInt_AsSignedInt(x); + } else if (sizeof(WordID) == sizeof(long)) { + if (is_unsigned) + return (WordID)__Pyx_PyInt_AsUnsignedLong(x); + else + return (WordID)__Pyx_PyInt_AsSignedLong(x); + } else if (sizeof(WordID) == sizeof(PY_LONG_LONG)) { + if (is_unsigned) + return (WordID)__Pyx_PyInt_AsUnsignedLongLong(x); + else + return (WordID)__Pyx_PyInt_AsSignedLongLong(x); + } else { + #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); + #else + WordID 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 (WordID)-1; + } } -static void* __Pyx_GetVtable(PyObject *dict) { - void* ptr; - PyObject *ob = PyObject_GetItem(dict, __pyx_n_s_pyx_vtable); - if (!ob) +static PyObject* __Pyx_Globals(void) { + Py_ssize_t i; + PyObject *names = NULL; + PyObject *globals = PyObject_GetAttr(__pyx_m, __pyx_n_s____dict__); + if (!globals) { + PyErr_SetString(PyExc_TypeError, + "current module must have __dict__ attribute"); goto bad; -#if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0) - ptr = PyCapsule_GetPointer(ob, 0); + } + names = PyObject_Dir(__pyx_m); + if (!names) + goto bad; + for (i = PyList_GET_SIZE(names)-1; i >= 0; i--) { +#if CYTHON_COMPILING_IN_PYPY + PyObject* name = PySequence_GetItem(names, i); + if (!name) + goto bad; #else - ptr = PyCObject_AsVoidPtr(ob); + PyObject* name = PyList_GET_ITEM(names, i); #endif - if (!ptr && !PyErr_Occurred()) - PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type"); - Py_DECREF(ob); - return ptr; + if (!PyDict_Contains(globals, name)) { + PyObject* value = PyObject_GetAttr(__pyx_m, name); + if (!value) { +#if CYTHON_COMPILING_IN_PYPY + Py_DECREF(name); +#endif + goto bad; + } + if (PyDict_SetItem(globals, name, value) < 0) { +#if CYTHON_COMPILING_IN_PYPY + Py_DECREF(name); +#endif + Py_DECREF(value); + goto bad; + } + } +#if CYTHON_COMPILING_IN_PYPY + Py_DECREF(name); +#endif + } + Py_DECREF(names); + return globals; bad: - Py_XDECREF(ob); + Py_XDECREF(names); + Py_XDECREF(globals); return NULL; } -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; +static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) { + const unsigned char neg_one = (unsigned char)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; + if (sizeof(unsigned char) < sizeof(long)) { + long val = __Pyx_PyInt_AsLong(x); + if (unlikely(val != (long)(unsigned char)val)) { + if (!unlikely(val == -1 && PyErr_Occurred())) { + PyErr_SetString(PyExc_OverflowError, + (is_unsigned && unlikely(val < 0)) ? + "can't convert negative value to unsigned char" : + "value too large to convert to unsigned char"); + } + return (unsigned char)-1; } - 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; + return (unsigned char)val; } - if (!metaclass) { -#if PY_MAJOR_VERSION < 3 - metaclass = &PyClass_Type; -#else - metaclass = &PyType_Type; -#endif + return (unsigned char)__Pyx_PyInt_AsUnsignedLong(x); +} + +static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) { + const unsigned short neg_one = (unsigned short)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; + if (sizeof(unsigned short) < sizeof(long)) { + long val = __Pyx_PyInt_AsLong(x); + if (unlikely(val != (long)(unsigned short)val)) { + if (!unlikely(val == -1 && PyErr_Occurred())) { + PyErr_SetString(PyExc_OverflowError, + (is_unsigned && unlikely(val < 0)) ? + "can't convert negative value to unsigned short" : + "value too large to convert to unsigned short"); + } + return (unsigned short)-1; + } + return (unsigned short)val; } - Py_INCREF((PyObject*) metaclass); - return (PyObject*) metaclass; + return (unsigned short)__Pyx_PyInt_AsUnsignedLong(x); } -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; +static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) { + const unsigned int neg_one = (unsigned int)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; + if (sizeof(unsigned int) < sizeof(long)) { + long val = __Pyx_PyInt_AsLong(x); + if (unlikely(val != (long)(unsigned int)val)) { + if (!unlikely(val == -1 && PyErr_Occurred())) { + PyErr_SetString(PyExc_OverflowError, + (is_unsigned && unlikely(val < 0)) ? + "can't convert negative value to unsigned int" : + "value too large to convert to unsigned int"); } - 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(); + return (unsigned int)-1; } - } else { - ns = PyDict_New(); + return (unsigned int)val; } - 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, doc) < 0)) goto bad; - return ns; -bad: - Py_DECREF(ns); - return NULL; + return (unsigned int)__Pyx_PyInt_AsUnsignedLong(x); } -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; + +static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject* x) { + const char neg_one = (char)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; + if (sizeof(char) < sizeof(long)) { + long val = __Pyx_PyInt_AsLong(x); + if (unlikely(val != (long)(char)val)) { + if (!unlikely(val == -1 && PyErr_Occurred())) { + PyErr_SetString(PyExc_OverflowError, + (is_unsigned && unlikely(val < 0)) ? + "can't convert negative value to char" : + "value too large to convert to char"); + } + return (char)-1; } + return (char)val; } - 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; + return (char)__Pyx_PyInt_AsLong(x); +} + +static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject* x) { + const short neg_one = (short)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; + if (sizeof(short) < sizeof(long)) { + long val = __Pyx_PyInt_AsLong(x); + if (unlikely(val != (long)(short)val)) { + if (!unlikely(val == -1 && PyErr_Occurred())) { + PyErr_SetString(PyExc_OverflowError, + (is_unsigned && unlikely(val < 0)) ? + "can't convert negative value to short" : + "value too large to convert to short"); + } + return (short)-1; + } + return (short)val; } - margs = PyTuple_Pack(3, name, bases, dict); - if (unlikely(!margs)) { - result = NULL; - } else { - result = PyObject_Call(metaclass, margs, mkw); - Py_DECREF(margs); + return (short)__Pyx_PyInt_AsLong(x); +} + +static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject* x) { + const int neg_one = (int)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; + if (sizeof(int) < sizeof(long)) { + long val = __Pyx_PyInt_AsLong(x); + if (unlikely(val != (long)(int)val)) { + if (!unlikely(val == -1 && PyErr_Occurred())) { + PyErr_SetString(PyExc_OverflowError, + (is_unsigned && unlikely(val < 0)) ? + "can't convert negative value to int" : + "value too large to convert to int"); + } + return (int)-1; + } + return (int)val; } - Py_XDECREF(owned_metaclass); - return result; + return (int)__Pyx_PyInt_AsLong(x); } -static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_int(unsigned int value) { - const unsigned int neg_one = (unsigned int) -1, const_zero = 0; +static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) { + const signed char neg_one = (signed char)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; - if (is_unsigned) { - if (sizeof(unsigned int) < sizeof(long)) { - return PyInt_FromLong((long) value); - } else if (sizeof(unsigned int) <= sizeof(unsigned long)) { - return PyLong_FromUnsignedLong((unsigned long) value); - } else if (sizeof(unsigned int) <= sizeof(unsigned long long)) { - return PyLong_FromUnsignedLongLong((unsigned long long) value); + if (sizeof(signed char) < sizeof(long)) { + long val = __Pyx_PyInt_AsLong(x); + if (unlikely(val != (long)(signed char)val)) { + if (!unlikely(val == -1 && PyErr_Occurred())) { + PyErr_SetString(PyExc_OverflowError, + (is_unsigned && unlikely(val < 0)) ? + "can't convert negative value to signed char" : + "value too large to convert to signed char"); + } + return (signed char)-1; } - } else { - if (sizeof(unsigned int) <= sizeof(long)) { - return PyInt_FromLong((long) value); - } else if (sizeof(unsigned int) <= sizeof(long long)) { - return PyLong_FromLongLong((long long) value); + return (signed char)val; + } + return (signed char)__Pyx_PyInt_AsSignedLong(x); +} + +static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) { + const signed short neg_one = (signed short)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; + if (sizeof(signed short) < sizeof(long)) { + long val = __Pyx_PyInt_AsLong(x); + if (unlikely(val != (long)(signed short)val)) { + if (!unlikely(val == -1 && PyErr_Occurred())) { + PyErr_SetString(PyExc_OverflowError, + (is_unsigned && unlikely(val < 0)) ? + "can't convert negative value to signed short" : + "value too large to convert to signed short"); + } + return (signed short)-1; } + return (signed short)val; } - { - int one = 1; int little = (int)*(unsigned char *)&one; - unsigned char *bytes = (unsigned char *)&value; - return _PyLong_FromByteArray(bytes, sizeof(unsigned int), - little, !is_unsigned); + return (signed short)__Pyx_PyInt_AsSignedLong(x); +} + +static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) { + const signed int neg_one = (signed int)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; + if (sizeof(signed int) < sizeof(long)) { + long val = __Pyx_PyInt_AsLong(x); + if (unlikely(val != (long)(signed int)val)) { + if (!unlikely(val == -1 && PyErr_Occurred())) { + PyErr_SetString(PyExc_OverflowError, + (is_unsigned && unlikely(val < 0)) ? + "can't convert negative value to signed int" : + "value too large to convert to signed int"); + } + return (signed int)-1; + } + return (signed int)val; } + return (signed int)__Pyx_PyInt_AsSignedLong(x); } -#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func) \ - { \ - func_type value = func(x); \ - if (sizeof(target_type) < sizeof(func_type)) { \ - if (unlikely(value != (func_type) (target_type) value)) { \ - func_type zero = 0; \ - PyErr_SetString(PyExc_OverflowError, \ - (is_unsigned && unlikely(value < zero)) ? \ - "can't convert negative value to " #target_type : \ - "value too large to convert to " #target_type); \ - return (target_type) -1; \ - } \ - } \ - return (target_type) value; \ +static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject* x) { + const int neg_one = (int)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; + if (sizeof(int) < sizeof(long)) { + long val = __Pyx_PyInt_AsLong(x); + if (unlikely(val != (long)(int)val)) { + if (!unlikely(val == -1 && PyErr_Occurred())) { + PyErr_SetString(PyExc_OverflowError, + (is_unsigned && unlikely(val < 0)) ? + "can't convert negative value to int" : + "value too large to convert to int"); + } + return (int)-1; + } + return (int)val; } + return (int)__Pyx_PyInt_AsLong(x); +} #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 - #if CYTHON_USE_PYLONG_INTERNALS - #include "longintrepr.h" - #endif +#if CYTHON_USE_PYLONG_INTERNALS +#include "longintrepr.h" #endif -static CYTHON_INLINE unsigned int __Pyx_PyInt_As_unsigned_int(PyObject *x) { - const unsigned int neg_one = (unsigned int) -1, const_zero = 0; +#endif +static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) { + const unsigned long neg_one = (unsigned long)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { - if (sizeof(unsigned int) < sizeof(long)) { - __PYX_VERIFY_RETURN_INT(unsigned int, long, PyInt_AS_LONG) - } else { - long val = PyInt_AS_LONG(x); - if (is_unsigned && unlikely(val < 0)) { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to unsigned long"); + return (unsigned long)-1; + } + return (unsigned long)val; + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 +#if CYTHON_USE_PYLONG_INTERNALS + if (sizeof(digit) <= sizeof(unsigned long)) { + switch (Py_SIZE(x)) { + case 0: return 0; + case 1: return (unsigned long) ((PyLongObject*)x)->ob_digit[0]; + } + } +#endif +#endif + if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to unsigned int"); - return (unsigned int) -1; + "can't convert negative value to unsigned long"); + return (unsigned long)-1; + } + return (unsigned long)PyLong_AsUnsignedLong(x); + } else { +#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 +#if CYTHON_USE_PYLONG_INTERNALS + if (sizeof(digit) <= sizeof(unsigned long)) { + switch (Py_SIZE(x)) { + case 0: return 0; + case 1: return +(unsigned long) ((PyLongObject*)x)->ob_digit[0]; + case -1: return -(unsigned long) ((PyLongObject*)x)->ob_digit[0]; + } } - return (unsigned int) val; +#endif +#endif + return (unsigned long)PyLong_AsLong(x); + } + } else { + unsigned long val; + PyObject *tmp = __Pyx_PyNumber_Int(x); + if (!tmp) return (unsigned long)-1; + val = __Pyx_PyInt_AsUnsignedLong(tmp); + Py_DECREF(tmp); + return val; + } +} + +#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 +#if CYTHON_USE_PYLONG_INTERNALS +#include "longintrepr.h" +#endif +#endif +static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) { + const unsigned PY_LONG_LONG neg_one = (unsigned PY_LONG_LONG)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to unsigned PY_LONG_LONG"); + return (unsigned PY_LONG_LONG)-1; } + return (unsigned PY_LONG_LONG)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 - #if CYTHON_USE_PYLONG_INTERNALS - if (sizeof(digit) <= sizeof(unsigned int)) { +#if CYTHON_USE_PYLONG_INTERNALS + if (sizeof(digit) <= sizeof(unsigned PY_LONG_LONG)) { switch (Py_SIZE(x)) { case 0: return 0; - case 1: return (unsigned int) ((PyLongObject*)x)->ob_digit[0]; + case 1: return (unsigned PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; } } - #endif +#endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to unsigned int"); - return (unsigned int) -1; + "can't convert negative value to unsigned PY_LONG_LONG"); + return (unsigned PY_LONG_LONG)-1; + } + return (unsigned PY_LONG_LONG)PyLong_AsUnsignedLongLong(x); + } else { +#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 +#if CYTHON_USE_PYLONG_INTERNALS + if (sizeof(digit) <= sizeof(unsigned PY_LONG_LONG)) { + switch (Py_SIZE(x)) { + case 0: return 0; + case 1: return +(unsigned PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; + case -1: return -(unsigned PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; + } + } +#endif +#endif + return (unsigned PY_LONG_LONG)PyLong_AsLongLong(x); + } + } else { + unsigned PY_LONG_LONG val; + PyObject *tmp = __Pyx_PyNumber_Int(x); + if (!tmp) return (unsigned PY_LONG_LONG)-1; + val = __Pyx_PyInt_AsUnsignedLongLong(tmp); + Py_DECREF(tmp); + return val; + } +} + +#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 +#if CYTHON_USE_PYLONG_INTERNALS +#include "longintrepr.h" +#endif +#endif +static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) { + const long neg_one = (long)-1, const_zero = 0; + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to long"); + return (long)-1; + } + return (long)val; + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 +#if CYTHON_USE_PYLONG_INTERNALS + if (sizeof(digit) <= sizeof(long)) { + switch (Py_SIZE(x)) { + case 0: return 0; + case 1: return (long) ((PyLongObject*)x)->ob_digit[0]; + } } - if (sizeof(unsigned int) <= sizeof(unsigned long)) { - __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, PyLong_AsUnsignedLong) - } else if (sizeof(unsigned int) <= sizeof(unsigned long long)) { - __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long long, PyLong_AsUnsignedLongLong) +#endif +#endif + if (unlikely(Py_SIZE(x) < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to long"); + return (long)-1; } + return (long)PyLong_AsUnsignedLong(x); } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 - #if CYTHON_USE_PYLONG_INTERNALS - if (sizeof(digit) <= sizeof(unsigned int)) { +#if CYTHON_USE_PYLONG_INTERNALS + if (sizeof(digit) <= sizeof(long)) { switch (Py_SIZE(x)) { case 0: return 0; - case 1: return +(unsigned int) ((PyLongObject*)x)->ob_digit[0]; - case -1: return -(unsigned int) ((PyLongObject*)x)->ob_digit[0]; + case 1: return +(long) ((PyLongObject*)x)->ob_digit[0]; + case -1: return -(long) ((PyLongObject*)x)->ob_digit[0]; } } - #endif #endif - if (sizeof(unsigned int) <= sizeof(long)) { - __PYX_VERIFY_RETURN_INT(unsigned int, long, PyLong_AsLong) - } else if (sizeof(unsigned int) <= sizeof(long long)) { - __PYX_VERIFY_RETURN_INT(unsigned int, long long, PyLong_AsLongLong) - } - } - { -#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) - PyErr_SetString(PyExc_RuntimeError, - "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); -#else - unsigned 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 (unsigned int) -1; + return (long)PyLong_AsLong(x); } } else { - unsigned int val; + long val; PyObject *tmp = __Pyx_PyNumber_Int(x); - if (!tmp) return (unsigned int) -1; - val = __Pyx_PyInt_As_unsigned_int(tmp); + if (!tmp) return (long)-1; + val = __Pyx_PyInt_AsLong(tmp); Py_DECREF(tmp); return val; } } #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 - #if CYTHON_USE_PYLONG_INTERNALS - #include "longintrepr.h" - #endif +#if CYTHON_USE_PYLONG_INTERNALS +#include "longintrepr.h" +#endif #endif -static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { - const int neg_one = (int) -1, const_zero = 0; +static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) { + const PY_LONG_LONG neg_one = (PY_LONG_LONG)-1, const_zero = 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) - } else { - long val = PyInt_AS_LONG(x); - if (is_unsigned && unlikely(val < 0)) { - PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to int"); - return (int) -1; - } - return (int) val; + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to PY_LONG_LONG"); + return (PY_LONG_LONG)-1; } + return (PY_LONG_LONG)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 - #if CYTHON_USE_PYLONG_INTERNALS - if (sizeof(digit) <= sizeof(int)) { +#if CYTHON_USE_PYLONG_INTERNALS + if (sizeof(digit) <= sizeof(PY_LONG_LONG)) { switch (Py_SIZE(x)) { case 0: return 0; - case 1: return (int) ((PyLongObject*)x)->ob_digit[0]; + case 1: return (PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; } } - #endif +#endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to int"); - return (int) -1; - } - if (sizeof(int) <= sizeof(unsigned long)) { - __PYX_VERIFY_RETURN_INT(int, unsigned long, PyLong_AsUnsignedLong) - } else if (sizeof(int) <= sizeof(unsigned long long)) { - __PYX_VERIFY_RETURN_INT(int, unsigned long long, PyLong_AsUnsignedLongLong) + "can't convert negative value to PY_LONG_LONG"); + return (PY_LONG_LONG)-1; } + return (PY_LONG_LONG)PyLong_AsUnsignedLongLong(x); } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 - #if CYTHON_USE_PYLONG_INTERNALS - if (sizeof(digit) <= sizeof(int)) { +#if CYTHON_USE_PYLONG_INTERNALS + if (sizeof(digit) <= sizeof(PY_LONG_LONG)) { switch (Py_SIZE(x)) { case 0: return 0; - case 1: return +(int) ((PyLongObject*)x)->ob_digit[0]; - case -1: return -(int) ((PyLongObject*)x)->ob_digit[0]; + case 1: return +(PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; + case -1: return -(PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; } } - #endif #endif - if (sizeof(int) <= sizeof(long)) { - __PYX_VERIFY_RETURN_INT(int, long, PyLong_AsLong) - } else if (sizeof(int) <= sizeof(long long)) { - __PYX_VERIFY_RETURN_INT(int, long long, PyLong_AsLongLong) - } - } - { -#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; + return (PY_LONG_LONG)PyLong_AsLongLong(x); } } else { - int val; + PY_LONG_LONG val; PyObject *tmp = __Pyx_PyNumber_Int(x); - if (!tmp) return (int) -1; - val = __Pyx_PyInt_As_int(tmp); + if (!tmp) return (PY_LONG_LONG)-1; + val = __Pyx_PyInt_AsLongLong(tmp); Py_DECREF(tmp); return val; } } -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_VERSION_HEX >= 0x02050000 - { - #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; /* try absolute import on failure */ - } - #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 - } - } - #else - if (level>0) { - PyErr_SetString(PyExc_RuntimeError, "Relative import is not supported for Python <=2.4."); - goto bad; - } - module = PyObject_CallFunctionObjArgs(py_import, - name, global_dict, empty_dict, list, NULL); - #endif -bad: - #if PY_VERSION_HEX < 0x03030000 - Py_XDECREF(py_import); - #endif - Py_XDECREF(empty_list); - Py_XDECREF(empty_dict); - return module; -} - -static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { - const int neg_one = (int) -1, const_zero = 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 long long)) { - return PyLong_FromUnsignedLongLong((unsigned long long) value); - } - } else { - if (sizeof(int) <= sizeof(long)) { - return PyInt_FromLong((long) value); - } else if (sizeof(int) <= sizeof(long long)) { - return PyLong_FromLongLong((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 CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { - const long neg_one = (long) -1, const_zero = 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 long long)) { - return PyLong_FromUnsignedLongLong((unsigned long long) value); - } - } else { - if (sizeof(long) <= sizeof(long)) { - return PyInt_FromLong((long) value); - } else if (sizeof(long) <= sizeof(long long)) { - return PyLong_FromLongLong((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_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 - #if CYTHON_USE_PYLONG_INTERNALS - #include "longintrepr.h" - #endif +#if CYTHON_USE_PYLONG_INTERNALS +#include "longintrepr.h" #endif -static CYTHON_INLINE WordID __Pyx_PyInt_As_WordID(PyObject *x) { - const WordID neg_one = (WordID) -1, const_zero = 0; +#endif +static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) { + const signed long neg_one = (signed long)-1, const_zero = 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { - if (sizeof(WordID) < sizeof(long)) { - __PYX_VERIFY_RETURN_INT(WordID, long, PyInt_AS_LONG) - } else { - long val = PyInt_AS_LONG(x); - if (is_unsigned && unlikely(val < 0)) { - PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to WordID"); - return (WordID) -1; - } - return (WordID) val; + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to signed long"); + return (signed long)-1; } + return (signed long)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 - #if CYTHON_USE_PYLONG_INTERNALS - if (sizeof(digit) <= sizeof(WordID)) { +#if CYTHON_USE_PYLONG_INTERNALS + if (sizeof(digit) <= sizeof(signed long)) { switch (Py_SIZE(x)) { case 0: return 0; - case 1: return (WordID) ((PyLongObject*)x)->ob_digit[0]; + case 1: return (signed long) ((PyLongObject*)x)->ob_digit[0]; } } - #endif +#endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to WordID"); - return (WordID) -1; - } - if (sizeof(WordID) <= sizeof(unsigned long)) { - __PYX_VERIFY_RETURN_INT(WordID, unsigned long, PyLong_AsUnsignedLong) - } else if (sizeof(WordID) <= sizeof(unsigned long long)) { - __PYX_VERIFY_RETURN_INT(WordID, unsigned long long, PyLong_AsUnsignedLongLong) + "can't convert negative value to signed long"); + return (signed long)-1; } + return (signed long)PyLong_AsUnsignedLong(x); } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 - #if CYTHON_USE_PYLONG_INTERNALS - if (sizeof(digit) <= sizeof(WordID)) { +#if CYTHON_USE_PYLONG_INTERNALS + if (sizeof(digit) <= sizeof(signed long)) { switch (Py_SIZE(x)) { case 0: return 0; - case 1: return +(WordID) ((PyLongObject*)x)->ob_digit[0]; - case -1: return -(WordID) ((PyLongObject*)x)->ob_digit[0]; + case 1: return +(signed long) ((PyLongObject*)x)->ob_digit[0]; + case -1: return -(signed long) ((PyLongObject*)x)->ob_digit[0]; } } - #endif #endif - if (sizeof(WordID) <= sizeof(long)) { - __PYX_VERIFY_RETURN_INT(WordID, long, PyLong_AsLong) - } else if (sizeof(WordID) <= sizeof(long long)) { - __PYX_VERIFY_RETURN_INT(WordID, long long, PyLong_AsLongLong) - } - } - { -#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) - PyErr_SetString(PyExc_RuntimeError, - "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); -#else - WordID 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 (WordID) -1; + return (signed long)PyLong_AsLong(x); } } else { - WordID val; + signed long val; PyObject *tmp = __Pyx_PyNumber_Int(x); - if (!tmp) return (WordID) -1; - val = __Pyx_PyInt_As_WordID(tmp); + if (!tmp) return (signed long)-1; + val = __Pyx_PyInt_AsSignedLong(tmp); Py_DECREF(tmp); return val; } } -static CYTHON_INLINE PyObject* __Pyx_PyInt_From_short(short value) { - const short neg_one = (short) -1, const_zero = 0; - const int is_unsigned = neg_one > const_zero; - if (is_unsigned) { - if (sizeof(short) < sizeof(long)) { - return PyInt_FromLong((long) value); - } else if (sizeof(short) <= sizeof(unsigned long)) { - return PyLong_FromUnsignedLong((unsigned long) value); - } else if (sizeof(short) <= sizeof(unsigned long long)) { - return PyLong_FromUnsignedLongLong((unsigned long long) value); - } - } else { - if (sizeof(short) <= sizeof(long)) { - return PyInt_FromLong((long) value); - } else if (sizeof(short) <= sizeof(long long)) { - return PyLong_FromLongLong((long long) value); - } - } - { - int one = 1; int little = (int)*(unsigned char *)&one; - unsigned char *bytes = (unsigned char *)&value; - return _PyLong_FromByteArray(bytes, sizeof(short), - little, !is_unsigned); - } -} - -static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) { -#if CYTHON_COMPILING_IN_CPYTHON -#if PY_MAJOR_VERSION >= 3 - if (likely(PyUnicode_Check(n))) -#else - if (likely(PyString_Check(n))) -#endif - return __Pyx_PyObject_GetAttrStr(o, n); -#endif - return PyObject_GetAttr(o, n); -} - -static PyObject* __Pyx_Globals(void) { - Py_ssize_t i; - PyObject *names = NULL; - PyObject *globals = PyObject_GetAttr(__pyx_m, __pyx_n_s_dict); - if (!globals) { - PyErr_SetString(PyExc_TypeError, - "current module must have __dict__ attribute"); - goto bad; - } - names = PyObject_Dir(__pyx_m); - if (!names) - goto bad; - for (i = PyList_GET_SIZE(names)-1; i >= 0; i--) { -#if CYTHON_COMPILING_IN_PYPY - PyObject* name = PySequence_GetItem(names, i); - if (!name) - goto bad; -#else - PyObject* name = PyList_GET_ITEM(names, i); -#endif - if (!PyDict_Contains(globals, name)) { - PyObject* value = __Pyx_GetAttr(__pyx_m, name); - if (!value) { -#if CYTHON_COMPILING_IN_PYPY - Py_DECREF(name); -#endif - goto bad; - } - if (PyDict_SetItem(globals, name, value) < 0) { -#if CYTHON_COMPILING_IN_PYPY - Py_DECREF(name); -#endif - Py_DECREF(value); - goto bad; - } - } -#if CYTHON_COMPILING_IN_PYPY - Py_DECREF(name); -#endif - } - Py_DECREF(names); - return globals; -bad: - Py_XDECREF(names); - Py_XDECREF(globals); - return NULL; -} - #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 - #if CYTHON_USE_PYLONG_INTERNALS - #include "longintrepr.h" - #endif +#if CYTHON_USE_PYLONG_INTERNALS +#include "longintrepr.h" +#endif #endif -static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { - const long neg_one = (long) -1, const_zero = 0; +static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) { + const signed PY_LONG_LONG neg_one = (signed PY_LONG_LONG)-1, const_zero = 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) - } else { - long val = PyInt_AS_LONG(x); - if (is_unsigned && unlikely(val < 0)) { - PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to long"); - return (long) -1; - } - return (long) val; + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to signed PY_LONG_LONG"); + return (signed PY_LONG_LONG)-1; } + return (signed PY_LONG_LONG)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 - #if CYTHON_USE_PYLONG_INTERNALS - if (sizeof(digit) <= sizeof(long)) { +#if CYTHON_USE_PYLONG_INTERNALS + if (sizeof(digit) <= sizeof(signed PY_LONG_LONG)) { switch (Py_SIZE(x)) { case 0: return 0; - case 1: return (long) ((PyLongObject*)x)->ob_digit[0]; + case 1: return (signed PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; } } - #endif +#endif #endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to long"); - return (long) -1; - } - if (sizeof(long) <= sizeof(unsigned long)) { - __PYX_VERIFY_RETURN_INT(long, unsigned long, PyLong_AsUnsignedLong) - } else if (sizeof(long) <= sizeof(unsigned long long)) { - __PYX_VERIFY_RETURN_INT(long, unsigned long long, PyLong_AsUnsignedLongLong) + "can't convert negative value to signed PY_LONG_LONG"); + return (signed PY_LONG_LONG)-1; } + return (signed PY_LONG_LONG)PyLong_AsUnsignedLongLong(x); } else { #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 - #if CYTHON_USE_PYLONG_INTERNALS - if (sizeof(digit) <= sizeof(long)) { +#if CYTHON_USE_PYLONG_INTERNALS + if (sizeof(digit) <= sizeof(signed PY_LONG_LONG)) { switch (Py_SIZE(x)) { case 0: return 0; - case 1: return +(long) ((PyLongObject*)x)->ob_digit[0]; - case -1: return -(long) ((PyLongObject*)x)->ob_digit[0]; + case 1: return +(signed PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; + case -1: return -(signed PY_LONG_LONG) ((PyLongObject*)x)->ob_digit[0]; } } - #endif #endif - if (sizeof(long) <= sizeof(long)) { - __PYX_VERIFY_RETURN_INT(long, long, PyLong_AsLong) - } else if (sizeof(long) <= sizeof(long long)) { - __PYX_VERIFY_RETURN_INT(long, long long, PyLong_AsLongLong) - } - } - { -#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; + return (signed PY_LONG_LONG)PyLong_AsLongLong(x); } } else { - long val; + signed PY_LONG_LONG val; PyObject *tmp = __Pyx_PyNumber_Int(x); - if (!tmp) return (long) -1; - val = __Pyx_PyInt_As_long(tmp); + if (!tmp) return (signed PY_LONG_LONG)-1; + val = __Pyx_PyInt_AsSignedLongLong(tmp); Py_DECREF(tmp); return val; } } +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_Generator_Next(PyObject *self); static PyObject *__Pyx_Generator_Send(PyObject *self, PyObject *value); static PyObject *__Pyx_Generator_Close(PyObject *self); @@ -30564,7 +29899,7 @@ static int __Pyx_PyGen_FetchStopIterationValue(PyObject **pvalue) { Py_DECREF(ev); #else { - PyObject* args = PyObject_GetAttr(ev, __pyx_n_s_args); + PyObject* args = PyObject_GetAttr(ev, __pyx_n_s__args); Py_DECREF(ev); if (likely(args)) { value = PyObject_GetItem(args, 0); @@ -30700,7 +30035,7 @@ static PyObject *__Pyx_Generator_Send(PyObject *self, PyObject *value) { if (value == Py_None) ret = PyIter_Next(yf); else - ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value); + ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s__send, value); } gen->is_running = 0; if (likely(ret)) { @@ -30720,7 +30055,7 @@ static int __Pyx_Generator_CloseIter(__pyx_GeneratorObject *gen, PyObject *yf) { } else { PyObject *meth; gen->is_running = 1; - meth = PyObject_GetAttr(yf, __pyx_n_s_close); + meth = PyObject_GetAttr(yf, __pyx_n_s__close); if (unlikely(!meth)) { if (!PyErr_ExceptionMatches(PyExc_AttributeError)) { PyErr_WriteUnraisable(yf); @@ -30805,7 +30140,7 @@ static PyObject *__Pyx_Generator_Throw(PyObject *self, PyObject *args) { if (__Pyx_Generator_CheckExact(yf)) { ret = __Pyx_Generator_Throw(yf, args); } else { - PyObject *meth = PyObject_GetAttr(yf, __pyx_n_s_throw); + PyObject *meth = PyObject_GetAttr(yf, __pyx_n_s__throw); if (unlikely(!meth)) { Py_DECREF(yf); if (!PyErr_ExceptionMatches(PyExc_AttributeError)) { @@ -30856,17 +30191,13 @@ static void __Pyx_Generator_dealloc(PyObject *self) { PyObject_GC_UnTrack(gen); if (gen->gi_weakreflist != NULL) PyObject_ClearWeakRefs(self); + PyObject_GC_Track(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; /* resurrected. :( */ - PyObject_GC_UnTrack(self); } + PyObject_GC_UnTrack(self); __Pyx_Generator_clear(self); PyObject_GC_Del(gen); } @@ -30876,10 +30207,8 @@ static void __Pyx_Generator_del(PyObject *self) { __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) 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_Generator_Close(self); if (res == NULL) @@ -30887,7 +30216,6 @@ static void __Pyx_Generator_del(PyObject *self) { else Py_DECREF(res); __Pyx_ErrRestore(error_type, error_value, error_traceback); -#if PY_VERSION_HEX < 0x030400a1 /* Undo the temporary resurrection; can't use DECREF here, it would * cause a recursive call. */ @@ -30919,7 +30247,6 @@ static void __Pyx_Generator_del(PyObject *self) { --Py_TYPE(self)->tp_frees; --Py_TYPE(self)->tp_allocs; #endif -#endif } static PyMemberDef __pyx_Generator_memberlist[] = { {(char *) "gi_running", @@ -30963,7 +30290,7 @@ static PyTypeObject __pyx_GeneratorType_type = { 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE, /* tp_flags*/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags*/ 0, /*tp_doc*/ (traverseproc) __Pyx_Generator_traverse, /*tp_traverse*/ 0, /*tp_clear*/ @@ -30989,17 +30316,10 @@ static PyTypeObject __pyx_GeneratorType_type = { 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ -#if PY_VERSION_HEX >= 0x030400a1 - 0, /*tp_del*/ -#else __Pyx_Generator_del, /*tp_del*/ -#endif #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif -#if PY_VERSION_HEX >= 0x030400a1 - __Pyx_Generator_del, /*tp_finalize*/ -#endif }; static __pyx_GeneratorObject *__Pyx_Generator_New(__pyx_generator_body_t body, PyObject *closure) { @@ -31024,10 +30344,10 @@ static __pyx_GeneratorObject *__Pyx_Generator_New(__pyx_generator_body_t body, 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 (__pyx_GeneratorType == NULL) { + if (PyType_Ready(&__pyx_GeneratorType_type)) { return -1; } + __pyx_GeneratorType = &__pyx_GeneratorType_type; return 0; } @@ -31095,7 +30415,7 @@ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class goto bad; if (!PyType_Check(result)) { PyErr_Format(PyExc_TypeError, - "%.200s.%.200s is not a type object", + "%s.%s is not a type object", module_name, class_name); goto bad; } @@ -31123,7 +30443,7 @@ static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class } else if ((size_t)basicsize != size) { PyErr_Format(PyExc_ValueError, - "%.200s.%.200s has the wrong size, try recompiling", + "%s.%s has the wrong size, try recompiling", module_name, class_name); goto bad; } @@ -31150,14 +30470,14 @@ static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (** cobj = PyDict_GetItemString(d, funcname); if (!cobj) { PyErr_Format(PyExc_ImportError, - "%.200s does not export expected C function %.200s", + "%s does not export expected C function %s", PyModule_GetName(module), funcname); goto bad; } #if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3 && PY_MINOR_VERSION==0) if (!PyCapsule_IsValid(cobj, sig)) { PyErr_Format(PyExc_TypeError, - "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)", + "C function %s.%s has wrong signature (expected %s, got %s)", PyModule_GetName(module), funcname, sig, PyCapsule_GetName(cobj)); goto bad; } @@ -31171,7 +30491,7 @@ static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (** 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)", + "C function %s.%s has wrong signature (expected %s, got %s)", PyModule_GetName(module), funcname, sig, desc); goto bad; } @@ -31429,18 +30749,10 @@ static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_ #endif /* PY_VERSION_HEX < 0x03030000 */ } else #endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT */ -#if !CYTHON_COMPILING_IN_PYPY -#if PY_VERSION_HEX >= 0x02060000 - if (PyByteArray_Check(o)) { - *length = PyByteArray_GET_SIZE(o); - return PyByteArray_AS_STRING(o); - } else -#endif -#endif { char* result; int r = PyBytes_AsStringAndSize(o, &result, length); - if (unlikely(r < 0)) { + if (r < 0) { return NULL; } else { return result; @@ -31485,7 +30797,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) { if (!PyLong_Check(res)) { #endif PyErr_Format(PyExc_TypeError, - "__%.4s__ returned non-%.4s (type %.200s)", + "__%s__ returned non-%s (type %.200s)", name, name, Py_TYPE(res)->tp_name); Py_DECREF(res); return NULL; @@ -31497,35 +30809,9 @@ static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) { } return res; } -#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 - #if CYTHON_USE_PYLONG_INTERNALS - #include "longintrepr.h" - #endif -#endif 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))) - return PyInt_AS_LONG(b); -#endif - if (likely(PyLong_CheckExact(b))) { - #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 - #if CYTHON_USE_PYLONG_INTERNALS - switch (Py_SIZE(b)) { - case -1: return -(sdigit)((PyLongObject*)b)->ob_digit[0]; - case 0: return 0; - case 1: return ((PyLongObject*)b)->ob_digit[0]; - } - #endif - #endif - #if PY_VERSION_HEX < 0x02060000 - return PyInt_AsSsize_t(b); - #else - return PyLong_AsSsize_t(b); - #endif - } - x = PyNumber_Index(b); + PyObject* x = PyNumber_Index(b); if (!x) return -1; ival = PyInt_AsSsize_t(x); Py_DECREF(x); @@ -31544,6 +30830,16 @@ static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { return PyInt_FromSize_t(ival); #endif } +static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) { + unsigned PY_LONG_LONG val = __Pyx_PyInt_AsUnsignedLongLong(x); + if (unlikely(val != (unsigned PY_LONG_LONG)(size_t)val)) { + if ((val != (unsigned PY_LONG_LONG)-1) || !PyErr_Occurred()) + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to size_t"); + return (size_t)-1; + } + return (size_t)val; +} #endif /* Py_PYTHON_H */ diff --git a/python/cdec/hypergraph.pxi b/python/cdec/hypergraph.pxi index 91cc8eec..1e0a1903 100644 --- a/python/cdec/hypergraph.pxi +++ b/python/cdec/hypergraph.pxi @@ -48,8 +48,8 @@ cdef class Hypergraph: def kbest(self, size): """hg.kbest(size) -> List of k-best hypotheses in the hypergraph.""" - cdef kbest.KBestDerivations[vector[WordID], kbest.ESentenceTraversal]* derivations = new kbest.KBestDerivations[vector[WordID], kbest.ESentenceTraversal](self.hg[0], size) - cdef kbest.KBestDerivations[vector[WordID], kbest.ESentenceTraversal].Derivation* derivation + cdef kbest.KBestDerivations[vector[WordID], kbest.ESentenceTraversal, kbest.NoFilter[vector[int]]]* derivations = new kbest.KBestDerivations[vector[WordID], kbest.ESentenceTraversal, kbest.NoFilter[vector[int]]](self.hg[0], size) + cdef kbest.KBestDerivations[vector[WordID], kbest.ESentenceTraversal, kbest.NoFilter[vector[int]]].Derivation* derivation cdef unsigned k try: for k in range(size): @@ -60,11 +60,11 @@ cdef class Hypergraph: del derivations def kbest_trees(self, size): - """hg.kbest_trees(size) -> List of k-best trees in the hypergraph.""" - cdef kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal]* f_derivations = new kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal](self.hg[0], size) - cdef kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal].Derivation* f_derivation - cdef kbest.KBestDerivations[vector[WordID], kbest.ETreeTraversal]* e_derivations = new kbest.KBestDerivations[vector[WordID], kbest.ETreeTraversal](self.hg[0], size) - cdef kbest.KBestDerivations[vector[WordID], kbest.ETreeTraversal].Derivation* e_derivation + """hg.kbest_trees(size) -> List of k-best trees in the hypergrapt.NoFilter.""" + cdef kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal, kbest.NoFilter[vector[int]]]* f_derivations = new kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal, kbest.NoFilter[vector[int]]](self.hg[0], size) + cdef kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal, kbest.NoFilter[vector[int]]].Derivation* f_derivation + cdef kbest.KBestDerivations[vector[WordID], kbest.ETreeTraversal, kbest.NoFilter[vector[int]]]* e_derivations = new kbest.KBestDerivations[vector[WordID], kbest.ETreeTraversal, kbest.NoFilter[vector[int]]](self.hg[0], size) + cdef kbest.KBestDerivations[vector[WordID], kbest.ETreeTraversal, kbest.NoFilter[vector[int]]].Derivation* e_derivation cdef unsigned k try: for k in range(size): @@ -80,8 +80,56 @@ cdef class Hypergraph: def kbest_features(self, size): """hg.kbest_trees(size) -> List of k-best feature vectors in the hypergraph.""" - cdef kbest.KBestDerivations[FastSparseVector[weight_t], kbest.FeatureVectorTraversal]* derivations = new kbest.KBestDerivations[FastSparseVector[weight_t], kbest.FeatureVectorTraversal](self.hg[0], size) - cdef kbest.KBestDerivations[FastSparseVector[weight_t], kbest.FeatureVectorTraversal].Derivation* derivation + cdef kbest.KBestDerivations[FastSparseVector[weight_t], kbest.FeatureVectorTraversal, kbest.NoFilter[FastSparseVector[double]]]* derivations = new kbest.KBestDerivations[FastSparseVector[weight_t], kbest.FeatureVectorTraversal, kbest.NoFilter[FastSparseVector[double]]](self.hg[0], size) + cdef kbest.KBestDerivations[FastSparseVector[weight_t], kbest.FeatureVectorTraversal, kbest.NoFilter[FastSparseVector[double]]].Derivation* derivation + cdef SparseVector fmap + cdef unsigned k + try: + for k in range(size): + derivation = derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) + if not derivation: break + fmap = SparseVector.__new__(SparseVector) + fmap.vector = new FastSparseVector[weight_t](derivation._yield) + yield fmap + finally: + del derivations + + def unique_kbest(self, size): + """hg.kbest(size) -> List of unique k-best hypotheses in the hypergraph.""" + cdef kbest.KBestDerivations[vector[WordID], kbest.ESentenceTraversal, kbest.FilterUnique]* derivations = new kbest.KBestDerivations[vector[WordID], kbest.ESentenceTraversal, kbest.FilterUnique](self.hg[0], size) + cdef kbest.KBestDerivations[vector[WordID], kbest.ESentenceTraversal, kbest.FilterUnique].Derivation* derivation + cdef unsigned k + try: + for k in range(size): + derivation = derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) + if not derivation: break + yield unicode(GetString(derivation._yield).c_str(), 'utf8') + finally: + del derivations + + def unique_kbest_trees(self, size): + """hg.kbest_trees(size) -> List of unique k-best trees in the hypergraph.""" + cdef kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal, kbest.FilterUnique]* f_derivations = new kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal, kbest.FilterUnique](self.hg[0], size) + cdef kbest.KBestDerivations[vector[WordID], kbest.FTreeTraversal, kbest.FilterUnique].Derivation* f_derivation + cdef kbest.KBestDerivations[vector[WordID], kbest.ETreeTraversal, kbest.FilterUnique]* e_derivations = new kbest.KBestDerivations[vector[WordID], kbest.ETreeTraversal, kbest.FilterUnique](self.hg[0], size) + cdef kbest.KBestDerivations[vector[WordID], kbest.ETreeTraversal, kbest.FilterUnique].Derivation* e_derivation + cdef unsigned k + try: + for k in range(size): + f_derivation = f_derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) + e_derivation = e_derivations.LazyKthBest(self.hg.nodes_.size() - 1, k) + if not f_derivation or not e_derivation: break + f_tree = unicode(GetString(f_derivation._yield).c_str(), 'utf8') + e_tree = unicode(GetString(e_derivation._yield).c_str(), 'utf8') + yield (f_tree, e_tree) + finally: + del f_derivations + del e_derivations + + def unique_kbest_features(self, size): + """hg.kbest_trees(size) -> List of unique k-best feature vectors in the hypergraph.""" + cdef kbest.KBestDerivations[FastSparseVector[weight_t], kbest.FeatureVectorTraversal, kbest.NoFilter[FastSparseVector[double]]]* derivations = new kbest.KBestDerivations[FastSparseVector[weight_t], kbest.FeatureVectorTraversal, kbest.NoFilter[FastSparseVector[double]]](self.hg[0], size) + cdef kbest.KBestDerivations[FastSparseVector[weight_t], kbest.FeatureVectorTraversal, kbest.NoFilter[FastSparseVector[double]]].Derivation* derivation cdef SparseVector fmap cdef unsigned k try: diff --git a/python/cdec/kbest.pxd b/python/cdec/kbest.pxd index 44ecfbab..ecf1fc00 100644 --- a/python/cdec/kbest.pxd +++ b/python/cdec/kbest.pxd @@ -13,7 +13,13 @@ cdef extern from "decoder/viterbi.h": pass cdef extern from "decoder/kbest.h" namespace "KBest": - cdef cppclass KBestDerivations[T, Traversal]: + cdef cppclass NoFilter[Dummy]: + pass + + cdef cppclass FilterUnique: + pass + + cdef cppclass KBestDerivations[T, Traversal, Filter]: cppclass Derivation: T _yield "yield" KBestDerivations(Hypergraph& hg, unsigned k) nogil -- cgit v1.2.3 From 4b3038e575a26172c117f6fd3acf902f8bf83e87 Mon Sep 17 00:00:00 2001 From: armatthews Date: Fri, 23 May 2014 01:44:14 -0400 Subject: Added t2s to the list of known pycdec formalisms --- python/cdec/_cdec.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'python/cdec') diff --git a/python/cdec/_cdec.pyx b/python/cdec/_cdec.pyx index 47d0c739..2e4265d4 100644 --- a/python/cdec/_cdec.pyx +++ b/python/cdec/_cdec.pyx @@ -51,7 +51,7 @@ cdef class Decoder: if config_str is None: formalism = config.get('formalism', None) if formalism not in ('scfg', 'fst', 'lextrans', 'pb', - 'csplit', 'tagger', 'lexalign'): + 'csplit', 'tagger', 'lexalign', 't2s'): raise InvalidConfig('formalism "%s" unknown' % formalism) config_str = '\n'.join('%s = %s' % kv for kv in _make_config(config)) cdef istringstream* config_stream = new istringstream(config_str) -- cgit v1.2.3 From fbb5528a6327cfe9abea34b8bc4188f9166ee4e9 Mon Sep 17 00:00:00 2001 From: armatthews Date: Sun, 25 May 2014 21:26:59 -0400 Subject: Make sure SufficientStats constructor gets called --- python/cdec/mteval.pxi | 3 +++ 1 file changed, 3 insertions(+) (limited to 'python/cdec') diff --git a/python/cdec/mteval.pxi b/python/cdec/mteval.pxi index 436a1e01..777ff55a 100644 --- a/python/cdec/mteval.pxi +++ b/python/cdec/mteval.pxi @@ -27,6 +27,9 @@ cdef class SufficientStats: cdef mteval.SufficientStats* stats cdef mteval.EvaluationMetric* metric + def __cinit__(self): + self.stats = new mteval.SufficientStats() + def __dealloc__(self): del self.stats -- cgit v1.2.3